Merge "Stop leaking view during a11y sorting"
diff --git a/Android.bp b/Android.bp
index 6815a0d..1586440 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",
@@ -799,6 +801,40 @@
},
}
+// ==== java proto device library (for test only) ==============================
+java_library {
+ name: "platformprotosnano",
+ proto: {
+ type: "nano",
+ output_params: ["store_unknown_fields=true"],
+ include_dirs: ["external/protobuf/src"],
+ },
+
+ sdk_version: "current",
+ srcs: [
+ "core/proto/**/*.proto",
+ "libs/incident/proto/android/os/**/*.proto",
+ ],
+}
+
+// ==== java proto device library (for test only) ==============================
+java_library {
+ name: "platformprotoslite",
+ proto: {
+ type: "lite",
+ include_dirs: ["external/protobuf/src"],
+ },
+
+ srcs: [
+ "core/proto/**/*.proto",
+ "libs/incident/proto/android/os/**/*.proto",
+ ],
+ // Protos have lots of MissingOverride and similar.
+ errorprone: {
+ javacflags: ["-XepDisableAllChecks"],
+ },
+}
+
// ==== c++ proto device library ==============================
cc_library {
name: "libplatformprotos",
@@ -904,6 +940,7 @@
"core/java/android/os/IHwInterface.java",
"core/java/android/os/DeadObjectException.java",
"core/java/android/os/DeadSystemException.java",
+ "core/java/android/os/NativeHandle.java",
"core/java/android/os/RemoteException.java",
"core/java/android/util/AndroidException.java",
],
@@ -1019,10 +1056,6 @@
":openjdk_javadoc_files",
":non_openjdk_javadoc_files",
":android_icu4j_src_files_for_docs",
- ":gen-ojluni-jaif-annotated-srcs",
- ],
- exclude_srcs: [
- ":annotated_ojluni_files",
],
srcs_lib: "framework",
srcs_lib_whitelist_dirs: frameworks_base_subdirs,
@@ -1036,7 +1069,7 @@
"ext",
"framework",
"voip-common",
- "android.test.mock",
+ "android.test.mock.impl",
],
local_sourcepaths: frameworks_base_subdirs,
html_dirs: [
@@ -1060,99 +1093,6 @@
installable: false,
}
-droiddoc {
- name: "api-stubs-docs",
- defaults: ["api-stubs-default"],
- arg_files: [
- "core/res/AndroidManifest.xml",
- ":api-version-xml",
- "core/java/overview.html",
- ":current-support-api",
- "api/current.txt",
- ],
- api_filename: "public_api.txt",
- removed_api_filename: "removed.txt",
- args: framework_docs_args + " -referenceonly -nodocs",
- check_api: {
- last_released: {
- api_file: ":last-released-public-api",
- removed_api_file: "api/removed.txt",
- args: "-hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
- "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 " +
- "-error 16 -error 17 -error 18 -error 31",
- },
- current: {
- api_file: "api/current.txt",
- removed_api_file: "api/removed.txt",
- args: "-error 2 -error 3 -error 4 -error 5 -error 6 " +
- "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 " +
- "-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 " +
- "-error 25 -error 26 -error 27",
- },
- },
-}
-
-droiddoc {
- name: "system-api-stubs-docs",
- defaults: ["api-stubs-default"],
- arg_files: [
- "core/res/AndroidManifest.xml",
- ":api-version-xml",
- "core/java/overview.html",
- ":current-support-api",
- "api/current.txt",
- ],
- api_tag_name: "SYSTEM",
- api_filename: "system-api.txt",
- removed_api_filename: "system-removed.txt",
- exact_api_filename: "system-exact.txt",
- args: framework_docs_args + " -referenceonly -showAnnotation android.annotation.SystemApi -nodocs",
- check_api: {
- last_released: {
- api_file: ":last-released-system-api",
- removed_api_file: "api/system-removed.txt",
- args: "-hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 " +
- "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 " +
- "-error 16 -error 17 -error 18 -error 31",
- },
- current: {
- api_file: "api/system-current.txt",
- removed_api_file: "api/system-removed.txt",
- args: "-error 2 -error 3 -error 4 -error 5 -error 6 " +
- "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 " +
- "-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 " +
- "-error 25 -error 26 -error 27",
- },
- },
-}
-
-droiddoc {
- name: "test-api-stubs-docs",
- defaults: ["api-stubs-default"],
- arg_files: [
- "core/res/AndroidManifest.xml",
- ":api-version-xml",
- "core/java/overview.html",
- ":current-support-api",
- "api/current.txt",
- ],
- api_tag_name: "TEST",
- api_filename: "test-api.txt",
- removed_api_filename: "test-removed.txt",
- exact_api_filename: "test-exact.txt",
- args: framework_docs_args + " -referenceonly -showAnnotation android.annotation.TestApi -nodocs",
- check_api: {
- current: {
- api_file: "api/test-current.txt",
- removed_api_file: "api/test-removed.txt",
- args: "-error 2 -error 3 -error 4 -error 5 -error 6 " +
- "-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 " +
- "-error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 " +
- "-error 25 -error 26 -error 27",
- },
- },
-}
-
doc_defaults {
name: "framework-docs-default",
srcs: [
@@ -1162,17 +1102,15 @@
":openjdk_javadoc_files",
":non_openjdk_javadoc_files",
":android_icu4j_src_files_for_docs",
- ":gen-ojluni-jaif-annotated-srcs",
"test-mock/src/**/*.java",
"test-runner/src/**/*.java",
],
- exclude_srcs: [
- ":annotated_ojluni_files",
- ],
srcs_lib: "framework",
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",
@@ -1447,6 +1385,7 @@
"core/java/android/os/IHwInterface.java",
"core/java/android/os/DeadObjectException.java",
"core/java/android/os/DeadSystemException.java",
+ "core/java/android/os/NativeHandle.java",
"core/java/android/os/RemoteException.java",
"core/java/android/util/AndroidException.java",
],
@@ -1544,10 +1483,6 @@
":openjdk_javadoc_files",
":non_openjdk_javadoc_files",
":android_icu4j_src_files_for_docs",
- ":gen-ojluni-jaif-annotated-srcs",
- ],
- exclude_srcs: [
- ":annotated_ojluni_files",
],
srcs_lib: "framework",
srcs_lib_whitelist_dirs: frameworks_base_subdirs,
@@ -1561,22 +1496,22 @@
"ext",
"framework",
"voip-common",
- "android.test.mock",
+ "android.test.mock.impl",
],
local_sourcepaths: frameworks_base_subdirs,
installable: false,
metalava_enabled: true,
metalava_annotations_enabled: true,
- metalava_previous_api: ":public-api-for-metalava-annotations",
+ metalava_previous_api: ":last-released-public-api",
metalava_merge_annotations_dirs: [
- "tools/metalava/manual",
+ "metalava-manual",
+ "ojluni-annotated-stubs",
],
}
droiddoc {
- name: "metalava-api-stubs-docs",
+ name: "api-stubs-docs",
defaults: ["metalava-api-stubs-default"],
- api_tag_name: "METALAVA_PUBLIC",
api_filename: "public_api.txt",
private_api_filename: "private.txt",
removed_api_filename: "removed.txt",
@@ -1584,12 +1519,18 @@
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args,
+ check_api: {
+ current: {
+ api_file: "api/current.txt",
+ removed_api_file: "api/removed.txt",
+ },
+ },
}
droiddoc {
- name: "metalava-system-api-stubs-docs",
+ name: "system-api-stubs-docs",
defaults: ["metalava-api-stubs-default"],
- api_tag_name: "METALAVA_SYSTEM",
+ api_tag_name: "SYSTEM",
api_filename: "system-api.txt",
private_api_filename: "system-private.txt",
private_dex_api_filename: "system-private-dex.txt",
@@ -1598,16 +1539,28 @@
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
+ check_api: {
+ current: {
+ api_file: "api/system-current.txt",
+ removed_api_file: "api/system-removed.txt",
+ },
+ },
}
droiddoc {
- name: "metalava-test-api-stubs-docs",
+ name: "test-api-stubs-docs",
defaults: ["metalava-api-stubs-default"],
- api_tag_name: "METALAVA_TEST",
+ api_tag_name: "TEST",
api_filename: "test-api.txt",
removed_api_filename: "test-removed.txt",
arg_files: [
"core/res/AndroidManifest.xml",
],
args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
+ check_api: {
+ current: {
+ api_file: "api/test-current.txt",
+ removed_api_file: "api/test-removed.txt",
+ },
+ },
}
diff --git a/Android.mk b/Android.mk
index edbb94d..29454e4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -321,36 +321,6 @@
$(hide) mkdir -p $(OUT_DOCS)/offline-sdk
( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1
-# ==== java proto device library (for test only) ==============================
-include $(CLEAR_VARS)
-LOCAL_MODULE := platformprotosnano
-LOCAL_MODULE_TAGS := tests
-LOCAL_PROTOC_OPTIMIZE_TYPE := nano
-LOCAL_PROTOC_FLAGS := \
- -Iexternal/protobuf/src
-LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
- store_unknown_fields = true
-LOCAL_SDK_VERSION := current
-LOCAL_SRC_FILES := \
- $(call all-proto-files-under, core/proto) \
- $(call all-proto-files-under, libs/incident/proto/android/os)
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-# ==== java proto device library (for test only) ==============================
-include $(CLEAR_VARS)
-LOCAL_MODULE := platformprotoslite
-LOCAL_MODULE_TAGS := tests
-LOCAL_PROTOC_OPTIMIZE_TYPE := lite
-LOCAL_PROTOC_FLAGS := \
- -Iexternal/protobuf/src
-LOCAL_SRC_FILES := \
- $(call all-proto-files-under, core/proto) \
- $(call all-proto-files-under, libs/incident/proto/android/os)
-# Protos have lots of MissingOverride and similar.
-LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
# ==== hiddenapi lists =======================================
include $(CLEAR_VARS)
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 2df7042..ae42882 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,8 +1,7 @@
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
- -fw core/java/android/
+ -fw core/
graphics/java/android
- core/tests/coretests/src/android/
packages/PrintRecommendationService/
packages/PrintSpooler/
packages/PackageInstaller/
diff --git a/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java b/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
new file mode 100644
index 0000000..9cdeb48
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
@@ -0,0 +1,107 @@
+/*
+ * 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;
+
+import static org.junit.Assert.fail;
+
+import android.content.res.AssetManager;
+import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+import android.support.test.filters.LargeTest;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+
+/**
+ * Benchmarks for {@link android.content.res.Resources}.
+ */
+@LargeTest
+public class ResourcesPerfTest {
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private AssetManager mAsset;
+ private Resources mRes;
+
+ private int mTextId;
+ private int mColorId;
+ private int mIntegerId;
+ private int mLayoutId;
+
+ @Before
+ public void setUp() {
+ mAsset = new AssetManager();
+ mAsset.addAssetPath("/system/framework/framework-res.apk");
+ mRes = new Resources(mAsset, null, null);
+
+ mTextId = mRes.getIdentifier("cancel", "string", "android");
+ mColorId = mRes.getIdentifier("transparent", "color", "android");
+ mIntegerId = mRes.getIdentifier("config_shortAnimTime", "integer", "android");
+ mLayoutId = mRes.getIdentifier("two_line_list_item", "layout", "android");
+ }
+
+ @After
+ public void tearDown() {
+ mAsset.close();
+ }
+
+ @Test
+ public void getText() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mRes.getText(mTextId);
+ }
+ }
+
+ @Test
+ public void getColor() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mRes.getColor(mColorId, null);
+ }
+ }
+
+ @Test
+ public void getInteger() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mRes.getInteger(mIntegerId);
+ }
+ }
+
+ @Test
+ public void getLayoutAndTravese() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ try (XmlResourceParser parser = mRes.getLayout(mLayoutId)) {
+ while (parser.next() != XmlPullParser.END_DOCUMENT) {
+ // Walk the entire tree
+ }
+ } catch (IOException | XmlPullParserException exception) {
+ fail("Parsing of the layout failed. Something is really broken");
+ }
+ }
+ }
+}
diff --git a/api/current.txt b/api/current.txt
index d70d1e7..fc595ac 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -11,6 +11,7 @@
field public static final java.lang.String ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
field public static final java.lang.String ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
field public static final java.lang.String ACCESS_LOCATION_EXTRA_COMMANDS = "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS";
+ field public static final java.lang.String ACCESS_MEDIA_LOCATION = "android.permission.ACCESS_MEDIA_LOCATION";
field public static final java.lang.String ACCESS_NETWORK_STATE = "android.permission.ACCESS_NETWORK_STATE";
field public static final java.lang.String ACCESS_NOTIFICATION_POLICY = "android.permission.ACCESS_NOTIFICATION_POLICY";
field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
@@ -101,10 +102,13 @@
field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR";
field public static final java.lang.String READ_CALL_LOG = "android.permission.READ_CALL_LOG";
field public static final java.lang.String READ_CONTACTS = "android.permission.READ_CONTACTS";
- field public static final java.lang.String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
+ field public static final deprecated java.lang.String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
field public static final java.lang.String READ_FRAME_BUFFER = "android.permission.READ_FRAME_BUFFER";
field public static final deprecated java.lang.String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
field public static final java.lang.String READ_LOGS = "android.permission.READ_LOGS";
+ field public static final java.lang.String READ_MEDIA_AUDIO = "android.permission.READ_MEDIA_AUDIO";
+ field public static final java.lang.String READ_MEDIA_IMAGES = "android.permission.READ_MEDIA_IMAGES";
+ field public static final java.lang.String READ_MEDIA_VIDEO = "android.permission.READ_MEDIA_VIDEO";
field public static final java.lang.String READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
field public static final java.lang.String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
field public static final java.lang.String READ_SMS = "android.permission.READ_SMS";
@@ -151,8 +155,11 @@
field public static final java.lang.String WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
field public static final java.lang.String WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
field public static final java.lang.String WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
- field public static final java.lang.String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
+ field public static final deprecated java.lang.String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
+ field public static final java.lang.String WRITE_MEDIA_AUDIO = "android.permission.WRITE_MEDIA_AUDIO";
+ field public static final java.lang.String WRITE_MEDIA_IMAGES = "android.permission.WRITE_MEDIA_IMAGES";
+ field public static final java.lang.String WRITE_MEDIA_VIDEO = "android.permission.WRITE_MEDIA_VIDEO";
field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
field public static final java.lang.String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
field public static final java.lang.String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
@@ -166,11 +173,13 @@
field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
field public static final java.lang.String CONTACTS = "android.permission-group.CONTACTS";
field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
+ field public static final java.lang.String MEDIA_AURAL = "android.permission-group.MEDIA_AURAL";
+ field public static final java.lang.String MEDIA_VISUAL = "android.permission-group.MEDIA_VISUAL";
field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final java.lang.String PHONE = "android.permission-group.PHONE";
field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
field public static final java.lang.String SMS = "android.permission-group.SMS";
- field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
+ field public static final deprecated java.lang.String STORAGE = "android.permission-group.STORAGE";
}
public final class R {
@@ -1323,7 +1332,7 @@
field public static final int targetName = 16843853; // 0x101044d
field public static final int targetPackage = 16842785; // 0x1010021
field public static final int targetProcesses = 16844097; // 0x1010541
- field public static final int targetSandboxVersion = 16844108; // 0x101054c
+ field public static final deprecated int targetSandboxVersion = 16844108; // 0x101054c
field public static final int targetSdkVersion = 16843376; // 0x1010270
field public static final int taskAffinity = 16842770; // 0x1010012
field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
@@ -11241,6 +11250,7 @@
method public abstract boolean hasSystemFeature(java.lang.String, int);
method public abstract boolean isInstantApp();
method public abstract boolean isInstantApp(java.lang.String);
+ method public boolean isPackageSuspended(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public boolean isPackageSuspended();
method public abstract boolean isPermissionRevokedByPolicy(java.lang.String, java.lang.String);
method public abstract boolean isSafeMode();
@@ -15180,7 +15190,7 @@
package android.graphics.fonts {
- public class Font {
+ public final class Font {
method public android.graphics.fonts.FontVariationAxis[] getAxes();
method public int getTtcIndex();
method public int getWeight();
@@ -15198,12 +15208,12 @@
public static class Font.Builder {
ctor public Font.Builder(java.nio.ByteBuffer);
- ctor public Font.Builder(java.io.File) throws java.io.IOException;
- ctor public Font.Builder(java.io.FileDescriptor) throws java.io.IOException;
- ctor public Font.Builder(java.io.FileDescriptor, long, long) throws java.io.IOException;
- ctor public Font.Builder(android.content.res.AssetManager, java.lang.String) throws java.io.IOException;
- ctor public Font.Builder(android.content.res.Resources, int) throws java.io.IOException;
- method public android.graphics.fonts.Font build();
+ ctor public Font.Builder(java.io.File);
+ ctor public Font.Builder(java.io.FileDescriptor);
+ ctor public Font.Builder(java.io.FileDescriptor, long, long);
+ ctor public Font.Builder(android.content.res.AssetManager, java.lang.String);
+ ctor public Font.Builder(android.content.res.Resources, int);
+ method public android.graphics.fonts.Font build() throws java.io.IOException;
method public android.graphics.fonts.Font.Builder setFontVariationSettings(java.lang.String);
method public android.graphics.fonts.Font.Builder setFontVariationSettings(android.graphics.fonts.FontVariationAxis[]);
method public android.graphics.fonts.Font.Builder setItalic(boolean);
@@ -15211,9 +15221,9 @@
method public android.graphics.fonts.Font.Builder setWeight(int);
}
- public class FontFamily {
+ public final class FontFamily {
method public android.graphics.fonts.Font getFont(int);
- method public int getFontCount();
+ method public int getSize();
}
public static class FontFamily.Builder {
@@ -27716,6 +27726,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 +35632,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 +35658,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 +35766,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 +35777,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 {
@@ -38994,6 +39005,7 @@
public static class CustomDescription.Builder {
ctor public CustomDescription.Builder(android.widget.RemoteViews);
method public android.service.autofill.CustomDescription.Builder addChild(int, android.service.autofill.Transformation);
+ method public android.service.autofill.CustomDescription.Builder addOnClickAction(int, android.service.autofill.OnClickAction);
method public android.service.autofill.CustomDescription.Builder batchUpdate(android.service.autofill.Validator, android.service.autofill.BatchUpdates);
method public android.service.autofill.CustomDescription build();
}
@@ -39084,6 +39096,7 @@
method public int getId();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.service.autofill.FillRequest> CREATOR;
+ field public static final int FLAG_COMPATIBILITY_MODE_REQUEST = 2; // 0x2
field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1
}
@@ -39131,6 +39144,9 @@
field public static final android.os.Parcelable.Creator<android.service.autofill.LuhnChecksumValidator> CREATOR;
}
+ public abstract interface OnClickAction {
+ }
+
public final class RegexValidator implements android.os.Parcelable android.service.autofill.Validator {
ctor public RegexValidator(android.view.autofill.AutofillId, java.util.regex.Pattern);
method public int describeContents();
@@ -39151,6 +39167,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
@@ -39225,6 +39242,18 @@
method public static android.service.autofill.Validator or(android.service.autofill.Validator...);
}
+ public final class VisibilitySetterAction implements android.service.autofill.OnClickAction android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.service.autofill.VisibilitySetterAction> CREATOR;
+ }
+
+ public static class VisibilitySetterAction.Builder {
+ ctor public VisibilitySetterAction.Builder(int, int);
+ method public android.service.autofill.VisibilitySetterAction build();
+ method public android.service.autofill.VisibilitySetterAction.Builder setVisibility(int, int);
+ }
+
}
package android.service.carrier {
@@ -42538,9 +42567,11 @@
method public deprecated int getMnc();
method public java.lang.String getMncString();
method public java.lang.String getNumber();
+ method public int getParentSubId();
method public int getSimSlotIndex();
method public int getSubscriptionId();
method public boolean isEmbedded();
+ method public boolean isOpportunistic();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.SubscriptionInfo> CREATOR;
}
@@ -42565,6 +42596,7 @@
method public void setSubscriptionOverrideCongested(int, boolean, long);
method public void setSubscriptionOverrideUnmetered(int, boolean, long);
method public void setSubscriptionPlans(int, java.util.List<android.telephony.SubscriptionPlan>);
+ method public void switchToSubscription(int, android.app.PendingIntent);
field public static final java.lang.String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED = "android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED";
field public static final java.lang.String ACTION_DEFAULT_SUBSCRIPTION_CHANGED = "android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED";
field public static final java.lang.String ACTION_MANAGE_SUBSCRIPTION_PLANS = "android.telephony.action.MANAGE_SUBSCRIPTION_PLANS";
@@ -46496,7 +46528,7 @@
method public final deprecated boolean dispatch(android.view.KeyEvent.Callback);
method public final boolean dispatch(android.view.KeyEvent.Callback, android.view.KeyEvent.DispatcherState, java.lang.Object);
method public final int getAction();
- method public final java.lang.String getCharacters();
+ method public final deprecated java.lang.String getCharacters();
method public static int getDeadChar(int, int);
method public final int getDeviceId();
method public char getDisplayLabel();
@@ -46545,7 +46577,7 @@
method public final void startTracking();
method public void writeToParcel(android.os.Parcel, int);
field public static final int ACTION_DOWN = 0; // 0x0
- field public static final int ACTION_MULTIPLE = 2; // 0x2
+ field public static final deprecated int ACTION_MULTIPLE = 2; // 0x2
field public static final int ACTION_UP = 1; // 0x1
field public static final android.os.Parcelable.Creator<android.view.KeyEvent> CREATOR;
field public static final int FLAG_CANCELED = 32; // 0x20
@@ -47618,6 +47650,7 @@
method public void forceLayout();
method public static int generateViewId();
method public java.lang.CharSequence getAccessibilityClassName();
+ method public android.view.View.AccessibilityDelegate getAccessibilityDelegate();
method public int getAccessibilityLiveRegion();
method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider();
method public java.lang.CharSequence getAccessibilityPaneTitle();
@@ -57736,14 +57769,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/system-current.txt b/api/system-current.txt
index 01f4709..d9befc7 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -201,6 +201,7 @@
field public static final java.lang.String WRITE_EMBEDDED_SUBSCRIPTIONS = "android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS";
field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
field public static final java.lang.String WRITE_MEDIA_STORAGE = "android.permission.WRITE_MEDIA_STORAGE";
+ field public static final java.lang.String WRITE_OBB = "android.permission.WRITE_OBB";
field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
}
@@ -1115,7 +1116,6 @@
method public abstract void grantRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
method public abstract int installExistingPackage(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract int installExistingPackage(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
- method public boolean isPackageSuspended(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceiversAsUser(android.content.Intent, int, android.os.UserHandle);
method public abstract void registerDexModule(java.lang.String, android.content.pm.PackageManager.DexModuleRegisterCallback);
method public abstract void removeOnPermissionsChangeListener(android.content.pm.PackageManager.OnPermissionsChangedListener);
@@ -3835,6 +3835,7 @@
method public final void putInt64Array(long, long[]);
method public final void putInt8(long, byte);
method public final void putInt8Array(long, byte[]);
+ method public final void putNativeHandle(long, android.os.NativeHandle);
method public final void putString(long, java.lang.String);
method public static java.lang.Boolean[] wrapArray(boolean[]);
method public static java.lang.Long[] wrapArray(long[]);
@@ -3854,6 +3855,7 @@
method public final double readDouble();
method public final java.util.ArrayList<java.lang.Double> readDoubleVector();
method public final android.os.HwBlob readEmbeddedBuffer(long, long, long, boolean);
+ method public final android.os.NativeHandle readEmbeddedNativeHandle(long, long);
method public final float readFloat();
method public final java.util.ArrayList<java.lang.Float> readFloatVector();
method public final short readInt16();
@@ -3864,6 +3866,8 @@
method public final java.util.ArrayList<java.lang.Long> readInt64Vector();
method public final byte readInt8();
method public final java.util.ArrayList<java.lang.Byte> readInt8Vector();
+ method public final android.os.NativeHandle readNativeHandle();
+ method public final java.util.ArrayList<android.os.NativeHandle> readNativeHandleVector();
method public final java.lang.String readString();
method public final java.util.ArrayList<java.lang.String> readStringVector();
method public final android.os.IHwBinder readStrongBinder();
@@ -3887,6 +3891,8 @@
method public final void writeInt8(byte);
method public final void writeInt8Vector(java.util.ArrayList<java.lang.Byte>);
method public final void writeInterfaceToken(java.lang.String);
+ method public final void writeNativeHandle(android.os.NativeHandle);
+ method public final void writeNativeHandleVector(java.util.ArrayList<android.os.NativeHandle>);
method public final void writeStatus(int);
method public final void writeString(java.lang.String);
method public final void writeStringVector(java.util.ArrayList<java.lang.String>);
@@ -3932,6 +3938,18 @@
field public static final android.os.Parcelable.Creator<android.os.IncidentReportArgs> CREATOR;
}
+ public final class NativeHandle implements java.io.Closeable {
+ ctor public NativeHandle();
+ ctor public NativeHandle(java.io.FileDescriptor, boolean);
+ ctor public NativeHandle(java.io.FileDescriptor[], int[], boolean);
+ method public void close() throws java.io.IOException;
+ method public android.os.NativeHandle dup() throws java.io.IOException;
+ method public java.io.FileDescriptor getFileDescriptor();
+ method public java.io.FileDescriptor[] getFileDescriptors();
+ method public int[] getInts();
+ method public boolean hasSingleFileDescriptor();
+ }
+
public final class PowerManager {
method public void userActivity(long, int, int);
field public static final int USER_ACTIVITY_EVENT_ACCESSIBILITY = 3; // 0x3
@@ -4371,7 +4389,10 @@
field public static final java.lang.String AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE = "autofill_user_data_max_user_data_size";
field public static final java.lang.String AUTOFILL_USER_DATA_MAX_VALUE_LENGTH = "autofill_user_data_max_value_length";
field public static final java.lang.String AUTOFILL_USER_DATA_MIN_VALUE_LENGTH = "autofill_user_data_min_value_length";
+ field public static final java.lang.String HUSH_GESTURE_USED = "hush_gesture_used";
field public static final java.lang.String INSTANT_APPS_ENABLED = "instant_apps_enabled";
+ field public static final java.lang.String MANUAL_RINGER_TOGGLE_COUNT = "manual_ringer_toggle_count";
+ field public static final java.lang.String VOLUME_HUSH_GESTURE = "volume_hush_gesture";
}
public final class TimeZoneRulesDataContract {
@@ -4665,6 +4686,7 @@
method public int getUser();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR;
+ field public static final java.lang.String KEY_IMPORTANCE = "key_importance";
field public static final java.lang.String KEY_PEOPLE = "key_people";
field public static final java.lang.String KEY_SMART_ACTIONS = "key_smart_actions";
field public static final java.lang.String KEY_SMART_REPLIES = "key_smart_replies";
@@ -4699,7 +4721,8 @@
method public final void adjustNotification(android.service.notification.Adjustment);
method public final void adjustNotifications(java.util.List<android.service.notification.Adjustment>);
method public final android.os.IBinder onBind(android.content.Intent);
- method public abstract android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+ method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+ method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, android.app.NotificationChannel);
method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap, android.service.notification.NotificationStats, int);
method public abstract void onNotificationSnoozedUntilContext(android.service.notification.StatusBarNotification, java.lang.String);
method public final void unsnoozeNotification(java.lang.String);
@@ -5941,6 +5964,7 @@
field public static final int CODE_SIP_SERVER_TIMEOUT = 353; // 0x161
field public static final int CODE_SIP_SERVICE_UNAVAILABLE = 352; // 0x160
field public static final int CODE_SIP_TEMPRARILY_UNAVAILABLE = 336; // 0x150
+ field public static final int CODE_SIP_TRANSACTION_DOES_NOT_EXIST = 343; // 0x157
field public static final int CODE_SIP_USER_REJECTED = 361; // 0x169
field public static final int CODE_SUPP_SVC_CANCELLED = 1202; // 0x4b2
field public static final int CODE_SUPP_SVC_FAILED = 1201; // 0x4b1
@@ -6039,12 +6063,16 @@
ctor public ImsSsInfo(int, java.lang.String);
method public int describeContents();
method public java.lang.String getIcbNum();
+ method public int getProvisionStatus();
method public int getStatus();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsInfo> CREATOR;
field public static final int DISABLED = 0; // 0x0
field public static final int ENABLED = 1; // 0x1
field public static final int NOT_REGISTERED = -1; // 0xffffffff
+ field public static final int SERVICE_NOT_PROVISIONED = 0; // 0x0
+ field public static final int SERVICE_PROVISIONED = 1; // 0x1
+ field public static final int SERVICE_PROVISIONING_UNKNOWN = -1; // 0xffffffff
}
public final class ImsStreamMediaProfile implements android.os.Parcelable {
diff --git a/api/test-current.txt b/api/test-current.txt
index 9dc61ee..1657de5 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -8,6 +8,8 @@
field public static final java.lang.String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS";
field public static final java.lang.String MANAGE_ACTIVITY_STACKS = "android.permission.MANAGE_ACTIVITY_STACKS";
field public static final java.lang.String READ_CELL_BROADCASTS = "android.permission.READ_CELL_BROADCASTS";
+ field public static final java.lang.String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES";
+ field public static final java.lang.String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
}
}
@@ -30,6 +32,8 @@
method public long getTotalRam();
method public int getUidImportance(int);
method public void removeOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener);
+ method public void forceStopPackage(java.lang.String);
+ method public void scheduleApplicationInfoChanged(java.util.List<java.lang.String>, int);
}
public static abstract interface ActivityManager.OnUidImportanceListener {
@@ -56,6 +60,14 @@
method public void setTaskWindowingModeSplitScreenPrimary(int, int, boolean, boolean, android.graphics.Rect, boolean) throws java.lang.SecurityException;
method public static boolean supportsMultiWindow(android.content.Context);
method public static boolean supportsSplitScreenMultiWindow(android.content.Context);
+ method public boolean moveTopActivityToPinnedStack(int, android.graphics.Rect);
+ method public void startSystemLockTaskMode(int);
+ method public void stopSystemLockTaskMode();
+ method public void moveTaskToStack(int, int, boolean);
+ method public void resizeStack(int, android.graphics.Rect, boolean);
+ method public void resizeTask(int, android.graphics.Rect);
+ method public void resizeDockedStack(android.graphics.Rect,android.graphics.Rect);
+ method public java.lang.String listAllStacks();
field public static final int INVALID_STACK_ID = -1; // 0xffffffff
field public static final int SPLIT_SCREEN_CREATE_MODE_BOTTOM_OR_RIGHT = 1; // 0x1
field public static final int SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT = 0; // 0x0
@@ -228,6 +240,14 @@
}
+package android.bluetooth {
+
+ public final class BluetoothClass implements android.os.Parcelable {
+ method public int getClassOfDevice();
+ }
+
+}
+
package android.content {
public abstract class ContentResolver {
@@ -978,6 +998,10 @@
method public void apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int) throws java.lang.Exception;
}
+ public final class CustomDescription implements android.os.Parcelable {
+ method public android.util.SparseArray<android.service.autofill.InternalOnClickAction> getActions();
+ }
+
public final class DateTransformation extends android.service.autofill.InternalTransformation implements android.os.Parcelable android.service.autofill.Transformation {
method public void apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int) throws java.lang.Exception;
}
@@ -994,6 +1018,11 @@
method public void apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int) throws java.lang.Exception;
}
+ public abstract class InternalOnClickAction implements android.service.autofill.OnClickAction android.os.Parcelable {
+ ctor public InternalOnClickAction();
+ method public abstract void onClick(android.view.ViewGroup);
+ }
+
public abstract class InternalSanitizer implements android.os.Parcelable android.service.autofill.Sanitizer {
ctor public InternalSanitizer();
}
@@ -1024,6 +1053,10 @@
method public abstract android.view.autofill.AutofillValue findRawValueByAutofillId(android.view.autofill.AutofillId);
}
+ public final class VisibilitySetterAction extends android.service.autofill.InternalOnClickAction implements android.service.autofill.OnClickAction android.os.Parcelable {
+ method public void onClick(android.view.ViewGroup);
+ }
+
}
package android.service.notification {
@@ -1039,6 +1072,7 @@
method public int getUser();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR;
+ field public static final java.lang.String KEY_IMPORTANCE = "key_importance";
field public static final java.lang.String KEY_PEOPLE = "key_people";
field public static final java.lang.String KEY_SMART_ACTIONS = "key_smart_actions";
field public static final java.lang.String KEY_SMART_REPLIES = "key_smart_replies";
@@ -1055,7 +1089,8 @@
method public final void adjustNotification(android.service.notification.Adjustment);
method public final void adjustNotifications(java.util.List<android.service.notification.Adjustment>);
method public final android.os.IBinder onBind(android.content.Intent);
- method public abstract android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+ method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+ method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, android.app.NotificationChannel);
method public abstract void onNotificationSnoozedUntilContext(android.service.notification.StatusBarNotification, java.lang.String);
method public final void unsnoozeNotification(java.lang.String);
field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService";
@@ -1446,19 +1481,28 @@
public final class MotionEvent extends android.view.InputEvent implements android.os.Parcelable {
method public void setActionButton(int);
method public void setButtonState(int);
+ method public void setDisplayId(int);
}
public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
method public android.view.View getTooltipView();
method public static boolean isDefaultFocusHighlightEnabled();
method public boolean isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
+ method protected void resetResolvedDrawables();
+ method public void resetResolvedLayoutDirection();
+ method public void resetResolvedPadding();
+ method public void resetResolvedTextAlignment();
+ method public void resetResolvedTextDirection();
+ method public void resetRtlProperties();
method public boolean restoreFocusInCluster(int);
method public boolean restoreFocusNotInCluster();
method public void setAutofilled(boolean);
method public final void setFocusedInCluster();
+ method public void setIsRootNamespace(boolean);
}
public class ViewConfiguration {
+ method public long getDeviceGlobalActionKeyTimeout();
method public static int getHoverTooltipHideShortTimeout();
method public static int getHoverTooltipHideTimeout();
method public static int getHoverTooltipShowTimeout();
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 641ae00..a826ec7 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,8 +843,9 @@
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(" bmgr init TRANSPORT...");
System.err.println("");
System.err.println("The 'backup' command schedules a backup pass for the named package.");
System.err.println("Note that the backup pass will effectively be a no-op if the package");
@@ -878,9 +898,168 @@
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("");
System.err.println("The 'cancel backups' command cancels all running backups.");
+ System.err.println("");
+ System.err.println("The 'init' command initializes the given transports, wiping all data");
+ System.err.println("from their backing data stores.");
+ }
+
+ 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/hid/jni/com_android_commands_hid_Device.cpp b/cmds/hid/jni/com_android_commands_hid_Device.cpp
index 5cc4fc4..b3e287b 100644
--- a/cmds/hid/jni/com_android_commands_hid_Device.cpp
+++ b/cmds/hid/jni/com_android_commands_hid_Device.cpp
@@ -42,7 +42,6 @@
namespace uhid {
static const char* UHID_PATH = "/dev/uhid";
-static const size_t UHID_MAX_NAME_LENGTH = 128;
static struct {
jmethodID onDeviceOpen;
@@ -90,8 +89,13 @@
}
Device* Device::open(int32_t id, const char* name, int32_t vid, int32_t pid,
- std::unique_ptr<uint8_t[]> descriptor, size_t descriptorSize,
- std::unique_ptr<DeviceCallback> callback) {
+ std::vector<uint8_t> descriptor, std::unique_ptr<DeviceCallback> callback) {
+
+ size_t size = descriptor.size();
+ if (size > HID_MAX_DESCRIPTOR_SIZE) {
+ LOGE("Received invalid hid report with descriptor size %zu, skipping", size);
+ return nullptr;
+ }
int fd = ::open(UHID_PATH, O_RDWR | O_CLOEXEC);
if (fd < 0) {
@@ -102,10 +106,10 @@
struct uhid_event ev;
memset(&ev, 0, sizeof(ev));
ev.type = UHID_CREATE2;
- strncpy((char*)ev.u.create2.name, name, UHID_MAX_NAME_LENGTH);
- memcpy(&ev.u.create2.rd_data, descriptor.get(),
- descriptorSize * sizeof(ev.u.create2.rd_data[0]));
- ev.u.create2.rd_size = descriptorSize;
+ strlcpy(reinterpret_cast<char*>(ev.u.create2.name), name, sizeof(ev.u.create2.name));
+ memcpy(&ev.u.create2.rd_data, descriptor.data(),
+ size * sizeof(ev.u.create2.rd_data[0]));
+ ev.u.create2.rd_size = size;
ev.u.create2.bus = BUS_BLUETOOTH;
ev.u.create2.vendor = vid;
ev.u.create2.product = pid;
@@ -156,12 +160,17 @@
mFd = -1;
}
-void Device::sendReport(uint8_t* report, size_t reportSize) {
+void Device::sendReport(const std::vector<uint8_t>& report) const {
+ if (report.size() > UHID_DATA_MAX) {
+ LOGE("Received invalid report of size %zu, skipping", report.size());
+ return;
+ }
+
struct uhid_event ev;
memset(&ev, 0, sizeof(ev));
ev.type = UHID_INPUT2;
- ev.u.input2.size = reportSize;
- memcpy(&ev.u.input2.data, report, reportSize);
+ ev.u.input2.size = report.size();
+ memcpy(&ev.u.input2.data, report.data(), report.size() * sizeof(ev.u.input2.data[0]));
ssize_t ret = TEMP_FAILURE_RETRY(::write(mFd, &ev, sizeof(ev)));
if (ret < 0 || ret != sizeof(ev)) {
LOGE("Failed to send hid event: %s", strerror(errno));
@@ -191,12 +200,13 @@
} // namespace uhid
-std::unique_ptr<uint8_t[]> getData(JNIEnv* env, jbyteArray javaArray, size_t& outSize) {
+std::vector<uint8_t> getData(JNIEnv* env, jbyteArray javaArray) {
ScopedByteArrayRO scopedArray(env, javaArray);
- outSize = scopedArray.size();
- std::unique_ptr<uint8_t[]> data(new uint8_t[outSize]);
- for (size_t i = 0; i < outSize; i++) {
- data[i] = static_cast<uint8_t>(scopedArray[i]);
+ size_t size = scopedArray.size();
+ std::vector<uint8_t> data;
+ data.reserve(size);
+ for (size_t i = 0; i < size; i++) {
+ data.push_back(static_cast<uint8_t>(scopedArray[i]));
}
return data;
}
@@ -208,23 +218,20 @@
return 0;
}
- size_t size;
- std::unique_ptr<uint8_t[]> desc = getData(env, rawDescriptor, size);
+ std::vector<uint8_t> desc = getData(env, rawDescriptor);
std::unique_ptr<uhid::DeviceCallback> cb(new uhid::DeviceCallback(env, callback));
uhid::Device* d = uhid::Device::open(
- id, reinterpret_cast<const char*>(name.c_str()), vid, pid,
- std::move(desc), size, std::move(cb));
+ id, reinterpret_cast<const char*>(name.c_str()), vid, pid, desc, std::move(cb));
return reinterpret_cast<jlong>(d);
}
static void sendReport(JNIEnv* env, jclass /* clazz */, jlong ptr, jbyteArray rawReport) {
- size_t size;
- std::unique_ptr<uint8_t[]> report = getData(env, rawReport, size);
+ std::vector<uint8_t> report = getData(env, rawReport);
uhid::Device* d = reinterpret_cast<uhid::Device*>(ptr);
if (d) {
- d->sendReport(report.get(), size);
+ d->sendReport(report);
} else {
LOGE("Could not send report, Device* is null!");
}
diff --git a/cmds/hid/jni/com_android_commands_hid_Device.h b/cmds/hid/jni/com_android_commands_hid_Device.h
index 149456d..61a1f76 100644
--- a/cmds/hid/jni/com_android_commands_hid_Device.h
+++ b/cmds/hid/jni/com_android_commands_hid_Device.h
@@ -15,6 +15,7 @@
*/
#include <memory>
+#include <vector>
#include <jni.h>
@@ -38,13 +39,12 @@
class Device {
public:
static Device* open(int32_t id, const char* name, int32_t vid, int32_t pid,
- std::unique_ptr<uint8_t[]> descriptor, size_t descriptorSize,
- std::unique_ptr<DeviceCallback> callback);
+ std::vector<uint8_t> descriptor, std::unique_ptr<DeviceCallback> callback);
Device(int32_t id, int fd, std::unique_ptr<DeviceCallback> callback);
~Device();
- void sendReport(uint8_t* report, size_t reportSize);
+ void sendReport(const std::vector<uint8_t>& report) const;
void close();
int handleEvents(int events);
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/PageTypeInfoParser.cpp b/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp
index 0615c74..2a89c920 100644
--- a/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp
+++ b/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp
@@ -75,18 +75,13 @@
} else return BAD_VALUE;
// expect part 2 starts with "type"
if (stripPrefix(&record[2], "type")) {
- // expect the rest of part 2 has number of (pageBlockOrder + 2) parts
// An example looks like:
// header line: type 0 1 2 3 4 5 6 7 8 9 10
// record line: Unmovable 426 279 226 1 1 1 0 0 2 2 0
- // The pageBlockOrder = 10 and it's zero-indexed. so total parts
- // are 10 + 1(zero-indexed) + 1(the type part) = 12.
record_t pageCounts = parseRecord(record[2]);
- int pageCountsSize = pageBlockOrder + 2;
- if ((int)pageCounts.size() != pageCountsSize) return BAD_VALUE;
proto.write(PageTypeInfoProto::MigrateType::TYPE, pageCounts[0]);
- for (auto i=1; i<pageCountsSize; i++) {
+ for (size_t i=1; i<pageCounts.size(); i++) {
proto.write(PageTypeInfoProto::MigrateType::FREE_PAGES_COUNT, toInt(pageCounts[i]));
}
} else return BAD_VALUE;
@@ -125,4 +120,4 @@
fprintf(stderr, "[%s]Proto size: %zu bytes\n", this->name.string(), proto.size());
return NO_ERROR;
-}
\ No newline at end of file
+}
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/incident_helper/testdata/pagetypeinfo.txt b/cmds/incident_helper/testdata/pagetypeinfo.txt
index d45ddc4..c65b5a1 100644
--- a/cmds/incident_helper/testdata/pagetypeinfo.txt
+++ b/cmds/incident_helper/testdata/pagetypeinfo.txt
@@ -1,5 +1,5 @@
-Page block order: 10
-Pages per block: 1024
+Page block order: 9
+Pages per block: 512
Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10
Node 0, zone DMA, type Unmovable 426 279 226 1 1 1 0 0 2 2 0
diff --git a/cmds/incident_helper/tests/PageTypeInfoParser_test.cpp b/cmds/incident_helper/tests/PageTypeInfoParser_test.cpp
index 9bad7be..5688681 100644
--- a/cmds/incident_helper/tests/PageTypeInfoParser_test.cpp
+++ b/cmds/incident_helper/tests/PageTypeInfoParser_test.cpp
@@ -54,8 +54,8 @@
PageTypeInfoParser parser;
PageTypeInfoProto expected;
- expected.set_page_block_order(10);
- expected.set_pages_per_block(1024);
+ expected.set_page_block_order(9);
+ expected.set_pages_per_block(512);
PageTypeInfoProto::MigrateType* mt1 = expected.add_migrate_types();
mt1->set_node(0);
diff --git a/cmds/statsd/Android.mk b/cmds/statsd/Android.mk
index 61c185f..ba2aaad8 100644
--- a/cmds/statsd/Android.mk
+++ b/cmds/statsd/Android.mk
@@ -45,7 +45,6 @@
src/external/puller_util.cpp \
src/logd/LogEvent.cpp \
src/logd/LogListener.cpp \
- src/logd/LogReader.cpp \
src/matchers/CombinationLogMatchingTracker.cpp \
src/matchers/matcher_util.cpp \
src/matchers/SimpleLogMatchingTracker.cpp \
@@ -194,7 +193,6 @@
tests/external/puller_util_test.cpp \
tests/indexed_priority_queue_test.cpp \
tests/LogEntryMatcher_test.cpp \
- tests/LogReader_test.cpp \
tests/LogEvent_test.cpp \
tests/MetricsManager_test.cpp \
tests/StatsLogProcessor_test.cpp \
diff --git a/cmds/statsd/src/StatsLogProcessor.cpp b/cmds/statsd/src/StatsLogProcessor.cpp
index ab0aa25..8e02f9c 100644
--- a/cmds/statsd/src/StatsLogProcessor.cpp
+++ b/cmds/statsd/src/StatsLogProcessor.cpp
@@ -161,10 +161,6 @@
}
}
-void StatsLogProcessor::OnLogEvent(LogEvent* event) {
- OnLogEvent(event, false);
-}
-
void StatsLogProcessor::resetConfigs() {
std::lock_guard<std::mutex> lock(mMetricsMutex);
resetConfigsLocked(getElapsedRealtimeNs());
@@ -178,7 +174,7 @@
resetConfigsLocked(timestampNs, configKeys);
}
-void StatsLogProcessor::OnLogEvent(LogEvent* event, bool reconnected) {
+void StatsLogProcessor::OnLogEvent(LogEvent* event) {
std::lock_guard<std::mutex> lock(mMetricsMutex);
#ifdef VERY_VERBOSE_PRINTING
@@ -188,41 +184,6 @@
#endif
const int64_t currentTimestampNs = event->GetElapsedTimestampNs();
- if (reconnected && mLastTimestampSeen != 0) {
- // LogReader tells us the connection has just been reset. Now we need
- // to enter reconnection state to find the last CP.
- mInReconnection = true;
- }
-
- if (mInReconnection) {
- // We see the checkpoint
- if (currentTimestampNs == mLastTimestampSeen) {
- mInReconnection = false;
- // Found the CP. ignore this event, and we will start to read from next event.
- return;
- }
- if (currentTimestampNs > mLargestTimestampSeen) {
- // We see a new log but CP has not been found yet. Give up now.
- mLogLossCount++;
- mInReconnection = false;
- StatsdStats::getInstance().noteLogLost(currentTimestampNs);
- // Persist the data before we reset. Do we want this?
- WriteDataToDiskLocked(CONFIG_RESET);
- // We see fresher event before we see the checkpoint. We might have lost data.
- // The best we can do is to reset.
- resetConfigsLocked(currentTimestampNs);
- } else {
- // Still in search of the CP. Keep going.
- return;
- }
- }
-
- mLogCount++;
- mLastTimestampSeen = currentTimestampNs;
- if (mLargestTimestampSeen < currentTimestampNs) {
- mLargestTimestampSeen = currentTimestampNs;
- }
-
resetIfConfigTtlExpiredLocked(currentTimestampNs);
StatsdStats::getInstance().noteAtomLogged(
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
index 05cf0c1..df80b8e 100644
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ b/cmds/statsd/src/StatsLogProcessor.h
@@ -18,7 +18,6 @@
#include <gtest/gtest_prod.h>
#include "config/ConfigListener.h"
-#include "logd/LogReader.h"
#include "metrics/MetricsManager.h"
#include "packages/UidMap.h"
#include "external/StatsPullerManager.h"
@@ -52,9 +51,6 @@
const std::function<bool(const ConfigKey&)>& sendBroadcast);
virtual ~StatsLogProcessor();
- void OnLogEvent(LogEvent* event, bool reconnectionStarts);
-
- // for testing only.
void OnLogEvent(LogEvent* event);
void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
@@ -174,14 +170,6 @@
int64_t mLastTimestampSeen = 0;
- bool mInReconnection = false;
-
- // Processed log count
- uint64_t mLogCount = 0;
-
- // Log loss detected count
- int mLogLossCount = 0;
-
long mLastPullerCacheClearTimeSec = 0;
#ifdef VERY_VERBOSE_PRINTING
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
index 0c241fc..91d68ea 100644
--- a/cmds/statsd/src/StatsService.cpp
+++ b/cmds/statsd/src/StatsService.cpp
@@ -883,8 +883,8 @@
mConfigManager->Startup();
}
-void StatsService::OnLogEvent(LogEvent* event, bool reconnectionStarts) {
- mProcessor->OnLogEvent(event, reconnectionStarts);
+void StatsService::OnLogEvent(LogEvent* event) {
+ mProcessor->OnLogEvent(event);
}
Status StatsService::getData(int64_t key, const String16& packageName, vector<uint8_t>* output) {
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index ed90050..613f509 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -22,6 +22,7 @@
#include "anomaly/AlarmMonitor.h"
#include "config/ConfigManager.h"
#include "external/StatsPullerManager.h"
+#include "logd/LogListener.h"
#include "packages/UidMap.h"
#include "statscompanion_util.h"
@@ -75,7 +76,7 @@
/**
* Called by LogReader when there's a log event to process.
*/
- virtual void OnLogEvent(LogEvent* event, bool reconnectionStarts);
+ virtual void OnLogEvent(LogEvent* event);
/**
* Binder call for clients to request data for this configuration key.
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 203a8e9b..6065bbf 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -127,6 +127,7 @@
WTFOccurred wtf_occurred = 80;
LowMemReported low_mem_reported = 81;
GenericAtom generic_atom = 82;
+ KeyValuePairsAtom key_value_pairs_atom = 83;
}
// Pulled events will start at field 10000.
@@ -177,6 +178,20 @@
optional string tag = 2;
}
+message KeyValuePair {
+ optional int32 key = 1;
+ oneof value {
+ int64 value_int = 2;
+ string value_str = 3;
+ float value_float = 4;
+ }
+}
+
+message KeyValuePairsAtom {
+ optional int32 uid = 1;
+ repeated KeyValuePair pairs = 2;
+}
+
/*
* *****************************************************************************
* Below are all of the individual atoms that are logged by Android via statsd.
@@ -1727,6 +1742,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 +2182,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/cmds/statsd/src/condition/condition_util.cpp b/cmds/statsd/src/condition/condition_util.cpp
index 691356b..35e03e4 100644
--- a/cmds/statsd/src/condition/condition_util.cpp
+++ b/cmds/statsd/src/condition/condition_util.cpp
@@ -76,9 +76,9 @@
break;
}
case LogicalOperation::NOT:
- newCondition = (conditionCache[children[0]] == ConditionState::kFalse)
- ? ConditionState::kTrue
- : ConditionState::kFalse;
+ newCondition = children.empty() ? ConditionState::kUnknown :
+ ((conditionCache[children[0]] == ConditionState::kFalse) ?
+ ConditionState::kTrue : ConditionState::kFalse);
break;
case LogicalOperation::NAND:
newCondition = hasFalse ? ConditionState::kTrue : ConditionState::kFalse;
diff --git a/cmds/statsd/src/config/ConfigManager.h b/cmds/statsd/src/config/ConfigManager.h
index 611c342..122e669 100644
--- a/cmds/statsd/src/config/ConfigManager.h
+++ b/cmds/statsd/src/config/ConfigManager.h
@@ -31,9 +31,6 @@
namespace os {
namespace statsd {
-// Util function to build a hard coded config with test metrics.
-StatsdConfig build_fake_config();
-
/**
* Keeps track of which configurations have been set from various sources.
*/
diff --git a/cmds/statsd/src/guardrail/StatsdStats.cpp b/cmds/statsd/src/guardrail/StatsdStats.cpp
index a955511..c37d0cf 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.cpp
+++ b/cmds/statsd/src/guardrail/StatsdStats.cpp
@@ -180,12 +180,12 @@
noteConfigResetInternalLocked(key);
}
-void StatsdStats::noteLogLost(int64_t timestampNs) {
+void StatsdStats::noteLogLost(int64_t timestampNs, int32_t count) {
lock_guard<std::mutex> lock(mLock);
if (mLogLossTimestampNs.size() == kMaxLoggerErrors) {
mLogLossTimestampNs.pop_front();
}
- mLogLossTimestampNs.push_back(timestampNs);
+ mLogLossTimestampNs.push_back(std::make_pair(timestampNs, count));
}
void StatsdStats::noteBroadcastSent(const ConfigKey& key) {
@@ -529,7 +529,8 @@
}
for (const auto& loss : mLogLossTimestampNs) {
- fprintf(out, "Log loss detected at %lld (elapsedRealtimeNs)\n", (long long)loss);
+ fprintf(out, "Log loss: %lld (elapsedRealtimeNs) - %d (count)\n", (long long)loss.first,
+ loss.second);
}
}
@@ -687,7 +688,7 @@
for (const auto& loss : mLogLossTimestampNs) {
proto.write(FIELD_TYPE_INT64 | FIELD_ID_LOG_LOSS_STATS | FIELD_COUNT_REPEATED,
- (long long)loss);
+ (long long)loss.first);
}
for (const auto& restart : mSystemServerRestartSec) {
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index 9fb2cd8..daea027 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -284,7 +284,7 @@
/**
* Records statsd skipped an event.
*/
- void noteLogLost(int64_t timestamp);
+ void noteLogLost(int64_t timestamp, int32_t count);
/**
* Reset the historical stats. Including all stats in icebox, and the tracked stats about
@@ -341,8 +341,8 @@
// Logd errors. Size capped by kMaxLoggerErrors.
std::list<const std::pair<int, int>> mLoggerErrors;
- // Timestamps when we detect log loss after logd reconnect.
- std::list<int64_t> mLogLossTimestampNs;
+ // Timestamps when we detect log loss, and the number of logs lost.
+ std::list<std::pair<int64_t, int32_t>> mLogLossTimestampNs;
std::list<int32_t> mSystemServerRestartSec;
diff --git a/cmds/statsd/src/logd/LogEvent.cpp b/cmds/statsd/src/logd/LogEvent.cpp
index 04d34f3..73e6572 100644
--- a/cmds/statsd/src/logd/LogEvent.cpp
+++ b/cmds/statsd/src/logd/LogEvent.cpp
@@ -18,6 +18,7 @@
#include "logd/LogEvent.h"
#include "stats_log_util.h"
+#include "statslog.h"
namespace android {
namespace os {
@@ -51,6 +52,52 @@
}
}
+LogEvent::LogEvent(int32_t tagId, int64_t wallClockTimestampNs, int64_t elapsedTimestampNs,
+ int32_t uid,
+ const std::map<int32_t, int64_t>& int_map,
+ const std::map<int32_t, std::string>& string_map,
+ const std::map<int32_t, float>& float_map) {
+ mLogdTimestampNs = wallClockTimestampNs;
+ mElapsedTimestampNs = elapsedTimestampNs;
+ mTagId = android::util::KEY_VALUE_PAIRS_ATOM;
+ mLogUid = uid;
+
+ int pos[] = {1, 1, 1};
+
+ mValues.push_back(FieldValue(Field(mTagId, pos, 0 /* depth */), Value(uid)));
+ pos[0]++;
+ for (const auto&itr : int_map) {
+ pos[2] = 1;
+ mValues.push_back(FieldValue(Field(mTagId, pos, 2 /* depth */), Value(itr.first)));
+ pos[2] = 2;
+ mValues.push_back(FieldValue(Field(mTagId, pos, 2 /* depth */), Value(itr.second)));
+ mValues.back().mField.decorateLastPos(2);
+ pos[1]++;
+ }
+
+ for (const auto&itr : string_map) {
+ pos[2] = 1;
+ mValues.push_back(FieldValue(Field(mTagId, pos, 2 /* depth */), Value(itr.first)));
+ pos[2] = 3;
+ mValues.push_back(FieldValue(Field(mTagId, pos, 2 /* depth */), Value(itr.second)));
+ mValues.back().mField.decorateLastPos(2);
+ pos[1]++;
+ }
+
+ for (const auto&itr : float_map) {
+ pos[2] = 1;
+ mValues.push_back(FieldValue(Field(mTagId, pos, 2 /* depth */), Value(itr.first)));
+ pos[2] = 4;
+ mValues.push_back(FieldValue(Field(mTagId, pos, 2 /* depth */), Value(itr.second)));
+ mValues.back().mField.decorateLastPos(2);
+ pos[1]++;
+ }
+ if (!mValues.empty()) {
+ mValues.back().mField.decorateLastPos(1);
+ mValues.at(mValues.size() - 2).mField.decorateLastPos(1);
+ }
+}
+
LogEvent::LogEvent(int32_t tagId, int64_t timestampNs) {
mLogdTimestampNs = timestampNs;
mTagId = tagId;
diff --git a/cmds/statsd/src/logd/LogEvent.h b/cmds/statsd/src/logd/LogEvent.h
index 24d624d..9ed09dd 100644
--- a/cmds/statsd/src/logd/LogEvent.h
+++ b/cmds/statsd/src/logd/LogEvent.h
@@ -69,6 +69,15 @@
// For testing. The timestamp is used as both elapsed real time and logd timestamp.
explicit LogEvent(int32_t tagId, int64_t timestampNs);
+ /**
+ * Constructs a KeyValuePairsAtom LogEvent from value maps.
+ */
+ explicit LogEvent(int32_t tagId, int64_t wallClockTimestampNs, int64_t elapsedTimestampNs,
+ int32_t uid,
+ const std::map<int32_t, int64_t>& int_map,
+ const std::map<int32_t, std::string>& string_map,
+ const std::map<int32_t, float>& float_map);
+
~LogEvent();
/**
diff --git a/cmds/statsd/src/logd/LogListener.cpp b/cmds/statsd/src/logd/LogListener.cpp
index 6ac7978..ddb26f9 100644
--- a/cmds/statsd/src/logd/LogListener.cpp
+++ b/cmds/statsd/src/logd/LogListener.cpp
@@ -14,17 +14,7 @@
* limitations under the License.
*/
-#include "logd/LogReader.h"
-
-#include <log/log_read.h>
-
-#include <utils/Errors.h>
-
-#include <time.h>
-#include <unistd.h>
-
-using namespace android;
-using namespace std;
+#include "logd/LogListener.h"
namespace android {
namespace os {
diff --git a/cmds/statsd/src/logd/LogListener.h b/cmds/statsd/src/logd/LogListener.h
index f924040..d8b06e9 100644
--- a/cmds/statsd/src/logd/LogListener.h
+++ b/cmds/statsd/src/logd/LogListener.h
@@ -19,7 +19,6 @@
#include "logd/LogEvent.h"
#include <utils/RefBase.h>
-#include <vector>
namespace android {
namespace os {
@@ -33,7 +32,7 @@
LogListener();
virtual ~LogListener();
- virtual void OnLogEvent(LogEvent* msg, bool reconnectionStarts) = 0;
+ virtual void OnLogEvent(LogEvent* msg) = 0;
};
} // namespace statsd
diff --git a/cmds/statsd/src/logd/LogReader.cpp b/cmds/statsd/src/logd/LogReader.cpp
deleted file mode 100644
index 26ae6a3..0000000
--- a/cmds/statsd/src/logd/LogReader.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#include "logd/LogReader.h"
-
-#include "guardrail/StatsdStats.h"
-
-#include <time.h>
-#include <unistd.h>
-#include <utils/Errors.h>
-
-using namespace android;
-using namespace std;
-
-namespace android {
-namespace os {
-namespace statsd {
-
-#define SNOOZE_INITIAL_MS 100
-#define SNOOZE_MAX_MS (10 * 60 * 1000) // Ten minutes
-
-LogReader::LogReader(const sp<LogListener>& listener) : mListener(listener) {
-}
-
-LogReader::~LogReader() {
-}
-
-void LogReader::Run() {
- int nextSnoozeMs = SNOOZE_INITIAL_MS;
-
- // In an ideal world, this outer loop will only ever run one iteration, but it
- // exists to handle crashes in logd. The inner loop inside connect_and_read()
- // reads from logd forever, but if that read fails, we fall out to the outer
- // loop, do the backoff (resetting the backoff timeout if we successfully read
- // something), and then try again.
- while (true) {
- // Connect and read
- int lineCount = connect_and_read();
-
- // Figure out how long to sleep.
- if (lineCount > 0) {
- // If we managed to read at least one line, reset the backoff
- nextSnoozeMs = SNOOZE_INITIAL_MS;
- } else {
- // Otherwise, expontial backoff
- nextSnoozeMs *= 1.5f;
- if (nextSnoozeMs > 10 * 60 * 1000) {
- // Don't wait for toooo long.
- nextSnoozeMs = SNOOZE_MAX_MS;
- }
- }
-
- // Sleep
- timespec ts;
- timespec rem;
- ts.tv_sec = nextSnoozeMs / 1000;
- ts.tv_nsec = (nextSnoozeMs % 1000) * 1000000L;
- while (nanosleep(&ts, &rem) == -1) {
- if (errno == EINTR) {
- ts = rem;
- }
- // other errors are basically impossible
- }
- }
-}
-
-int LogReader::connect_and_read() {
- int lineCount = 0;
- status_t err;
- logger_list* loggers;
- logger* eventLogger;
-
- // Prepare the logging context
- loggers = android_logger_list_alloc(ANDROID_LOG_RDONLY,
- /* don't stop after N lines */ 0,
- /* no pid restriction */ 0);
-
- // Open the buffer(s)
- eventLogger = android_logger_open(loggers, LOG_ID_STATS);
-
- // Read forever
- if (eventLogger) {
- log_msg msg;
- while (true) {
- // Read a message
- err = android_logger_list_read(loggers, &msg);
- // err = 0 - no content, unexpected connection drop or EOF.
- // err = +ive number - size of retrieved data from logger
- // err = -ive number, OS supplied error _except_ for -EAGAIN
- if (err <= 0) {
- StatsdStats::getInstance().noteLoggerError(err);
- fprintf(stderr, "logcat read failure: %s\n", strerror(err));
- break;
- }
-
- // Record that we read one (used above to know how to snooze).
- lineCount++;
-
- // Wrap it in a LogEvent object
- LogEvent event(msg);
-
- // Call the listener
- mListener->OnLogEvent(&event,
- lineCount == 1 /* indicate whether it's a new connection */);
- }
- }
-
- // Free the logger list and close the individual loggers
- android_logger_list_free(loggers);
-
- return lineCount;
-}
-
-} // namespace statsd
-} // namespace os
-} // namespace android
diff --git a/cmds/statsd/src/logd/LogReader.h b/cmds/statsd/src/logd/LogReader.h
deleted file mode 100644
index c51074c..0000000
--- a/cmds/statsd/src/logd/LogReader.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#ifndef LOGREADER_H
-#define LOGREADER_H
-
-#include "logd/LogListener.h"
-
-#include <utils/RefBase.h>
-
-#include <vector>
-
-namespace android {
-namespace os {
-namespace statsd {
-
-/**
- * Class to read logs from logd.
- */
-class LogReader : public virtual android::RefBase {
-public:
- /**
- * Construct the LogReader with the event listener. (Which is StatsService)
- */
- LogReader(const sp<LogListener>& listener);
-
- /**
- * Destructor.
- */
- virtual ~LogReader();
-
- /**
- * Run the main LogReader loop
- */
- void Run();
-
-private:
- /**
- * Who is going to get the events when they're read.
- */
- sp<LogListener> mListener;
-
- /**
- * Connect to a single instance of logd, and read until there's a read error.
- * Logd can crash, exit, be killed etc.
- *
- * Returns the number of lines that were read.
- */
- int connect_and_read();
-};
-
-} // namespace statsd
-} // namespace os
-} // namespace android
-
-#endif // LOGREADER_H
diff --git a/cmds/statsd/src/main.cpp b/cmds/statsd/src/main.cpp
index 2f15d0f..9002f07 100644
--- a/cmds/statsd/src/main.cpp
+++ b/cmds/statsd/src/main.cpp
@@ -18,7 +18,6 @@
#include "Log.h"
#include "StatsService.h"
-#include "logd/LogReader.h"
#include "socket/StatsSocketListener.h"
#include <binder/IInterface.h>
@@ -39,9 +38,6 @@
using namespace android;
using namespace android::os::statsd;
-const bool kUseLogd = false;
-const bool kUseStatsdSocket = true;
-
/**
* Thread function data.
*/
@@ -49,58 +45,6 @@
sp<StatsService> service;
};
-/**
- * Thread func for where the log reader runs.
- */
-static void* log_reader_thread_func(void* cookie) {
- log_reader_thread_data* data = static_cast<log_reader_thread_data*>(cookie);
- sp<LogReader> reader = new LogReader(data->service);
-
- // Run the read loop. Never returns.
- reader->Run();
-
- ALOGW("statsd LogReader.Run() is not supposed to return.");
-
- delete data;
- return NULL;
-}
-
-/**
- * Creates and starts the thread to own the LogReader.
- */
-static status_t start_log_reader_thread(const sp<StatsService>& service) {
- status_t err;
- pthread_attr_t attr;
- pthread_t thread;
-
- // Thread data.
- std::unique_ptr<log_reader_thread_data> data = std::make_unique<log_reader_thread_data>();
- data->service = service;
-
- // Create the thread
- err = pthread_attr_init(&attr);
- if (err != NO_ERROR) {
- return err;
- }
- err = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- if (err != NO_ERROR) {
- pthread_attr_destroy(&attr);
- return err;
- }
- err = pthread_create(&thread, &attr, log_reader_thread_func,
- static_cast<void*>(data.get()));
- if (err != NO_ERROR) {
- pthread_attr_destroy(&attr);
- return err;
- }
- // Release here rather than in pthread_create, since an error creating the
- // thread leaves `data` ownerless.
- data.release();
- pthread_attr_destroy(&attr);
-
- return NO_ERROR;
-}
-
int main(int /*argc*/, char** /*argv*/) {
// Set up the looper
sp<Looper> looper(Looper::prepare(0 /* opts */));
@@ -124,22 +68,11 @@
sp<StatsSocketListener> socketListener = new StatsSocketListener(service);
- if (kUseLogd) {
- ALOGI("using logd");
- // Start the log reader thread
- status_t err = start_log_reader_thread(service);
- if (err != NO_ERROR) {
- return 1;
- }
- }
-
- if (kUseStatsdSocket) {
ALOGI("using statsd socket");
// Backlog and /proc/sys/net/unix/max_dgram_qlen set to large value
if (socketListener->startListener(600)) {
exit(1);
}
- }
// Loop forever -- the reports run on this thread in a handler, and the
// binder calls remain responsive in their pool of one thread.
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
index fbe0b21..284c451 100644
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
@@ -71,11 +71,14 @@
GaugeMetricProducer::GaugeMetricProducer(const ConfigKey& key, const GaugeMetric& metric,
const int conditionIndex,
const sp<ConditionWizard>& wizard, const int pullTagId,
+ const int triggerAtomId, const int atomId,
const int64_t timeBaseNs, const int64_t startTimeNs,
const sp<StatsPullerManager>& pullerManager)
: MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, wizard),
mPullerManager(pullerManager),
mPullTagId(pullTagId),
+ mTriggerAtomId(triggerAtomId),
+ mAtomId(atomId),
mIsPulled(pullTagId != -1),
mMinBucketSizeNs(metric.min_bucket_size_nanos()),
mDimensionSoftLimit(StatsdStats::kAtomDimensionKeySizeLimitMap.find(pullTagId) !=
@@ -272,12 +275,12 @@
uint64_t atomsToken =
protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
FIELD_ID_ATOM);
- writeFieldValueTreeToStream(mTagId, *(atom.mFields), protoOutput);
+ writeFieldValueTreeToStream(mAtomId, *(atom.mFields), protoOutput);
protoOutput->end(atomsToken);
}
const bool truncateTimestamp =
android::util::AtomsInfo::kNotTruncatingTimestampAtomWhiteList.find(
- mTagId) ==
+ mAtomId) ==
android::util::AtomsInfo::kNotTruncatingTimestampAtomWhiteList.end();
for (const auto& atom : bucket.mGaugeAtoms) {
const int64_t elapsedTimestampNs = truncateTimestamp ?
@@ -410,7 +413,6 @@
return;
}
int64_t eventTimeNs = event.GetElapsedTimestampNs();
- mTagId = event.GetTagId();
if (eventTimeNs < mCurrentBucketStartTimeNs) {
VLOG("Gauge Skip event due to late arrival: %lld vs %lld", (long long)eventTimeNs,
(long long)mCurrentBucketStartTimeNs);
@@ -418,6 +420,11 @@
}
flushIfNeededLocked(eventTimeNs);
+ if (mTriggerAtomId == event.GetTagId()) {
+ pullLocked(eventTimeNs);
+ return;
+ }
+
// When gauge metric wants to randomly sample the output atom, we just simply use the first
// gauge in the given bucket.
if (mCurrentSlicedBucket->find(eventKey) != mCurrentSlicedBucket->end() &&
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.h b/cmds/statsd/src/metrics/GaugeMetricProducer.h
index cc65440..15be1d7 100644
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.h
+++ b/cmds/statsd/src/metrics/GaugeMetricProducer.h
@@ -58,7 +58,8 @@
public:
GaugeMetricProducer(const ConfigKey& key, const GaugeMetric& gaugeMetric,
const int conditionIndex, const sp<ConditionWizard>& wizard,
- const int pullTagId, const int64_t timeBaseNs, const int64_t startTimeNs,
+ const int pullTagId, const int triggerAtomId, const int atomId,
+ const int64_t timeBaseNs, const int64_t startTimeNs,
const sp<StatsPullerManager>& pullerManager);
virtual ~GaugeMetricProducer();
@@ -115,12 +116,16 @@
void pullLocked(const int64_t timestampNs);
- int mTagId;
-
sp<StatsPullerManager> mPullerManager;
// tagId for pulled data. -1 if this is not pulled
const int mPullTagId;
+ // tagId for atoms that trigger the pulling, if any
+ const int mTriggerAtomId;
+
+ // tagId for output atom
+ const int mAtomId;
+
// if this is pulled metric
const bool mIsPulled;
@@ -169,6 +174,7 @@
FRIEND_TEST(GaugeMetricProducerTest, TestPulledWithUpgrade);
FRIEND_TEST(GaugeMetricProducerTest, TestPulledEventsAnomalyDetection);
FRIEND_TEST(GaugeMetricProducerTest, TestFirstBucket);
+ FRIEND_TEST(GaugeMetricProducerTest, TestPullOnTrigger);
};
} // namespace statsd
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
index 16447e8..192a54b 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "ValueMetricProducer.h"
diff --git a/cmds/statsd/src/metrics/metrics_manager_util.cpp b/cmds/statsd/src/metrics/metrics_manager_util.cpp
index ff48d02..75d6df9 100644
--- a/cmds/statsd/src/metrics/metrics_manager_util.cpp
+++ b/cmds/statsd/src/metrics/metrics_manager_util.cpp
@@ -82,6 +82,28 @@
return true;
}
+bool handlePullMetricTriggerWithLogTrackers(
+ const int64_t trigger, const int metricIndex,
+ const vector<sp<LogMatchingTracker>>& allAtomMatchers,
+ const unordered_map<int64_t, int>& logTrackerMap,
+ unordered_map<int, std::vector<int>>& trackerToMetricMap, int& logTrackerIndex) {
+ auto logTrackerIt = logTrackerMap.find(trigger);
+ if (logTrackerIt == logTrackerMap.end()) {
+ ALOGW("cannot find the AtomMatcher \"%lld\" in config", (long long)trigger);
+ return false;
+ }
+ if (allAtomMatchers[logTrackerIt->second]->getAtomIds().size() > 1) {
+ ALOGE("AtomMatcher \"%lld\" has more than one tag ids."
+ "Trigger can only be one atom type.",
+ (long long)trigger);
+ return false;
+ }
+ logTrackerIndex = logTrackerIt->second;
+ auto& metric_list = trackerToMetricMap[logTrackerIndex];
+ metric_list.push_back(metricIndex);
+ return true;
+}
+
bool handleMetricWithConditions(
const int64_t condition, const int metricIndex,
const unordered_map<int64_t, int>& conditionTrackerMap,
@@ -502,13 +524,29 @@
}
sp<LogMatchingTracker> atomMatcher = allAtomMatchers.at(trackerIndex);
- // If it is pulled atom, it should be simple matcher with one tagId.
+ // For GaugeMetric atom, it should be simple matcher with one tagId.
if (atomMatcher->getAtomIds().size() != 1) {
return false;
}
int atomTagId = *(atomMatcher->getAtomIds().begin());
int pullTagId = statsPullerManager.PullerForMatcherExists(atomTagId) ? atomTagId : -1;
+ int triggerTrackerIndex;
+ int triggerAtomId = -1;
+ if (pullTagId != -1 && metric.has_trigger_event()) {
+ // event_trigger should be used with ALL_CONDITION_CHANGES
+ if (metric.sampling_type() != GaugeMetric::ALL_CONDITION_CHANGES) {
+ return false;
+ }
+ if (!handlePullMetricTriggerWithLogTrackers(metric.trigger_event(), metricIndex,
+ allAtomMatchers, logTrackerMap,
+ trackerToMetricMap, triggerTrackerIndex)) {
+ return false;
+ }
+ sp<LogMatchingTracker> triggerAtomMatcher = allAtomMatchers.at(triggerTrackerIndex);
+ triggerAtomId = *(triggerAtomMatcher->getAtomIds().begin());
+ }
+
int conditionIndex = -1;
if (metric.has_condition()) {
bool good = handleMetricWithConditions(
@@ -524,9 +562,9 @@
}
}
- sp<MetricProducer> gaugeProducer =
- new GaugeMetricProducer(key, metric, conditionIndex, wizard, pullTagId,
- timeBaseTimeNs, currentTimeNs, pullerManager);
+ sp<MetricProducer> gaugeProducer = new GaugeMetricProducer(
+ key, metric, conditionIndex, wizard, pullTagId, triggerAtomId, atomTagId,
+ timeBaseTimeNs, currentTimeNs, pullerManager);
allMetricProducers.push_back(gaugeProducer);
}
for (int i = 0; i < config.no_report_metric_size(); ++i) {
diff --git a/cmds/statsd/src/socket/StatsSocketListener.cpp b/cmds/statsd/src/socket/StatsSocketListener.cpp
index 0392d67..4041da7 100755
--- a/cmds/statsd/src/socket/StatsSocketListener.cpp
+++ b/cmds/statsd/src/socket/StatsSocketListener.cpp
@@ -40,6 +40,7 @@
namespace statsd {
static const int kLogMsgHeaderSize = 28;
+static const int kLibLogTag = 1006;
StatsSocketListener::StatsSocketListener(const sp<LogListener>& listener)
: SocketListener(getLogSocket(), false /*start listen*/), mListener(listener) {
@@ -99,6 +100,22 @@
char* ptr = ((char*)buffer) + sizeof(android_log_header_t);
n -= sizeof(android_log_header_t);
+ // When a log failed to write to statsd socket (e.g., due ot EBUSY), a special message would
+ // be sent to statsd when the socket communication becomes available again.
+ // The format is android_log_event_int_t with a single integer in the payload indicating the
+ // number of logs that failed. (*FORMAT MUST BE IN SYNC WITH system/core/libstats*)
+ // Note that all normal stats logs are in the format of event_list, so there won't be confusion.
+ //
+ // TODO(b/80538532): In addition to log it in StatsdStats, we should properly reset the config.
+ if (n == sizeof(android_log_event_int_t)) {
+ android_log_event_int_t* int_event = reinterpret_cast<android_log_event_int_t*>(ptr);
+ if (int_event->header.tag == kLibLogTag && int_event->payload.type == EVENT_TYPE_INT) {
+ ALOGE("Found dropped events: %d", int_event->payload.data);
+ StatsdStats::getInstance().noteLogLost(getElapsedRealtimeNs(), int_event->payload.data);
+ return true;
+ }
+ }
+
log_msg msg;
msg.entry.len = n;
@@ -111,7 +128,7 @@
LogEvent event(msg);
// Call the listener
- mListener->OnLogEvent(&event, false /*reconnected, N/A in statsd socket*/);
+ mListener->OnLogEvent(&event);
return true;
}
diff --git a/cmds/statsd/src/stats_util.h b/cmds/statsd/src/stats_util.h
index 5fcb161..cfc411f 100644
--- a/cmds/statsd/src/stats_util.h
+++ b/cmds/statsd/src/stats_util.h
@@ -17,7 +17,6 @@
#pragma once
#include "HashableDimensionKey.h"
-#include "logd/LogReader.h"
#include <unordered_map>
diff --git a/cmds/statsd/src/statsd_config.proto b/cmds/statsd/src/statsd_config.proto
index 26dfda3..d19e247 100644
--- a/cmds/statsd/src/statsd_config.proto
+++ b/cmds/statsd/src/statsd_config.proto
@@ -217,6 +217,8 @@
optional int64 what = 2;
+ optional int64 trigger_event = 12;
+
optional FieldFilter gauge_fields_filter = 3;
optional int64 condition = 4;
diff --git a/cmds/statsd/tests/LogEvent_test.cpp b/cmds/statsd/tests/LogEvent_test.cpp
index 2fcde29..acfa151 100644
--- a/cmds/statsd/tests/LogEvent_test.cpp
+++ b/cmds/statsd/tests/LogEvent_test.cpp
@@ -158,6 +158,96 @@
EXPECT_EQ((float)1.1, item7.mValue.float_value);
}
+TEST(LogEventTest, TestKeyValuePairsAtomParsing) {
+ std::map<int32_t, int64_t> int_map;
+ std::map<int32_t, std::string> string_map;
+ std::map<int32_t, float> float_map;
+
+ int_map[11] = 123L;
+ int_map[22] = 345L;
+
+ string_map[1] = "test2";
+ string_map[2] = "test1";
+
+ float_map[111] = 2.2f;
+ float_map[222] = 1.1f;
+
+ LogEvent event1(83, 2000, 2001, 10001, int_map, string_map, float_map);
+ event1.init();
+
+ EXPECT_EQ(83, event1.GetTagId());
+ EXPECT_EQ((int64_t)2000, event1.GetLogdTimestampNs());
+ EXPECT_EQ((int64_t)2001, event1.GetElapsedTimestampNs());
+
+ const auto& items = event1.getValues();
+ EXPECT_EQ((size_t)13, items.size());
+
+ const FieldValue& item0 = event1.getValues()[0];
+ EXPECT_EQ(0x00010000, item0.mField.getField());
+ EXPECT_EQ(Type::INT, item0.mValue.getType());
+ EXPECT_EQ(10001, item0.mValue.int_value);
+
+ const FieldValue& item1 = event1.getValues()[1];
+ EXPECT_EQ(0x2020101, item1.mField.getField());
+ EXPECT_EQ(Type::INT, item1.mValue.getType());
+ EXPECT_EQ(11, item1.mValue.int_value);
+
+ const FieldValue& item2 = event1.getValues()[2];
+ EXPECT_EQ(0x2020182, item2.mField.getField());
+ EXPECT_EQ(Type::LONG, item2.mValue.getType());
+ EXPECT_EQ(123L, item2.mValue.long_value);
+
+ const FieldValue& item3 = event1.getValues()[3];
+ EXPECT_EQ(0x2020201, item3.mField.getField());
+ EXPECT_EQ(Type::INT, item3.mValue.getType());
+ EXPECT_EQ(22, item3.mValue.int_value);
+
+ const FieldValue& item4 = event1.getValues()[4];
+ EXPECT_EQ(0x2020282, item4.mField.getField());
+ EXPECT_EQ(Type::LONG, item4.mValue.getType());
+ EXPECT_EQ(345L, item4.mValue.long_value);
+
+ const FieldValue& item5 = event1.getValues()[5];
+ EXPECT_EQ(0x2020301, item5.mField.getField());
+ EXPECT_EQ(Type::INT, item5.mValue.getType());
+ EXPECT_EQ(1, item5.mValue.int_value);
+
+ const FieldValue& item6 = event1.getValues()[6];
+ EXPECT_EQ(0x2020383, item6.mField.getField());
+ EXPECT_EQ(Type::STRING, item6.mValue.getType());
+ EXPECT_EQ("test2", item6.mValue.str_value);
+
+ const FieldValue& item7 = event1.getValues()[7];
+ EXPECT_EQ(0x2020401, item7.mField.getField());
+ EXPECT_EQ(Type::INT, item7.mValue.getType());
+ EXPECT_EQ(2, item7.mValue.int_value);
+
+ const FieldValue& item8 = event1.getValues()[8];
+ EXPECT_EQ(0x2020483, item8.mField.getField());
+ EXPECT_EQ(Type::STRING, item8.mValue.getType());
+ EXPECT_EQ("test1", item8.mValue.str_value);
+
+ const FieldValue& item9 = event1.getValues()[9];
+ EXPECT_EQ(0x2020501, item9.mField.getField());
+ EXPECT_EQ(Type::INT, item9.mValue.getType());
+ EXPECT_EQ(111, item9.mValue.int_value);
+
+ const FieldValue& item10 = event1.getValues()[10];
+ EXPECT_EQ(0x2020584, item10.mField.getField());
+ EXPECT_EQ(Type::FLOAT, item10.mValue.getType());
+ EXPECT_EQ(2.2f, item10.mValue.float_value);
+
+ const FieldValue& item11 = event1.getValues()[11];
+ EXPECT_EQ(0x2028601, item11.mField.getField());
+ EXPECT_EQ(Type::INT, item11.mValue.getType());
+ EXPECT_EQ(222, item11.mValue.int_value);
+
+ const FieldValue& item12 = event1.getValues()[12];
+ EXPECT_EQ(0x2028684, item12.mField.getField());
+ EXPECT_EQ(Type::FLOAT, item12.mValue.getType());
+ EXPECT_EQ(1.1f, item12.mValue.float_value);
+}
+
} // namespace statsd
} // namespace os
diff --git a/cmds/statsd/tests/StatsLogProcessor_test.cpp b/cmds/statsd/tests/StatsLogProcessor_test.cpp
index ecc57f5..b6f635c 100644
--- a/cmds/statsd/tests/StatsLogProcessor_test.cpp
+++ b/cmds/statsd/tests/StatsLogProcessor_test.cpp
@@ -238,132 +238,6 @@
EXPECT_EQ(2, report.annotation(0).field_int32());
}
-TEST(StatsLogProcessorTest, TestOutOfOrderLogs) {
- // Setup simple config key corresponding to empty config.
- sp<UidMap> m = new UidMap();
- sp<StatsPullerManager> pullerManager = new StatsPullerManager();
- sp<AlarmMonitor> anomalyAlarmMonitor;
- sp<AlarmMonitor> subscriberAlarmMonitor;
- int broadcastCount = 0;
- StatsLogProcessor p(m, pullerManager, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
- [&broadcastCount](const ConfigKey& key) {
- broadcastCount++;
- return true;
- });
-
- LogEvent event1(0, 1 /*logd timestamp*/, 1001 /*elapsedRealtime*/);
- event1.init();
-
- LogEvent event2(0, 2, 1002);
- event2.init();
-
- LogEvent event3(0, 3, 1005);
- event3.init();
-
- LogEvent event4(0, 4, 1004);
- event4.init();
-
- // <----- Reconnection happens
-
- LogEvent event5(0, 5, 999);
- event5.init();
-
- LogEvent event6(0, 6, 2000);
- event6.init();
-
- // <----- Reconnection happens
-
- LogEvent event7(0, 7, 3000);
- event7.init();
-
- // first event ever
- p.OnLogEvent(&event1, true);
- EXPECT_EQ(1UL, p.mLogCount);
- EXPECT_EQ(1001LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1001LL, p.mLastTimestampSeen);
-
- p.OnLogEvent(&event2, false);
- EXPECT_EQ(2UL, p.mLogCount);
- EXPECT_EQ(1002LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1002LL, p.mLastTimestampSeen);
-
- p.OnLogEvent(&event3, false);
- EXPECT_EQ(3UL, p.mLogCount);
- EXPECT_EQ(1005LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1005LL, p.mLastTimestampSeen);
-
- p.OnLogEvent(&event4, false);
- EXPECT_EQ(4UL, p.mLogCount);
- EXPECT_EQ(1005LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1004LL, p.mLastTimestampSeen);
- EXPECT_FALSE(p.mInReconnection);
-
- // Reconnect happens, event1 out of buffer. Read event2
- p.OnLogEvent(&event2, true);
- EXPECT_EQ(4UL, p.mLogCount);
- EXPECT_EQ(1005LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1004LL, p.mLastTimestampSeen);
- EXPECT_TRUE(p.mInReconnection);
-
- p.OnLogEvent(&event3, false);
- EXPECT_EQ(4UL, p.mLogCount);
- EXPECT_EQ(1005LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1004LL, p.mLastTimestampSeen);
- EXPECT_TRUE(p.mInReconnection);
-
- p.OnLogEvent(&event4, false);
- EXPECT_EQ(4UL, p.mLogCount);
- EXPECT_EQ(1005LL, p.mLargestTimestampSeen);
- EXPECT_EQ(1004LL, p.mLastTimestampSeen);
- EXPECT_FALSE(p.mInReconnection);
-
- // Fresh event comes.
- p.OnLogEvent(&event5, false);
- EXPECT_EQ(5UL, p.mLogCount);
- EXPECT_EQ(1005LL, p.mLargestTimestampSeen);
- EXPECT_EQ(999LL, p.mLastTimestampSeen);
-
- p.OnLogEvent(&event6, false);
- EXPECT_EQ(6UL, p.mLogCount);
- EXPECT_EQ(2000LL, p.mLargestTimestampSeen);
- EXPECT_EQ(2000LL, p.mLastTimestampSeen);
-
- // Reconnect happens, read from event4
- p.OnLogEvent(&event4, true);
- EXPECT_EQ(6UL, p.mLogCount);
- EXPECT_EQ(2000LL, p.mLargestTimestampSeen);
- EXPECT_EQ(2000LL, p.mLastTimestampSeen);
- EXPECT_TRUE(p.mInReconnection);
-
- p.OnLogEvent(&event5, false);
- EXPECT_EQ(6UL, p.mLogCount);
- EXPECT_EQ(2000LL, p.mLargestTimestampSeen);
- EXPECT_EQ(2000LL, p.mLastTimestampSeen);
- EXPECT_TRUE(p.mInReconnection);
-
- // Before we get out of reconnection state, it reconnects again.
- p.OnLogEvent(&event5, true);
- EXPECT_EQ(6UL, p.mLogCount);
- EXPECT_EQ(2000LL, p.mLargestTimestampSeen);
- EXPECT_EQ(2000LL, p.mLastTimestampSeen);
- EXPECT_TRUE(p.mInReconnection);
-
- p.OnLogEvent(&event6, false);
- EXPECT_EQ(6UL, p.mLogCount);
- EXPECT_EQ(2000LL, p.mLargestTimestampSeen);
- EXPECT_EQ(2000LL, p.mLastTimestampSeen);
- EXPECT_FALSE(p.mInReconnection);
- EXPECT_EQ(0, p.mLogLossCount);
-
- // it reconnects again. All old events are gone. We lose CP.
- p.OnLogEvent(&event7, true);
- EXPECT_EQ(7UL, p.mLogCount);
- EXPECT_EQ(3000LL, p.mLargestTimestampSeen);
- EXPECT_EQ(3000LL, p.mLastTimestampSeen);
- EXPECT_EQ(1, p.mLogLossCount);
- EXPECT_FALSE(p.mInReconnection);
-}
-
#else
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif
diff --git a/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp b/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp
index 23d6926..6529d65 100644
--- a/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp
+++ b/cmds/statsd/tests/condition/CombinationConditionTracker_test.cpp
@@ -40,6 +40,7 @@
EXPECT_EQ(evaluateCombinationCondition(children, operation, conditionResults),
ConditionState::kUnknown);
}
+
TEST(ConditionTrackerTest, TestAndCondition) {
// Set up the matcher
LogicalOperation operation = LogicalOperation::AND;
@@ -103,6 +104,11 @@
conditionResults.clear();
conditionResults.push_back(ConditionState::kFalse);
EXPECT_TRUE(evaluateCombinationCondition(children, operation, conditionResults));
+
+ children.clear();
+ conditionResults.clear();
+ EXPECT_EQ(evaluateCombinationCondition(children, operation, conditionResults),
+ ConditionState::kUnknown);
}
TEST(ConditionTrackerTest, TestNandCondition) {
diff --git a/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp b/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp
index 2fda858..9471faa 100644
--- a/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp
+++ b/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp
@@ -66,7 +66,8 @@
// statsd started long ago.
// The metric starts in the middle of the bucket
GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard,
- -1, 5, 600 * NS_PER_SEC + NS_PER_SEC/2, pullerManager);
+ -1, -1, tagId, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2,
+ pullerManager);
EXPECT_EQ(600500000000, gaugeProducer.mCurrentBucketStartTimeNs);
EXPECT_EQ(10, gaugeProducer.mCurrentBucketNum);
@@ -100,8 +101,8 @@
}));
GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard,
- tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
- gaugeProducer.setBucketSize(60 * NS_PER_SEC);
+ tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs,
+ pullerManager);
vector<shared_ptr<LogEvent>> allData;
allData.clear();
@@ -176,10 +177,9 @@
sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard,
- -1 /* -1 means no pulling */, bucketStartTimeNs,
+ -1 /* -1 means no pulling */, -1, tagId, bucketStartTimeNs,
bucketStartTimeNs, pullerManager);
- gaugeProducer.setBucketSize(60 * NS_PER_SEC);
sp<AnomalyTracker> anomalyTracker = gaugeProducer.addAnomalyTracker(alert, alarmMonitor);
EXPECT_TRUE(anomalyTracker != nullptr);
@@ -261,8 +261,8 @@
}));
GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard,
- tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
- gaugeProducer.setBucketSize(60 * NS_PER_SEC);
+ tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs,
+ pullerManager);
vector<shared_ptr<LogEvent>> allData;
shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 1);
@@ -328,9 +328,8 @@
return true;
}));
- GaugeMetricProducer gaugeProducer(kConfigKey, metric, 1, wizard, tagId, bucketStartTimeNs,
- bucketStartTimeNs, pullerManager);
- gaugeProducer.setBucketSize(60 * NS_PER_SEC);
+ GaugeMetricProducer gaugeProducer(kConfigKey, metric, 1, wizard, tagId, -1, tagId,
+ bucketStartTimeNs, bucketStartTimeNs, pullerManager);
gaugeProducer.onConditionChanged(true, bucketStartTimeNs + 8);
EXPECT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
@@ -419,9 +418,8 @@
return true;
}));
- GaugeMetricProducer gaugeProducer(kConfigKey, metric, 1, wizard, tagId, bucketStartTimeNs,
- bucketStartTimeNs, pullerManager);
- gaugeProducer.setBucketSize(60 * NS_PER_SEC);
+ GaugeMetricProducer gaugeProducer(kConfigKey, metric, 1, wizard, tagId, -1, tagId,
+ bucketStartTimeNs, bucketStartTimeNs, pullerManager);
gaugeProducer.onSlicedConditionMayChange(true, bucketStartTimeNs + 8);
@@ -464,8 +462,8 @@
gaugeFieldMatcher->set_field(tagId);
gaugeFieldMatcher->add_child()->set_field(2);
GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard,
- tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager);
- gaugeProducer.setBucketSize(60 * NS_PER_SEC);
+ tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs,
+ pullerManager);
Alert alert;
alert.set_id(101);
@@ -530,6 +528,83 @@
EXPECT_TRUE(gaugeProducer.mCurrentSlicedBucket->begin()->second.front().mFields->empty());
}
+TEST(GaugeMetricProducerTest, TestPullOnTrigger) {
+ GaugeMetric metric;
+ metric.set_id(metricId);
+ metric.set_bucket(ONE_MINUTE);
+ metric.set_sampling_type(GaugeMetric::ALL_CONDITION_CHANGES);
+ metric.mutable_gauge_fields_filter()->set_include_all(false);
+ auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields();
+ gaugeFieldMatcher->set_field(tagId);
+ gaugeFieldMatcher->add_child()->set_field(1);
+
+ sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>();
+
+ sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>();
+ EXPECT_CALL(*pullerManager, Pull(tagId, _, _))
+ .WillOnce(Invoke([](int tagId, int64_t timeNs,
+ vector<std::shared_ptr<LogEvent>>* data) {
+ data->clear();
+ shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 3);
+ event->write(3);
+ event->init();
+ data->push_back(event);
+ return true;
+ }))
+ .WillOnce(Invoke([](int tagId, int64_t timeNs,
+ vector<std::shared_ptr<LogEvent>>* data) {
+ data->clear();
+ shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 10);
+ event->write(4);
+ event->init();
+ data->push_back(event);
+ return true;
+ }))
+ .WillOnce(Invoke([](int tagId, int64_t timeNs,
+ vector<std::shared_ptr<LogEvent>>* data) {
+ data->clear();
+ shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 20);
+ event->write(5);
+ event->init();
+ data->push_back(event);
+ return true;
+ }));
+
+ int triggerId = 5;
+ GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard,
+ tagId, triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs,
+ pullerManager);
+
+ vector<shared_ptr<LogEvent>> allData;
+ allData.clear();
+
+ EXPECT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
+ LogEvent trigger(triggerId, bucketStartTimeNs + 10);
+ trigger.init();
+ gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, trigger);
+ EXPECT_EQ(2UL, gaugeProducer.mCurrentSlicedBucket->begin()->second.size());
+ trigger.setElapsedTimestampNs(bucketStartTimeNs + 20);
+ gaugeProducer.onMatchedLogEvent(1 /*log matcher index*/, trigger);
+ EXPECT_EQ(3UL, gaugeProducer.mCurrentSlicedBucket->begin()->second.size());
+
+ allData.clear();
+ shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucket2StartTimeNs + 1);
+ event->write(10);
+ event->init();
+ allData.push_back(event);
+
+ gaugeProducer.onDataPulled(allData);
+ EXPECT_EQ(1UL, gaugeProducer.mCurrentSlicedBucket->size());
+ auto it = gaugeProducer.mCurrentSlicedBucket->begin()->second.front().mFields->begin();
+ EXPECT_EQ(INT, it->mValue.getType());
+ EXPECT_EQ(10, it->mValue.int_value);
+ EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.size());
+ EXPECT_EQ(3UL, gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.size());
+ EXPECT_EQ(3, gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms[0].mFields->begin()->mValue.int_value);
+ EXPECT_EQ(4, gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms[1].mFields->begin()->mValue.int_value);
+ EXPECT_EQ(5, gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms[2].mFields->begin()->mValue.int_value);
+}
+
} // namespace statsd
} // namespace os
} // namespace android
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index ee4e20a..3a96cd3 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
@@ -48,411 +30,13 @@
Landroid/accounts/IAccountManagerResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManagerResponse;
Landroid/accounts/IAccountManagerResponse;->onError(ILjava/lang/String;)V
Landroid/accounts/IAccountManagerResponse;->onResult(Landroid/os/Bundle;)V
-Landroid/app/ActionBar;->collapseActionView()Z
-Landroid/app/ActionBar;->DISPLAY_TITLE_MULTIPLE_LINES:I
-Landroid/app/ActionBar;->setShowHideAnimationEnabled(Z)V
-Landroid/app/Activity;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Landroid/app/Instrumentation;Landroid/os/IBinder;ILandroid/app/Application;Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Ljava/lang/CharSequence;Landroid/app/Activity;Ljava/lang/String;Landroid/app/Activity$NonConfigurationInstances;Landroid/content/res/Configuration;Ljava/lang/String;Lcom/android/internal/app/IVoiceInteractor;Landroid/view/Window;Landroid/view/ViewRootImpl$ActivityConfigCallback;)V
-Landroid/app/Activity;->dispatchActivityResult(Ljava/lang/String;IILandroid/content/Intent;Ljava/lang/String;)V
-Landroid/app/Activity;->finish(I)V
-Landroid/app/Activity;->FRAGMENTS_TAG:Ljava/lang/String;
-Landroid/app/Activity;->getActivityOptions()Landroid/app/ActivityOptions;
-Landroid/app/Activity;->getActivityToken()Landroid/os/IBinder;
-Landroid/app/Activity;->isResumed()Z
-Landroid/app/Activity;->mActivityInfo:Landroid/content/pm/ActivityInfo;
-Landroid/app/Activity;->mActivityTransitionState:Landroid/app/ActivityTransitionState;
-Landroid/app/Activity;->mApplication:Landroid/app/Application;
-Landroid/app/Activity;->mCalled:Z
-Landroid/app/Activity;->mComponent:Landroid/content/ComponentName;
-Landroid/app/Activity;->mConfigChangeFlags:I
-Landroid/app/Activity;->mCurrentConfig:Landroid/content/res/Configuration;
-Landroid/app/Activity;->mDestroyed:Z
-Landroid/app/Activity;->mEmbeddedID:Ljava/lang/String;
-Landroid/app/Activity;->mFinished:Z
-Landroid/app/Activity;->mFragments:Landroid/app/FragmentController;
-Landroid/app/Activity;->mHandler:Landroid/os/Handler;
-Landroid/app/Activity;->mIdent:I
-Landroid/app/Activity;->mInstrumentation:Landroid/app/Instrumentation;
-Landroid/app/Activity;->mIntent:Landroid/content/Intent;
-Landroid/app/Activity;->mLastNonConfigurationInstances:Landroid/app/Activity$NonConfigurationInstances;
-Landroid/app/Activity;->mMainThread:Landroid/app/ActivityThread;
-Landroid/app/Activity;->mParent:Landroid/app/Activity;
-Landroid/app/Activity;->mReferrer:Ljava/lang/String;
-Landroid/app/Activity;->mResultCode:I
-Landroid/app/Activity;->mResultData:Landroid/content/Intent;
-Landroid/app/Activity;->mResumed:Z
-Landroid/app/Activity;->mStopped:Z
-Landroid/app/Activity;->mTitle:Ljava/lang/CharSequence;
-Landroid/app/Activity;->mToken:Landroid/os/IBinder;
-Landroid/app/Activity;->mVisibleFromClient:Z
-Landroid/app/Activity;->mVoiceInteractor:Landroid/app/VoiceInteractor;
-Landroid/app/Activity;->mWindow:Landroid/view/Window;
-Landroid/app/Activity;->mWindowAdded:Z
-Landroid/app/Activity;->mWindowManager:Landroid/view/WindowManager;
-Landroid/app/Activity;->performCreate(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V
-Landroid/app/Activity;->saveManagedDialogs(Landroid/os/Bundle;)V
-Landroid/app/Activity;->setDisablePreviewScreenshots(Z)V
-Landroid/app/Activity;->setParent(Landroid/app/Activity;)V
-Landroid/app/Activity;->setPersistent(Z)V
-Landroid/app/Activity;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
-Landroid/app/Activity;->startActivityForResult(Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)V
-Landroid/app/Activity;->startActivityForResultAsUser(Landroid/content/Intent;ILandroid/os/UserHandle;)V
-Landroid/app/ActivityGroup;->mLocalActivityManager:Landroid/app/LocalActivityManager;
-Landroid/app/ActivityManager$MemoryInfo;->foregroundAppThreshold:J
-Landroid/app/ActivityManager$MemoryInfo;->hiddenAppThreshold:J
-Landroid/app/ActivityManager$MemoryInfo;->secondaryServerThreshold:J
-Landroid/app/ActivityManager$MemoryInfo;->visibleAppThreshold:J
-Landroid/app/ActivityManager$RunningAppProcessInfo;->flags:I
-Landroid/app/ActivityManager$RunningAppProcessInfo;->FLAG_HAS_ACTIVITIES:I
-Landroid/app/ActivityManager$RunningAppProcessInfo;->FLAG_PERSISTENT:I
-Landroid/app/ActivityManager$RunningAppProcessInfo;->processState:I
-Landroid/app/ActivityManager$RunningAppProcessInfo;->procStateToImportance(I)I
-Landroid/app/ActivityManager$StackInfo;->bounds:Landroid/graphics/Rect;
-Landroid/app/ActivityManager$StackInfo;->displayId:I
-Landroid/app/ActivityManager$StackInfo;->position:I
-Landroid/app/ActivityManager$StackInfo;->stackId:I
-Landroid/app/ActivityManager$StackInfo;->taskBounds:[Landroid/graphics/Rect;
-Landroid/app/ActivityManager$StackInfo;->taskIds:[I
-Landroid/app/ActivityManager$StackInfo;->taskNames:[Ljava/lang/String;
-Landroid/app/ActivityManager$StackInfo;->taskUserIds:[I
-Landroid/app/ActivityManager$StackInfo;->topActivity:Landroid/content/ComponentName;
-Landroid/app/ActivityManager$StackInfo;->toString(Ljava/lang/String;)Ljava/lang/String;
-Landroid/app/ActivityManager$StackInfo;->userId:I
-Landroid/app/ActivityManager$StackInfo;->visible:Z
-Landroid/app/ActivityManager$TaskDescription;->getBackgroundColor()I
-Landroid/app/ActivityManager$TaskDescription;->getInMemoryIcon()Landroid/graphics/Bitmap;
-Landroid/app/ActivityManager$TaskDescription;->setIcon(Landroid/graphics/Bitmap;)V
-Landroid/app/ActivityManager$TaskSnapshot;->getContentInsets()Landroid/graphics/Rect;
-Landroid/app/ActivityManager$TaskSnapshot;->getOrientation()I
-Landroid/app/ActivityManager$TaskSnapshot;->getScale()F
-Landroid/app/ActivityManager$TaskSnapshot;->isRealSnapshot()Z
-Landroid/app/ActivityManager$TaskSnapshot;->isReducedResolution()Z
-Landroid/app/ActivityManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
-Landroid/app/ActivityManager;->checkComponentPermission(Ljava/lang/String;IIZ)I
-Landroid/app/ActivityManager;->clearApplicationUserData(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)Z
-Landroid/app/ActivityManager;->forceStopPackageAsUser(Ljava/lang/String;I)V
-Landroid/app/ActivityManager;->getMaxRecentTasksStatic()I
-Landroid/app/ActivityManager;->getService()Landroid/app/IActivityManager;
-Landroid/app/ActivityManager;->IActivityManagerSingleton:Landroid/util/Singleton;
-Landroid/app/ActivityManager;->INTENT_SENDER_ACTIVITY:I
-Landroid/app/ActivityManager;->isHighEndGfx()Z
-Landroid/app/ActivityManager;->isLowRamDeviceStatic()Z
-Landroid/app/ActivityManager;->isUserRunning(I)Z
-Landroid/app/ActivityManager;->mContext:Landroid/content/Context;
-Landroid/app/ActivityManager;->PROCESS_STATE_BOUND_FOREGROUND_SERVICE:I
-Landroid/app/ActivityManager;->PROCESS_STATE_CACHED_ACTIVITY:I
-Landroid/app/ActivityManager;->PROCESS_STATE_FOREGROUND_SERVICE:I
-Landroid/app/ActivityManager;->PROCESS_STATE_HOME:I
-Landroid/app/ActivityManager;->PROCESS_STATE_IMPORTANT_BACKGROUND:I
-Landroid/app/ActivityManager;->PROCESS_STATE_RECEIVER:I
-Landroid/app/ActivityManager;->PROCESS_STATE_SERVICE:I
-Landroid/app/ActivityManager;->PROCESS_STATE_TOP:I
-Landroid/app/ActivityManager;->staticGetMemoryClass()I
-Landroid/app/ActivityManager;->switchUser(I)Z
Landroid/app/ActivityManagerNative;-><init>()V
-Landroid/app/ActivityManagerNative;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager;
-Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
-Landroid/app/ActivityManagerNative;->isSystemReady()Z
-Landroid/app/ActivityOptions;->makeCustomAnimation(Landroid/content/Context;IILandroid/os/Handler;Landroid/app/ActivityOptions$OnAnimationStartedListener;)Landroid/app/ActivityOptions;
-Landroid/app/ActivityOptions;->makeMultiThumbFutureAspectScaleAnimation(Landroid/content/Context;Landroid/os/Handler;Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/app/ActivityOptions$OnAnimationStartedListener;Z)Landroid/app/ActivityOptions;
-Landroid/app/ActivityThread$ActivityClientRecord;-><init>()V
-Landroid/app/ActivityThread$ActivityClientRecord;->activity:Landroid/app/Activity;
-Landroid/app/ActivityThread$ActivityClientRecord;->activityInfo:Landroid/content/pm/ActivityInfo;
-Landroid/app/ActivityThread$ActivityClientRecord;->compatInfo:Landroid/content/res/CompatibilityInfo;
-Landroid/app/ActivityThread$ActivityClientRecord;->intent:Landroid/content/Intent;
-Landroid/app/ActivityThread$ActivityClientRecord;->mPreserveWindow:Z
-Landroid/app/ActivityThread$ActivityClientRecord;->packageInfo:Landroid/app/LoadedApk;
-Landroid/app/ActivityThread$ActivityClientRecord;->paused:Z
-Landroid/app/ActivityThread$ActivityClientRecord;->stopped:Z
-Landroid/app/ActivityThread$ActivityClientRecord;->token:Landroid/os/IBinder;
Landroid/app/ActivityThread$AppBindData;-><init>()V
-Landroid/app/ActivityThread$AppBindData;->appInfo:Landroid/content/pm/ApplicationInfo;
-Landroid/app/ActivityThread$AppBindData;->compatInfo:Landroid/content/res/CompatibilityInfo;
-Landroid/app/ActivityThread$AppBindData;->info:Landroid/app/LoadedApk;
-Landroid/app/ActivityThread$AppBindData;->instrumentationArgs:Landroid/os/Bundle;
-Landroid/app/ActivityThread$AppBindData;->persistent:Z
-Landroid/app/ActivityThread$AppBindData;->processName:Ljava/lang/String;
-Landroid/app/ActivityThread$AppBindData;->providers:Ljava/util/List;
-Landroid/app/ActivityThread$AppBindData;->restrictedBackupMode:Z
-Landroid/app/ActivityThread$BindServiceData;->intent:Landroid/content/Intent;
-Landroid/app/ActivityThread$BindServiceData;->token:Landroid/os/IBinder;
Landroid/app/ActivityThread$CreateServiceData;-><init>()V
-Landroid/app/ActivityThread$CreateServiceData;->compatInfo:Landroid/content/res/CompatibilityInfo;
-Landroid/app/ActivityThread$CreateServiceData;->info:Landroid/content/pm/ServiceInfo;
-Landroid/app/ActivityThread$CreateServiceData;->intent:Landroid/content/Intent;
-Landroid/app/ActivityThread$CreateServiceData;->token:Landroid/os/IBinder;
-Landroid/app/ActivityThread$H;->BIND_SERVICE:I
-Landroid/app/ActivityThread$H;->CREATE_SERVICE:I
-Landroid/app/ActivityThread$H;->DUMP_PROVIDER:I
-Landroid/app/ActivityThread$H;->ENTER_ANIMATION_COMPLETE:I
-Landroid/app/ActivityThread$H;->EXIT_APPLICATION:I
-Landroid/app/ActivityThread$H;->GC_WHEN_IDLE:I
-Landroid/app/ActivityThread$H;->INSTALL_PROVIDER:I
-Landroid/app/ActivityThread$H;->RECEIVER:I
-Landroid/app/ActivityThread$H;->REMOVE_PROVIDER:I
-Landroid/app/ActivityThread$H;->SCHEDULE_CRASH:I
-Landroid/app/ActivityThread$H;->SERVICE_ARGS:I
-Landroid/app/ActivityThread$H;->STOP_SERVICE:I
-Landroid/app/ActivityThread$H;->UNBIND_SERVICE:I
-Landroid/app/ActivityThread$ProviderClientRecord;->mHolder:Landroid/app/ContentProviderHolder;
-Landroid/app/ActivityThread$ProviderClientRecord;->mLocalProvider:Landroid/content/ContentProvider;
-Landroid/app/ActivityThread$ProviderClientRecord;->mProvider:Landroid/content/IContentProvider;
-Landroid/app/ActivityThread$ReceiverData;->compatInfo:Landroid/content/res/CompatibilityInfo;
-Landroid/app/ActivityThread$ReceiverData;->info:Landroid/content/pm/ActivityInfo;
-Landroid/app/ActivityThread$ReceiverData;->intent:Landroid/content/Intent;
-Landroid/app/ActivityThread$ServiceArgsData;->args:Landroid/content/Intent;
-Landroid/app/ActivityThread$ServiceArgsData;->token:Landroid/os/IBinder;
-Landroid/app/ActivityThread;-><init>()V
-Landroid/app/ActivityThread;->acquireExistingProvider(Landroid/content/Context;Ljava/lang/String;IZ)Landroid/content/IContentProvider;
-Landroid/app/ActivityThread;->acquireProvider(Landroid/content/Context;Ljava/lang/String;IZ)Landroid/content/IContentProvider;
-Landroid/app/ActivityThread;->attach(ZJ)V
-Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread;
-Landroid/app/ActivityThread;->currentApplication()Landroid/app/Application;
-Landroid/app/ActivityThread;->currentPackageName()Ljava/lang/String;
-Landroid/app/ActivityThread;->currentProcessName()Ljava/lang/String;
-Landroid/app/ActivityThread;->getActivity(Landroid/os/IBinder;)Landroid/app/Activity;
-Landroid/app/ActivityThread;->getApplication()Landroid/app/Application;
-Landroid/app/ActivityThread;->getApplicationThread()Landroid/app/ActivityThread$ApplicationThread;
-Landroid/app/ActivityThread;->getHandler()Landroid/os/Handler;
-Landroid/app/ActivityThread;->getInstrumentation()Landroid/app/Instrumentation;
-Landroid/app/ActivityThread;->getLooper()Landroid/os/Looper;
-Landroid/app/ActivityThread;->getPackageInfo(Landroid/content/pm/ApplicationInfo;Landroid/content/res/CompatibilityInfo;I)Landroid/app/LoadedApk;
-Landroid/app/ActivityThread;->getPackageInfo(Ljava/lang/String;Landroid/content/res/CompatibilityInfo;I)Landroid/app/LoadedApk;
-Landroid/app/ActivityThread;->getPackageInfoNoCheck(Landroid/content/pm/ApplicationInfo;Landroid/content/res/CompatibilityInfo;)Landroid/app/LoadedApk;
-Landroid/app/ActivityThread;->getPackageManager()Landroid/content/pm/IPackageManager;
-Landroid/app/ActivityThread;->getProcessName()Ljava/lang/String;
-Landroid/app/ActivityThread;->getSystemContext()Landroid/app/ContextImpl;
-Landroid/app/ActivityThread;->handleBindApplication(Landroid/app/ActivityThread$AppBindData;)V
-Landroid/app/ActivityThread;->handleCreateService(Landroid/app/ActivityThread$CreateServiceData;)V
-Landroid/app/ActivityThread;->handleReceiver(Landroid/app/ActivityThread$ReceiverData;)V
-Landroid/app/ActivityThread;->handleUnstableProviderDied(Landroid/os/IBinder;Z)V
-Landroid/app/ActivityThread;->installContentProviders(Landroid/content/Context;Ljava/util/List;)V
-Landroid/app/ActivityThread;->installProvider(Landroid/content/Context;Landroid/app/ContentProviderHolder;Landroid/content/pm/ProviderInfo;ZZZ)Landroid/app/ContentProviderHolder;
-Landroid/app/ActivityThread;->installSystemProviders(Ljava/util/List;)V
-Landroid/app/ActivityThread;->mActivities:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mAllApplications:Ljava/util/ArrayList;
-Landroid/app/ActivityThread;->mAppThread:Landroid/app/ActivityThread$ApplicationThread;
-Landroid/app/ActivityThread;->mBoundApplication:Landroid/app/ActivityThread$AppBindData;
-Landroid/app/ActivityThread;->mConfiguration:Landroid/content/res/Configuration;
-Landroid/app/ActivityThread;->mCurDefaultDisplayDpi:I
-Landroid/app/ActivityThread;->mDensityCompatMode:Z
-Landroid/app/ActivityThread;->mH:Landroid/app/ActivityThread$H;
-Landroid/app/ActivityThread;->mInitialApplication:Landroid/app/Application;
-Landroid/app/ActivityThread;->mInstrumentation:Landroid/app/Instrumentation;
-Landroid/app/ActivityThread;->mInstrumentationAppDir:Ljava/lang/String;
-Landroid/app/ActivityThread;->mInstrumentedAppDir:Ljava/lang/String;
-Landroid/app/ActivityThread;->mLocalProviders:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mLocalProvidersByName:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mLooper:Landroid/os/Looper;
-Landroid/app/ActivityThread;->mNumVisibleActivities:I
-Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mPendingConfiguration:Landroid/content/res/Configuration;
-Landroid/app/ActivityThread;->mProviderMap:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mProviderRefCountMap:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mResourcePackages:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mResourcesManager:Landroid/app/ResourcesManager;
-Landroid/app/ActivityThread;->mServices:Landroid/util/ArrayMap;
-Landroid/app/ActivityThread;->mSystemContext:Landroid/app/ContextImpl;
-Landroid/app/ActivityThread;->peekPackageInfo(Ljava/lang/String;Z)Landroid/app/LoadedApk;
-Landroid/app/ActivityThread;->performNewIntents(Landroid/os/IBinder;Ljava/util/List;Z)V
-Landroid/app/ActivityThread;->performStopActivity(Landroid/os/IBinder;ZLjava/lang/String;)V
-Landroid/app/ActivityThread;->registerOnActivityPausedListener(Landroid/app/Activity;Landroid/app/OnActivityPausedListener;)V
-Landroid/app/ActivityThread;->releaseProvider(Landroid/content/IContentProvider;Z)Z
-Landroid/app/ActivityThread;->scheduleGcIdler()V
-Landroid/app/ActivityThread;->sCurrentActivityThread:Landroid/app/ActivityThread;
-Landroid/app/ActivityThread;->sendActivityResult(Landroid/os/IBinder;Ljava/lang/String;IILandroid/content/Intent;)V
-Landroid/app/ActivityThread;->sMainThreadHandler:Landroid/os/Handler;
-Landroid/app/ActivityThread;->sPackageManager:Landroid/content/pm/IPackageManager;
-Landroid/app/ActivityThread;->startActivityNow(Landroid/app/Activity;Ljava/lang/String;Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Landroid/os/IBinder;Landroid/os/Bundle;Landroid/app/Activity$NonConfigurationInstances;)Landroid/app/Activity;
-Landroid/app/ActivityThread;->systemMain()Landroid/app/ActivityThread;
-Landroid/app/ActivityThread;->unregisterOnActivityPausedListener(Landroid/app/Activity;Landroid/app/OnActivityPausedListener;)V
-Landroid/app/admin/DeviceAdminInfo$PolicyInfo;->tag:Ljava/lang/String;
-Landroid/app/admin/DeviceAdminInfo;->getUsedPolicies()Ljava/util/ArrayList;
-Landroid/app/admin/DevicePolicyManager;->ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED:Ljava/lang/String;
-Landroid/app/admin/DevicePolicyManager;->getActiveAdminsAsUser(I)Ljava/util/List;
-Landroid/app/admin/DevicePolicyManager;->getCameraDisabled(Landroid/content/ComponentName;I)Z
-Landroid/app/admin/DevicePolicyManager;->getCurrentFailedPasswordAttempts(I)I
-Landroid/app/admin/DevicePolicyManager;->getKeyguardDisabledFeatures(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getMandatoryBackupTransport()Landroid/content/ComponentName;
-Landroid/app/admin/DevicePolicyManager;->getMaximumFailedPasswordsForWipe(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getMaximumTimeToLock(Landroid/content/ComponentName;I)J
-Landroid/app/admin/DevicePolicyManager;->getPasswordHistoryLength(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLength(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLetters(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumLowerCase(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumNonLetter(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumNumeric(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumSymbols(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordMinimumUpperCase(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getPasswordQuality(Landroid/content/ComponentName;I)I
-Landroid/app/admin/DevicePolicyManager;->getProfileOwnerAsUser(I)Landroid/content/ComponentName;
-Landroid/app/admin/DevicePolicyManager;->getRequiredStrongAuthTimeout(Landroid/content/ComponentName;I)J
-Landroid/app/admin/DevicePolicyManager;->getStorageEncryptionStatus(I)I
-Landroid/app/admin/DevicePolicyManager;->getTrustAgentConfiguration(Landroid/content/ComponentName;Landroid/content/ComponentName;I)Ljava/util/List;
-Landroid/app/admin/DevicePolicyManager;->packageHasActiveAdmins(Ljava/lang/String;I)Z
-Landroid/app/admin/DevicePolicyManager;->reportFailedPasswordAttempt(I)V
-Landroid/app/admin/DevicePolicyManager;->reportSuccessfulPasswordAttempt(I)V
-Landroid/app/admin/DevicePolicyManager;->setActiveAdmin(Landroid/content/ComponentName;Z)V
-Landroid/app/admin/DevicePolicyManager;->setActiveAdmin(Landroid/content/ComponentName;ZI)V
-Landroid/app/admin/DevicePolicyManager;->setActivePasswordState(Landroid/app/admin/PasswordMetrics;I)V
-Landroid/app/admin/DevicePolicyManager;->setDefaultSmsApplication(Landroid/content/ComponentName;Ljava/lang/String;)V
-Landroid/app/admin/DevicePolicyManager;->setGlobalProxy(Landroid/content/ComponentName;Ljava/net/Proxy;Ljava/util/List;)Landroid/content/ComponentName;
-Landroid/app/admin/DevicePolicyManager;->throwIfParentInstance(Ljava/lang/String;)V
Landroid/app/admin/IDevicePolicyManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/admin/IDevicePolicyManager;
Landroid/app/admin/IDevicePolicyManager$Stub;->TRANSACTION_packageHasActiveAdmins:I
Landroid/app/admin/IDevicePolicyManager$Stub;->TRANSACTION_removeActiveAdmin:I
Landroid/app/admin/IDevicePolicyManager;->packageHasActiveAdmins(Ljava/lang/String;I)Z
-Landroid/app/admin/SecurityLog$SecurityEvent;-><init>([B)V
-Landroid/app/AlarmManager;->FLAG_ALLOW_WHILE_IDLE_UNRESTRICTED:I
-Landroid/app/AlarmManager;->FLAG_IDLE_UNTIL:I
-Landroid/app/AlarmManager;->FLAG_STANDALONE:I
-Landroid/app/AlarmManager;->FLAG_WAKE_FROM_IDLE:I
-Landroid/app/AlarmManager;->mService:Landroid/app/IAlarmManager;
-Landroid/app/AlarmManager;->set(IJJJLjava/lang/String;Landroid/app/AlarmManager$OnAlarmListener;Landroid/os/Handler;Landroid/os/WorkSource;)V
-Landroid/app/AlarmManager;->WINDOW_EXACT:J
-Landroid/app/AlarmManager;->WINDOW_HEURISTIC:J
-Landroid/app/AlertDialog$Builder;->P:Lcom/android/internal/app/AlertController$AlertParams;
-Landroid/app/AlertDialog$Builder;->setRecycleOnMeasureEnabled(Z)Landroid/app/AlertDialog$Builder;
-Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;IIII)Landroid/app/AlertDialog$Builder;
-Landroid/app/AlertDialog;->mAlert:Lcom/android/internal/app/AlertController;
-Landroid/app/AppGlobals;->getInitialApplication()Landroid/app/Application;
-Landroid/app/AppGlobals;->getInitialPackage()Ljava/lang/String;
-Landroid/app/AppGlobals;->getPackageManager()Landroid/content/pm/IPackageManager;
-Landroid/app/Application;->attach(Landroid/content/Context;)V
-Landroid/app/Application;->collectActivityLifecycleCallbacks()[Ljava/lang/Object;
-Landroid/app/Application;->dispatchActivityCreated(Landroid/app/Activity;Landroid/os/Bundle;)V
-Landroid/app/Application;->dispatchActivityDestroyed(Landroid/app/Activity;)V
-Landroid/app/Application;->dispatchActivityPaused(Landroid/app/Activity;)V
-Landroid/app/Application;->dispatchActivityResumed(Landroid/app/Activity;)V
-Landroid/app/Application;->dispatchActivitySaveInstanceState(Landroid/app/Activity;Landroid/os/Bundle;)V
-Landroid/app/Application;->dispatchActivityStarted(Landroid/app/Activity;)V
-Landroid/app/Application;->dispatchActivityStopped(Landroid/app/Activity;)V
-Landroid/app/Application;->mActivityLifecycleCallbacks:Ljava/util/ArrayList;
-Landroid/app/Application;->mAssistCallbacks:Ljava/util/ArrayList;
-Landroid/app/Application;->mComponentCallbacks:Ljava/util/ArrayList;
-Landroid/app/Application;->mLoadedApk:Landroid/app/LoadedApk;
-Landroid/app/ApplicationLoaders;->getDefault()Landroid/app/ApplicationLoaders;
-Landroid/app/ApplicationLoaders;->mLoaders:Landroid/util/ArrayMap;
-Landroid/app/ApplicationPackageManager;-><init>(Landroid/app/ContextImpl;Landroid/content/pm/IPackageManager;)V
-Landroid/app/ApplicationPackageManager;->configurationChanged()V
-Landroid/app/ApplicationPackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
-Landroid/app/ApplicationPackageManager;->getPackageCurrentVolume(Landroid/content/pm/ApplicationInfo;)Landroid/os/storage/VolumeInfo;
-Landroid/app/ApplicationPackageManager;->getPackageSizeInfoAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageStatsObserver;)V
-Landroid/app/ApplicationPackageManager;->mPM:Landroid/content/pm/IPackageManager;
-Landroid/app/ApplicationPackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
-Landroid/app/AppOpsManager$PackageOps;-><init>(Ljava/lang/String;ILjava/util/List;)V
-Landroid/app/AppOpsManager;->checkOp(IILjava/lang/String;)I
-Landroid/app/AppOpsManager;->checkOpNoThrow(IILjava/lang/String;)I
-Landroid/app/AppOpsManager;->mService:Lcom/android/internal/app/IAppOpsService;
-Landroid/app/AppOpsManager;->noteOp(I)I
-Landroid/app/AppOpsManager;->noteOp(IILjava/lang/String;)I
-Landroid/app/AppOpsManager;->noteOpNoThrow(IILjava/lang/String;)I
-Landroid/app/AppOpsManager;->noteProxyOp(ILjava/lang/String;)I
-Landroid/app/AppOpsManager;->opToName(I)Ljava/lang/String;
-Landroid/app/AppOpsManager;->opToSwitch(I)I
-Landroid/app/AppOpsManager;->OP_ACCEPT_HANDOVER:I
-Landroid/app/AppOpsManager;->OP_ACCESS_NOTIFICATIONS:I
-Landroid/app/AppOpsManager;->OP_ACTIVATE_VPN:I
-Landroid/app/AppOpsManager;->OP_ADD_VOICEMAIL:I
-Landroid/app/AppOpsManager;->OP_ANSWER_PHONE_CALLS:I
-Landroid/app/AppOpsManager;->OP_ASSIST_SCREENSHOT:I
-Landroid/app/AppOpsManager;->OP_ASSIST_STRUCTURE:I
-Landroid/app/AppOpsManager;->OP_AUDIO_ACCESSIBILITY_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_ALARM_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_BLUETOOTH_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_MASTER_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_MEDIA_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_NOTIFICATION_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_RING_VOLUME:I
-Landroid/app/AppOpsManager;->OP_AUDIO_VOICE_VOLUME:I
-Landroid/app/AppOpsManager;->OP_BIND_ACCESSIBILITY_SERVICE:I
-Landroid/app/AppOpsManager;->OP_BLUETOOTH_SCAN:I
-Landroid/app/AppOpsManager;->OP_BODY_SENSORS:I
-Landroid/app/AppOpsManager;->OP_CALL_PHONE:I
-Landroid/app/AppOpsManager;->OP_CAMERA:I
-Landroid/app/AppOpsManager;->OP_CHANGE_WIFI_STATE:I
-Landroid/app/AppOpsManager;->OP_COARSE_LOCATION:I
-Landroid/app/AppOpsManager;->OP_FINE_LOCATION:I
-Landroid/app/AppOpsManager;->OP_GET_ACCOUNTS:I
-Landroid/app/AppOpsManager;->OP_GET_USAGE_STATS:I
-Landroid/app/AppOpsManager;->OP_GPS:I
-Landroid/app/AppOpsManager;->OP_INSTANT_APP_START_FOREGROUND:I
-Landroid/app/AppOpsManager;->OP_MANAGE_IPSEC_TUNNELS:I
-Landroid/app/AppOpsManager;->OP_MOCK_LOCATION:I
-Landroid/app/AppOpsManager;->OP_MONITOR_HIGH_POWER_LOCATION:I
-Landroid/app/AppOpsManager;->OP_MONITOR_LOCATION:I
-Landroid/app/AppOpsManager;->OP_MUTE_MICROPHONE:I
-Landroid/app/AppOpsManager;->OP_NEIGHBORING_CELLS:I
-Landroid/app/AppOpsManager;->OP_NONE:I
-Landroid/app/AppOpsManager;->OP_PICTURE_IN_PICTURE:I
-Landroid/app/AppOpsManager;->OP_PLAY_AUDIO:I
-Landroid/app/AppOpsManager;->OP_POST_NOTIFICATION:I
-Landroid/app/AppOpsManager;->OP_PROCESS_OUTGOING_CALLS:I
-Landroid/app/AppOpsManager;->OP_PROJECT_MEDIA:I
-Landroid/app/AppOpsManager;->OP_READ_CALENDAR:I
-Landroid/app/AppOpsManager;->OP_READ_CALL_LOG:I
-Landroid/app/AppOpsManager;->OP_READ_CELL_BROADCASTS:I
-Landroid/app/AppOpsManager;->OP_READ_CLIPBOARD:I
-Landroid/app/AppOpsManager;->OP_READ_CONTACTS:I
-Landroid/app/AppOpsManager;->OP_READ_EXTERNAL_STORAGE:I
-Landroid/app/AppOpsManager;->OP_READ_ICC_SMS:I
-Landroid/app/AppOpsManager;->OP_READ_PHONE_NUMBERS:I
-Landroid/app/AppOpsManager;->OP_READ_PHONE_STATE:I
-Landroid/app/AppOpsManager;->OP_READ_SMS:I
-Landroid/app/AppOpsManager;->OP_RECEIVE_EMERGECY_SMS:I
-Landroid/app/AppOpsManager;->OP_RECEIVE_MMS:I
-Landroid/app/AppOpsManager;->OP_RECEIVE_SMS:I
-Landroid/app/AppOpsManager;->OP_RECEIVE_WAP_PUSH:I
-Landroid/app/AppOpsManager;->OP_REQUEST_DELETE_PACKAGES:I
-Landroid/app/AppOpsManager;->OP_REQUEST_INSTALL_PACKAGES:I
-Landroid/app/AppOpsManager;->OP_RUN_ANY_IN_BACKGROUND:I
-Landroid/app/AppOpsManager;->OP_RUN_IN_BACKGROUND:I
-Landroid/app/AppOpsManager;->OP_SEND_SMS:I
-Landroid/app/AppOpsManager;->OP_START_FOREGROUND:I
-Landroid/app/AppOpsManager;->OP_TAKE_AUDIO_FOCUS:I
-Landroid/app/AppOpsManager;->OP_TAKE_MEDIA_BUTTONS:I
-Landroid/app/AppOpsManager;->OP_TOAST_WINDOW:I
-Landroid/app/AppOpsManager;->OP_TURN_SCREEN_ON:I
-Landroid/app/AppOpsManager;->OP_USE_FINGERPRINT:I
-Landroid/app/AppOpsManager;->OP_USE_SIP:I
-Landroid/app/AppOpsManager;->OP_VIBRATE:I
-Landroid/app/AppOpsManager;->OP_WAKE_LOCK:I
-Landroid/app/AppOpsManager;->OP_WIFI_SCAN:I
-Landroid/app/AppOpsManager;->OP_WRITE_CALENDAR:I
-Landroid/app/AppOpsManager;->OP_WRITE_CALL_LOG:I
-Landroid/app/AppOpsManager;->OP_WRITE_CLIPBOARD:I
-Landroid/app/AppOpsManager;->OP_WRITE_CONTACTS:I
-Landroid/app/AppOpsManager;->OP_WRITE_EXTERNAL_STORAGE:I
-Landroid/app/AppOpsManager;->OP_WRITE_ICC_SMS:I
-Landroid/app/AppOpsManager;->OP_WRITE_SETTINGS:I
-Landroid/app/AppOpsManager;->OP_WRITE_SMS:I
-Landroid/app/AppOpsManager;->OP_WRITE_WALLPAPER:I
-Landroid/app/AppOpsManager;->resetAllModes()V
-Landroid/app/AppOpsManager;->setRestriction(III[Ljava/lang/String;)V
-Landroid/app/AppOpsManager;->sOpPerms:[Ljava/lang/String;
-Landroid/app/AppOpsManager;->_NUM_OP:I
-Landroid/app/assist/AssistContent;-><init>(Landroid/os/Parcel;)V
-Landroid/app/assist/AssistContent;->mClipData:Landroid/content/ClipData;
-Landroid/app/assist/AssistContent;->mExtras:Landroid/os/Bundle;
-Landroid/app/assist/AssistContent;->mIntent:Landroid/content/Intent;
-Landroid/app/assist/AssistContent;->mIsAppProvidedIntent:Z
-Landroid/app/assist/AssistContent;->mStructuredData:Ljava/lang/String;
-Landroid/app/assist/AssistContent;->mUri:Landroid/net/Uri;
-Landroid/app/assist/AssistContent;->writeToParcelInternal(Landroid/os/Parcel;I)V
-Landroid/app/backup/BackupDataInput$EntityHeader;->dataSize:I
-Landroid/app/backup/BackupDataInput$EntityHeader;->key:Ljava/lang/String;
-Landroid/app/backup/BackupDataInputStream;->dataSize:I
-Landroid/app/backup/BackupDataInputStream;->key:Ljava/lang/String;
-Landroid/app/backup/BackupDataOutput;->mBackupWriter:J
-Landroid/app/backup/BackupHelperDispatcher$Header;->chunkSize:I
-Landroid/app/backup/BackupHelperDispatcher$Header;->keyPrefix:Ljava/lang/String;
-Landroid/app/backup/BackupManager;->checkServiceBinder()V
-Landroid/app/backup/BackupManager;->sService:Landroid/app/backup/IBackupManager;
-Landroid/app/backup/FileBackupHelperBase;->writeNewStateDescription(Landroid/os/ParcelFileDescriptor;)V
-Landroid/app/backup/FullBackup;->backupToTar(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/backup/FullBackupDataOutput;)I
-Landroid/app/backup/FullBackupDataOutput;-><init>(Landroid/os/ParcelFileDescriptor;)V
-Landroid/app/backup/FullBackupDataOutput;->addSize(J)V
-Landroid/app/backup/FullBackupDataOutput;->getData()Landroid/app/backup/BackupDataOutput;
-Landroid/app/backup/FullBackupDataOutput;->mData:Landroid/app/backup/BackupDataOutput;
Landroid/app/backup/IBackupManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/backup/IBackupManager;
Landroid/app/backup/IBackupManager;->acknowledgeFullBackupOrRestore(IZLjava/lang/String;Ljava/lang/String;Landroid/app/backup/IFullBackupRestoreObserver;)V
Landroid/app/backup/IBackupManager;->clearBackupData(Ljava/lang/String;Ljava/lang/String;)V
@@ -466,85 +50,7 @@
Landroid/app/backup/IBackupManager;->setBackupEnabled(Z)V
Landroid/app/backup/IFullBackupRestoreObserver$Stub;-><init>()V
Landroid/app/backup/IRestoreObserver$Stub;-><init>()V
-Landroid/app/ContentProviderHolder;-><init>(Landroid/content/pm/ProviderInfo;)V
-Landroid/app/ContentProviderHolder;-><init>(Landroid/os/Parcel;)V
-Landroid/app/ContentProviderHolder;->info:Landroid/content/pm/ProviderInfo;
-Landroid/app/ContentProviderHolder;->noReleaseNeeded:Z
-Landroid/app/ContentProviderHolder;->provider:Landroid/content/IContentProvider;
-Landroid/app/ContextImpl$ApplicationContentResolver;->acquireProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
-Landroid/app/ContextImpl$ApplicationContentResolver;->mMainThread:Landroid/app/ActivityThread;
-Landroid/app/ContextImpl;->createActivityContext(Landroid/app/ActivityThread;Landroid/app/LoadedApk;Landroid/content/pm/ActivityInfo;Landroid/os/IBinder;ILandroid/content/res/Configuration;)Landroid/app/ContextImpl;
-Landroid/app/ContextImpl;->createAppContext(Landroid/app/ActivityThread;Landroid/app/LoadedApk;)Landroid/app/ContextImpl;
-Landroid/app/ContextImpl;->createSystemContext(Landroid/app/ActivityThread;)Landroid/app/ContextImpl;
-Landroid/app/ContextImpl;->getActivityToken()Landroid/os/IBinder;
-Landroid/app/ContextImpl;->getDisplay()Landroid/view/Display;
-Landroid/app/ContextImpl;->getImpl(Landroid/content/Context;)Landroid/app/ContextImpl;
-Landroid/app/ContextImpl;->getOuterContext()Landroid/content/Context;
-Landroid/app/ContextImpl;->getPreferencesDir()Ljava/io/File;
-Landroid/app/ContextImpl;->getReceiverRestrictedContext()Landroid/content/Context;
-Landroid/app/ContextImpl;->mBasePackageName:Ljava/lang/String;
-Landroid/app/ContextImpl;->mClassLoader:Ljava/lang/ClassLoader;
-Landroid/app/ContextImpl;->mContentResolver:Landroid/app/ContextImpl$ApplicationContentResolver;
-Landroid/app/ContextImpl;->mFlags:I
-Landroid/app/ContextImpl;->mMainThread:Landroid/app/ActivityThread;
-Landroid/app/ContextImpl;->mOpPackageName:Ljava/lang/String;
-Landroid/app/ContextImpl;->mOuterContext:Landroid/content/Context;
-Landroid/app/ContextImpl;->mPackageInfo:Landroid/app/LoadedApk;
-Landroid/app/ContextImpl;->mPackageManager:Landroid/content/pm/PackageManager;
-Landroid/app/ContextImpl;->mPreferencesDir:Ljava/io/File;
-Landroid/app/ContextImpl;->mResources:Landroid/content/res/Resources;
-Landroid/app/ContextImpl;->mServiceCache:[Ljava/lang/Object;
-Landroid/app/ContextImpl;->mSharedPrefsPaths:Landroid/util/ArrayMap;
-Landroid/app/ContextImpl;->mTheme:Landroid/content/res/Resources$Theme;
-Landroid/app/ContextImpl;->mThemeResource:I
-Landroid/app/ContextImpl;->scheduleFinalCleanup(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/app/ContextImpl;->setOuterContext(Landroid/content/Context;)V
-Landroid/app/ContextImpl;->sSharedPrefsCache:Landroid/util/ArrayMap;
-Landroid/app/DatePickerDialog;->mDatePicker:Landroid/widget/DatePicker;
-Landroid/app/Dialog;->CANCEL:I
-Landroid/app/Dialog;->dismissDialog()V
-Landroid/app/Dialog;->mCancelMessage:Landroid/os/Message;
-Landroid/app/Dialog;->mContext:Landroid/content/Context;
-Landroid/app/Dialog;->mDismissMessage:Landroid/os/Message;
-Landroid/app/Dialog;->mHandler:Landroid/os/Handler;
-Landroid/app/Dialog;->mListenersHandler:Landroid/os/Handler;
-Landroid/app/Dialog;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
-Landroid/app/Dialog;->mOwnerActivity:Landroid/app/Activity;
-Landroid/app/Dialog;->mShowing:Z
-Landroid/app/Dialog;->mShowMessage:Landroid/os/Message;
-Landroid/app/Dialog;->mWindow:Landroid/view/Window;
-Landroid/app/DialogFragment;->mBackStackId:I
-Landroid/app/DialogFragment;->mDismissed:Z
-Landroid/app/DialogFragment;->mShownByMe:Z
-Landroid/app/DialogFragment;->mViewDestroyed:Z
-Landroid/app/DialogFragment;->showAllowingStateLoss(Landroid/app/FragmentManager;Ljava/lang/String;)V
-Landroid/app/DownloadManager$Query;->orderBy(Ljava/lang/String;I)Landroid/app/DownloadManager$Query;
-Landroid/app/DownloadManager$Query;->setOnlyIncludeVisibleInDownloadsUi(Z)Landroid/app/DownloadManager$Query;
-Landroid/app/DownloadManager$Request;->mUri:Landroid/net/Uri;
-Landroid/app/DownloadManager;->getWhereArgsForIds([J)[Ljava/lang/String;
-Landroid/app/DownloadManager;->getWhereClauseForIds([J)Ljava/lang/String;
Landroid/app/DownloadManager;->restartDownload([J)V
-Landroid/app/DownloadManager;->setAccessAllDownloads(Z)V
-Landroid/app/DownloadManager;->setAccessFilename(Z)V
-Landroid/app/DownloadManager;->UNDERLYING_COLUMNS:[Ljava/lang/String;
-Landroid/app/Fragment;->mAdded:Z
-Landroid/app/Fragment;->mChildFragmentManager:Landroid/app/FragmentManagerImpl;
-Landroid/app/Fragment;->mFragmentId:I
-Landroid/app/Fragment;->mFragmentManager:Landroid/app/FragmentManagerImpl;
-Landroid/app/Fragment;->mHost:Landroid/app/FragmentHostCallback;
-Landroid/app/Fragment;->mIndex:I
-Landroid/app/Fragment;->mLoadersStarted:Z
-Landroid/app/Fragment;->mSavedFragmentState:Landroid/os/Bundle;
-Landroid/app/Fragment;->mView:Landroid/view/View;
-Landroid/app/Fragment;->mWho:Ljava/lang/String;
-Landroid/app/Fragment;->sClassMap:Landroid/util/ArrayMap;
-Landroid/app/FragmentController;->mHost:Landroid/app/FragmentHostCallback;
-Landroid/app/FragmentHostCallback;->mLoadersStarted:Z
-Landroid/app/FragmentManagerImpl;->loadAnimator(Landroid/app/Fragment;IZI)Landroid/animation/Animator;
-Landroid/app/FragmentManagerImpl;->mActive:Landroid/util/SparseArray;
-Landroid/app/FragmentManagerImpl;->mAdded:Ljava/util/ArrayList;
-Landroid/app/FragmentManagerImpl;->mStateSaved:Z
-Landroid/app/FragmentManagerImpl;->noteStateNotSaved()V
Landroid/app/IActivityController;->activityResuming(Ljava/lang/String;)Z
Landroid/app/IActivityController;->activityStarting(Landroid/content/Intent;Ljava/lang/String;)Z
Landroid/app/IActivityController;->appNotResponding(Ljava/lang/String;ILjava/lang/String;)I
@@ -671,22 +177,11 @@
Landroid/app/INotificationManager;->cancelAllNotifications(Ljava/lang/String;I)V
Landroid/app/INotificationManager;->cancelNotificationWithTag(Ljava/lang/String;Ljava/lang/String;II)V
Landroid/app/INotificationManager;->cancelToast(Ljava/lang/String;Landroid/app/ITransientNotification;)V
-Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;I)V
+Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;II)V
Landroid/app/INotificationManager;->getActiveNotifications(Ljava/lang/String;)[Landroid/service/notification/StatusBarNotification;
Landroid/app/INotificationManager;->getHistoricalNotifications(Ljava/lang/String;I)[Landroid/service/notification/StatusBarNotification;
Landroid/app/INotificationManager;->getZenMode()I
Landroid/app/INotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
-Landroid/app/Instrumentation;->callActivityOnNewIntent(Landroid/app/Activity;Lcom/android/internal/content/ReferrerIntent;)V
-Landroid/app/Instrumentation;->checkStartActivityResult(ILjava/lang/Object;)V
-Landroid/app/Instrumentation;->execStartActivities(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;[Landroid/content/Intent;Landroid/os/Bundle;)V
-Landroid/app/Instrumentation;->execStartActivitiesAsUser(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;[Landroid/content/Intent;Landroid/os/Bundle;I)I
-Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
-Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)Landroid/app/Instrumentation$ActivityResult;
-Landroid/app/Instrumentation;->execStartActivity(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/Instrumentation$ActivityResult;
-Landroid/app/Instrumentation;->execStartActivityAsCaller(Landroid/content/Context;Landroid/os/IBinder;Landroid/os/IBinder;Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;ZI)Landroid/app/Instrumentation$ActivityResult;
-Landroid/app/Instrumentation;->execStartActivityFromAppTask(Landroid/content/Context;Landroid/os/IBinder;Landroid/app/IAppTask;Landroid/content/Intent;Landroid/os/Bundle;)V
-Landroid/app/IntentReceiverLeaked;-><init>(Ljava/lang/String;)V
-Landroid/app/IntentService;->mServiceHandler:Landroid/app/IntentService$ServiceHandler;
Landroid/app/IProcessObserver$Stub;-><init>()V
Landroid/app/ISearchManager$Stub$Proxy;->getGlobalSearchActivity()Landroid/content/ComponentName;
Landroid/app/ISearchManager$Stub$Proxy;->getWebSearchActivity()Landroid/content/ComponentName;
@@ -736,155 +231,10 @@
Landroid/app/job/IJobService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobService;
Landroid/app/job/IJobService;->startJob(Landroid/app/job/JobParameters;)V
Landroid/app/job/IJobService;->stopJob(Landroid/app/job/JobParameters;)V
-Landroid/app/job/JobInfo$Builder;->setFlags(I)Landroid/app/job/JobInfo$Builder;
-Landroid/app/job/JobInfo$Builder;->setPriority(I)Landroid/app/job/JobInfo$Builder;
-Landroid/app/job/JobInfo;->flags:I
-Landroid/app/job/JobInfo;->FLAG_WILL_BE_FOREGROUND:I
-Landroid/app/job/JobInfo;->jobId:I
-Landroid/app/job/JobInfo;->PRIORITY_FOREGROUND_APP:I
-Landroid/app/job/JobInfo;->service:Landroid/content/ComponentName;
-Landroid/app/job/JobParameters;->callback:Landroid/os/IBinder;
-Landroid/app/job/JobParameters;->getCallback()Landroid/app/job/IJobCallback;
-Landroid/app/job/JobParameters;->jobId:I
-Landroid/app/job/JobWorkItem;-><init>(Landroid/os/Parcel;)V
-Landroid/app/job/JobWorkItem;->mDeliveryCount:I
-Landroid/app/job/JobWorkItem;->mGrants:Ljava/lang/Object;
-Landroid/app/job/JobWorkItem;->mIntent:Landroid/content/Intent;
-Landroid/app/job/JobWorkItem;->mWorkId:I
-Landroid/app/KeyguardManager;->isDeviceSecure(I)Z
-Landroid/app/LoadedApk$ReceiverDispatcher;->getIIntentReceiver()Landroid/content/IIntentReceiver;
-Landroid/app/LoadedApk$ReceiverDispatcher;->getIntentReceiver()Landroid/content/BroadcastReceiver;
-Landroid/app/LoadedApk$ReceiverDispatcher;->mContext:Landroid/content/Context;
-Landroid/app/LoadedApk$ReceiverDispatcher;->mReceiver:Landroid/content/BroadcastReceiver;
-Landroid/app/LoadedApk$ServiceDispatcher$InnerConnection;->mDispatcher:Ljava/lang/ref/WeakReference;
-Landroid/app/LoadedApk$ServiceDispatcher;-><init>(Landroid/content/ServiceConnection;Landroid/content/Context;Landroid/os/Handler;I)V
-Landroid/app/LoadedApk$ServiceDispatcher;->getIServiceConnection()Landroid/app/IServiceConnection;
-Landroid/app/LoadedApk$ServiceDispatcher;->mConnection:Landroid/content/ServiceConnection;
-Landroid/app/LoadedApk$ServiceDispatcher;->mContext:Landroid/content/Context;
-Landroid/app/LoadedApk;->getAppDir()Ljava/lang/String;
-Landroid/app/LoadedApk;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
-Landroid/app/LoadedApk;->getAssets()Landroid/content/res/AssetManager;
-Landroid/app/LoadedApk;->getClassLoader()Ljava/lang/ClassLoader;
-Landroid/app/LoadedApk;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
-Landroid/app/LoadedApk;->getDataDirFile()Ljava/io/File;
-Landroid/app/LoadedApk;->getOverlayDirs()[Ljava/lang/String;
-Landroid/app/LoadedApk;->getPackageName()Ljava/lang/String;
-Landroid/app/LoadedApk;->getResDir()Ljava/lang/String;
-Landroid/app/LoadedApk;->getResources()Landroid/content/res/Resources;
-Landroid/app/LoadedApk;->getServiceDispatcher(Landroid/content/ServiceConnection;Landroid/content/Context;Landroid/os/Handler;I)Landroid/app/IServiceConnection;
-Landroid/app/LoadedApk;->getSplitResDirs()[Ljava/lang/String;
-Landroid/app/LoadedApk;->mActivityThread:Landroid/app/ActivityThread;
-Landroid/app/LoadedApk;->makeApplication(ZLandroid/app/Instrumentation;)Landroid/app/Application;
-Landroid/app/LoadedApk;->mAppDir:Ljava/lang/String;
-Landroid/app/LoadedApk;->mApplication:Landroid/app/Application;
-Landroid/app/LoadedApk;->mApplicationInfo:Landroid/content/pm/ApplicationInfo;
-Landroid/app/LoadedApk;->mBaseClassLoader:Ljava/lang/ClassLoader;
-Landroid/app/LoadedApk;->mClassLoader:Ljava/lang/ClassLoader;
-Landroid/app/LoadedApk;->mDataDir:Ljava/lang/String;
-Landroid/app/LoadedApk;->mDataDirFile:Ljava/io/File;
-Landroid/app/LoadedApk;->mDisplayAdjustments:Landroid/view/DisplayAdjustments;
-Landroid/app/LoadedApk;->mLibDir:Ljava/lang/String;
-Landroid/app/LoadedApk;->mPackageName:Ljava/lang/String;
-Landroid/app/LoadedApk;->mReceivers:Landroid/util/ArrayMap;
-Landroid/app/LoadedApk;->mResDir:Ljava/lang/String;
-Landroid/app/LoadedApk;->mResources:Landroid/content/res/Resources;
-Landroid/app/LoadedApk;->mServices:Landroid/util/ArrayMap;
-Landroid/app/LoadedApk;->mSplitResDirs:[Ljava/lang/String;
-Landroid/app/LoadedApk;->rewriteRValues(Ljava/lang/ClassLoader;Ljava/lang/String;I)V
-Landroid/app/LocalActivityManager;->mActivities:Ljava/util/Map;
-Landroid/app/LocalActivityManager;->mActivityArray:Ljava/util/ArrayList;
-Landroid/app/LocalActivityManager;->moveToState(Landroid/app/LocalActivityManager$LocalActivityRecord;I)V
-Landroid/app/LocalActivityManager;->mParent:Landroid/app/Activity;
-Landroid/app/LocalActivityManager;->mResumed:Landroid/app/LocalActivityManager$LocalActivityRecord;
-Landroid/app/LocalActivityManager;->mSingleMode:Z
-Landroid/app/NativeActivity;->hideIme(I)V
-Landroid/app/NativeActivity;->loadNativeCode(Ljava/lang/String;Ljava/lang/String;Landroid/os/MessageQueue;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/content/res/AssetManager;[BLjava/lang/ClassLoader;Ljava/lang/String;)J
-Landroid/app/NativeActivity;->mNativeHandle:J
-Landroid/app/NativeActivity;->setWindowFlags(II)V
-Landroid/app/NativeActivity;->setWindowFormat(I)V
-Landroid/app/NativeActivity;->showIme(I)V
-Landroid/app/Notification$Action;->mIcon:Landroid/graphics/drawable/Icon;
-Landroid/app/Notification$Builder;->getBaseLayoutResource()I
-Landroid/app/Notification$Builder;->loadHeaderAppName()Ljava/lang/String;
-Landroid/app/Notification$Builder;->mActions:Ljava/util/ArrayList;
-Landroid/app/Notification$Builder;->makePublicContentView()Landroid/widget/RemoteViews;
-Landroid/app/Notification$MediaStyle;->buildStyled(Landroid/app/Notification;)Landroid/app/Notification;
-Landroid/app/Notification;-><init>(Landroid/content/Context;ILjava/lang/CharSequence;JLjava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/content/Intent;)V
-Landroid/app/Notification;->allPendingIntents:Landroid/util/ArraySet;
-Landroid/app/Notification;->isGroupChild()Z
-Landroid/app/Notification;->isGroupSummary()Z
-Landroid/app/Notification;->mChannelId:Ljava/lang/String;
-Landroid/app/Notification;->mGroupKey:Ljava/lang/String;
-Landroid/app/Notification;->mLargeIcon:Landroid/graphics/drawable/Icon;
-Landroid/app/Notification;->mSmallIcon:Landroid/graphics/drawable/Icon;
-Landroid/app/Notification;->setSmallIcon(Landroid/graphics/drawable/Icon;)V
-Landroid/app/NotificationChannel;->mId:Ljava/lang/String;
-Landroid/app/NotificationChannel;->setBlockableSystem(Z)V
-Landroid/app/NotificationChannelGroup;->mId:Ljava/lang/String;
-Landroid/app/NotificationManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
-Landroid/app/NotificationManager;->from(Landroid/content/Context;)Landroid/app/NotificationManager;
-Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
-Landroid/app/NotificationManager;->getZenModeConfig()Landroid/service/notification/ZenModeConfig;
-Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
-Landroid/app/NotificationManager;->setZenMode(ILandroid/net/Uri;Ljava/lang/String;)V
-Landroid/app/NotificationManager;->sService:Landroid/app/INotificationManager;
Landroid/app/PackageDeleteObserver;-><init>()V
Landroid/app/PackageInstallObserver;-><init>()V
-Landroid/app/PackageInstallObserver;->onPackageInstalled(Ljava/lang/String;ILjava/lang/String;Landroid/os/Bundle;)V
-Landroid/app/PendingIntent;->getActivityAsUser(Landroid/content/Context;ILandroid/content/Intent;ILandroid/os/Bundle;Landroid/os/UserHandle;)Landroid/app/PendingIntent;
-Landroid/app/PendingIntent;->getBroadcastAsUser(Landroid/content/Context;ILandroid/content/Intent;ILandroid/os/UserHandle;)Landroid/app/PendingIntent;
-Landroid/app/PendingIntent;->getIntent()Landroid/content/Intent;
-Landroid/app/PendingIntent;->getTag(Ljava/lang/String;)Ljava/lang/String;
-Landroid/app/PendingIntent;->isActivity()Z
-Landroid/app/PendingIntent;->setOnMarshaledListener(Landroid/app/PendingIntent$OnMarshaledListener;)V
-Landroid/app/PictureInPictureArgs;-><init>()V
-Landroid/app/PictureInPictureArgs;->setActions(Ljava/util/List;)V
-Landroid/app/PictureInPictureArgs;->setAspectRatio(F)V
-Landroid/app/Presentation;->createPresentationContext(Landroid/content/Context;Landroid/view/Display;I)Landroid/content/Context;
-Landroid/app/ProgressDialog;->mMessageView:Landroid/widget/TextView;
-Landroid/app/ProgressDialog;->mProgress:Landroid/widget/ProgressBar;
-Landroid/app/ProgressDialog;->mProgressNumber:Landroid/widget/TextView;
-Landroid/app/QueuedWork;->addFinisher(Ljava/lang/Runnable;)V
-Landroid/app/QueuedWork;->getHandler()Landroid/os/Handler;
-Landroid/app/QueuedWork;->queue(Ljava/lang/Runnable;Z)V
-Landroid/app/QueuedWork;->removeFinisher(Ljava/lang/Runnable;)V
-Landroid/app/QueuedWork;->sFinishers:Ljava/util/LinkedList;
Landroid/app/ResourcesManager$ActivityResources;-><init>()V
Landroid/app/ResourcesManager;-><init>()V
-Landroid/app/ResourcesManager;->appendLibAssetForMainAssetPath(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/app/ResourcesManager;->createAssetManager(Landroid/content/res/ResourcesKey;)Landroid/content/res/AssetManager;
-Landroid/app/ResourcesManager;->getInstance()Landroid/app/ResourcesManager;
-Landroid/app/ResourcesManager;->mActivityResourceReferences:Ljava/util/WeakHashMap;
-Landroid/app/ResourcesManager;->mResConfiguration:Landroid/content/res/Configuration;
-Landroid/app/ResourcesManager;->mResourceImpls:Landroid/util/ArrayMap;
-Landroid/app/ResourcesManager;->mResourceReferences:Ljava/util/ArrayList;
-Landroid/app/ResultInfo;-><init>(Ljava/lang/String;IILandroid/content/Intent;)V
-Landroid/app/ResultInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/app/ResultInfo;->mData:Landroid/content/Intent;
-Landroid/app/ResultInfo;->mRequestCode:I
-Landroid/app/ResultInfo;->mResultWho:Ljava/lang/String;
-Landroid/app/SearchableInfo$ActionKeyInfo;->getQueryActionMsg()Ljava/lang/String;
-Landroid/app/SearchableInfo$ActionKeyInfo;->getSuggestActionMsg()Ljava/lang/String;
-Landroid/app/SearchableInfo$ActionKeyInfo;->getSuggestActionMsgColumn()Ljava/lang/String;
-Landroid/app/SearchableInfo;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Landroid/content/ComponentName;)V
-Landroid/app/SearchableInfo;->findActionKey(I)Landroid/app/SearchableInfo$ActionKeyInfo;
-Landroid/app/SearchableInfo;->getActivityContext(Landroid/content/Context;)Landroid/content/Context;
-Landroid/app/SearchableInfo;->getIconId()I
-Landroid/app/SearchableInfo;->getLabelId()I
-Landroid/app/SearchableInfo;->getProviderContext(Landroid/content/Context;Landroid/content/Context;)Landroid/content/Context;
-Landroid/app/SearchDialog;->isLandscapeMode(Landroid/content/Context;)Z
-Landroid/app/SearchDialog;->launchQuerySearch()V
-Landroid/app/SearchDialog;->launchQuerySearch(ILjava/lang/String;)V
-Landroid/app/SearchDialog;->setWorking(Z)V
-Landroid/app/SearchManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
-Landroid/app/SearchManager;->DISABLE_VOICE_SEARCH:Ljava/lang/String;
-Landroid/app/SearchManager;->getSuggestions(Landroid/app/SearchableInfo;Ljava/lang/String;)Landroid/database/Cursor;
-Landroid/app/SearchManager;->getSuggestions(Landroid/app/SearchableInfo;Ljava/lang/String;I)Landroid/database/Cursor;
-Landroid/app/SearchManager;->getWebSearchActivity()Landroid/content/ComponentName;
-Landroid/app/SearchManager;->isVisible()Z
-Landroid/app/SearchManager;->launchAssist(Landroid/os/Bundle;)V
-Landroid/app/SearchManager;->mSearchDialog:Landroid/app/SearchDialog;
-Landroid/app/SearchManager;->startSearch(Ljava/lang/String;ZLandroid/content/ComponentName;Landroid/os/Bundle;ZLandroid/graphics/Rect;)V
Landroid/app/servertransaction/ActivityResultItem;->mResultInfoList:Ljava/util/List;
Landroid/app/servertransaction/ClientTransaction;->getActivityToken()Landroid/os/IBinder;
Landroid/app/servertransaction/ClientTransaction;->getCallbacks()Ljava/util/List;
@@ -893,111 +243,15 @@
Landroid/app/servertransaction/LaunchActivityItem;->mInfo:Landroid/content/pm/ActivityInfo;
Landroid/app/servertransaction/LaunchActivityItem;->mIntent:Landroid/content/Intent;
Landroid/app/servertransaction/NewIntentItem;->mIntents:Ljava/util/List;
-Landroid/app/Service;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Ljava/lang/String;Landroid/os/IBinder;Landroid/app/Application;Ljava/lang/Object;)V
-Landroid/app/Service;->mActivityManager:Landroid/app/IActivityManager;
-Landroid/app/Service;->mApplication:Landroid/app/Application;
-Landroid/app/Service;->mClassName:Ljava/lang/String;
-Landroid/app/Service;->mStartCompatibility:Z
-Landroid/app/Service;->mThread:Landroid/app/ActivityThread;
-Landroid/app/Service;->mToken:Landroid/os/IBinder;
-Landroid/app/Service;->setForeground(Z)V
-Landroid/app/ServiceConnectionLeaked;-><init>(Ljava/lang/String;)V
-Landroid/app/SharedPreferencesImpl;-><init>(Ljava/io/File;I)V
-Landroid/app/SharedPreferencesImpl;->mFile:Ljava/io/File;
-Landroid/app/SharedPreferencesImpl;->startLoadFromDisk()V
-Landroid/app/SharedPreferencesImpl;->startReloadIfChangedUnexpectedly()V
-Landroid/app/StatusBarManager;-><init>(Landroid/content/Context;)V
-Landroid/app/StatusBarManager;->collapsePanels()V
-Landroid/app/StatusBarManager;->disable(I)V
-Landroid/app/StatusBarManager;->DISABLE_EXPAND:I
-Landroid/app/StatusBarManager;->DISABLE_NONE:I
-Landroid/app/StatusBarManager;->DISABLE_NOTIFICATION_TICKER:I
-Landroid/app/StatusBarManager;->expandNotificationsPanel()V
-Landroid/app/StatusBarManager;->expandSettingsPanel()V
-Landroid/app/StatusBarManager;->expandSettingsPanel(Ljava/lang/String;)V
-Landroid/app/StatusBarManager;->getService()Lcom/android/internal/statusbar/IStatusBarService;
-Landroid/app/StatusBarManager;->mContext:Landroid/content/Context;
-Landroid/app/StatusBarManager;->mToken:Landroid/os/IBinder;
-Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
-Landroid/app/TaskInfo;->lastActiveTime:J
-Landroid/app/TaskInfo;->resizeMode:I
-Landroid/app/TaskInfo;->stackId:I
-Landroid/app/TaskInfo;->supportsSplitScreenMultiWindow:Z
-Landroid/app/TaskInfo;->userId:I
Landroid/app/TaskStackListener;-><init>()V
-Landroid/app/TimePickerDialog;->mTimePicker:Landroid/widget/TimePicker;
Landroid/app/trust/ITrustManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
-Landroid/app/trust/TrustManager;->reportUnlockAttempt(ZI)V
-Landroid/app/UiAutomation;-><init>(Landroid/os/Looper;Landroid/app/IUiAutomationConnection;)V
-Landroid/app/UiAutomation;->connect()V
-Landroid/app/UiAutomation;->disconnect()V
Landroid/app/UiAutomationConnection;-><init>()V
-Landroid/app/UiModeManager;-><init>()V
-Landroid/app/usage/ConfigurationStats;->mActivationCount:I
-Landroid/app/usage/ConfigurationStats;->mBeginTimeStamp:J
-Landroid/app/usage/ConfigurationStats;->mConfiguration:Landroid/content/res/Configuration;
-Landroid/app/usage/ConfigurationStats;->mEndTimeStamp:J
-Landroid/app/usage/ConfigurationStats;->mLastTimeActive:J
-Landroid/app/usage/ConfigurationStats;->mTotalTimeActive:J
Landroid/app/usage/IUsageStatsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/usage/IUsageStatsManager;
Landroid/app/usage/IUsageStatsManager;->isAppInactive(Ljava/lang/String;I)Z
Landroid/app/usage/IUsageStatsManager;->queryConfigurationStats(IJJLjava/lang/String;)Landroid/content/pm/ParceledListSlice;
Landroid/app/usage/IUsageStatsManager;->queryUsageStats(IJJLjava/lang/String;)Landroid/content/pm/ParceledListSlice;
Landroid/app/usage/IUsageStatsManager;->setAppInactive(Ljava/lang/String;ZI)V
-Landroid/app/usage/NetworkStatsManager;-><init>(Landroid/content/Context;)V
-Landroid/app/usage/UsageEvents$Event;->mClass:Ljava/lang/String;
-Landroid/app/usage/UsageEvents$Event;->mConfiguration:Landroid/content/res/Configuration;
-Landroid/app/usage/UsageEvents$Event;->mEventType:I
-Landroid/app/usage/UsageEvents$Event;->mPackage:Ljava/lang/String;
-Landroid/app/usage/UsageEvents$Event;->mTimeStamp:J
-Landroid/app/usage/UsageEvents;-><init>(Landroid/os/Parcel;)V
-Landroid/app/usage/UsageEvents;->findStringIndex(Ljava/lang/String;)I
-Landroid/app/usage/UsageEvents;->mEventCount:I
-Landroid/app/usage/UsageEvents;->mEventsToWrite:Ljava/util/List;
-Landroid/app/usage/UsageEvents;->mIndex:I
-Landroid/app/usage/UsageEvents;->mParcel:Landroid/os/Parcel;
-Landroid/app/usage/UsageEvents;->mStringPool:[Ljava/lang/String;
-Landroid/app/usage/UsageEvents;->readEventFromParcel(Landroid/os/Parcel;Landroid/app/usage/UsageEvents$Event;)V
-Landroid/app/usage/UsageEvents;->writeEventToParcel(Landroid/app/usage/UsageEvents$Event;Landroid/os/Parcel;I)V
-Landroid/app/usage/UsageStats;->mBeginTimeStamp:J
-Landroid/app/usage/UsageStats;->mEndTimeStamp:J
-Landroid/app/usage/UsageStats;->mLastEvent:I
-Landroid/app/usage/UsageStats;->mLastTimeUsed:J
-Landroid/app/usage/UsageStats;->mLaunchCount:I
-Landroid/app/usage/UsageStats;->mPackageName:Ljava/lang/String;
-Landroid/app/usage/UsageStats;->mTotalTimeInForeground:J
-Landroid/app/usage/UsageStatsManager;->mContext:Landroid/content/Context;
-Landroid/app/usage/UsageStatsManager;->mService:Landroid/app/usage/IUsageStatsManager;
-Landroid/app/usage/UsageStatsManager;->sEmptyResults:Landroid/app/usage/UsageEvents;
Landroid/app/UserSwitchObserver;-><init>()V
-Landroid/app/VrManager;->mService:Landroid/service/vr/IVrManager;
-Landroid/app/WallpaperColors;->getColorHints()I
-Landroid/app/WallpaperManager;->addOnColorsChangedListener(Landroid/app/WallpaperManager$OnColorsChangedListener;Landroid/os/Handler;I)V
-Landroid/app/WallpaperManager;->getBitmap()Landroid/graphics/Bitmap;
-Landroid/app/WallpaperManager;->getBitmap(Z)Landroid/graphics/Bitmap;
-Landroid/app/WallpaperManager;->getIWallpaperManager()Landroid/app/IWallpaperManager;
-Landroid/app/WallpaperManager;->getWallpaperColors(II)Landroid/app/WallpaperColors;
-Landroid/app/WallpaperManager;->getWallpaperFile(II)Landroid/os/ParcelFileDescriptor;
-Landroid/app/WallpaperManager;->openDefaultWallpaper(Landroid/content/Context;I)Ljava/io/InputStream;
-Landroid/app/WallpaperManager;->setBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;ZII)I
-Landroid/app/WallpaperManager;->setWallpaperComponent(Landroid/content/ComponentName;I)Z
-Landroid/app/WallpaperManager;->sGlobals:Landroid/app/WallpaperManager$Globals;
-Landroid/appwidget/AppWidgetHost;-><init>(Landroid/content/Context;ILandroid/widget/RemoteViews$OnClickHandler;Landroid/os/Looper;)V
-Landroid/appwidget/AppWidgetHost;->HANDLE_VIEW_DATA_CHANGED:I
-Landroid/appwidget/AppWidgetHost;->mHandler:Landroid/os/Handler;
-Landroid/appwidget/AppWidgetHost;->sService:Lcom/android/internal/appwidget/IAppWidgetService;
-Landroid/appwidget/AppWidgetHostView;->getDefaultPaddingForWidget(Landroid/content/Context;Landroid/content/pm/ApplicationInfo;Landroid/graphics/Rect;)Landroid/graphics/Rect;
-Landroid/appwidget/AppWidgetHostView;->mAppWidgetId:I
-Landroid/appwidget/AppWidgetHostView;->mInfo:Landroid/appwidget/AppWidgetProviderInfo;
-Landroid/appwidget/AppWidgetHostView;->updateAppWidgetSize(Landroid/os/Bundle;IIIIZ)V
-Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;)V
-Landroid/appwidget/AppWidgetManager;->bindAppWidgetId(ILandroid/content/ComponentName;Landroid/os/Bundle;)V
-Landroid/appwidget/AppWidgetManager;->bindAppWidgetIdIfAllowed(IILandroid/content/ComponentName;Landroid/os/Bundle;)Z
-Landroid/appwidget/AppWidgetManager;->bindRemoteViewsService(Landroid/content/Context;ILandroid/content/Intent;Landroid/app/IServiceConnection;I)Z
-Landroid/appwidget/AppWidgetManager;->getInstalledProviders(I)Ljava/util/List;
-Landroid/appwidget/AppWidgetManager;->getInstalledProvidersForProfile(ILandroid/os/UserHandle;Ljava/lang/String;)Ljava/util/List;
-Landroid/appwidget/AppWidgetManager;->mService:Lcom/android/internal/appwidget/IAppWidgetService;
-Landroid/appwidget/AppWidgetProviderInfo;->providerInfo:Landroid/content/pm/ActivityInfo;
Landroid/bluetooth/IBluetooth$Stub$Proxy;->getAddress()Ljava/lang/String;
Landroid/bluetooth/IBluetooth$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I
Landroid/bluetooth/IBluetooth$Stub;-><init>()V
@@ -1037,113 +291,8 @@
Landroid/bluetooth/IBluetoothManagerCallback$Stub;-><init>()V
Landroid/bluetooth/IBluetoothPbap$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothPbap;
Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;-><init>()V
-Landroid/content/AsyncTaskLoader;->mExecutor:Ljava/util/concurrent/Executor;
-Landroid/content/AsyncTaskLoader;->waitForLoader()V
-Landroid/content/BroadcastReceiver$PendingResult;-><init>(ILjava/lang/String;Landroid/os/Bundle;IZZLandroid/os/IBinder;II)V
-Landroid/content/BroadcastReceiver$PendingResult;->mAbortBroadcast:Z
-Landroid/content/BroadcastReceiver$PendingResult;->mFinished:Z
-Landroid/content/BroadcastReceiver$PendingResult;->mFlags:I
-Landroid/content/BroadcastReceiver$PendingResult;->mInitialStickyHint:Z
-Landroid/content/BroadcastReceiver$PendingResult;->mOrderedHint:Z
-Landroid/content/BroadcastReceiver$PendingResult;->mResultCode:I
-Landroid/content/BroadcastReceiver$PendingResult;->mResultData:Ljava/lang/String;
-Landroid/content/BroadcastReceiver$PendingResult;->mResultExtras:Landroid/os/Bundle;
-Landroid/content/BroadcastReceiver$PendingResult;->mSendingUser:I
-Landroid/content/BroadcastReceiver$PendingResult;->mToken:Landroid/os/IBinder;
-Landroid/content/BroadcastReceiver$PendingResult;->mType:I
-Landroid/content/BroadcastReceiver;->getPendingResult()Landroid/content/BroadcastReceiver$PendingResult;
-Landroid/content/BroadcastReceiver;->mPendingResult:Landroid/content/BroadcastReceiver$PendingResult;
-Landroid/content/BroadcastReceiver;->setPendingResult(Landroid/content/BroadcastReceiver$PendingResult;)V
-Landroid/content/ClipboardManager;-><init>(Landroid/content/Context;Landroid/os/Handler;)V
-Landroid/content/ClipboardManager;->reportPrimaryClipChanged()V
-Landroid/content/ClipData$Item;->mUri:Landroid/net/Uri;
-Landroid/content/ClipData;->getIcon()Landroid/graphics/Bitmap;
-Landroid/content/ComponentName;->appendShortString(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)V
-Landroid/content/ComponentName;->printShortString(Ljava/io/PrintWriter;Ljava/lang/String;Ljava/lang/String;)V
-Landroid/content/ContentProvider;->coerceToLocalContentProvider(Landroid/content/IContentProvider;)Landroid/content/ContentProvider;
-Landroid/content/ContentProvider;->mAuthorities:[Ljava/lang/String;
-Landroid/content/ContentProvider;->mAuthority:Ljava/lang/String;
-Landroid/content/ContentProvider;->maybeAddUserId(Landroid/net/Uri;I)Landroid/net/Uri;
-Landroid/content/ContentProvider;->mContext:Landroid/content/Context;
-Landroid/content/ContentProvider;->mPathPermissions:[Landroid/content/pm/PathPermission;
-Landroid/content/ContentProvider;->mReadPermission:Ljava/lang/String;
-Landroid/content/ContentProvider;->mWritePermission:Ljava/lang/String;
-Landroid/content/ContentProvider;->setAppOps(II)V
-Landroid/content/ContentProviderClient;->mContentProvider:Landroid/content/IContentProvider;
-Landroid/content/ContentProviderClient;->mPackageName:Ljava/lang/String;
-Landroid/content/ContentProviderNative;->asInterface(Landroid/os/IBinder;)Landroid/content/IContentProvider;
-Landroid/content/ContentProviderOperation;->getType()I
-Landroid/content/ContentProviderOperation;->mSelection:Ljava/lang/String;
-Landroid/content/ContentProviderOperation;->mType:I
-Landroid/content/ContentProviderOperation;->mUri:Landroid/net/Uri;
-Landroid/content/ContentProviderOperation;->TYPE_DELETE:I
-Landroid/content/ContentProviderOperation;->TYPE_INSERT:I
-Landroid/content/ContentProviderOperation;->TYPE_UPDATE:I
-Landroid/content/ContentResolver$OpenResourceIdResult;->id:I
-Landroid/content/ContentResolver$OpenResourceIdResult;->r:Landroid/content/res/Resources;
-Landroid/content/ContentResolver;->acquireExistingProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->acquireExistingProvider(Landroid/net/Uri;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->acquireProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->acquireProvider(Landroid/net/Uri;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->acquireProvider(Ljava/lang/String;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->acquireUnstableProvider(Landroid/content/Context;Ljava/lang/String;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->acquireUnstableProvider(Ljava/lang/String;)Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->getContentService()Landroid/content/IContentService;
-Landroid/content/ContentResolver;->getPackageName()Ljava/lang/String;
-Landroid/content/ContentResolver;->getResourceId(Landroid/net/Uri;)Landroid/content/ContentResolver$OpenResourceIdResult;
-Landroid/content/ContentResolver;->getSyncStatus(Landroid/accounts/Account;Ljava/lang/String;)Landroid/content/SyncStatusInfo;
-Landroid/content/ContentResolver;->getSyncStatusAsUser(Landroid/accounts/Account;Ljava/lang/String;I)Landroid/content/SyncStatusInfo;
-Landroid/content/ContentResolver;->mContext:Landroid/content/Context;
-Landroid/content/ContentResolver;->mPackageName:Ljava/lang/String;
-Landroid/content/ContentResolver;->releaseProvider(Landroid/content/IContentProvider;)Z
-Landroid/content/ContentResolver;->releaseUnstableProvider(Landroid/content/IContentProvider;)Z
-Landroid/content/ContentResolver;->sContentService:Landroid/content/IContentService;
-Landroid/content/ContentResolver;->SYNC_ERROR_SYNC_ALREADY_IN_PROGRESS:I
-Landroid/content/ContentResolver;->SYNC_OBSERVER_TYPE_STATUS:I
-Landroid/content/ContentResolver;->takePersistableUriPermission(Ljava/lang/String;Landroid/net/Uri;I)V
-Landroid/content/ContentResolver;->unstableProviderDied(Landroid/content/IContentProvider;)V
-Landroid/content/ContentValues;-><init>(Ljava/util/HashMap;)V
-Landroid/content/ContentValues;->mValues:Ljava/util/HashMap;
-Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z
-Landroid/content/Context;->canStartActivityForResult()Z
-Landroid/content/Context;->checkPermission(Ljava/lang/String;IILandroid/os/IBinder;)I
-Landroid/content/Context;->COUNTRY_DETECTOR:Ljava/lang/String;
-Landroid/content/Context;->createApplicationContext(Landroid/content/pm/ApplicationInfo;I)Landroid/content/Context;
-Landroid/content/Context;->ETHERNET_SERVICE:Ljava/lang/String;
-Landroid/content/Context;->getBasePackageName()Ljava/lang/String;
-Landroid/content/Context;->getDisplay()Landroid/view/Display;
-Landroid/content/Context;->getSharedPrefsFile(Ljava/lang/String;)Ljava/io/File;
-Landroid/content/Context;->getThemeResId()I
-Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;Ljava/lang/String;I)V
-Landroid/content/Context;->sendBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;I)V
-Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;ILandroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
-Landroid/content/Context;->sendOrderedBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;ILandroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
-Landroid/content/Context;->sendOrderedBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;ILandroid/os/Bundle;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V
-Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/Bundle;Landroid/os/UserHandle;)V
-Landroid/content/Context;->startActivityForResult(Ljava/lang/String;Landroid/content/Intent;ILandroid/os/Bundle;)V
-Landroid/content/Context;->STATUS_BAR_SERVICE:Ljava/lang/String;
-Landroid/content/ContextWrapper;->createApplicationContext(Landroid/content/pm/ApplicationInfo;I)Landroid/content/Context;
-Landroid/content/ContextWrapper;->getBasePackageName()Ljava/lang/String;
-Landroid/content/ContextWrapper;->getDisplay()Landroid/view/Display;
-Landroid/content/ContextWrapper;->mBase:Landroid/content/Context;
-Landroid/content/ContextWrapper;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
-Landroid/content/ContextWrapper;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
-Landroid/content/ContextWrapper;->startForegroundServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
-Landroid/content/ContextWrapper;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
-Landroid/content/CursorEntityIterator;-><init>(Landroid/database/Cursor;)V
-Landroid/content/CursorLoader;->mCancellationSignal:Landroid/os/CancellationSignal;
-Landroid/content/CursorLoader;->mObserver:Landroid/content/Loader$ForceLoadContentObserver;
-Landroid/content/Entity;->mSubValues:Ljava/util/ArrayList;
-Landroid/content/Entity;->mValues:Landroid/content/ContentValues;
Landroid/content/IClipboard$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/content/IClipboard$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IClipboard;
-Landroid/content/IContentProvider;->bulkInsert(Ljava/lang/String;Landroid/net/Uri;[Landroid/content/ContentValues;)I
-Landroid/content/IContentProvider;->call(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;
-Landroid/content/IContentProvider;->delete(Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
-Landroid/content/IContentProvider;->descriptor:Ljava/lang/String;
-Landroid/content/IContentProvider;->insert(Ljava/lang/String;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
-Landroid/content/IContentProvider;->QUERY_TRANSACTION:I
-Landroid/content/IContentProvider;->update(Ljava/lang/String;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/content/IContentService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/content/IContentService$Stub;-><init>()V
Landroid/content/IContentService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IContentService;
@@ -1160,29 +309,6 @@
Landroid/content/IIntentReceiver;->performReceive(Landroid/content/Intent;ILjava/lang/String;Landroid/os/Bundle;ZZI)V
Landroid/content/IIntentSender$Stub;-><init>()V
Landroid/content/IIntentSender$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IIntentSender;
-Landroid/content/Intent;->ACTION_ALARM_CHANGED:Ljava/lang/String;
-Landroid/content/Intent;->ACTION_USER_SWITCHED:Ljava/lang/String;
-Landroid/content/Intent;->FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT:I
-Landroid/content/Intent;->getExtra(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
-Landroid/content/Intent;->isExcludingStopped()Z
-Landroid/content/Intent;->mExtras:Landroid/os/Bundle;
-Landroid/content/Intent;->parseCommandArgs(Landroid/os/ShellCommand;Landroid/content/Intent$CommandOptionHandler;)Landroid/content/Intent;
-Landroid/content/Intent;->prepareToLeaveProcess(Landroid/content/Context;)V
-Landroid/content/Intent;->printIntentArgsHelp(Ljava/io/PrintWriter;Ljava/lang/String;)V
-Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/IBinder;)Landroid/content/Intent;
-Landroid/content/Intent;->setAllowFds(Z)V
-Landroid/content/Intent;->toInsecureString()Ljava/lang/String;
-Landroid/content/IntentFilter;->hasDataAuthority(Landroid/content/IntentFilter$AuthorityEntry;)Z
-Landroid/content/IntentFilter;->hasDataPath(Landroid/os/PatternMatcher;)Z
-Landroid/content/IntentFilter;->hasDataSchemeSpecificPart(Landroid/os/PatternMatcher;)Z
-Landroid/content/IntentFilter;->hasExactDataType(Ljava/lang/String;)Z
-Landroid/content/IntentFilter;->isVerified()Z
-Landroid/content/IntentFilter;->mActions:Ljava/util/ArrayList;
-Landroid/content/IntentFilter;->mOrder:I
-Landroid/content/IntentFilter;->setAutoVerify(Z)V
-Landroid/content/IntentSender;-><init>(Landroid/content/IIntentSender;)V
-Landroid/content/IntentSender;->getTarget()Landroid/content/IIntentSender;
-Landroid/content/IntentSender;->mTarget:Landroid/content/IIntentSender;
Landroid/content/IOnPrimaryClipChangedListener$Stub;-><init>()V
Landroid/content/IOnPrimaryClipChangedListener$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IOnPrimaryClipChangedListener;
Landroid/content/IRestrictionsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IRestrictionsManager;
@@ -1208,38 +334,6 @@
Landroid/content/om/IOverlayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/om/IOverlayManager;
Landroid/content/om/IOverlayManager;->getAllOverlays(I)Ljava/util/Map;
Landroid/content/om/IOverlayManager;->getOverlayInfo(Ljava/lang/String;I)Landroid/content/om/OverlayInfo;
-Landroid/content/om/OverlayInfo;->isEnabled()Z
-Landroid/content/om/OverlayInfo;->packageName:Ljava/lang/String;
-Landroid/content/om/OverlayInfo;->state:I
-Landroid/content/om/OverlayInfo;->targetPackageName:Ljava/lang/String;
-Landroid/content/pm/ActivityInfo;->activityInfoConfigJavaToNative(I)I
-Landroid/content/pm/ActivityInfo;->FLAG_ALLOW_EMBEDDED:I
-Landroid/content/pm/ActivityInfo;->FLAG_SHOW_FOR_ALL_USERS:I
-Landroid/content/pm/ActivityInfo;->isResizeableMode(I)Z
-Landroid/content/pm/ActivityInfo;->resizeMode:I
-Landroid/content/pm/ActivityInfo;->supportsPictureInPicture()Z
-Landroid/content/pm/ApplicationInfo$DisplayNameComparator;->mPM:Landroid/content/pm/PackageManager;
-Landroid/content/pm/ApplicationInfo$DisplayNameComparator;->sCollator:Ljava/text/Collator;
-Landroid/content/pm/ApplicationInfo;->disableCompatibilityMode()V
-Landroid/content/pm/ApplicationInfo;->enabledSetting:I
-Landroid/content/pm/ApplicationInfo;->fullBackupContent:I
-Landroid/content/pm/ApplicationInfo;->getBaseResourcePath()Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->getCodePath()Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->hasRtlSupport()Z
-Landroid/content/pm/ApplicationInfo;->installLocation:I
-Landroid/content/pm/ApplicationInfo;->isForwardLocked()Z
-Landroid/content/pm/ApplicationInfo;->isPackageUnavailable(Landroid/content/pm/PackageManager;)Z
-Landroid/content/pm/ApplicationInfo;->nativeLibraryRootDir:Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->primaryCpuAbi:Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->resourceDirs:[Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->scanPublicSourceDir:Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->scanSourceDir:Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->secondaryCpuAbi:Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->secondaryNativeLibraryDir:Ljava/lang/String;
-Landroid/content/pm/ApplicationInfo;->versionCode:I
-Landroid/content/pm/BaseParceledListSlice;->getList()Ljava/util/List;
-Landroid/content/pm/BaseParceledListSlice;->writeParcelableCreator(Ljava/lang/Object;Landroid/os/Parcel;)V
-Landroid/content/pm/ComponentInfo;->getComponentName()Landroid/content/ComponentName;
Landroid/content/pm/IPackageDataObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/content/pm/IPackageDataObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/content/pm/IPackageDataObserver$Stub$Proxy;->onRemoveCompleted(Ljava/lang/String;Z)V
@@ -1353,483 +447,14 @@
Landroid/content/pm/IPackageStatsObserver$Stub;->TRANSACTION_onGetStatsCompleted:I
Landroid/content/pm/IShortcutService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/content/pm/IShortcutService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IShortcutService;
-Landroid/content/pm/LauncherActivityInfo;->mActivityInfo:Landroid/content/pm/ActivityInfo;
-Landroid/content/pm/LauncherApps;->mPm:Landroid/content/pm/PackageManager;
-Landroid/content/pm/LauncherApps;->mService:Landroid/content/pm/ILauncherApps;
-Landroid/content/pm/LauncherApps;->startShortcut(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Rect;Landroid/os/Bundle;I)V
-Landroid/content/pm/PackageInfo;-><init>(Landroid/os/Parcel;)V
-Landroid/content/pm/PackageInfo;->coreApp:Z
-Landroid/content/pm/PackageInfo;->INSTALL_LOCATION_UNSPECIFIED:I
-Landroid/content/pm/PackageInfo;->overlayTarget:Ljava/lang/String;
-Landroid/content/pm/PackageInfoLite;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/content/pm/PackageInstaller$Session;->addProgress(F)V
-Landroid/content/pm/PackageInstaller$SessionInfo;-><init>()V
-Landroid/content/pm/PackageInstaller$SessionInfo;->active:Z
-Landroid/content/pm/PackageInstaller$SessionInfo;->appIcon:Landroid/graphics/Bitmap;
-Landroid/content/pm/PackageInstaller$SessionInfo;->appLabel:Ljava/lang/CharSequence;
-Landroid/content/pm/PackageInstaller$SessionInfo;->appPackageName:Ljava/lang/String;
-Landroid/content/pm/PackageInstaller$SessionInfo;->installerPackageName:Ljava/lang/String;
-Landroid/content/pm/PackageInstaller$SessionInfo;->mode:I
-Landroid/content/pm/PackageInstaller$SessionInfo;->progress:F
-Landroid/content/pm/PackageInstaller$SessionInfo;->resolvedBaseCodePath:Ljava/lang/String;
-Landroid/content/pm/PackageInstaller$SessionInfo;->sealed:Z
-Landroid/content/pm/PackageInstaller$SessionInfo;->sessionId:I
-Landroid/content/pm/PackageInstaller$SessionInfo;->sizeBytes:J
-Landroid/content/pm/PackageInstaller$SessionParams;->appIcon:Landroid/graphics/Bitmap;
-Landroid/content/pm/PackageInstaller$SessionParams;->appLabel:Ljava/lang/String;
-Landroid/content/pm/PackageInstaller$SessionParams;->appPackageName:Ljava/lang/String;
-Landroid/content/pm/PackageInstaller$SessionParams;->installFlags:I
-Landroid/content/pm/PackageInstaller$SessionParams;->mode:I
-Landroid/content/pm/PackageInstaller$SessionParams;->originatingUid:I
-Landroid/content/pm/PackageInstaller$SessionParams;->sizeBytes:J
-Landroid/content/pm/PackageItemInfo;->setForceSafeLabels(Z)V
-Landroid/content/pm/PackageManager;->addCrossProfileIntentFilter(Landroid/content/IntentFilter;III)V
-Landroid/content/pm/PackageManager;->addPreferredActivityAsUser(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
-Landroid/content/pm/PackageManager;->buildRequestPermissionsIntent([Ljava/lang/String;)Landroid/content/Intent;
-Landroid/content/pm/PackageManager;->clearApplicationUserData(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
-Landroid/content/pm/PackageManager;->clearCrossProfileIntentFilters(I)V
-Landroid/content/pm/PackageManager;->deleteApplicationCacheFiles(Ljava/lang/String;Landroid/content/pm/IPackageDataObserver;)V
-Landroid/content/pm/PackageManager;->deleteApplicationCacheFilesAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageDataObserver;)V
-Landroid/content/pm/PackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
-Landroid/content/pm/PackageManager;->deletePackageAsUser(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;II)V
-Landroid/content/pm/PackageManager;->deleteStatusToString(I)Ljava/lang/String;
-Landroid/content/pm/PackageManager;->flushPackageRestrictionsAsUser(I)V
-Landroid/content/pm/PackageManager;->freeStorage(JLandroid/content/IntentSender;)V
-Landroid/content/pm/PackageManager;->freeStorage(Ljava/lang/String;JLandroid/content/IntentSender;)V
-Landroid/content/pm/PackageManager;->freeStorageAndNotify(JLandroid/content/pm/IPackageDataObserver;)V
-Landroid/content/pm/PackageManager;->freeStorageAndNotify(Ljava/lang/String;JLandroid/content/pm/IPackageDataObserver;)V
-Landroid/content/pm/PackageManager;->getApplicationHiddenSettingAsUser(Ljava/lang/String;Landroid/os/UserHandle;)Z
-Landroid/content/pm/PackageManager;->getApplicationInfoAsUser(Ljava/lang/String;II)Landroid/content/pm/ApplicationInfo;
-Landroid/content/pm/PackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
-Landroid/content/pm/PackageManager;->getKeySetByAlias(Ljava/lang/String;Ljava/lang/String;)Landroid/content/pm/KeySet;
-Landroid/content/pm/PackageManager;->getMoveStatus(I)I
-Landroid/content/pm/PackageManager;->getPackageCandidateVolumes(Landroid/content/pm/ApplicationInfo;)Ljava/util/List;
-Landroid/content/pm/PackageManager;->getPackageCurrentVolume(Landroid/content/pm/ApplicationInfo;)Landroid/os/storage/VolumeInfo;
-Landroid/content/pm/PackageManager;->getPackageInfoAsUser(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
-Landroid/content/pm/PackageManager;->getPackageSizeInfo(Ljava/lang/String;Landroid/content/pm/IPackageStatsObserver;)V
-Landroid/content/pm/PackageManager;->getPackageSizeInfoAsUser(Ljava/lang/String;ILandroid/content/pm/IPackageStatsObserver;)V
-Landroid/content/pm/PackageManager;->getPackageUidAsUser(Ljava/lang/String;I)I
-Landroid/content/pm/PackageManager;->getPackageUidAsUser(Ljava/lang/String;II)I
-Landroid/content/pm/PackageManager;->getResourcesForApplicationAsUser(Ljava/lang/String;I)Landroid/content/res/Resources;
-Landroid/content/pm/PackageManager;->getSigningKeySet(Ljava/lang/String;)Landroid/content/pm/KeySet;
-Landroid/content/pm/PackageManager;->getUidForSharedUser(Ljava/lang/String;)I
-Landroid/content/pm/PackageManager;->getUserBadgeForDensity(Landroid/os/UserHandle;I)Landroid/graphics/drawable/Drawable;
-Landroid/content/pm/PackageManager;->getUserBadgeForDensityNoBackground(Landroid/os/UserHandle;I)Landroid/graphics/drawable/Drawable;
-Landroid/content/pm/PackageManager;->installExistingPackageAsUser(Ljava/lang/String;I)I
-Landroid/content/pm/PackageManager;->installStatusToString(I)Ljava/lang/String;
-Landroid/content/pm/PackageManager;->installStatusToString(ILjava/lang/String;)Ljava/lang/String;
-Landroid/content/pm/PackageManager;->INSTALL_REPLACE_EXISTING:I
-Landroid/content/pm/PackageManager;->isPackageAvailable(Ljava/lang/String;)Z
-Landroid/content/pm/PackageManager;->isPackageSuspendedForUser(Ljava/lang/String;I)Z
-Landroid/content/pm/PackageManager;->isSignedBy(Ljava/lang/String;Landroid/content/pm/KeySet;)Z
-Landroid/content/pm/PackageManager;->isSignedByExactly(Ljava/lang/String;Landroid/content/pm/KeySet;)Z
-Landroid/content/pm/PackageManager;->isUpgrade()Z
-Landroid/content/pm/PackageManager;->loadItemIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
-Landroid/content/pm/PackageManager;->loadUnbadgedItemIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
-Landroid/content/pm/PackageManager;->movePackage(Ljava/lang/String;Landroid/os/storage/VolumeInfo;)I
-Landroid/content/pm/PackageManager;->MOVE_EXTERNAL_MEDIA:I
-Landroid/content/pm/PackageManager;->MOVE_INTERNAL:I
-Landroid/content/pm/PackageManager;->NO_NATIVE_LIBRARIES:I
-Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;II)Ljava/util/List;
-Landroid/content/pm/PackageManager;->queryBroadcastReceiversAsUser(Landroid/content/Intent;II)Ljava/util/List;
-Landroid/content/pm/PackageManager;->queryIntentActivitiesAsUser(Landroid/content/Intent;II)Ljava/util/List;
-Landroid/content/pm/PackageManager;->queryIntentContentProvidersAsUser(Landroid/content/Intent;II)Ljava/util/List;
-Landroid/content/pm/PackageManager;->queryIntentServicesAsUser(Landroid/content/Intent;II)Ljava/util/List;
-Landroid/content/pm/PackageManager;->registerMoveCallback(Landroid/content/pm/PackageManager$MoveCallback;Landroid/os/Handler;)V
-Landroid/content/pm/PackageManager;->replacePreferredActivity(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;)V
-Landroid/content/pm/PackageManager;->replacePreferredActivityAsUser(Landroid/content/IntentFilter;I[Landroid/content/ComponentName;Landroid/content/ComponentName;I)V
-Landroid/content/pm/PackageManager;->resolveActivityAsUser(Landroid/content/Intent;II)Landroid/content/pm/ResolveInfo;
-Landroid/content/pm/PackageManager;->resolveContentProviderAsUser(Ljava/lang/String;II)Landroid/content/pm/ProviderInfo;
-Landroid/content/pm/PackageManager;->setApplicationHiddenSettingAsUser(Ljava/lang/String;ZLandroid/os/UserHandle;)Z
-Landroid/content/pm/PackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
-Landroid/content/pm/PackageManager;->unregisterMoveCallback(Landroid/content/pm/PackageManager$MoveCallback;)V
-Landroid/content/pm/PackageParser$Activity;->info:Landroid/content/pm/ActivityInfo;
-Landroid/content/pm/PackageParser$ActivityIntentInfo;->activity:Landroid/content/pm/PackageParser$Activity;
-Landroid/content/pm/PackageParser$Component;->className:Ljava/lang/String;
-Landroid/content/pm/PackageParser$Component;->getComponentName()Landroid/content/ComponentName;
-Landroid/content/pm/PackageParser$Component;->intents:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Component;->metaData:Landroid/os/Bundle;
-Landroid/content/pm/PackageParser$Component;->owner:Landroid/content/pm/PackageParser$Package;
-Landroid/content/pm/PackageParser$Instrumentation;->info:Landroid/content/pm/InstrumentationInfo;
-Landroid/content/pm/PackageParser$IntentInfo;-><init>()V
-Landroid/content/pm/PackageParser$IntentInfo;->banner:I
-Landroid/content/pm/PackageParser$IntentInfo;->hasDefault:Z
-Landroid/content/pm/PackageParser$IntentInfo;->icon:I
-Landroid/content/pm/PackageParser$IntentInfo;->labelRes:I
-Landroid/content/pm/PackageParser$IntentInfo;->logo:I
-Landroid/content/pm/PackageParser$IntentInfo;->nonLocalizedLabel:Ljava/lang/CharSequence;
-Landroid/content/pm/PackageParser$NewPermissionInfo;->name:Ljava/lang/String;
-Landroid/content/pm/PackageParser$NewPermissionInfo;->sdkVersion:I
-Landroid/content/pm/PackageParser$Package;-><init>(Ljava/lang/String;)V
-Landroid/content/pm/PackageParser$Package;->activities:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
-Landroid/content/pm/PackageParser$Package;->configPreferences:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->installLocation:I
-Landroid/content/pm/PackageParser$Package;->instrumentation:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->mAppMetaData:Landroid/os/Bundle;
-Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
-Landroid/content/pm/PackageParser$Package;->mKeySetMapping:Landroid/util/ArrayMap;
-Landroid/content/pm/PackageParser$Package;->mPreferredOrder:I
-Landroid/content/pm/PackageParser$Package;->mSharedUserId:Ljava/lang/String;
-Landroid/content/pm/PackageParser$Package;->mSharedUserLabel:I
-Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
-Landroid/content/pm/PackageParser$Package;->mUpgradeKeySets:Landroid/util/ArraySet;
-Landroid/content/pm/PackageParser$Package;->mVersionCode:I
-Landroid/content/pm/PackageParser$Package;->mVersionName:Ljava/lang/String;
-Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
-Landroid/content/pm/PackageParser$Package;->permissionGroups:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->permissions:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->protectedBroadcasts:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->receivers:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->reqFeatures:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->requestedPermissions:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->services:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->setPackageName(Ljava/lang/String;)V
-Landroid/content/pm/PackageParser$Package;->usesLibraries:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$Package;->usesLibraryFiles:[Ljava/lang/String;
-Landroid/content/pm/PackageParser$Package;->usesOptionalLibraries:Ljava/util/ArrayList;
-Landroid/content/pm/PackageParser$PackageLite;->installLocation:I
-Landroid/content/pm/PackageParser$PackageLite;->packageName:Ljava/lang/String;
-Landroid/content/pm/PackageParser$Permission;-><init>(Landroid/content/pm/PackageParser$Package;Landroid/content/pm/PermissionInfo;)V
-Landroid/content/pm/PackageParser$Permission;->group:Landroid/content/pm/PackageParser$PermissionGroup;
-Landroid/content/pm/PackageParser$Permission;->info:Landroid/content/pm/PermissionInfo;
-Landroid/content/pm/PackageParser$Permission;->tree:Z
-Landroid/content/pm/PackageParser$PermissionGroup;->info:Landroid/content/pm/PermissionGroupInfo;
-Landroid/content/pm/PackageParser$Provider;-><init>(Landroid/content/pm/PackageParser$Provider;)V
-Landroid/content/pm/PackageParser$Provider;->info:Landroid/content/pm/ProviderInfo;
-Landroid/content/pm/PackageParser$Provider;->syncable:Z
-Landroid/content/pm/PackageParser$ProviderIntentInfo;->provider:Landroid/content/pm/PackageParser$Provider;
-Landroid/content/pm/PackageParser$Service;->info:Landroid/content/pm/ServiceInfo;
-Landroid/content/pm/PackageParser$ServiceIntentInfo;->service:Landroid/content/pm/PackageParser$Service;
-Landroid/content/pm/PackageParser$SigningDetails$Builder;-><init>()V
-Landroid/content/pm/PackageParser$SigningDetails$Builder;->build()Landroid/content/pm/PackageParser$SigningDetails;
-Landroid/content/pm/PackageParser$SigningDetails$Builder;->setPastSigningCertificates([Landroid/content/pm/Signature;)Landroid/content/pm/PackageParser$SigningDetails$Builder;
-Landroid/content/pm/PackageParser$SigningDetails$Builder;->setPastSigningCertificatesFlags([I)Landroid/content/pm/PackageParser$SigningDetails$Builder;
-Landroid/content/pm/PackageParser$SigningDetails$Builder;->setSignatures([Landroid/content/pm/Signature;)Landroid/content/pm/PackageParser$SigningDetails$Builder;
-Landroid/content/pm/PackageParser$SigningDetails$Builder;->setSignatureSchemeVersion(I)Landroid/content/pm/PackageParser$SigningDetails$Builder;
-Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
-Landroid/content/pm/PackageParser;-><init>()V
-Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Ljava/io/File;Z)V
-Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Z)V
-Landroid/content/pm/PackageParser;->generateActivityInfo(Landroid/content/pm/PackageParser$Activity;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ActivityInfo;
-Landroid/content/pm/PackageParser;->generateApplicationInfo(Landroid/content/pm/PackageParser$Package;ILandroid/content/pm/PackageUserState;)Landroid/content/pm/ApplicationInfo;
-Landroid/content/pm/PackageParser;->generateApplicationInfo(Landroid/content/pm/PackageParser$Package;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ApplicationInfo;
-Landroid/content/pm/PackageParser;->generateInstrumentationInfo(Landroid/content/pm/PackageParser$Instrumentation;I)Landroid/content/pm/InstrumentationInfo;
-Landroid/content/pm/PackageParser;->generatePackageInfo(Landroid/content/pm/PackageParser$Package;[IIJJLjava/util/Set;Landroid/content/pm/PackageUserState;)Landroid/content/pm/PackageInfo;
-Landroid/content/pm/PackageParser;->generatePackageInfo(Landroid/content/pm/PackageParser$Package;[IIJJLjava/util/Set;Landroid/content/pm/PackageUserState;I)Landroid/content/pm/PackageInfo;
-Landroid/content/pm/PackageParser;->generatePermissionGroupInfo(Landroid/content/pm/PackageParser$PermissionGroup;I)Landroid/content/pm/PermissionGroupInfo;
-Landroid/content/pm/PackageParser;->generatePermissionInfo(Landroid/content/pm/PackageParser$Permission;I)Landroid/content/pm/PermissionInfo;
-Landroid/content/pm/PackageParser;->generateProviderInfo(Landroid/content/pm/PackageParser$Provider;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ProviderInfo;
-Landroid/content/pm/PackageParser;->generateServiceInfo(Landroid/content/pm/PackageParser$Service;ILandroid/content/pm/PackageUserState;I)Landroid/content/pm/ServiceInfo;
-Landroid/content/pm/PackageParser;->mCallback:Landroid/content/pm/PackageParser$Callback;
-Landroid/content/pm/PackageParser;->NEW_PERMISSIONS:[Landroid/content/pm/PackageParser$NewPermissionInfo;
-Landroid/content/pm/PackageParser;->parseBaseApk(Ljava/lang/String;Landroid/content/res/Resources;Landroid/content/res/XmlResourceParser;I[Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
-Landroid/content/pm/PackageParser;->parseBaseApplication(Landroid/content/pm/PackageParser$Package;Landroid/content/res/Resources;Landroid/content/res/XmlResourceParser;I[Ljava/lang/String;)Z
-Landroid/content/pm/PackageParser;->parseMonolithicPackage(Ljava/io/File;I)Landroid/content/pm/PackageParser$Package;
-Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;I)Landroid/content/pm/PackageParser$Package;
-Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;IZ)Landroid/content/pm/PackageParser$Package;
-Landroid/content/pm/PackageParser;->parsePackageLite(Ljava/io/File;I)Landroid/content/pm/PackageParser$PackageLite;
-Landroid/content/pm/PackageParser;->setCompatibilityModeEnabled(Z)V
-Landroid/content/pm/PackageParser;->setSeparateProcesses([Ljava/lang/String;)V
-Landroid/content/pm/PackageStats;->userHandle:I
-Landroid/content/pm/PackageUserState;-><init>()V
-Landroid/content/pm/ParceledListSlice;-><init>(Ljava/util/List;)V
-Landroid/content/pm/ParceledListSlice;->CREATOR:Landroid/os/Parcelable$ClassLoaderCreator;
-Landroid/content/pm/ParceledListSlice;->writeParcelableCreator(Landroid/os/Parcelable;Landroid/os/Parcel;)V
-Landroid/content/pm/PermissionInfo;->protectionToString(I)Ljava/lang/String;
-Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->componentName:Landroid/content/ComponentName;
-Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->type:Ljava/lang/Object;
-Landroid/content/pm/RegisteredServicesCache$ServiceInfo;->uid:I
-Landroid/content/pm/RegisteredServicesCache;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/content/pm/XmlSerializerAndParser;)V
-Landroid/content/pm/ResolveInfo;->getComponentInfo()Landroid/content/pm/ComponentInfo;
-Landroid/content/pm/ResolveInfo;->handleAllWebDataURI:Z
-Landroid/content/pm/ResolveInfo;->system:Z
-Landroid/content/pm/ResolveInfo;->targetUserId:I
-Landroid/content/pm/ShortcutInfo;->getIcon()Landroid/graphics/drawable/Icon;
-Landroid/content/pm/ShortcutManager;->mService:Landroid/content/pm/IShortcutService;
-Landroid/content/pm/Signature;->getPublicKey()Ljava/security/PublicKey;
-Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;I)V
-Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;Ljava/lang/String;I)V
-Landroid/content/pm/UserInfo;->creationTime:J
-Landroid/content/pm/UserInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/content/pm/UserInfo;->flags:I
-Landroid/content/pm/UserInfo;->FLAG_PRIMARY:I
-Landroid/content/pm/UserInfo;->getUserHandle()Landroid/os/UserHandle;
-Landroid/content/pm/UserInfo;->guestToRemove:Z
-Landroid/content/pm/UserInfo;->iconPath:Ljava/lang/String;
-Landroid/content/pm/UserInfo;->id:I
-Landroid/content/pm/UserInfo;->isAdmin()Z
-Landroid/content/pm/UserInfo;->isEnabled()Z
-Landroid/content/pm/UserInfo;->isGuest()Z
-Landroid/content/pm/UserInfo;->isManagedProfile()Z
-Landroid/content/pm/UserInfo;->isPrimary()Z
-Landroid/content/pm/UserInfo;->isRestricted()Z
-Landroid/content/pm/UserInfo;->lastLoggedInTime:J
-Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
-Landroid/content/pm/UserInfo;->partial:Z
-Landroid/content/pm/UserInfo;->profileGroupId:I
-Landroid/content/pm/UserInfo;->serialNumber:I
-Landroid/content/pm/VerifierInfo;-><init>(Ljava/lang/String;Ljava/security/PublicKey;)V
-Landroid/content/pm/XmlSerializerAndParser;->createFromXml(Lorg/xmlpull/v1/XmlPullParser;)Ljava/lang/Object;
-Landroid/content/pm/XmlSerializerAndParser;->writeAsXml(Ljava/lang/Object;Lorg/xmlpull/v1/XmlSerializer;)V
-Landroid/content/res/ApkAssets;->getAssetPath()Ljava/lang/String;
-Landroid/content/res/AssetFileDescriptor;->mFd:Landroid/os/ParcelFileDescriptor;
-Landroid/content/res/AssetFileDescriptor;->mLength:J
-Landroid/content/res/AssetFileDescriptor;->mStartOffset:J
-Landroid/content/res/AssetManager$AssetInputStream;->getAssetInt()I
-Landroid/content/res/AssetManager$AssetInputStream;->getNativeAsset()J
-Landroid/content/res/AssetManager;-><init>()V
-Landroid/content/res/AssetManager;->addAssetPath(Ljava/lang/String;)I
-Landroid/content/res/AssetManager;->addAssetPathAsSharedLibrary(Ljava/lang/String;)I
-Landroid/content/res/AssetManager;->addOverlayPath(Ljava/lang/String;)I
-Landroid/content/res/AssetManager;->applyStyle(JIILandroid/content/res/XmlBlock$Parser;[IJJ)V
-Landroid/content/res/AssetManager;->createTheme()J
-Landroid/content/res/AssetManager;->getApkAssets()[Landroid/content/res/ApkAssets;
-Landroid/content/res/AssetManager;->getAssignedPackageIdentifiers()Landroid/util/SparseArray;
-Landroid/content/res/AssetManager;->getGlobalAssetCount()I
-Landroid/content/res/AssetManager;->getGlobalAssetManagerCount()I
-Landroid/content/res/AssetManager;->getResourceBagText(II)Ljava/lang/CharSequence;
-Landroid/content/res/AssetManager;->getResourceEntryName(I)Ljava/lang/String;
-Landroid/content/res/AssetManager;->getResourceIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
-Landroid/content/res/AssetManager;->getResourceName(I)Ljava/lang/String;
-Landroid/content/res/AssetManager;->getResourcePackageName(I)Ljava/lang/String;
-Landroid/content/res/AssetManager;->getResourceText(I)Ljava/lang/CharSequence;
-Landroid/content/res/AssetManager;->getResourceTypeName(I)Ljava/lang/String;
-Landroid/content/res/AssetManager;->getResourceValue(IILandroid/util/TypedValue;Z)Z
-Landroid/content/res/AssetManager;->getSystem()Landroid/content/res/AssetManager;
-Landroid/content/res/AssetManager;->isUpToDate()Z
-Landroid/content/res/AssetManager;->mObject:J
-Landroid/content/res/AssetManager;->openNonAsset(ILjava/lang/String;)Ljava/io/InputStream;
-Landroid/content/res/AssetManager;->openNonAsset(ILjava/lang/String;I)Ljava/io/InputStream;
-Landroid/content/res/AssetManager;->openNonAsset(Ljava/lang/String;)Ljava/io/InputStream;
-Landroid/content/res/AssetManager;->openNonAsset(Ljava/lang/String;I)Ljava/io/InputStream;
-Landroid/content/res/AssetManager;->resolveAttrs(JII[I[I[I[I)Z
-Landroid/content/res/AssetManager;->retrieveAttributes(Landroid/content/res/XmlBlock$Parser;[I[I[I)Z
-Landroid/content/res/AssetManager;->setConfiguration(IILjava/lang/String;IIIIIIIIIIIIIII)V
-Landroid/content/res/AssetManager;->sSystem:Landroid/content/res/AssetManager;
-Landroid/content/res/ColorStateList$ColorStateListFactory;-><init>(Landroid/content/res/ColorStateList;)V
-Landroid/content/res/ColorStateList;-><init>()V
-Landroid/content/res/ColorStateList;->canApplyTheme()Z
-Landroid/content/res/ColorStateList;->getColors()[I
-Landroid/content/res/ColorStateList;->getStates()[[I
-Landroid/content/res/ColorStateList;->mColors:[I
-Landroid/content/res/ColorStateList;->mDefaultColor:I
-Landroid/content/res/ColorStateList;->mFactory:Landroid/content/res/ColorStateList$ColorStateListFactory;
-Landroid/content/res/ColorStateList;->mStateSpecs:[[I
-Landroid/content/res/ColorStateList;->obtainForTheme(Landroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList;
-Landroid/content/res/ColorStateList;->onColorsChanged()V
-Landroid/content/res/CompatibilityInfo$Translator;->applicationInvertedScale:F
-Landroid/content/res/CompatibilityInfo$Translator;->applicationScale:F
-Landroid/content/res/CompatibilityInfo$Translator;->getTranslatedContentInsets(Landroid/graphics/Rect;)Landroid/graphics/Rect;
-Landroid/content/res/CompatibilityInfo$Translator;->translateCanvas(Landroid/graphics/Canvas;)V
-Landroid/content/res/CompatibilityInfo$Translator;->translateEventInScreenToAppWindow(Landroid/view/MotionEvent;)V
-Landroid/content/res/CompatibilityInfo$Translator;->translateRectInAppWindowToScreen(Landroid/graphics/Rect;)V
-Landroid/content/res/CompatibilityInfo$Translator;->translateRectInScreenToAppWindow(Landroid/graphics/Rect;)V
-Landroid/content/res/CompatibilityInfo$Translator;->translateRectInScreenToAppWinFrame(Landroid/graphics/Rect;)V
-Landroid/content/res/CompatibilityInfo$Translator;->translateRegionInWindowToScreen(Landroid/graphics/Region;)V
-Landroid/content/res/CompatibilityInfo$Translator;->translateWindowLayout(Landroid/view/WindowManager$LayoutParams;)V
-Landroid/content/res/CompatibilityInfo;-><init>()V
-Landroid/content/res/CompatibilityInfo;-><init>(Landroid/content/pm/ApplicationInfo;IIZ)V
-Landroid/content/res/CompatibilityInfo;->applicationScale:F
-Landroid/content/res/CompatibilityInfo;->computeCompatibleScaling(Landroid/util/DisplayMetrics;Landroid/util/DisplayMetrics;)F
-Landroid/content/res/CompatibilityInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/content/res/CompatibilityInfo;->DEFAULT_COMPATIBILITY_INFO:Landroid/content/res/CompatibilityInfo;
-Landroid/content/res/CompatibilityInfo;->getTranslator()Landroid/content/res/CompatibilityInfo$Translator;
-Landroid/content/res/CompatibilityInfo;->isScalingRequired()Z
-Landroid/content/res/CompatibilityInfo;->supportsScreen()Z
-Landroid/content/res/Configuration;->generateDelta(Landroid/content/res/Configuration;Landroid/content/res/Configuration;)Landroid/content/res/Configuration;
-Landroid/content/res/Configuration;->makeDefault()V
-Landroid/content/res/Configuration;->resourceQualifierString(Landroid/content/res/Configuration;)Ljava/lang/String;
-Landroid/content/res/Configuration;->seq:I
-Landroid/content/res/Configuration;->userSetLocale:Z
Landroid/content/res/ConfigurationBoundResourceCache;-><init>()V
Landroid/content/res/DrawableCache;-><init>()V
-Landroid/content/res/DrawableCache;->getInstance(JLandroid/content/res/Resources;Landroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
-Landroid/content/res/ObbInfo;->salt:[B
-Landroid/content/res/Resources$Theme;->mThemeImpl:Landroid/content/res/ResourcesImpl$ThemeImpl;
-Landroid/content/res/Resources$Theme;->resolveAttributes([I[I)Landroid/content/res/TypedArray;
-Landroid/content/res/Resources;-><init>()V
-Landroid/content/res/Resources;-><init>(Ljava/lang/ClassLoader;)V
-Landroid/content/res/Resources;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
-Landroid/content/res/Resources;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
-Landroid/content/res/Resources;->getDrawableInflater()Landroid/graphics/drawable/DrawableInflater;
-Landroid/content/res/Resources;->getFloat(I)F
-Landroid/content/res/Resources;->getImpl()Landroid/content/res/ResourcesImpl;
-Landroid/content/res/Resources;->getPreloadedDrawables()Landroid/util/LongSparseArray;
-Landroid/content/res/Resources;->loadDrawable(Landroid/util/TypedValue;IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
-Landroid/content/res/Resources;->loadXmlResourceParser(ILjava/lang/String;)Landroid/content/res/XmlResourceParser;
-Landroid/content/res/Resources;->loadXmlResourceParser(Ljava/lang/String;IILjava/lang/String;)Landroid/content/res/XmlResourceParser;
-Landroid/content/res/Resources;->mClassLoader:Ljava/lang/ClassLoader;
-Landroid/content/res/Resources;->mDrawableInflater:Landroid/graphics/drawable/DrawableInflater;
-Landroid/content/res/Resources;->mResourcesImpl:Landroid/content/res/ResourcesImpl;
-Landroid/content/res/Resources;->mSystem:Landroid/content/res/Resources;
-Landroid/content/res/Resources;->mTmpValue:Landroid/util/TypedValue;
-Landroid/content/res/Resources;->mTypedArrayPool:Landroid/util/Pools$SynchronizedPool;
-Landroid/content/res/Resources;->selectDefaultTheme(II)I
-Landroid/content/res/Resources;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
-Landroid/content/res/Resources;->setImpl(Landroid/content/res/ResourcesImpl;)V
-Landroid/content/res/Resources;->updateSystemConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;Landroid/content/res/CompatibilityInfo;)V
-Landroid/content/res/ResourcesImpl;-><init>(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;Landroid/view/DisplayAdjustments;)V
-Landroid/content/res/ResourcesImpl;->getAssets()Landroid/content/res/AssetManager;
-Landroid/content/res/ResourcesImpl;->getDisplayMetrics()Landroid/util/DisplayMetrics;
-Landroid/content/res/ResourcesImpl;->getValue(ILandroid/util/TypedValue;Z)V
-Landroid/content/res/ResourcesImpl;->mAccessLock:Ljava/lang/Object;
-Landroid/content/res/ResourcesImpl;->mAnimatorCache:Landroid/content/res/ConfigurationBoundResourceCache;
-Landroid/content/res/ResourcesImpl;->mAssets:Landroid/content/res/AssetManager;
-Landroid/content/res/ResourcesImpl;->mColorDrawableCache:Landroid/content/res/DrawableCache;
-Landroid/content/res/ResourcesImpl;->mConfiguration:Landroid/content/res/Configuration;
-Landroid/content/res/ResourcesImpl;->mDrawableCache:Landroid/content/res/DrawableCache;
-Landroid/content/res/ResourcesImpl;->mPreloading:Z
-Landroid/content/res/ResourcesImpl;->mStateListAnimatorCache:Landroid/content/res/ConfigurationBoundResourceCache;
-Landroid/content/res/ResourcesImpl;->sPreloadedColorDrawables:Landroid/util/LongSparseArray;
-Landroid/content/res/ResourcesImpl;->sPreloadedComplexColors:Landroid/util/LongSparseArray;
-Landroid/content/res/ResourcesImpl;->sPreloadedDrawables:[Landroid/util/LongSparseArray;
-Landroid/content/res/ResourcesImpl;->TRACE_FOR_MISS_PRELOAD:Z
-Landroid/content/res/ResourcesImpl;->TRACE_FOR_PRELOAD:Z
-Landroid/content/res/ResourcesKey;-><init>(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;ILandroid/content/res/Configuration;Landroid/content/res/CompatibilityInfo;)V
-Landroid/content/res/ResourcesKey;->mResDir:Ljava/lang/String;
-Landroid/content/res/ResourcesKey;->mSplitResDirs:[Ljava/lang/String;
-Landroid/content/res/StringBlock;-><init>(JZ)V
-Landroid/content/res/StringBlock;->get(I)Ljava/lang/CharSequence;
-Landroid/content/res/ThemedResourceCache;->mThemedEntries:Landroid/util/ArrayMap;
-Landroid/content/res/ThemedResourceCache;->onConfigurationChange(I)V
-Landroid/content/res/TypedArray;->extractThemeAttrs()[I
-Landroid/content/res/TypedArray;->extractThemeAttrs([I)[I
-Landroid/content/res/TypedArray;->getNonConfigurationString(II)Ljava/lang/String;
-Landroid/content/res/TypedArray;->getValueAt(ILandroid/util/TypedValue;)Z
-Landroid/content/res/TypedArray;->mAssets:Landroid/content/res/AssetManager;
-Landroid/content/res/TypedArray;->mData:[I
-Landroid/content/res/TypedArray;->mIndices:[I
-Landroid/content/res/TypedArray;->mLength:I
-Landroid/content/res/TypedArray;->mMetrics:Landroid/util/DisplayMetrics;
-Landroid/content/res/TypedArray;->mRecycled:Z
-Landroid/content/res/TypedArray;->mResources:Landroid/content/res/Resources;
-Landroid/content/res/TypedArray;->mTheme:Landroid/content/res/Resources$Theme;
-Landroid/content/res/TypedArray;->mValue:Landroid/util/TypedValue;
-Landroid/content/res/TypedArray;->mXml:Landroid/content/res/XmlBlock$Parser;
-Landroid/content/res/XmlBlock$Parser;->mBlock:Landroid/content/res/XmlBlock;
-Landroid/content/res/XmlBlock$Parser;->mParseState:J
-Landroid/content/res/XmlBlock;-><init>([B)V
-Landroid/content/res/XmlBlock;->newParser()Landroid/content/res/XmlResourceParser;
-Landroid/content/RestrictionsManager;->mService:Landroid/content/IRestrictionsManager;
-Landroid/content/SearchRecentSuggestionsProvider;->mSuggestionProjection:[Ljava/lang/String;
-Landroid/content/SyncAdaptersCache;-><init>(Landroid/content/Context;)V
-Landroid/content/SyncAdapterType;-><init>(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/content/SyncAdapterType;->allowParallelSyncs:Z
-Landroid/content/SyncAdapterType;->isAlwaysSyncable:Z
-Landroid/content/SyncAdapterType;->settingsActivity:Ljava/lang/String;
-Landroid/content/SyncAdapterType;->supportsUploading:Z
-Landroid/content/SyncAdapterType;->userVisible:Z
-Landroid/content/SyncContext;-><init>(Landroid/content/ISyncContext;)V
-Landroid/content/SyncContext;->setStatusText(Ljava/lang/String;)V
-Landroid/content/SyncInfo;-><init>(ILandroid/accounts/Account;Ljava/lang/String;J)V
-Landroid/content/SyncInfo;-><init>(Landroid/os/Parcel;)V
-Landroid/content/SyncInfo;->authorityId:I
-Landroid/content/SyncInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/content/SyncRequest;->mAccountToSync:Landroid/accounts/Account;
-Landroid/content/SyncRequest;->mAuthority:Ljava/lang/String;
-Landroid/content/SyncRequest;->mExtras:Landroid/os/Bundle;
-Landroid/content/SyncRequest;->mIsPeriodic:Z
-Landroid/content/SyncRequest;->mSyncRunTimeSecs:J
-Landroid/content/SyncStatusInfo;-><init>(I)V
-Landroid/content/SyncStatusInfo;-><init>(Landroid/os/Parcel;)V
-Landroid/content/SyncStatusInfo;->authorityId:I
-Landroid/content/SyncStatusInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/content/SyncStatusInfo;->ensurePeriodicSyncTimeSize(I)V
-Landroid/content/SyncStatusInfo;->getLastFailureMesgAsInt(I)I
-Landroid/content/SyncStatusInfo;->getPeriodicSyncTime(I)J
-Landroid/content/SyncStatusInfo;->initialFailureTime:J
-Landroid/content/SyncStatusInfo;->initialize:Z
-Landroid/content/SyncStatusInfo;->lastFailureMesg:Ljava/lang/String;
-Landroid/content/SyncStatusInfo;->lastFailureSource:I
-Landroid/content/SyncStatusInfo;->lastFailureTime:J
-Landroid/content/SyncStatusInfo;->lastSuccessSource:I
-Landroid/content/SyncStatusInfo;->lastSuccessTime:J
-Landroid/content/SyncStatusInfo;->pending:Z
-Landroid/content/SyncStatusInfo;->periodicSyncTimes:Ljava/util/ArrayList;
-Landroid/content/SyncStatusInfo;->removePeriodicSyncTime(I)V
-Landroid/content/SyncStatusInfo;->setPeriodicSyncTime(IJ)V
Landroid/content/UndoManager;-><init>()V
-Landroid/content/UndoManager;->addOperation(Landroid/content/UndoOperation;I)V
-Landroid/content/UndoManager;->beginUpdate(Ljava/lang/CharSequence;)V
-Landroid/content/UndoManager;->commitState(Landroid/content/UndoOwner;)I
-Landroid/content/UndoManager;->countRedos([Landroid/content/UndoOwner;)I
-Landroid/content/UndoManager;->countUndos([Landroid/content/UndoOwner;)I
-Landroid/content/UndoManager;->endUpdate()V
-Landroid/content/UndoManager;->forgetRedos([Landroid/content/UndoOwner;I)I
-Landroid/content/UndoManager;->forgetUndos([Landroid/content/UndoOwner;I)I
-Landroid/content/UndoManager;->getLastOperation(Ljava/lang/Class;Landroid/content/UndoOwner;I)Landroid/content/UndoOperation;
-Landroid/content/UndoManager;->getOwner(Ljava/lang/String;Ljava/lang/Object;)Landroid/content/UndoOwner;
-Landroid/content/UndoManager;->isInUndo()Z
-Landroid/content/UndoManager;->redo([Landroid/content/UndoOwner;I)I
-Landroid/content/UndoManager;->restoreInstanceState(Landroid/os/Parcel;Ljava/lang/ClassLoader;)V
-Landroid/content/UndoManager;->saveInstanceState(Landroid/os/Parcel;)V
-Landroid/content/UndoManager;->setUndoLabel(Ljava/lang/CharSequence;)V
-Landroid/content/UndoManager;->undo([Landroid/content/UndoOwner;I)I
-Landroid/content/UndoOperation;-><init>(Landroid/content/UndoOwner;)V
-Landroid/content/UndoOperation;-><init>(Landroid/os/Parcel;Ljava/lang/ClassLoader;)V
-Landroid/content/UriMatcher;->mChildren:Ljava/util/ArrayList;
-Landroid/content/UriMatcher;->mText:Ljava/lang/String;
-Landroid/database/AbstractCursor;->mExtras:Landroid/os/Bundle;
-Landroid/database/AbstractCursor;->mNotifyUri:Landroid/net/Uri;
-Landroid/database/AbstractWindowedCursor;->clearOrCreateWindow(Ljava/lang/String;)V
-Landroid/database/AbstractWindowedCursor;->closeWindow()V
-Landroid/database/AbstractWindowedCursor;->onDeactivateOrClose()V
-Landroid/database/ContentObserver;->releaseContentObserver()Landroid/database/IContentObserver;
-Landroid/database/CursorWindow;->mWindowPtr:J
-Landroid/database/CursorWindow;->printStats()Ljava/lang/String;
-Landroid/database/CursorWindow;->sCursorWindowSize:I
-Landroid/database/CursorWindow;->sWindowToPidMap:Landroid/util/LongSparseArray;
-Landroid/database/CursorWrapper;->mCursor:Landroid/database/Cursor;
-Landroid/database/DatabaseUtils;->cursorPickFillWindowStartPosition(II)I
-Landroid/database/DatabaseUtils;->getTypeOfObject(Ljava/lang/Object;)I
Landroid/database/IContentObserver$Stub;-><init>()V
Landroid/database/IContentObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/database/IContentObserver;
Landroid/database/IContentObserver;->onChange(ZLandroid/net/Uri;I)V
-Landroid/database/MatrixCursor;->data:[Ljava/lang/Object;
-Landroid/database/MatrixCursor;->get(I)Ljava/lang/Object;
-Landroid/database/MatrixCursor;->rowCount:I
-Landroid/database/sqlite/DatabaseObjectNotClosedException;-><init>()V
-Landroid/database/sqlite/SQLiteClosable;->mReferenceCount:I
-Landroid/database/sqlite/SQLiteCursor;->fillWindow(I)V
-Landroid/database/sqlite/SQLiteCursor;->mEditTable:Ljava/lang/String;
-Landroid/database/sqlite/SQLiteCursor;->mQuery:Landroid/database/sqlite/SQLiteQuery;
-Landroid/database/sqlite/SQLiteCustomFunction;->dispatchCallback([Ljava/lang/String;)V
-Landroid/database/sqlite/SQLiteCustomFunction;->name:Ljava/lang/String;
-Landroid/database/sqlite/SQLiteCustomFunction;->numArgs:I
-Landroid/database/sqlite/SQLiteDatabase;->beginTransaction(Landroid/database/sqlite/SQLiteTransactionListener;Z)V
-Landroid/database/sqlite/SQLiteDatabase;->collectDbStats(Ljava/util/ArrayList;)V
-Landroid/database/sqlite/SQLiteDatabase;->CONFLICT_VALUES:[Ljava/lang/String;
-Landroid/database/sqlite/SQLiteDatabase;->getActiveDatabases()Ljava/util/ArrayList;
-Landroid/database/sqlite/SQLiteDatabase;->getThreadSession()Landroid/database/sqlite/SQLiteSession;
-Landroid/database/sqlite/SQLiteDatabase;->mConfigurationLocked:Landroid/database/sqlite/SQLiteDatabaseConfiguration;
-Landroid/database/sqlite/SQLiteDatabase;->mConnectionPoolLocked:Landroid/database/sqlite/SQLiteConnectionPool;
-Landroid/database/sqlite/SQLiteDatabase;->mThreadSession:Ljava/lang/ThreadLocal;
-Landroid/database/sqlite/SQLiteDatabase;->openDatabase(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$OpenParams;)Landroid/database/sqlite/SQLiteDatabase;
-Landroid/database/sqlite/SQLiteDatabase;->reopenReadWrite()V
-Landroid/database/sqlite/SQLiteDatabaseConfiguration;->maxSqlCacheSize:I
-Landroid/database/sqlite/SQLiteOpenHelper;->mName:Ljava/lang/String;
-Landroid/database/sqlite/SQLiteProgram;->mBindArgs:[Ljava/lang/Object;
-Landroid/database/sqlite/SQLiteProgram;->mSql:Ljava/lang/String;
-Landroid/database/sqlite/SQLiteQueryBuilder;->computeProjection([Ljava/lang/String;)[Ljava/lang/String;
-Landroid/database/sqlite/SQLiteQueryBuilder;->mDistinct:Z
-Landroid/database/sqlite/SQLiteQueryBuilder;->mTables:Ljava/lang/String;
-Landroid/database/sqlite/SQLiteQueryBuilder;->mWhereClause:Ljava/lang/StringBuilder;
-Landroid/database/sqlite/SQLiteSession;->beginTransaction(ILandroid/database/sqlite/SQLiteTransactionListener;ILandroid/os/CancellationSignal;)V
-Landroid/database/sqlite/SQLiteStatement;-><init>(Landroid/database/sqlite/SQLiteDatabase;Ljava/lang/String;[Ljava/lang/Object;)V
-Landroid/database/sqlite/SqliteWrapper;->checkSQLiteException(Landroid/content/Context;Landroid/database/sqlite/SQLiteException;)V
-Landroid/database/sqlite/SqliteWrapper;->delete(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
-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;
@@ -1838,7 +463,6 @@
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;
@@ -1855,29 +479,18 @@
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;
@@ -1895,170 +508,19 @@
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
@@ -2090,18 +552,6 @@
Landroid/icu/util/UResourceBundle;->getType()I
Landroid/icu/util/UResourceBundleIterator;->hasNext()Z
Landroid/icu/util/UResourceBundleIterator;->next()Landroid/icu/util/UResourceBundle;
-Landroid/location/Country;-><init>(Ljava/lang/String;I)V
-Landroid/location/Country;->getCountryIso()Ljava/lang/String;
-Landroid/location/Country;->getSource()I
-Landroid/location/CountryDetector;-><init>(Landroid/location/ICountryDetector;)V
-Landroid/location/CountryDetector;->addCountryListener(Landroid/location/CountryListener;Landroid/os/Looper;)V
-Landroid/location/CountryDetector;->detectCountry()Landroid/location/Country;
-Landroid/location/CountryDetector;->removeCountryListener(Landroid/location/CountryListener;)V
-Landroid/location/CountryListener;->onCountryDetected(Landroid/location/Country;)V
-Landroid/location/GeocoderParams;->getClientPackage()Ljava/lang/String;
-Landroid/location/GeocoderParams;->getLocale()Ljava/util/Locale;
-Landroid/location/Geofence;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/location/GpsStatus;->setTimeToFirstFix(I)V
Landroid/location/ICountryDetector$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ICountryDetector;
Landroid/location/ICountryListener$Stub;-><init>()V
Landroid/location/IGeocodeProvider$Stub;-><init>()V
@@ -2120,234 +570,6 @@
Landroid/location/ILocationManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/location/ILocationManager;
Landroid/location/ILocationManager$Stub;->TRANSACTION_getAllProviders:I
Landroid/location/ILocationManager;->getAllProviders()Ljava/util/List;
-Landroid/location/Location;->mElapsedRealtimeNanos:J
-Landroid/location/Location;->mProvider:Ljava/lang/String;
-Landroid/location/LocationManager;->mService:Landroid/location/ILocationManager;
-Landroid/location/LocationManager;->requestLocationUpdates(Landroid/location/LocationRequest;Landroid/location/LocationListener;Landroid/os/Looper;Landroid/app/PendingIntent;)V
-Landroid/location/LocationManager;->sendNiResponse(II)Z
-Landroid/location/LocationRequest;->checkDisplacement(F)V
-Landroid/location/LocationRequest;->checkInterval(J)V
-Landroid/location/LocationRequest;->checkProvider(Ljava/lang/String;)V
-Landroid/location/LocationRequest;->checkQuality(I)V
-Landroid/location/LocationRequest;->mExpireAt:J
-Landroid/location/LocationRequest;->mExplicitFastestInterval:Z
-Landroid/location/LocationRequest;->mFastestInterval:J
-Landroid/location/LocationRequest;->mHideFromAppOps:Z
-Landroid/location/LocationRequest;->mInterval:J
-Landroid/location/LocationRequest;->mNumUpdates:I
-Landroid/location/LocationRequest;->mProvider:Ljava/lang/String;
-Landroid/location/LocationRequest;->mQuality:I
-Landroid/location/LocationRequest;->mSmallestDisplacement:F
-Landroid/location/LocationRequest;->mWorkSource:Landroid/os/WorkSource;
-Landroid/media/AmrInputStream;-><init>(Ljava/io/InputStream;)V
-Landroid/media/AsyncPlayer;->setUsesWakeLock(Landroid/content/Context;)V
-Landroid/media/AudioAttributes$Builder;->addTag(Ljava/lang/String;)Landroid/media/AudioAttributes$Builder;
-Landroid/media/AudioAttributes$Builder;->setInternalLegacyStreamType(I)Landroid/media/AudioAttributes$Builder;
-Landroid/media/AudioAttributes;->mContentType:I
-Landroid/media/AudioAttributes;->mFlags:I
-Landroid/media/AudioAttributes;->mFormattedTags:Ljava/lang/String;
-Landroid/media/AudioAttributes;->mSource:I
-Landroid/media/AudioAttributes;->mUsage:I
-Landroid/media/AudioAttributes;->toLegacyStreamType(Landroid/media/AudioAttributes;)I
-Landroid/media/AudioDevicePort;-><init>(Landroid/media/AudioHandle;Ljava/lang/String;[I[I[I[I[Landroid/media/AudioGain;ILjava/lang/String;)V
-Landroid/media/AudioDevicePort;->type()I
-Landroid/media/AudioDevicePortConfig;-><init>(Landroid/media/AudioDevicePort;IIILandroid/media/AudioGainConfig;)V
-Landroid/media/AudioFormat;-><init>(IIII)V
-Landroid/media/AudioFormat;->mChannelMask:I
-Landroid/media/AudioFormat;->mEncoding:I
-Landroid/media/AudioFormat;->mSampleRate:I
-Landroid/media/audiofx/AudioEffect;-><init>(Ljava/util/UUID;Ljava/util/UUID;II)V
-Landroid/media/audiofx/AudioEffect;->checkState(Ljava/lang/String;)V
-Landroid/media/audiofx/AudioEffect;->command(I[B[B)I
-Landroid/media/audiofx/AudioEffect;->getParameter([I[B)I
-Landroid/media/audiofx/AudioEffect;->getParameter([I[I)I
-Landroid/media/audiofx/AudioEffect;->setParameter([I[S)I
-Landroid/media/audiofx/Visualizer;->mId:I
-Landroid/media/AudioGain;-><init>(IIIIIIIII)V
-Landroid/media/AudioGainConfig;-><init>(ILandroid/media/AudioGain;II[II)V
-Landroid/media/AudioGainConfig;->mChannelMask:I
-Landroid/media/AudioGainConfig;->mIndex:I
-Landroid/media/AudioGainConfig;->mMode:I
-Landroid/media/AudioGainConfig;->mRampDurationMs:I
-Landroid/media/AudioGainConfig;->mValues:[I
-Landroid/media/AudioHandle;-><init>(I)V
-Landroid/media/AudioHandle;->mId:I
-Landroid/media/AudioManager;-><init>()V
-Landroid/media/AudioManager;-><init>(Landroid/content/Context;)V
-Landroid/media/AudioManager;->abandonAudioFocusForCall()V
-Landroid/media/AudioManager;->createAudioPatch([Landroid/media/AudioPatch;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)I
-Landroid/media/AudioManager;->DEVICE_OUT_ANLG_DOCK_HEADSET:I
-Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP:I
-Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES:I
-Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER:I
-Landroid/media/AudioManager;->DEVICE_OUT_BLUETOOTH_SCO_HEADSET:I
-Landroid/media/AudioManager;->DEVICE_OUT_DGTL_DOCK_HEADSET:I
-Landroid/media/AudioManager;->DEVICE_OUT_EARPIECE:I
-Landroid/media/AudioManager;->DEVICE_OUT_HDMI:I
-Landroid/media/AudioManager;->DEVICE_OUT_SPEAKER:I
-Landroid/media/AudioManager;->DEVICE_OUT_WIRED_HEADPHONE:I
-Landroid/media/AudioManager;->DEVICE_OUT_WIRED_HEADSET:I
-Landroid/media/AudioManager;->EXTRA_VOLUME_STREAM_TYPE:Ljava/lang/String;
-Landroid/media/AudioManager;->EXTRA_VOLUME_STREAM_VALUE:Ljava/lang/String;
-Landroid/media/AudioManager;->forceVolumeControlStream(I)V
-Landroid/media/AudioManager;->getDevicesForStream(I)I
-Landroid/media/AudioManager;->getLastAudibleStreamVolume(I)I
-Landroid/media/AudioManager;->getOutputLatency(I)I
-Landroid/media/AudioManager;->getRingerModeInternal()I
-Landroid/media/AudioManager;->getService()Landroid/media/IAudioService;
-Landroid/media/AudioManager;->isMasterMute()Z
-Landroid/media/AudioManager;->isMusicActiveRemotely()Z
-Landroid/media/AudioManager;->isSilentMode()Z
-Landroid/media/AudioManager;->isValidRingerMode(I)Z
-Landroid/media/AudioManager;->listAudioPatches(Ljava/util/ArrayList;)I
-Landroid/media/AudioManager;->listAudioPorts(Ljava/util/ArrayList;)I
-Landroid/media/AudioManager;->mAudioFocusIdListenerMap:Ljava/util/concurrent/ConcurrentHashMap;
-Landroid/media/AudioManager;->NUM_SOUND_EFFECTS:I
-Landroid/media/AudioManager;->releaseAudioPatch(Landroid/media/AudioPatch;)I
-Landroid/media/AudioManager;->reloadAudioSettings()V
-Landroid/media/AudioManager;->requestAudioFocusForCall(II)V
-Landroid/media/AudioManager;->setMasterMute(ZI)V
-Landroid/media/AudioManager;->setRingerModeInternal(I)V
-Landroid/media/AudioManager;->setWiredDeviceConnectionState(IILjava/lang/String;Ljava/lang/String;)V
-Landroid/media/AudioManager;->startBluetoothScoVirtualCall()V
-Landroid/media/AudioManager;->STREAM_BLUETOOTH_SCO:I
-Landroid/media/AudioManager;->STREAM_SYSTEM_ENFORCED:I
-Landroid/media/AudioManager;->STREAM_TTS:I
-Landroid/media/AudioManager;->VOLUME_CHANGED_ACTION:Ljava/lang/String;
-Landroid/media/AudioMixPort;-><init>(Landroid/media/AudioHandle;IILjava/lang/String;[I[I[I[I[Landroid/media/AudioGain;)V
-Landroid/media/AudioMixPort;->ioHandle()I
-Landroid/media/AudioMixPortConfig;-><init>(Landroid/media/AudioMixPort;IIILandroid/media/AudioGainConfig;)V
-Landroid/media/AudioPatch;-><init>(Landroid/media/AudioHandle;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)V
-Landroid/media/AudioPatch;->mHandle:Landroid/media/AudioHandle;
-Landroid/media/AudioPatch;->sinks()[Landroid/media/AudioPortConfig;
-Landroid/media/AudioPatch;->sources()[Landroid/media/AudioPortConfig;
-Landroid/media/audiopolicy/AudioMix;->mCallbackFlags:I
-Landroid/media/audiopolicy/AudioMix;->mDeviceAddress:Ljava/lang/String;
-Landroid/media/audiopolicy/AudioMix;->mDeviceSystemType:I
-Landroid/media/audiopolicy/AudioMix;->mFormat:Landroid/media/AudioFormat;
-Landroid/media/audiopolicy/AudioMix;->mMixType:I
-Landroid/media/audiopolicy/AudioMix;->mRouteFlags:I
-Landroid/media/audiopolicy/AudioMix;->mRule:Landroid/media/audiopolicy/AudioMixingRule;
-Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mAttr:Landroid/media/AudioAttributes;
-Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mIntProp:I
-Landroid/media/audiopolicy/AudioMixingRule$AudioMixMatchCriterion;->mRule:I
-Landroid/media/audiopolicy/AudioMixingRule;->mCriteria:Ljava/util/ArrayList;
-Landroid/media/AudioPort;-><init>(Landroid/media/AudioHandle;ILjava/lang/String;[I[I[I[I[Landroid/media/AudioGain;)V
-Landroid/media/AudioPort;->id()I
-Landroid/media/AudioPort;->mActiveConfig:Landroid/media/AudioPortConfig;
-Landroid/media/AudioPort;->mGains:[Landroid/media/AudioGain;
-Landroid/media/AudioPort;->mHandle:Landroid/media/AudioHandle;
-Landroid/media/AudioPort;->mRole:I
-Landroid/media/AudioPort;->role()I
-Landroid/media/AudioPortConfig;-><init>(Landroid/media/AudioPort;IIILandroid/media/AudioGainConfig;)V
-Landroid/media/AudioPortConfig;->mChannelMask:I
-Landroid/media/AudioPortConfig;->mConfigMask:I
-Landroid/media/AudioPortConfig;->mFormat:I
-Landroid/media/AudioPortConfig;->mGain:Landroid/media/AudioGainConfig;
-Landroid/media/AudioPortConfig;->mPort:Landroid/media/AudioPort;
-Landroid/media/AudioPortConfig;->mSamplingRate:I
-Landroid/media/AudioPortConfig;->port()Landroid/media/AudioPort;
-Landroid/media/AudioPortEventHandler;->mJniCallback:J
-Landroid/media/AudioPortEventHandler;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
-Landroid/media/AudioRecord;->mAudioAttributes:Landroid/media/AudioAttributes;
-Landroid/media/AudioRecord;->mInitializationLooper:Landroid/os/Looper;
-Landroid/media/AudioRecord;->mNativeCallbackCookie:J
-Landroid/media/AudioRecord;->mNativeDeviceCallback:J
-Landroid/media/AudioRecord;->mNativeRecorderInJavaObj:J
-Landroid/media/AudioRecord;->native_release()V
-Landroid/media/AudioRecord;->native_setup(Ljava/lang/Object;Ljava/lang/Object;[IIIII[ILjava/lang/String;J)I
-Landroid/media/AudioRecord;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
-Landroid/media/AudioRecordingConfiguration;->getClientPackageName()Ljava/lang/String;
-Landroid/media/AudioRecordingConfiguration;->getClientUid()I
-Landroid/media/AudioSystem;->DEVICE_IN_AMBIENT:I
-Landroid/media/AudioSystem;->DEVICE_IN_ANLG_DOCK_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_IN_AUX_DIGITAL:I
-Landroid/media/AudioSystem;->DEVICE_IN_BACK_MIC:I
-Landroid/media/AudioSystem;->DEVICE_IN_BLUETOOTH_A2DP:I
-Landroid/media/AudioSystem;->DEVICE_IN_BLUETOOTH_SCO_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_IN_BUILTIN_MIC:I
-Landroid/media/AudioSystem;->DEVICE_IN_COMMUNICATION:I
-Landroid/media/AudioSystem;->DEVICE_IN_DEFAULT:I
-Landroid/media/AudioSystem;->DEVICE_IN_DGTL_DOCK_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_IN_REMOTE_SUBMIX:I
-Landroid/media/AudioSystem;->DEVICE_IN_USB_ACCESSORY:I
-Landroid/media/AudioSystem;->DEVICE_IN_USB_DEVICE:I
-Landroid/media/AudioSystem;->DEVICE_IN_VOICE_CALL:I
-Landroid/media/AudioSystem;->DEVICE_IN_WIRED_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_OUT_ALL_USB:I
-Landroid/media/AudioSystem;->DEVICE_OUT_ANLG_DOCK_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_OUT_AUX_DIGITAL:I
-Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP:I
-Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES:I
-Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER:I
-Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO:I
-Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO_CARKIT:I
-Landroid/media/AudioSystem;->DEVICE_OUT_BLUETOOTH_SCO_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_OUT_DGTL_DOCK_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_OUT_EARPIECE:I
-Landroid/media/AudioSystem;->DEVICE_OUT_FM:I
-Landroid/media/AudioSystem;->DEVICE_OUT_REMOTE_SUBMIX:I
-Landroid/media/AudioSystem;->DEVICE_OUT_SPEAKER:I
-Landroid/media/AudioSystem;->DEVICE_OUT_TELEPHONY_TX:I
-Landroid/media/AudioSystem;->DEVICE_OUT_USB_ACCESSORY:I
-Landroid/media/AudioSystem;->DEVICE_OUT_USB_DEVICE:I
-Landroid/media/AudioSystem;->DEVICE_OUT_WIRED_HEADPHONE:I
-Landroid/media/AudioSystem;->DEVICE_OUT_WIRED_HEADSET:I
-Landroid/media/AudioSystem;->DEVICE_STATE_AVAILABLE:I
-Landroid/media/AudioSystem;->DEVICE_STATE_UNAVAILABLE:I
-Landroid/media/AudioSystem;->dynamicPolicyCallbackFromNative(ILjava/lang/String;I)V
-Landroid/media/AudioSystem;->errorCallbackFromNative(I)V
-Landroid/media/AudioSystem;->FORCE_ANALOG_DOCK:I
-Landroid/media/AudioSystem;->FORCE_BT_CAR_DOCK:I
-Landroid/media/AudioSystem;->FORCE_BT_DESK_DOCK:I
-Landroid/media/AudioSystem;->FORCE_DIGITAL_DOCK:I
-Landroid/media/AudioSystem;->FORCE_NONE:I
-Landroid/media/AudioSystem;->getDeviceConnectionState(ILjava/lang/String;)I
-Landroid/media/AudioSystem;->getDevicesForStream(I)I
-Landroid/media/AudioSystem;->getMasterMute()Z
-Landroid/media/AudioSystem;->getNumStreamTypes()I
-Landroid/media/AudioSystem;->getOutputDeviceName(I)Ljava/lang/String;
-Landroid/media/AudioSystem;->getOutputLatency(I)I
-Landroid/media/AudioSystem;->getPrimaryOutputFrameCount()I
-Landroid/media/AudioSystem;->getPrimaryOutputSamplingRate()I
-Landroid/media/AudioSystem;->initStreamVolume(III)I
-Landroid/media/AudioSystem;->isMicrophoneMuted()Z
-Landroid/media/AudioSystem;->isSourceActive(I)Z
-Landroid/media/AudioSystem;->isStreamActive(II)Z
-Landroid/media/AudioSystem;->muteMicrophone(Z)I
-Landroid/media/AudioSystem;->recordingCallbackFromNative(IIII[I)V
-Landroid/media/AudioSystem;->setDeviceConnectionState(IILjava/lang/String;Ljava/lang/String;)I
-Landroid/media/AudioSystem;->setErrorCallback(Landroid/media/AudioSystem$ErrorCallback;)V
-Landroid/media/AudioSystem;->setMasterMute(Z)I
-Landroid/media/AudioSystem;->setPhoneState(I)I
-Landroid/media/AudioSystem;->setStreamVolumeIndex(III)I
-Landroid/media/AudioSystem;->STREAM_SYSTEM_ENFORCED:I
-Landroid/media/AudioTrack;->deferred_connect(J)V
-Landroid/media/AudioTrack;->getLatency()I
-Landroid/media/AudioTrack;->mJniData:J
-Landroid/media/AudioTrack;->mNativeTrackInJavaObj:J
-Landroid/media/AudioTrack;->mStreamType:I
-Landroid/media/AudioTrack;->native_release()V
-Landroid/media/AudioTrack;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
-Landroid/media/CamcorderProfile;->native_get_camcorder_profile(II)Landroid/media/CamcorderProfile;
-Landroid/media/CamcorderProfile;->native_init()V
-Landroid/media/DecoderCapabilities$AudioDecoder;->AUDIO_DECODER_WMA:Landroid/media/DecoderCapabilities$AudioDecoder;
-Landroid/media/DecoderCapabilities$VideoDecoder;->VIDEO_DECODER_WMV:Landroid/media/DecoderCapabilities$VideoDecoder;
-Landroid/media/DecoderCapabilities;->getAudioDecoders()Ljava/util/List;
-Landroid/media/DecoderCapabilities;->getVideoDecoders()Ljava/util/List;
-Landroid/media/EncoderCapabilities$VideoEncoderCap;->mCodec:I
-Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMaxFrameHeight:I
-Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMaxFrameWidth:I
-Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMinFrameHeight:I
-Landroid/media/EncoderCapabilities$VideoEncoderCap;->mMinFrameWidth:I
-Landroid/media/EncoderCapabilities;->getVideoEncoders()Ljava/util/List;
-Landroid/media/ExifInterface;->convertRationalLatLonToFloat(Ljava/lang/String;Ljava/lang/String;)F
-Landroid/media/ExifInterface;->getDateTime()J
-Landroid/media/ExifInterface;->getGpsDateTime()J
-Landroid/media/ExifInterface;->mAttributes:[Ljava/util/HashMap;
-Landroid/media/ExifInterface;->mFilename:Ljava/lang/String;
-Landroid/media/ExifInterface;->mHasThumbnail:Z
-Landroid/media/ExifInterface;->sFormatter:Ljava/text/SimpleDateFormat;
Landroid/media/IAudioFocusDispatcher;->dispatchAudioFocusChange(ILjava/lang/String;)V
Landroid/media/IAudioRoutesObserver$Stub;-><init>()V
Landroid/media/IAudioService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
@@ -2357,8 +579,6 @@
Landroid/media/IAudioService;->getStreamVolume(I)I
Landroid/media/IAudioService;->setStreamVolume(IIILjava/lang/String;)V
Landroid/media/IAudioService;->startWatchingRoutes(Landroid/media/IAudioRoutesObserver;)Landroid/media/AudioRoutesInfo;
-Landroid/media/Image$Plane;-><init>()V
-Landroid/media/Image;-><init>()V
Landroid/media/IMediaRouterService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaRouterService;
Landroid/media/IMediaScannerListener$Stub;-><init>()V
Landroid/media/IMediaScannerService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaScannerService;
@@ -2367,307 +587,9 @@
Landroid/media/IRemoteDisplayCallback;->onStateChanged(Landroid/media/RemoteDisplayState;)V
Landroid/media/IRingtonePlayer;->play(Landroid/os/IBinder;Landroid/net/Uri;Landroid/media/AudioAttributes;FZ)V
Landroid/media/IVolumeController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IVolumeController;
-Landroid/media/JetPlayer;->mNativePlayerInJavaObj:J
-Landroid/media/JetPlayer;->postEventFromNative(Ljava/lang/Object;III)V
-Landroid/media/MediaCodec$CodecException;-><init>(IILjava/lang/String;)V
-Landroid/media/MediaCodec;->getBuffers(Z)[Ljava/nio/ByteBuffer;
-Landroid/media/MediaCodec;->mNativeContext:J
-Landroid/media/MediaCodec;->releaseOutputBuffer(IZZJ)V
-Landroid/media/MediaCodec;->setParameters([Ljava/lang/String;[Ljava/lang/Object;)V
-Landroid/media/MediaCodecInfo$VideoCapabilities;->create(Landroid/media/MediaFormat;Landroid/media/MediaCodecInfo$CodecCapabilities;)Landroid/media/MediaCodecInfo$VideoCapabilities;
-Landroid/media/MediaFile$MediaFileType;->fileType:I
-Landroid/media/MediaFile$MediaFileType;->mimeType:Ljava/lang/String;
Landroid/media/MediaFile;-><init>()V
-Landroid/media/MediaFile;->addFileType(Ljava/lang/String;ILjava/lang/String;)V
-Landroid/media/MediaFile;->FIRST_AUDIO_FILE_TYPE:I
-Landroid/media/MediaFile;->getFileTitle(Ljava/lang/String;)Ljava/lang/String;
-Landroid/media/MediaFile;->getFileType(Ljava/lang/String;)Landroid/media/MediaFile$MediaFileType;
-Landroid/media/MediaFile;->getFileTypeForMimeType(Ljava/lang/String;)I
-Landroid/media/MediaFile;->getMimeTypeForFile(Ljava/lang/String;)Ljava/lang/String;
-Landroid/media/MediaFile;->isAudioFileType(I)Z
-Landroid/media/MediaFile;->isDrmFileType(I)Z
-Landroid/media/MediaFile;->isImageFileType(I)Z
-Landroid/media/MediaFile;->isPlayListFileType(I)Z
-Landroid/media/MediaFile;->isVideoFileType(I)Z
-Landroid/media/MediaFile;->LAST_AUDIO_FILE_TYPE:I
-Landroid/media/MediaFile;->sFileTypeMap:Ljava/util/HashMap;
-Landroid/media/MediaFile;->sFileTypeToFormatMap:Ljava/util/HashMap;
-Landroid/media/MediaFile;->sFormatToMimeTypeMap:Ljava/util/HashMap;
-Landroid/media/MediaFile;->sMimeTypeToFormatMap:Ljava/util/HashMap;
-Landroid/media/MediaFormat;->getMap()Ljava/util/Map;
-Landroid/media/MediaFormat;->mMap:Ljava/util/Map;
-Landroid/media/MediaHTTPConnection;-><init>()V
-Landroid/media/MediaHTTPConnection;->connect(Ljava/lang/String;Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/media/MediaHTTPConnection;->disconnect()V
-Landroid/media/MediaHTTPConnection;->getMIMEType()Ljava/lang/String;
-Landroid/media/MediaHTTPConnection;->getUri()Ljava/lang/String;
-Landroid/media/MediaHTTPConnection;->mAllowCrossDomainRedirect:Z
-Landroid/media/MediaHTTPConnection;->mAllowCrossProtocolRedirect:Z
-Landroid/media/MediaHTTPConnection;->mConnection:Ljava/net/HttpURLConnection;
-Landroid/media/MediaHTTPConnection;->mCurrentOffset:J
-Landroid/media/MediaHTTPConnection;->mHeaders:Ljava/util/Map;
-Landroid/media/MediaHTTPConnection;->mTotalSize:J
-Landroid/media/MediaHTTPConnection;->mURL:Ljava/net/URL;
-Landroid/media/MediaHTTPConnection;->readAt(JI)I
-Landroid/media/MediaHTTPService;->createHttpServiceBinderIfNecessary(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/media/MediaInserter;->flushAll()V
-Landroid/media/MediaMetadata;->getKeyFromMetadataEditorKey(I)Ljava/lang/String;
-Landroid/media/MediaMetadataRetriever;->getEmbeddedPicture(I)[B
-Landroid/media/MediaMetadataRetriever;->native_finalize()V
-Landroid/media/MediaMetadataRetriever;->native_init()V
-Landroid/media/MediaMetadataRetriever;->native_setup()V
-Landroid/media/MediaMuxer;->mCloseGuard:Ldalvik/system/CloseGuard;
-Landroid/media/MediaMuxer;->mNativeObject:J
-Landroid/media/MediaMuxer;->mState:I
-Landroid/media/MediaMuxer;->MUXER_STATE_STARTED:I
-Landroid/media/MediaMuxer;->MUXER_STATE_STOPPED:I
-Landroid/media/MediaMuxer;->MUXER_STATE_UNINITIALIZED:I
-Landroid/media/MediaMuxer;->nativeRelease(J)V
-Landroid/media/MediaMuxer;->nativeSetup(Ljava/io/FileDescriptor;I)J
-Landroid/media/MediaPlayer$TrackInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/media/MediaPlayer2$TrackInfo;->getLanguage()Ljava/lang/String;
-Landroid/media/MediaPlayer2$TrackInfo;->getTrackType()I
-Landroid/media/MediaPlayer;->addSubtitleSource(Ljava/io/InputStream;Landroid/media/MediaFormat;)V
-Landroid/media/MediaPlayer;->BYPASS_METADATA_FILTER:Z
-Landroid/media/MediaPlayer;->getMediaTimeProvider()Landroid/media/MediaTimeProvider;
-Landroid/media/MediaPlayer;->getMetadata(ZZ)Landroid/media/Metadata;
-Landroid/media/MediaPlayer;->invoke(Landroid/os/Parcel;Landroid/os/Parcel;)V
-Landroid/media/MediaPlayer;->MEDIA_INFO_EXTERNAL_METADATA_UPDATE:I
-Landroid/media/MediaPlayer;->MEDIA_INFO_TIMED_TEXT_ERROR:I
-Landroid/media/MediaPlayer;->METADATA_ALL:Z
-Landroid/media/MediaPlayer;->mEventHandler:Landroid/media/MediaPlayer$EventHandler;
-Landroid/media/MediaPlayer;->mOnCompletionListener:Landroid/media/MediaPlayer$OnCompletionListener;
-Landroid/media/MediaPlayer;->mOnErrorListener:Landroid/media/MediaPlayer$OnErrorListener;
-Landroid/media/MediaPlayer;->mOnInfoListener:Landroid/media/MediaPlayer$OnInfoListener;
-Landroid/media/MediaPlayer;->mOnPreparedListener:Landroid/media/MediaPlayer$OnPreparedListener;
-Landroid/media/MediaPlayer;->mOnSeekCompleteListener:Landroid/media/MediaPlayer$OnSeekCompleteListener;
-Landroid/media/MediaPlayer;->mOnTimedTextListener:Landroid/media/MediaPlayer$OnTimedTextListener;
-Landroid/media/MediaPlayer;->newRequest()Landroid/os/Parcel;
-Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;Ljava/util/Map;)V
-Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;)V
-Landroid/media/MediaPlayer;->setDataSource(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Ljava/util/List;)V
-Landroid/media/MediaPlayer;->setParameter(ILandroid/os/Parcel;)Z
-Landroid/media/MediaPlayer;->setRetransmitEndpoint(Ljava/net/InetSocketAddress;)V
-Landroid/media/MediaPlayer;->setSubtitleAnchor(Landroid/media/SubtitleController;Landroid/media/SubtitleController$Anchor;)V
-Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;
-Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;
-Landroid/media/MediaRecorder;->mOnErrorListener:Landroid/media/MediaRecorder$OnErrorListener;
-Landroid/media/MediaRecorder;->mOnInfoListener:Landroid/media/MediaRecorder$OnInfoListener;
-Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;
-Landroid/media/MediaRecorder;->mSurface:Landroid/view/Surface;
-Landroid/media/MediaRecorder;->native_finalize()V
-Landroid/media/MediaRecorder;->native_init()V
-Landroid/media/MediaRecorder;->native_reset()V
-Landroid/media/MediaRecorder;->native_setup(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V
-Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V
-Landroid/media/MediaRecorder;->_prepare()V
-Landroid/media/MediaRouter$RouteInfo;->getDeviceAddress()Ljava/lang/String;
-Landroid/media/MediaRouter$RouteInfo;->getName(Landroid/content/res/Resources;)Ljava/lang/CharSequence;
-Landroid/media/MediaRouter$RouteInfo;->getStatusCode()I
-Landroid/media/MediaRouter$RouteInfo;->isDefault()Z
-Landroid/media/MediaRouter$RouteInfo;->isSelected()Z
-Landroid/media/MediaRouter$RouteInfo;->matchesTypes(I)Z
-Landroid/media/MediaRouter$RouteInfo;->mNameResId:I
-Landroid/media/MediaRouter$RouteInfo;->select()V
-Landroid/media/MediaRouter$RouteInfo;->STATUS_CONNECTING:I
-Landroid/media/MediaRouter;->getSelectedRoute()Landroid/media/MediaRouter$RouteInfo;
-Landroid/media/MediaRouter;->selectRouteInt(ILandroid/media/MediaRouter$RouteInfo;Z)V
-Landroid/media/MediaScanner$FileEntry;-><init>(JLjava/lang/String;JI)V
-Landroid/media/MediaScanner$FileEntry;->mLastModifiedChanged:Z
-Landroid/media/MediaScanner$FileEntry;->mRowId:J
-Landroid/media/MediaScanner$MyMediaScannerClient;->beginFile(Ljava/lang/String;Ljava/lang/String;JJZZ)Landroid/media/MediaScanner$FileEntry;
-Landroid/media/MediaScanner$MyMediaScannerClient;->doScanFile(Ljava/lang/String;Ljava/lang/String;JJZZZ)Landroid/net/Uri;
-Landroid/media/MediaScanner$MyMediaScannerClient;->endFile(Landroid/media/MediaScanner$FileEntry;ZZZZZ)Landroid/net/Uri;
-Landroid/media/MediaScanner$MyMediaScannerClient;->getFileTypeFromDrm(Ljava/lang/String;)I
-Landroid/media/MediaScanner$MyMediaScannerClient;->handleStringTag(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/media/MediaScanner$MyMediaScannerClient;->mFileType:I
-Landroid/media/MediaScanner$MyMediaScannerClient;->mIsDrm:Z
-Landroid/media/MediaScanner$MyMediaScannerClient;->mMimeType:Ljava/lang/String;
-Landroid/media/MediaScanner$MyMediaScannerClient;->mNoMedia:Z
-Landroid/media/MediaScanner$MyMediaScannerClient;->mPath:Ljava/lang/String;
-Landroid/media/MediaScanner$MyMediaScannerClient;->scanFile(Ljava/lang/String;JJZZ)V
-Landroid/media/MediaScanner$MyMediaScannerClient;->setMimeType(Ljava/lang/String;)V
-Landroid/media/MediaScanner$MyMediaScannerClient;->toValues()Landroid/content/ContentValues;
-Landroid/media/MediaScanner;-><init>(Landroid/content/Context;Ljava/lang/String;)V
-Landroid/media/MediaScanner;->FILES_PRESCAN_PROJECTION:[Ljava/lang/String;
-Landroid/media/MediaScanner;->isDrmEnabled()Z
-Landroid/media/MediaScanner;->isNoMediaPath(Ljava/lang/String;)Z
-Landroid/media/MediaScanner;->makeEntryFor(Ljava/lang/String;)Landroid/media/MediaScanner$FileEntry;
-Landroid/media/MediaScanner;->mAudioUri:Landroid/net/Uri;
-Landroid/media/MediaScanner;->mClient:Landroid/media/MediaScanner$MyMediaScannerClient;
-Landroid/media/MediaScanner;->mContext:Landroid/content/Context;
-Landroid/media/MediaScanner;->mDefaultAlarmAlertFilename:Ljava/lang/String;
-Landroid/media/MediaScanner;->mDefaultNotificationFilename:Ljava/lang/String;
-Landroid/media/MediaScanner;->mDefaultRingtoneFilename:Ljava/lang/String;
-Landroid/media/MediaScanner;->mFilesUri:Landroid/net/Uri;
-Landroid/media/MediaScanner;->mMediaInserter:Landroid/media/MediaInserter;
-Landroid/media/MediaScanner;->mPackageName:Ljava/lang/String;
-Landroid/media/MediaScanner;->postscan([Ljava/lang/String;)V
-Landroid/media/MediaScanner;->prescan(Ljava/lang/String;Z)V
-Landroid/media/MediaScanner;->scanSingleFile(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
-Landroid/media/MediaScanner;->setLocale(Ljava/lang/String;)V
-Landroid/media/Metadata;-><init>()V
-Landroid/media/Metadata;->getBoolean(I)Z
-Landroid/media/Metadata;->getByteArray(I)[B
-Landroid/media/Metadata;->getDate(I)Ljava/util/Date;
-Landroid/media/Metadata;->getDouble(I)D
-Landroid/media/Metadata;->getInt(I)I
-Landroid/media/Metadata;->getLong(I)J
-Landroid/media/Metadata;->getString(I)Ljava/lang/String;
-Landroid/media/Metadata;->has(I)Z
-Landroid/media/Metadata;->keySet()Ljava/util/Set;
-Landroid/media/Metadata;->parse(Landroid/os/Parcel;)Z
-Landroid/media/Metadata;->PAUSE_AVAILABLE:I
-Landroid/media/Metadata;->SEEK_AVAILABLE:I
-Landroid/media/Metadata;->SEEK_BACKWARD_AVAILABLE:I
-Landroid/media/Metadata;->SEEK_FORWARD_AVAILABLE:I
-Landroid/media/MicrophoneInfo;-><init>(Ljava/lang/String;ILjava/lang/String;IIILandroid/media/MicrophoneInfo$Coordinate3F;Landroid/media/MicrophoneInfo$Coordinate3F;Ljava/util/List;Ljava/util/List;FFFI)V
-Landroid/media/MiniThumbFile;->reset()V
-Landroid/media/PlaybackParams;->mAudioFallbackMode:I
-Landroid/media/PlaybackParams;->mAudioStretchMode:I
-Landroid/media/PlaybackParams;->mPitch:F
-Landroid/media/PlaybackParams;->mSet:I
-Landroid/media/PlaybackParams;->mSpeed:F
-Landroid/media/PlaybackParams;->SET_AUDIO_FALLBACK_MODE:I
-Landroid/media/PlaybackParams;->SET_AUDIO_STRETCH_MODE:I
-Landroid/media/PlaybackParams;->SET_PITCH:I
-Landroid/media/PlaybackParams;->SET_SPEED:I
Landroid/media/projection/IMediaProjectionManager;->hasProjectionPermission(ILjava/lang/String;)Z
-Landroid/media/RemoteControlClient;->MEDIA_POSITION_READABLE:I
-Landroid/media/RemoteControlClient;->MEDIA_POSITION_WRITABLE:I
-Landroid/media/RemoteController;->getUpdateListener()Landroid/media/RemoteController$OnClientUpdateListener;
-Landroid/media/RemoteController;->mCurrentSession:Landroid/media/session/MediaController;
-Landroid/media/RemoteController;->setArtworkConfiguration(ZII)Z
-Landroid/media/RemoteDisplay;->dispose()V
-Landroid/media/RemoteDisplay;->notifyDisplayConnected(Landroid/view/Surface;IIII)V
-Landroid/media/RemoteDisplay;->notifyDisplayDisconnected()V
-Landroid/media/RemoteDisplay;->notifyDisplayError(I)V
-Landroid/media/RemoteDisplayState;-><init>()V
-Landroid/media/RemoteDisplayState;->displays:Ljava/util/ArrayList;
-Landroid/media/Ringtone;-><init>(Landroid/content/Context;Z)V
-Landroid/media/Ringtone;->getUri()Landroid/net/Uri;
-Landroid/media/Ringtone;->mLocalPlayer:Landroid/media/MediaPlayer;
-Landroid/media/Ringtone;->mUri:Landroid/net/Uri;
-Landroid/media/Ringtone;->setUri(Landroid/net/Uri;)V
-Landroid/media/RingtoneManager;->getInternalRingtones()Landroid/database/Cursor;
-Landroid/media/RingtoneManager;->getMediaRingtones(Landroid/content/Context;)Landroid/database/Cursor;
-Landroid/media/RingtoneManager;->getRingtone(Landroid/content/Context;Landroid/net/Uri;I)Landroid/media/Ringtone;
-Landroid/media/RingtoneManager;->mCursor:Landroid/database/Cursor;
Landroid/media/session/ISessionManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/session/ISessionManager;
-Landroid/media/session/MediaController;->controlsSameSession(Landroid/media/session/MediaController;)Z
-Landroid/media/session/MediaSession$QueueItem;->mId:J
-Landroid/media/session/MediaSession;->getCallingPackage()Ljava/lang/String;
-Landroid/media/session/MediaSession;->mCallback:Landroid/media/session/MediaSession$CallbackMessageHandler;
-Landroid/media/session/MediaSessionLegacyHelper;->getHelper(Landroid/content/Context;)Landroid/media/session/MediaSessionLegacyHelper;
-Landroid/media/session/MediaSessionManager;->getActiveSessionsForUser(Landroid/content/ComponentName;I)Ljava/util/List;
-Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
-Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getData()[B
-Landroid/media/soundtrigger/SoundTriggerManager;->isRecognitionActive(Ljava/util/UUID;)Z
-Landroid/media/soundtrigger/SoundTriggerManager;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;)I
-Landroid/media/soundtrigger/SoundTriggerManager;->startRecognition(Ljava/util/UUID;Landroid/os/Bundle;Landroid/content/ComponentName;Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
-Landroid/media/soundtrigger/SoundTriggerManager;->stopRecognition(Ljava/util/UUID;)I
-Landroid/media/soundtrigger/SoundTriggerManager;->unloadSoundModel(Ljava/util/UUID;)I
-Landroid/media/SubtitleController;-><init>(Landroid/content/Context;Landroid/media/MediaTimeProvider;Landroid/media/SubtitleController$Listener;)V
-Landroid/media/SubtitleController;->hide()V
-Landroid/media/SubtitleController;->mHandler:Landroid/os/Handler;
-Landroid/media/SubtitleController;->registerRenderer(Landroid/media/SubtitleController$Renderer;)V
-Landroid/media/SubtitleController;->reset()V
-Landroid/media/SubtitleController;->show()V
-Landroid/media/SubtitleTrack$RenderingWidget;->draw(Landroid/graphics/Canvas;)V
-Landroid/media/SubtitleTrack$RenderingWidget;->onAttachedToWindow()V
-Landroid/media/SubtitleTrack$RenderingWidget;->onDetachedFromWindow()V
-Landroid/media/SubtitleTrack$RenderingWidget;->setOnChangedListener(Landroid/media/SubtitleTrack$RenderingWidget$OnChangedListener;)V
-Landroid/media/SubtitleTrack$RenderingWidget;->setSize(II)V
-Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V
-Landroid/media/ThumbnailUtils;->computeInitialSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
-Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
-Landroid/media/ThumbnailUtils;->createImageThumbnail(Ljava/lang/String;I)Landroid/graphics/Bitmap;
-Landroid/media/ThumbnailUtils;->createThumbnailFromEXIF(Ljava/lang/String;IILandroid/media/ThumbnailUtils$SizedThumbnailBitmap;)V
-Landroid/media/ThumbnailUtils;->makeInputStream(Landroid/net/Uri;Landroid/content/ContentResolver;)Landroid/os/ParcelFileDescriptor;
-Landroid/media/ThumbnailUtils;->TARGET_SIZE_MICRO_THUMBNAIL:I
-Landroid/media/ThumbnailUtils;->transform(Landroid/graphics/Matrix;Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;
-Landroid/media/TimedText;->getObject(I)Ljava/lang/Object;
-Landroid/media/ToneGenerator;->mNativeContext:J
-Landroid/media/TtmlRenderer;-><init>(Landroid/content/Context;)V
-Landroid/media/tv/TvInputInfo;->getComponent()Landroid/content/ComponentName;
-Landroid/media/tv/TvInputService$Session;->mOverlayFrame:Landroid/graphics/Rect;
-Landroid/media/VolumeShaper$Configuration;-><init>(IIIDI[F[F)V
-Landroid/media/VolumeShaper$Configuration;->mDurationMs:D
-Landroid/media/VolumeShaper$Configuration;->mId:I
-Landroid/media/VolumeShaper$Configuration;->mInterpolatorType:I
-Landroid/media/VolumeShaper$Configuration;->mOptionFlags:I
-Landroid/media/VolumeShaper$Configuration;->mTimes:[F
-Landroid/media/VolumeShaper$Configuration;->mType:I
-Landroid/media/VolumeShaper$Configuration;->mVolumes:[F
-Landroid/media/VolumeShaper$Operation;-><init>(IIF)V
-Landroid/media/VolumeShaper$Operation;->mFlags:I
-Landroid/media/VolumeShaper$Operation;->mReplaceId:I
-Landroid/media/VolumeShaper$Operation;->mXOffset:F
-Landroid/media/VolumeShaper$State;-><init>(FF)V
-Landroid/media/VolumeShaper$State;->mVolume:F
-Landroid/media/VolumeShaper$State;->mXOffset:F
-Landroid/media/WebVttRenderer;-><init>(Landroid/content/Context;)V
-Landroid/mtp/MtpPropertyList;->append(IIIJ)V
-Landroid/mtp/MtpPropertyList;->append(IILjava/lang/String;)V
-Landroid/mtp/MtpStorage;->getPath()Ljava/lang/String;
-Landroid/mtp/MtpStorage;->getStorageId()I
-Landroid/net/ConnectivityManager;->ACTION_TETHER_STATE_CHANGED:Ljava/lang/String;
-Landroid/net/ConnectivityManager;->EXTRA_ACTIVE_TETHER:Ljava/lang/String;
-Landroid/net/ConnectivityManager;->EXTRA_AVAILABLE_TETHER:Ljava/lang/String;
-Landroid/net/ConnectivityManager;->EXTRA_ERRORED_TETHER:Ljava/lang/String;
-Landroid/net/ConnectivityManager;->from(Landroid/content/Context;)Landroid/net/ConnectivityManager;
-Landroid/net/ConnectivityManager;->getActiveLinkProperties()Landroid/net/LinkProperties;
-Landroid/net/ConnectivityManager;->getActiveNetworkInfoForUid(I)Landroid/net/NetworkInfo;
-Landroid/net/ConnectivityManager;->getDefaultNetworkCapabilitiesForUser(I)[Landroid/net/NetworkCapabilities;
-Landroid/net/ConnectivityManager;->getInstance()Landroid/net/ConnectivityManager;
-Landroid/net/ConnectivityManager;->getLastTetherError(Ljava/lang/String;)I
-Landroid/net/ConnectivityManager;->getLinkProperties(I)Landroid/net/LinkProperties;
-Landroid/net/ConnectivityManager;->getMobileDataEnabled()Z
-Landroid/net/ConnectivityManager;->getNetworkForType(I)Landroid/net/Network;
-Landroid/net/ConnectivityManager;->getNetworkTypeName(I)Ljava/lang/String;
-Landroid/net/ConnectivityManager;->getTetherableBluetoothRegexs()[Ljava/lang/String;
-Landroid/net/ConnectivityManager;->getTetherableIfaces()[Ljava/lang/String;
-Landroid/net/ConnectivityManager;->getTetherableUsbRegexs()[Ljava/lang/String;
-Landroid/net/ConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
-Landroid/net/ConnectivityManager;->getTetheredIfaces()[Ljava/lang/String;
-Landroid/net/ConnectivityManager;->getTetheringErroredIfaces()[Ljava/lang/String;
-Landroid/net/ConnectivityManager;->INET_CONDITION_ACTION:Ljava/lang/String;
-Landroid/net/ConnectivityManager;->isNetworkSupported(I)Z
-Landroid/net/ConnectivityManager;->isNetworkTypeMobile(I)Z
-Landroid/net/ConnectivityManager;->mService:Landroid/net/IConnectivityManager;
-Landroid/net/ConnectivityManager;->networkCapabilitiesForFeature(ILjava/lang/String;)Landroid/net/NetworkCapabilities;
-Landroid/net/ConnectivityManager;->registerNetworkFactory(Landroid/os/Messenger;Ljava/lang/String;)V
-Landroid/net/ConnectivityManager;->removeRequestForFeature(Landroid/net/NetworkCapabilities;)Z
-Landroid/net/ConnectivityManager;->requestNetworkForFeatureLocked(Landroid/net/NetworkCapabilities;)Landroid/net/NetworkRequest;
-Landroid/net/ConnectivityManager;->requestRouteToHostAddress(ILjava/net/InetAddress;)Z
-Landroid/net/ConnectivityManager;->setBackgroundDataSetting(Z)V
-Landroid/net/ConnectivityManager;->setProcessDefaultNetworkForHostResolution(Landroid/net/Network;)Z
-Landroid/net/ConnectivityManager;->setUsbTethering(Z)I
-Landroid/net/ConnectivityManager;->sLegacyRequests:Ljava/util/HashMap;
-Landroid/net/ConnectivityManager;->TYPE_MOBILE_CBS:I
-Landroid/net/ConnectivityManager;->TYPE_MOBILE_EMERGENCY:I
-Landroid/net/ConnectivityManager;->TYPE_MOBILE_FOTA:I
-Landroid/net/ConnectivityManager;->TYPE_MOBILE_IA:I
-Landroid/net/ConnectivityManager;->TYPE_MOBILE_IMS:I
-Landroid/net/ConnectivityManager;->TYPE_NONE:I
-Landroid/net/ConnectivityManager;->TYPE_PROXY:I
-Landroid/net/ConnectivityManager;->TYPE_WIFI_P2P:I
-Landroid/net/ConnectivityManager;->unregisterNetworkFactory(Landroid/os/Messenger;)V
-Landroid/net/EthernetManager$Listener;->onAvailabilityChanged(Ljava/lang/String;Z)V
-Landroid/net/EthernetManager;->addListener(Landroid/net/EthernetManager$Listener;)V
-Landroid/net/EthernetManager;->getAvailableInterfaces()[Ljava/lang/String;
-Landroid/net/EthernetManager;->getConfiguration(Ljava/lang/String;)Landroid/net/IpConfiguration;
-Landroid/net/EthernetManager;->isAvailable()Z
-Landroid/net/EthernetManager;->isAvailable(Ljava/lang/String;)Z
-Landroid/net/EthernetManager;->removeListener(Landroid/net/EthernetManager$Listener;)V
-Landroid/net/EthernetManager;->setConfiguration(Ljava/lang/String;Landroid/net/IpConfiguration;)V
-Landroid/net/http/SslCertificate;->getDigest(Ljava/security/cert/X509Certificate;Ljava/lang/String;)Ljava/lang/String;
-Landroid/net/http/SslCertificate;->getSerialNumber(Ljava/security/cert/X509Certificate;)Ljava/lang/String;
-Landroid/net/http/SslCertificate;->inflateCertificateView(Landroid/content/Context;)Landroid/view/View;
-Landroid/net/http/SslCertificate;->mX509Certificate:Ljava/security/cert/X509Certificate;
-Landroid/net/http/SslError;->mCertificate:Landroid/net/http/SslCertificate;
-Landroid/net/http/SslError;->mErrors:I
-Landroid/net/http/SslError;->mUrl:Ljava/lang/String;
Landroid/net/IConnectivityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveLinkProperties()Landroid/net/LinkProperties;
Landroid/net/IConnectivityManager$Stub$Proxy;->getActiveNetworkInfo()Landroid/net/NetworkInfo;
@@ -2712,205 +634,10 @@
Landroid/net/INetworkStatsSession;->close()V
Landroid/net/INetworkStatsSession;->getSummaryForAllUid(Landroid/net/NetworkTemplate;JJZ)Landroid/net/NetworkStats;
Landroid/net/INetworkStatsSession;->getSummaryForNetwork(Landroid/net/NetworkTemplate;JJ)Landroid/net/NetworkStats;
-Landroid/net/InterfaceConfiguration;->clearFlag(Ljava/lang/String;)V
-Landroid/net/InterfaceConfiguration;->getFlags()Ljava/lang/Iterable;
-Landroid/net/InterfaceConfiguration;->setFlag(Ljava/lang/String;)V
-Landroid/net/InterfaceConfiguration;->setInterfaceDown()V
-Landroid/net/InterfaceConfiguration;->setInterfaceUp()V
-Landroid/net/IpConfiguration$IpAssignment;->STATIC:Landroid/net/IpConfiguration$IpAssignment;
-Landroid/net/IpConfiguration$ProxySettings;->NONE:Landroid/net/IpConfiguration$ProxySettings;
-Landroid/net/IpConfiguration;-><init>(Landroid/net/IpConfiguration$IpAssignment;Landroid/net/IpConfiguration$ProxySettings;Landroid/net/StaticIpConfiguration;Landroid/net/ProxyInfo;)V
-Landroid/net/IpConfiguration;->httpProxy:Landroid/net/ProxyInfo;
-Landroid/net/LinkAddress;->address:Ljava/net/InetAddress;
-Landroid/net/LinkAddress;->getNetworkPrefixLength()I
-Landroid/net/LinkAddress;->prefixLength:I
-Landroid/net/LinkProperties;->addLinkAddress(Landroid/net/LinkAddress;)Z
-Landroid/net/LinkProperties;->getAddresses()Ljava/util/List;
-Landroid/net/LinkProperties;->getAllAddresses()Ljava/util/List;
-Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List;
-Landroid/net/LinkProperties;->getTcpBufferSizes()Ljava/lang/String;
-Landroid/net/LinkProperties;->isIdenticalHttpProxy(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->isIdenticalInterfaceName(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->mIfaceName:Ljava/lang/String;
-Landroid/net/LinkProperties;->setHttpProxy(Landroid/net/ProxyInfo;)V
-Landroid/net/LinkQualityInfo;->setDataSampleDuration(I)V
-Landroid/net/LinkQualityInfo;->setLastDataSampleTime(J)V
-Landroid/net/LinkQualityInfo;->setPacketCount(J)V
-Landroid/net/LinkQualityInfo;->setPacketErrorCount(J)V
-Landroid/net/LocalSocket;->impl:Landroid/net/LocalSocketImpl;
-Landroid/net/LocalSocketImpl;-><init>()V
-Landroid/net/LocalSocketImpl;->inboundFileDescriptors:[Ljava/io/FileDescriptor;
-Landroid/net/LocalSocketImpl;->outboundFileDescriptors:[Ljava/io/FileDescriptor;
Landroid/net/MobileLinkQualityInfo;-><init>()V
-Landroid/net/MobileLinkQualityInfo;->getMobileNetworkType()I
-Landroid/net/MobileLinkQualityInfo;->setCdmaDbm(I)V
-Landroid/net/MobileLinkQualityInfo;->setCdmaEcio(I)V
-Landroid/net/MobileLinkQualityInfo;->setEvdoDbm(I)V
-Landroid/net/MobileLinkQualityInfo;->setEvdoEcio(I)V
-Landroid/net/MobileLinkQualityInfo;->setEvdoSnr(I)V
-Landroid/net/MobileLinkQualityInfo;->setGsmErrorRate(I)V
-Landroid/net/MobileLinkQualityInfo;->setLteCqi(I)V
-Landroid/net/MobileLinkQualityInfo;->setLteRsrp(I)V
-Landroid/net/MobileLinkQualityInfo;->setLteRsrq(I)V
-Landroid/net/MobileLinkQualityInfo;->setLteRssnr(I)V
-Landroid/net/MobileLinkQualityInfo;->setLteSignalStrength(I)V
-Landroid/net/MobileLinkQualityInfo;->setMobileNetworkType(I)V
-Landroid/net/MobileLinkQualityInfo;->setRssi(I)V
-Landroid/net/NetworkAgent;->sendNetworkInfo(Landroid/net/NetworkInfo;)V
-Landroid/net/NetworkCapabilities;-><init>()V
-Landroid/net/NetworkCapabilities;->addCapability(I)Landroid/net/NetworkCapabilities;
-Landroid/net/NetworkCapabilities;->addTransportType(I)Landroid/net/NetworkCapabilities;
-Landroid/net/NetworkCapabilities;->mNetworkCapabilities:J
-Landroid/net/NetworkCapabilities;->mSignalStrength:I
-Landroid/net/NetworkCapabilities;->removeCapability(I)Landroid/net/NetworkCapabilities;
-Landroid/net/NetworkCapabilities;->setSignalStrength(I)Landroid/net/NetworkCapabilities;
-Landroid/net/NetworkFactory;-><init>(Landroid/os/Looper;Landroid/content/Context;Ljava/lang/String;Landroid/net/NetworkCapabilities;)V
-Landroid/net/NetworkFactory;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
-Landroid/net/NetworkFactory;->setScoreFilter(I)V
-Landroid/net/NetworkInfo;-><init>(IILjava/lang/String;Ljava/lang/String;)V
-Landroid/net/NetworkInfo;-><init>(Landroid/net/NetworkInfo;)V
-Landroid/net/NetworkInfo;->setDetailedState(Landroid/net/NetworkInfo$DetailedState;Ljava/lang/String;Ljava/lang/String;)V
-Landroid/net/NetworkInfo;->setFailover(Z)V
-Landroid/net/NetworkInfo;->setIsAvailable(Z)V
-Landroid/net/NetworkInfo;->setRoaming(Z)V
-Landroid/net/NetworkInfo;->setSubtype(ILjava/lang/String;)V
-Landroid/net/NetworkPolicy;-><init>(Landroid/net/NetworkTemplate;ILjava/lang/String;JJJJZZ)V
-Landroid/net/NetworkPolicy;->clearSnooze()V
-Landroid/net/NetworkPolicy;->compareTo(Landroid/net/NetworkPolicy;)I
-Landroid/net/NetworkPolicy;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/NetworkPolicy;->inferred:Z
-Landroid/net/NetworkPolicy;->isOverLimit(J)Z
-Landroid/net/NetworkPolicy;->isOverWarning(J)Z
-Landroid/net/NetworkPolicy;->limitBytes:J
-Landroid/net/NetworkPolicy;->metered:Z
-Landroid/net/NetworkPolicy;->template:Landroid/net/NetworkTemplate;
-Landroid/net/NetworkPolicy;->warningBytes:J
-Landroid/net/NetworkPolicyManager;->from(Landroid/content/Context;)Landroid/net/NetworkPolicyManager;
-Landroid/net/NetworkPolicyManager;->getNetworkPolicies()[Landroid/net/NetworkPolicy;
-Landroid/net/NetworkPolicyManager;->getRestrictBackground()Z
-Landroid/net/NetworkPolicyManager;->getUidPolicy(I)I
-Landroid/net/NetworkPolicyManager;->getUidsWithPolicy(I)[I
-Landroid/net/NetworkPolicyManager;->mService:Landroid/net/INetworkPolicyManager;
-Landroid/net/NetworkPolicyManager;->registerListener(Landroid/net/INetworkPolicyListener;)V
-Landroid/net/NetworkPolicyManager;->setRestrictBackground(Z)V
-Landroid/net/NetworkPolicyManager;->setUidPolicy(II)V
-Landroid/net/NetworkPolicyManager;->unregisterListener(Landroid/net/INetworkPolicyListener;)V
-Landroid/net/NetworkQuotaInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/NetworkRequest$Builder;->clearCapabilities()Landroid/net/NetworkRequest$Builder;
-Landroid/net/NetworkRequest;->legacyType:I
-Landroid/net/NetworkRequest;->requestId:I
-Landroid/net/NetworkState;-><init>(Landroid/os/Parcel;)V
-Landroid/net/NetworkState;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/NetworkStats;-><init>(Landroid/os/Parcel;)V
-Landroid/net/NetworkStats;->capacity:I
-Landroid/net/NetworkStats;->combineAllValues(Landroid/net/NetworkStats;)V
-Landroid/net/NetworkStats;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/NetworkStats;->defaultNetwork:[I
-Landroid/net/NetworkStats;->getTotal(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
-Landroid/net/NetworkStats;->getTotal(Landroid/net/NetworkStats$Entry;I)Landroid/net/NetworkStats$Entry;
-Landroid/net/NetworkStats;->getTotalBytes()J
-Landroid/net/NetworkStats;->getTotalIncludingTags(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
-Landroid/net/NetworkStats;->getUniqueUids()[I
-Landroid/net/NetworkStats;->getValues(ILandroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats$Entry;
-Landroid/net/NetworkStats;->iface:[Ljava/lang/String;
-Landroid/net/NetworkStats;->metered:[I
-Landroid/net/NetworkStats;->operations:[J
-Landroid/net/NetworkStats;->roaming:[I
-Landroid/net/NetworkStats;->rxBytes:[J
-Landroid/net/NetworkStats;->rxPackets:[J
-Landroid/net/NetworkStats;->set:[I
-Landroid/net/NetworkStats;->size()I
-Landroid/net/NetworkStats;->size:I
-Landroid/net/NetworkStats;->tag:[I
-Landroid/net/NetworkStats;->txBytes:[J
-Landroid/net/NetworkStats;->txPackets:[J
-Landroid/net/NetworkStats;->uid:[I
-Landroid/net/NetworkStatsHistory$Entry;->bucketDuration:J
-Landroid/net/NetworkStatsHistory$Entry;->bucketStart:J
-Landroid/net/NetworkStatsHistory$Entry;->rxBytes:J
-Landroid/net/NetworkStatsHistory$Entry;->rxPackets:J
-Landroid/net/NetworkStatsHistory$Entry;->txPackets:J
-Landroid/net/NetworkStatsHistory;-><init>(J)V
-Landroid/net/NetworkStatsHistory;-><init>(Landroid/os/Parcel;)V
-Landroid/net/NetworkStatsHistory;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/NetworkStatsHistory;->getEnd()J
-Landroid/net/NetworkStatsHistory;->getIndexBefore(J)I
-Landroid/net/NetworkStatsHistory;->getValues(ILandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
-Landroid/net/NetworkStatsHistory;->getValues(JJJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
-Landroid/net/NetworkStatsHistory;->recordEntireHistory(Landroid/net/NetworkStatsHistory;)V
-Landroid/net/NetworkStatsHistory;->size()I
-Landroid/net/NetworkTemplate;-><init>(ILjava/lang/String;Ljava/lang/String;)V
-Landroid/net/NetworkTemplate;->buildTemplateEthernet()Landroid/net/NetworkTemplate;
-Landroid/net/NetworkTemplate;->buildTemplateMobileWildcard()Landroid/net/NetworkTemplate;
-Landroid/net/NetworkTemplate;->buildTemplateWifi()Landroid/net/NetworkTemplate;
-Landroid/net/NetworkTemplate;->buildTemplateWifiWildcard()Landroid/net/NetworkTemplate;
-Landroid/net/NetworkTemplate;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/NetworkTemplate;->getMatchRule()I
-Landroid/net/NetworkTemplate;->getSubscriberId()Ljava/lang/String;
-Landroid/net/NetworkTemplate;->normalize(Landroid/net/NetworkTemplate;[Ljava/lang/String;)Landroid/net/NetworkTemplate;
-Landroid/net/NetworkUtils;->intToInetAddress(I)Ljava/net/InetAddress;
-Landroid/net/NetworkUtils;->numericToInetAddress(Ljava/lang/String;)Ljava/net/InetAddress;
-Landroid/net/NetworkUtils;->prefixLengthToNetmaskInt(I)I
-Landroid/net/NetworkUtils;->trimV4AddrZeros(Ljava/lang/String;)Ljava/lang/String;
Landroid/net/nsd/INsdManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/nsd/INsdManager;
Landroid/net/nsd/INsdManager;->getMessenger()Landroid/os/Messenger;
-Landroid/net/nsd/NsdServiceInfo;->setAttribute(Ljava/lang/String;[B)V
-Landroid/net/Proxy;->getProxy(Landroid/content/Context;Ljava/lang/String;)Ljava/net/Proxy;
-Landroid/net/Proxy;->setHttpProxySystemProperty(Landroid/net/ProxyInfo;)V
-Landroid/net/ProxyInfo;-><init>(Ljava/lang/String;ILjava/lang/String;)V
-Landroid/net/RouteInfo;-><init>(Landroid/net/LinkAddress;Ljava/net/InetAddress;)V
-Landroid/net/RouteInfo;-><init>(Landroid/net/LinkAddress;Ljava/net/InetAddress;Ljava/lang/String;)V
-Landroid/net/RouteInfo;-><init>(Ljava/net/InetAddress;)V
-Landroid/net/RouteInfo;->isHost()Z
-Landroid/net/RouteInfo;->mGateway:Ljava/net/InetAddress;
-Landroid/net/RouteInfo;->mIsHost:Z
Landroid/net/SntpClient;-><init>()V
-Landroid/net/SSLCertificateSocketFactory;-><init>(ILandroid/net/SSLSessionCache;Z)V
-Landroid/net/SSLCertificateSocketFactory;->castToOpenSSLSocket(Ljava/net/Socket;)Lcom/android/org/conscrypt/OpenSSLSocketImpl;
-Landroid/net/SSLCertificateSocketFactory;->getAlpnSelectedProtocol(Ljava/net/Socket;)[B
-Landroid/net/SSLCertificateSocketFactory;->getDelegate()Ljavax/net/ssl/SSLSocketFactory;
-Landroid/net/SSLCertificateSocketFactory;->INSECURE_TRUST_MANAGER:[Ljavax/net/ssl/TrustManager;
-Landroid/net/SSLCertificateSocketFactory;->isSslCheckRelaxed()Z
-Landroid/net/SSLCertificateSocketFactory;->makeSocketFactory([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
-Landroid/net/SSLCertificateSocketFactory;->mAlpnProtocols:[B
-Landroid/net/SSLCertificateSocketFactory;->mChannelIdPrivateKey:Ljava/security/PrivateKey;
-Landroid/net/SSLCertificateSocketFactory;->mHandshakeTimeoutMillis:I
-Landroid/net/SSLCertificateSocketFactory;->mInsecureFactory:Ljavax/net/ssl/SSLSocketFactory;
-Landroid/net/SSLCertificateSocketFactory;->mKeyManagers:[Ljavax/net/ssl/KeyManager;
-Landroid/net/SSLCertificateSocketFactory;->mNpnProtocols:[B
-Landroid/net/SSLCertificateSocketFactory;->mSecure:Z
-Landroid/net/SSLCertificateSocketFactory;->mSecureFactory:Ljavax/net/ssl/SSLSocketFactory;
-Landroid/net/SSLCertificateSocketFactory;->mSessionCache:Lcom/android/org/conscrypt/SSLClientSessionCache;
-Landroid/net/SSLCertificateSocketFactory;->mTrustManagers:[Ljavax/net/ssl/TrustManager;
-Landroid/net/SSLCertificateSocketFactory;->setAlpnProtocols([[B)V
-Landroid/net/SSLCertificateSocketFactory;->setChannelIdPrivateKey(Ljava/security/PrivateKey;)V
-Landroid/net/SSLCertificateSocketFactory;->setSoWriteTimeout(Ljava/net/Socket;I)V
-Landroid/net/SSLCertificateSocketFactory;->TAG:Ljava/lang/String;
-Landroid/net/SSLCertificateSocketFactory;->verifyHostname(Ljava/net/Socket;Ljava/lang/String;)V
-Landroid/net/SSLSessionCache;->mSessionCache:Lcom/android/org/conscrypt/SSLClientSessionCache;
-Landroid/net/StaticIpConfiguration;-><init>()V
-Landroid/net/StaticIpConfiguration;->gateway:Ljava/net/InetAddress;
-Landroid/net/StaticIpConfiguration;->ipAddress:Landroid/net/LinkAddress;
-Landroid/net/TrafficStats;->getMobileIfaces()[Ljava/lang/String;
-Landroid/net/TrafficStats;->getRxBytes(Ljava/lang/String;)J
-Landroid/net/TrafficStats;->getStatsService()Landroid/net/INetworkStatsService;
-Landroid/net/TrafficStats;->getTxBytes(Ljava/lang/String;)J
-Landroid/net/Uri;-><init>()V
-Landroid/net/Uri;->getCanonicalUri()Landroid/net/Uri;
-Landroid/net/Uri;->toSafeString()Ljava/lang/String;
-Landroid/net/VpnService$Builder;->mAddresses:Ljava/util/List;
-Landroid/net/VpnService$Builder;->mRoutes:Ljava/util/List;
-Landroid/net/WebAddress;->getAuthInfo()Ljava/lang/String;
-Landroid/net/WebAddress;->getHost()Ljava/lang/String;
-Landroid/net/WebAddress;->getPath()Ljava/lang/String;
-Landroid/net/WebAddress;->getPort()I
-Landroid/net/WebAddress;->getScheme()Ljava/lang/String;
-Landroid/net/WebAddress;->mHost:Ljava/lang/String;
-Landroid/net/WebAddress;->mPath:Ljava/lang/String;
-Landroid/net/WebAddress;->mPort:I
-Landroid/net/WebAddress;->mScheme:Ljava/lang/String;
-Landroid/net/WebAddress;->setHost(Ljava/lang/String;)V
-Landroid/net/WebAddress;->setPath(Ljava/lang/String;)V
Landroid/net/wifi/IWifiManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/net/wifi/IWifiManager$Stub;-><init>()V
Landroid/net/wifi/IWifiManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/IWifiManager;
@@ -2923,163 +650,6 @@
Landroid/net/wifi/IWifiScanner$Stub;-><init>()V
Landroid/net/wifi/IWifiScanner$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/IWifiScanner;
Landroid/net/wifi/p2p/IWifiP2pManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/wifi/p2p/IWifiP2pManager;
-Landroid/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo;->createRequest(Ljava/lang/String;II)Ljava/lang/String;
-Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;-><init>(Ljava/util/List;)V
-Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/p2p/nsd/WifiP2pServiceInfo;->mQueryList:Ljava/util/List;
-Landroid/net/wifi/p2p/nsd/WifiP2pServiceRequest;-><init>(ILjava/lang/String;)V
-Landroid/net/wifi/p2p/nsd/WifiP2pServiceRequest;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/p2p/WifiP2pConfig;-><init>(Ljava/lang/String;)V
-Landroid/net/wifi/p2p/WifiP2pConfig;->MIN_GROUP_OWNER_INTENT:I
-Landroid/net/wifi/p2p/WifiP2pConfig;->netId:I
-Landroid/net/wifi/p2p/WifiP2pDevice;-><init>(Ljava/lang/String;)V
-Landroid/net/wifi/p2p/WifiP2pDevice;->deviceCapability:I
-Landroid/net/wifi/p2p/WifiP2pDevice;->groupCapability:I
-Landroid/net/wifi/p2p/WifiP2pDevice;->update(Landroid/net/wifi/p2p/WifiP2pDevice;)V
-Landroid/net/wifi/p2p/WifiP2pDevice;->wfdInfo:Landroid/net/wifi/p2p/WifiP2pWfdInfo;
-Landroid/net/wifi/p2p/WifiP2pDevice;->wpsConfigMethodsSupported:I
-Landroid/net/wifi/p2p/WifiP2pDeviceList;->remove(Ljava/lang/String;)Landroid/net/wifi/p2p/WifiP2pDevice;
-Landroid/net/wifi/p2p/WifiP2pDeviceList;->update(Landroid/net/wifi/p2p/WifiP2pDevice;)V
-Landroid/net/wifi/p2p/WifiP2pGroup;-><init>(Ljava/lang/String;)V
-Landroid/net/wifi/p2p/WifiP2pGroup;->getNetworkId()I
-Landroid/net/wifi/p2p/WifiP2pGroup;->isClientListEmpty()Z
-Landroid/net/wifi/p2p/WifiP2pGroup;->setInterface(Ljava/lang/String;)V
-Landroid/net/wifi/p2p/WifiP2pGroup;->setIsGroupOwner(Z)V
-Landroid/net/wifi/p2p/WifiP2pGroup;->setNetworkId(I)V
-Landroid/net/wifi/p2p/WifiP2pGroup;->TEMPORARY_NET_ID:I
-Landroid/net/wifi/p2p/WifiP2pGroupList;-><init>(Landroid/net/wifi/p2p/WifiP2pGroupList;Landroid/net/wifi/p2p/WifiP2pGroupList$GroupDeleteListener;)V
-Landroid/net/wifi/p2p/WifiP2pGroupList;->getGroupList()Ljava/util/Collection;
-Landroid/net/wifi/p2p/WifiP2pGroupList;->mGroups:Landroid/util/LruCache;
-Landroid/net/wifi/p2p/WifiP2pManager$Channel;->mAsyncChannel:Lcom/android/internal/util/AsyncChannel;
-Landroid/net/wifi/p2p/WifiP2pManager$Channel;->putListener(Ljava/lang/Object;)I
-Landroid/net/wifi/p2p/WifiP2pManager;-><init>(Landroid/net/wifi/p2p/IWifiP2pManager;)V
-Landroid/net/wifi/p2p/WifiP2pManager;->CREATE_GROUP:I
-Landroid/net/wifi/p2p/WifiP2pManager;->deletePersistentGroup(Landroid/net/wifi/p2p/WifiP2pManager$Channel;ILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
-Landroid/net/wifi/p2p/WifiP2pManager;->requestPersistentGroupInfo(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pManager$PersistentGroupInfoListener;)V
-Landroid/net/wifi/p2p/WifiP2pManager;->setDeviceName(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Ljava/lang/String;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
-Landroid/net/wifi/p2p/WifiP2pManager;->setMiracastMode(I)V
-Landroid/net/wifi/p2p/WifiP2pManager;->setWFDInfo(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pWfdInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
-Landroid/net/wifi/p2p/WifiP2pManager;->setWifiP2pChannels(Landroid/net/wifi/p2p/WifiP2pManager$Channel;IILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
-Landroid/net/wifi/p2p/WifiP2pManager;->startWps(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/WpsInfo;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V
-Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;-><init>()V
-Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->device:Landroid/net/wifi/p2p/WifiP2pDevice;
-Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->event:I
-Landroid/net/wifi/p2p/WifiP2pProvDiscEvent;->pin:Ljava/lang/String;
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>()V
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>(III)V
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;-><init>(Landroid/net/wifi/p2p/WifiP2pWfdInfo;)V
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->getDeviceType()I
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->isWfdEnabled()Z
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setControlPort(I)V
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setDeviceType(I)Z
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setMaxThroughput(I)V
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setSessionAvailable(Z)V
-Landroid/net/wifi/p2p/WifiP2pWfdInfo;->setWfdEnabled(Z)V
-Landroid/net/wifi/ScanResult$InformationElement;->bytes:[B
-Landroid/net/wifi/ScanResult$InformationElement;->EID_BSS_LOAD:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_ERP:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_EXTENDED_CAPS:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_EXTENDED_SUPPORTED_RATES:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_HT_OPERATION:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_INTERWORKING:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_ROAMING_CONSORTIUM:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_RSN:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_SSID:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_SUPPORTED_RATES:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_TIM:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_VHT_OPERATION:I
-Landroid/net/wifi/ScanResult$InformationElement;->EID_VSA:I
-Landroid/net/wifi/ScanResult$InformationElement;->id:I
-Landroid/net/wifi/ScanResult;->anqpDomainId:I
-Landroid/net/wifi/ScanResult;->anqpLines:Ljava/util/List;
-Landroid/net/wifi/ScanResult;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/ScanResult;->distanceCm:I
-Landroid/net/wifi/ScanResult;->distanceSdCm:I
-Landroid/net/wifi/ScanResult;->flags:J
-Landroid/net/wifi/ScanResult;->hessid:J
-Landroid/net/wifi/ScanResult;->informationElements:[Landroid/net/wifi/ScanResult$InformationElement;
-Landroid/net/wifi/ScanResult;->is80211McRTTResponder:Z
-Landroid/net/wifi/ScanResult;->numUsage:I
-Landroid/net/wifi/ScanResult;->seen:J
-Landroid/net/wifi/ScanResult;->wifiSsid:Landroid/net/wifi/WifiSsid;
-Landroid/net/wifi/WifiConfiguration;-><init>(Landroid/net/wifi/WifiConfiguration;)V
-Landroid/net/wifi/WifiConfiguration;->apBand:I
-Landroid/net/wifi/WifiConfiguration;->apChannel:I
-Landroid/net/wifi/WifiConfiguration;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/WifiConfiguration;->defaultGwMacAddress:Ljava/lang/String;
-Landroid/net/wifi/WifiConfiguration;->getAuthType()I
-Landroid/net/wifi/WifiConfiguration;->getIpAssignment()Landroid/net/IpConfiguration$IpAssignment;
-Landroid/net/wifi/WifiConfiguration;->getIpConfiguration()Landroid/net/IpConfiguration;
-Landroid/net/wifi/WifiConfiguration;->getPrintableSsid()Ljava/lang/String;
-Landroid/net/wifi/WifiConfiguration;->getProxySettings()Landroid/net/IpConfiguration$ProxySettings;
-Landroid/net/wifi/WifiConfiguration;->getStaticIpConfiguration()Landroid/net/StaticIpConfiguration;
-Landroid/net/wifi/WifiConfiguration;->INVALID_RSSI:I
-Landroid/net/wifi/WifiConfiguration;->isEnterprise()Z
-Landroid/net/wifi/WifiConfiguration;->lastConnectUid:I
-Landroid/net/wifi/WifiConfiguration;->mIpConfiguration:Landroid/net/IpConfiguration;
-Landroid/net/wifi/WifiConfiguration;->noInternetAccessExpected:Z
-Landroid/net/wifi/WifiConfiguration;->numNoInternetAccessReports:I
-Landroid/net/wifi/WifiConfiguration;->selfAdded:Z
-Landroid/net/wifi/WifiConfiguration;->setIpAssignment(Landroid/net/IpConfiguration$IpAssignment;)V
-Landroid/net/wifi/WifiConfiguration;->setIpConfiguration(Landroid/net/IpConfiguration;)V
-Landroid/net/wifi/WifiConfiguration;->setProxy(Landroid/net/IpConfiguration$ProxySettings;Landroid/net/ProxyInfo;)V
-Landroid/net/wifi/WifiConfiguration;->setProxySettings(Landroid/net/IpConfiguration$ProxySettings;)V
-Landroid/net/wifi/WifiConfiguration;->setStaticIpConfiguration(Landroid/net/StaticIpConfiguration;)V
-Landroid/net/wifi/WifiConfiguration;->shared:Z
-Landroid/net/wifi/WifiConfiguration;->validatedInternetAccess:Z
-Landroid/net/wifi/WifiConfiguration;->wepKeyVarNames:[Ljava/lang/String;
-Landroid/net/wifi/WifiEnterpriseConfig;->getCaCertificateAlias()Ljava/lang/String;
-Landroid/net/wifi/WifiEnterpriseConfig;->getClientCertificateAlias()Ljava/lang/String;
-Landroid/net/wifi/WifiEnterpriseConfig;->mFields:Ljava/util/HashMap;
-Landroid/net/wifi/WifiEnterpriseConfig;->setCaCertificateAlias(Ljava/lang/String;)V
-Landroid/net/wifi/WifiEnterpriseConfig;->setClientCertificateAlias(Ljava/lang/String;)V
-Landroid/net/wifi/WifiInfo;-><init>()V
-Landroid/net/wifi/WifiInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/WifiInfo;->DEFAULT_MAC_ADDRESS:Ljava/lang/String;
-Landroid/net/wifi/WifiInfo;->getMeteredHint()Z
-Landroid/net/wifi/WifiInfo;->getWifiSsid()Landroid/net/wifi/WifiSsid;
-Landroid/net/wifi/WifiInfo;->INVALID_RSSI:I
-Landroid/net/wifi/WifiInfo;->isEphemeral()Z
-Landroid/net/wifi/WifiInfo;->mBSSID:Ljava/lang/String;
-Landroid/net/wifi/WifiInfo;->mIpAddress:Ljava/net/InetAddress;
-Landroid/net/wifi/WifiInfo;->mMacAddress:Ljava/lang/String;
-Landroid/net/wifi/WifiInfo;->mWifiSsid:Landroid/net/wifi/WifiSsid;
-Landroid/net/wifi/WifiInfo;->removeDoubleQuotes(Ljava/lang/String;)Ljava/lang/String;
-Landroid/net/wifi/WifiInfo;->setBSSID(Ljava/lang/String;)V
-Landroid/net/wifi/WifiInfo;->setLinkSpeed(I)V
-Landroid/net/wifi/WifiInfo;->setMacAddress(Ljava/lang/String;)V
-Landroid/net/wifi/WifiInfo;->setNetworkId(I)V
-Landroid/net/wifi/WifiInfo;->setRssi(I)V
-Landroid/net/wifi/WifiInfo;->setSupplicantState(Landroid/net/wifi/SupplicantState;)V
-Landroid/net/wifi/WifiInfo;->setSupplicantState(Ljava/lang/String;)V
-Landroid/net/wifi/WifiManager;->cancelLocalOnlyHotspotRequest()V
-Landroid/net/wifi/WifiManager;->connect(ILandroid/net/wifi/WifiManager$ActionListener;)V
-Landroid/net/wifi/WifiManager;->disable(ILandroid/net/wifi/WifiManager$ActionListener;)V
-Landroid/net/wifi/WifiManager;->enableVerboseLogging(I)V
-Landroid/net/wifi/WifiManager;->forget(ILandroid/net/wifi/WifiManager$ActionListener;)V
-Landroid/net/wifi/WifiManager;->getCountryCode()Ljava/lang/String;
-Landroid/net/wifi/WifiManager;->getCurrentNetwork()Landroid/net/Network;
-Landroid/net/wifi/WifiManager;->getMatchingWifiConfig(Landroid/net/wifi/ScanResult;)Landroid/net/wifi/WifiConfiguration;
-Landroid/net/wifi/WifiManager;->getVerboseLoggingLevel()I
-Landroid/net/wifi/WifiManager;->getWifiServiceMessenger()Landroid/os/Messenger;
-Landroid/net/wifi/WifiManager;->initializeMulticastFiltering()Z
-Landroid/net/wifi/WifiManager;->isDualBandSupported()Z
-Landroid/net/wifi/WifiManager;->LINK_CONFIGURATION_CHANGED_ACTION:Ljava/lang/String;
-Landroid/net/wifi/WifiManager;->mActiveLockCount:I
-Landroid/net/wifi/WifiManager;->MAX_RSSI:I
-Landroid/net/wifi/WifiManager;->MIN_RSSI:I
-Landroid/net/wifi/WifiManager;->mService:Landroid/net/wifi/IWifiManager;
-Landroid/net/wifi/WifiManager;->RSSI_LEVELS:I
-Landroid/net/wifi/WifiManager;->save(Landroid/net/wifi/WifiConfiguration;Landroid/net/wifi/WifiManager$ActionListener;)V
-Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_2GHZ:I
-Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_5GHZ:I
-Landroid/net/wifi/WifiManager;->WIFI_FREQUENCY_BAND_AUTO:I
-Landroid/net/wifi/WifiSsid;->createFromAsciiEncoded(Ljava/lang/String;)Landroid/net/wifi/WifiSsid;
-Landroid/net/wifi/WifiSsid;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/net/wifi/WifiSsid;->getOctets()[B
-Landroid/net/wifi/WifiSsid;->NONE:Ljava/lang/String;
-Landroid/net/wifi/WifiSsid;->octets:Ljava/io/ByteArrayOutputStream;
Landroid/nfc/INfcAdapter$Stub;->TRANSACTION_enable:I
Landroid/nfc/INfcAdapterExtras;->authenticate(Ljava/lang/String;[B)V
Landroid/nfc/INfcAdapterExtras;->close(Ljava/lang/String;Landroid/os/IBinder;)Landroid/os/Bundle;
@@ -3088,13 +658,6 @@
Landroid/nfc/INfcAdapterExtras;->open(Ljava/lang/String;Landroid/os/IBinder;)Landroid/os/Bundle;
Landroid/nfc/INfcAdapterExtras;->setCardEmulationRoute(Ljava/lang/String;I)V
Landroid/nfc/INfcAdapterExtras;->transceive(Ljava/lang/String;[B)Landroid/os/Bundle;
-Landroid/opengl/EGL14;->eglGetDisplay(J)Landroid/opengl/EGLDisplay;
-Landroid/opengl/GLES20;->glGetActiveAttrib(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V
-Landroid/opengl/GLES20;->glGetActiveUniform(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V
-Landroid/opengl/GLSurfaceView$EglHelper;->mEglContext:Ljavax/microedition/khronos/egl/EGLContext;
-Landroid/opengl/GLSurfaceView$GLThread;->mEglHelper:Landroid/opengl/GLSurfaceView$EglHelper;
-Landroid/opengl/GLSurfaceView;->mGLThread:Landroid/opengl/GLSurfaceView$GLThread;
-Landroid/opengl/GLSurfaceView;->mRenderer:Landroid/opengl/GLSurfaceView$Renderer;
Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;)Landroid/os/AsyncResult;
Landroid/os/AsyncTask;->mFuture:Ljava/util/concurrent/FutureTask;
Landroid/os/AsyncTask;->mStatus:Landroid/os/AsyncTask$Status;
@@ -3690,265 +1253,6 @@
Landroid/os/WorkSource;->updateLocked(Landroid/os/WorkSource;ZZ)Z
Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/String;)V
Landroid/os/ZygoteStartFailedEx;-><init>(Ljava/lang/Throwable;)V
-Landroid/permissionpresenterservice/RuntimePermissionPresenterService;->onRevokeRuntimePermission(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/preference/DialogPreference;->mBuilder:Landroid/app/AlertDialog$Builder;
-Landroid/preference/DialogPreference;->mDialog:Landroid/app/Dialog;
-Landroid/preference/DialogPreference;->mDialogIcon:Landroid/graphics/drawable/Drawable;
-Landroid/preference/DialogPreference;->mDialogMessage:Ljava/lang/CharSequence;
-Landroid/preference/DialogPreference;->mDialogTitle:Ljava/lang/CharSequence;
-Landroid/preference/DialogPreference;->mNegativeButtonText:Ljava/lang/CharSequence;
-Landroid/preference/DialogPreference;->mPositiveButtonText:Ljava/lang/CharSequence;
-Landroid/preference/DialogPreference;->mWhichButtonClicked:I
-Landroid/preference/EditTextPreference;->mEditText:Landroid/widget/EditText;
-Landroid/preference/ListPreference;->mClickedDialogEntryIndex:I
-Landroid/preference/Preference;->getId()J
-Landroid/preference/Preference;->mLayoutResId:I
-Landroid/preference/Preference;->mSummary:Ljava/lang/CharSequence;
-Landroid/preference/Preference;->mWidgetLayoutResId:I
-Landroid/preference/Preference;->onKey(Landroid/view/View;ILandroid/view/KeyEvent;)Z
-Landroid/preference/Preference;->performClick(Landroid/preference/PreferenceScreen;)V
-Landroid/preference/Preference;->registerDependent(Landroid/preference/Preference;)V
-Landroid/preference/Preference;->setOnPreferenceChangeInternalListener(Landroid/preference/Preference$OnPreferenceChangeInternalListener;)V
-Landroid/preference/PreferenceActivity;->getHeaders()Ljava/util/List;
-Landroid/preference/PreferenceActivity;->mPreferenceManager:Landroid/preference/PreferenceManager;
-Landroid/preference/PreferenceActivity;->mPrefsContainer:Landroid/view/ViewGroup;
-Landroid/preference/PreferenceActivity;->postBindPreferences()V
-Landroid/preference/PreferenceActivity;->requirePreferenceManager()V
-Landroid/preference/PreferenceFragment;->getListView()Landroid/widget/ListView;
-Landroid/preference/PreferenceFragment;->mPreferenceManager:Landroid/preference/PreferenceManager;
-Landroid/preference/PreferenceManager;-><init>(Landroid/app/Activity;I)V
-Landroid/preference/PreferenceManager;-><init>(Landroid/content/Context;)V
-Landroid/preference/PreferenceManager;->dispatchActivityDestroy()V
-Landroid/preference/PreferenceManager;->dispatchActivityResult(IILandroid/content/Intent;)V
-Landroid/preference/PreferenceManager;->dispatchActivityStop()V
-Landroid/preference/PreferenceManager;->getActivity()Landroid/app/Activity;
-Landroid/preference/PreferenceManager;->getEditor()Landroid/content/SharedPreferences$Editor;
-Landroid/preference/PreferenceManager;->getFragment()Landroid/preference/PreferenceFragment;
-Landroid/preference/PreferenceManager;->getNextRequestCode()I
-Landroid/preference/PreferenceManager;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
-Landroid/preference/PreferenceManager;->inflateFromIntent(Landroid/content/Intent;Landroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
-Landroid/preference/PreferenceManager;->inflateFromResource(Landroid/content/Context;ILandroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;
-Landroid/preference/PreferenceManager;->mActivityDestroyListeners:Ljava/util/List;
-Landroid/preference/PreferenceManager;->mFragment:Landroid/preference/PreferenceFragment;
-Landroid/preference/PreferenceManager;->mOnPreferenceTreeClickListener:Landroid/preference/PreferenceManager$OnPreferenceTreeClickListener;
-Landroid/preference/PreferenceManager;->mSharedPreferences:Landroid/content/SharedPreferences;
-Landroid/preference/PreferenceManager;->registerOnActivityDestroyListener(Landroid/preference/PreferenceManager$OnActivityDestroyListener;)V
-Landroid/preference/PreferenceManager;->registerOnActivityResultListener(Landroid/preference/PreferenceManager$OnActivityResultListener;)V
-Landroid/preference/PreferenceManager;->registerOnActivityStopListener(Landroid/preference/PreferenceManager$OnActivityStopListener;)V
-Landroid/preference/PreferenceManager;->setFragment(Landroid/preference/PreferenceFragment;)V
-Landroid/preference/PreferenceManager;->setNoCommit(Z)V
-Landroid/preference/PreferenceManager;->setPreferences(Landroid/preference/PreferenceScreen;)Z
-Landroid/preference/PreferenceManager;->shouldCommit()Z
-Landroid/preference/PreferenceManager;->unregisterOnActivityDestroyListener(Landroid/preference/PreferenceManager$OnActivityDestroyListener;)V
-Landroid/preference/PreferenceManager;->unregisterOnActivityResultListener(Landroid/preference/PreferenceManager$OnActivityResultListener;)V
-Landroid/preference/PreferenceManager;->unregisterOnActivityStopListener(Landroid/preference/PreferenceManager$OnActivityStopListener;)V
-Landroid/preference/PreferenceScreen;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/preference/PreferenceScreen;->mListView:Landroid/widget/ListView;
-Landroid/preference/PreferenceScreen;->mRootAdapter:Landroid/widget/ListAdapter;
-Landroid/preference/RingtonePreference;->mRequestCode:I
-Landroid/preference/SeekBarDialogPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;)V
-Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/preference/SeekBarPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
-Landroid/preference/SeekBarVolumizer;-><init>(Landroid/content/Context;ILandroid/net/Uri;Landroid/preference/SeekBarVolumizer$Callback;)V
-Landroid/preference/SeekBarVolumizer;->mAudioManager:Landroid/media/AudioManager;
-Landroid/preference/SeekBarVolumizer;->mContext:Landroid/content/Context;
-Landroid/preference/SeekBarVolumizer;->mLastProgress:I
-Landroid/preference/SeekBarVolumizer;->mOriginalStreamVolume:I
-Landroid/preference/SeekBarVolumizer;->mRingtone:Landroid/media/Ringtone;
-Landroid/preference/SeekBarVolumizer;->mSeekBar:Landroid/widget/SeekBar;
-Landroid/preference/SeekBarVolumizer;->mStreamType:I
-Landroid/preference/SeekBarVolumizer;->stop()V
-Landroid/preference/SwitchPreference;->mListener:Landroid/preference/SwitchPreference$Listener;
-Landroid/preference/TwoStatePreference;->syncSummaryView(Landroid/view/View;)V
-Landroid/preference/VolumePreference$VolumeStore;->originalVolume:I
-Landroid/preference/VolumePreference$VolumeStore;->volume:I
-Landroid/preference/VolumePreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/preference/VolumePreference;->mStreamType:I
-Landroid/provider/Browser;->getVisitedHistory(Landroid/content/ContentResolver;)[Ljava/lang/String;
-Landroid/provider/Browser;->sendString(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
-Landroid/provider/BrowserContract$Accounts;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/BrowserContract$Bookmarks;->buildFolderUri(J)Landroid/net/Uri;
-Landroid/provider/BrowserContract$Bookmarks;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/BrowserContract$Bookmarks;->CONTENT_URI_DEFAULT_FOLDER:Landroid/net/Uri;
-Landroid/provider/BrowserContract$Combined;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/BrowserContract$History;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/BrowserContract$Images;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/BrowserContract;->AUTHORITY_URI:Landroid/net/Uri;
-Landroid/provider/CalendarContract$CalendarAlerts;->findNextAlarmTime(Landroid/content/ContentResolver;J)J
-Landroid/provider/CalendarContract$CalendarAlerts;->rescheduleMissedAlarms(Landroid/content/ContentResolver;Landroid/content/Context;Landroid/app/AlarmManager;)V
-Landroid/provider/CalendarContract$CalendarAlerts;->scheduleAlarm(Landroid/content/Context;Landroid/app/AlarmManager;J)V
-Landroid/provider/CallLog$Calls;->addCall(Lcom/android/internal/telephony/CallerInfo;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILandroid/telecom/PhoneAccountHandle;JILjava/lang/Long;ZLandroid/os/UserHandle;Z)Landroid/net/Uri;
-Landroid/provider/ContactsContract$Contacts$AggregationSuggestions;->builder()Landroid/provider/ContactsContract$Contacts$AggregationSuggestions$Builder;
-Landroid/provider/ContactsContract$Contacts;->CORP_CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/ContactsContract$QuickContact;->composeQuickContactsIntent(Landroid/content/Context;Landroid/graphics/Rect;Landroid/net/Uri;I[Ljava/lang/String;)Landroid/content/Intent;
-Landroid/provider/ContactsInternal;->startQuickContactWithErrorToast(Landroid/content/Context;Landroid/content/Intent;)V
-Landroid/provider/DocumentsContract$Root;->FLAG_ADVANCED:I
-Landroid/provider/DocumentsContract;->getDocumentThumbnail(Landroid/content/ContentProviderClient;Landroid/net/Uri;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/graphics/Bitmap;
-Landroid/provider/DocumentsContract;->METHOD_CREATE_DOCUMENT:Ljava/lang/String;
-Landroid/provider/DocumentsContract;->moveDocument(Landroid/content/ContentProviderClient;Landroid/net/Uri;Landroid/net/Uri;Landroid/net/Uri;)Landroid/net/Uri;
-Landroid/provider/DocumentsContract;->PATH_DOCUMENT:Ljava/lang/String;
-Landroid/provider/DocumentsContract;->PATH_TREE:Ljava/lang/String;
-Landroid/provider/DocumentsContract;->setManageMode(Landroid/net/Uri;)Landroid/net/Uri;
-Landroid/provider/Downloads$Impl$RequestHeaders;->INSERT_KEY_PREFIX:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->ALL_DOWNLOADS_CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/Downloads$Impl;->COLUMN_ALLOWED_NETWORK_TYPES:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_ALLOW_ROAMING:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_COOKIE_DATA:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_DELETED:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_DESCRIPTION:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_DESTINATION:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_FILE_NAME_HINT:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_IS_PUBLIC_API:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_MEDIA_SCANNED:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_MIME_TYPE:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_CLASS:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_EXTRAS:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_NOTIFICATION_PACKAGE:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_REFERER:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_TITLE:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_URI:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->COLUMN_VISIBILITY:Ljava/lang/String;
-Landroid/provider/Downloads$Impl;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/Downloads$Impl;->DESTINATION_CACHE_PARTITION_PURGEABLE:I
-Landroid/provider/Downloads$Impl;->DESTINATION_FILE_URI:I
-Landroid/provider/Downloads$Impl;->isNotificationToBeDisplayed(I)Z
-Landroid/provider/Downloads$Impl;->isStatusCompleted(I)Z
-Landroid/provider/Downloads$Impl;->isStatusError(I)Z
-Landroid/provider/Downloads$Impl;->isStatusSuccess(I)Z
-Landroid/provider/Downloads$Impl;->PUBLICLY_ACCESSIBLE_DOWNLOADS_URI:Landroid/net/Uri;
-Landroid/provider/MediaStore$Files$FileColumns;->FORMAT:Ljava/lang/String;
-Landroid/provider/MediaStore$Files$FileColumns;->STORAGE_ID:Ljava/lang/String;
-Landroid/provider/MediaStore$Files;->getMtpObjectsUri(Ljava/lang/String;)Landroid/net/Uri;
-Landroid/provider/MediaStore$Files;->getMtpObjectsUri(Ljava/lang/String;J)Landroid/net/Uri;
-Landroid/provider/MediaStore$Files;->getMtpReferencesUri(Ljava/lang/String;J)Landroid/net/Uri;
-Landroid/provider/MediaStore$MediaColumns;->IS_DRM:Ljava/lang/String;
-Landroid/provider/Settings$Bookmarks;->add(Landroid/content/ContentResolver;Landroid/content/Intent;Ljava/lang/String;Ljava/lang/String;CI)Landroid/net/Uri;
-Landroid/provider/Settings$Bookmarks;->CONTENT_URI:Landroid/net/Uri;
-Landroid/provider/Settings$ContentProviderHolder;->mContentProvider:Landroid/content/IContentProvider;
-Landroid/provider/Settings$Global;->ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Global;->HEADS_UP_NOTIFICATIONS_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Global;->HEADS_UP_OFF:I
-Landroid/provider/Settings$Global;->HEADS_UP_ON:I
-Landroid/provider/Settings$Global;->MOBILE_DATA:Ljava/lang/String;
-Landroid/provider/Settings$Global;->MOVED_TO_SECURE:Ljava/util/HashSet;
-Landroid/provider/Settings$Global;->MULTI_SIM_USER_PREFERRED_SUBS:[Ljava/lang/String;
-Landroid/provider/Settings$Global;->MULTI_SIM_VOICE_PROMPT:Ljava/lang/String;
-Landroid/provider/Settings$Global;->NETWORK_SCORER_APP:Ljava/lang/String;
-Landroid/provider/Settings$Global;->PACKAGE_VERIFIER_ENABLE:Ljava/lang/String;
-Landroid/provider/Settings$Global;->PREFERRED_NETWORK_MODE:Ljava/lang/String;
-Landroid/provider/Settings$Global;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
-Landroid/provider/Settings$Global;->REQUIRE_PASSWORD_TO_DECRYPT:Ljava/lang/String;
-Landroid/provider/Settings$Global;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
-Landroid/provider/Settings$Global;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
-Landroid/provider/Settings$Global;->WEBVIEW_PROVIDER:Ljava/lang/String;
-Landroid/provider/Settings$Global;->WIFI_SAVED_STATE:Ljava/lang/String;
-Landroid/provider/Settings$Global;->WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Global;->ZEN_MODE:Ljava/lang/String;
-Landroid/provider/Settings$Global;->ZEN_MODE_ALARMS:I
-Landroid/provider/Settings$Global;->ZEN_MODE_CONFIG_ETAG:Ljava/lang/String;
-Landroid/provider/Settings$Global;->ZEN_MODE_IMPORTANT_INTERRUPTIONS:I
-Landroid/provider/Settings$Global;->ZEN_MODE_NO_INTERRUPTIONS:I
-Landroid/provider/Settings$Global;->ZEN_MODE_OFF:I
-Landroid/provider/Settings$NameValueCache;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
-Landroid/provider/Settings$NameValueCache;->mProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
-Landroid/provider/Settings$Secure;->ACCESSIBILITY_AUTOCLICK_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ACCESSIBILITY_CAPTIONING_TYPEFACE:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ACCESSIBILITY_LARGE_POINTER_ICON:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ANR_SHOW_BACKGROUND:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ASSISTANT:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->BACKUP_AUTO_RESTORE:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->BACKUP_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->BACKUP_PROVISIONED:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->BACKUP_TRANSPORT:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->DIALER_DEFAULT_APPLICATION:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->DOZE_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ENABLED_NOTIFICATION_LISTENERS:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->ENABLED_PRINT_SERVICES:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
-Landroid/provider/Settings$Secure;->getLongForUser(Landroid/content/ContentResolver;Ljava/lang/String;JI)J
-Landroid/provider/Settings$Secure;->IMMERSIVE_MODE_CONFIRMATIONS:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->INCALL_POWER_BUTTON_BEHAVIOR:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->LOCK_SCREEN_LOCK_AFTER_TIMEOUT:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->LOCK_SCREEN_OWNER_INFO_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->LOCK_SCREEN_SHOW_NOTIFICATIONS:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->LONG_PRESS_TIMEOUT:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->MOVED_TO_GLOBAL:Ljava/util/HashSet;
-Landroid/provider/Settings$Secure;->MOVED_TO_LOCK_SETTINGS:Ljava/util/HashSet;
-Landroid/provider/Settings$Secure;->NFC_PAYMENT_DEFAULT_COMPONENT:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->PACKAGE_VERIFIER_USER_CONSENT:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->putIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
-Landroid/provider/Settings$Secure;->putLongForUser(Landroid/content/ContentResolver;Ljava/lang/String;JI)Z
-Landroid/provider/Settings$Secure;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
-Landroid/provider/Settings$Secure;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)Z
-Landroid/provider/Settings$Secure;->SELECTED_SPELL_CHECKER:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->SELECTED_SPELL_CHECKER_SUBTYPE:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->SETTINGS_TO_BACKUP:[Ljava/lang/String;
-Landroid/provider/Settings$Secure;->SMS_DEFAULT_APPLICATION:Ljava/lang/String;
-Landroid/provider/Settings$Secure;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
-Landroid/provider/Settings$Secure;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
-Landroid/provider/Settings$Secure;->VOICE_RECOGNITION_SERVICE:Ljava/lang/String;
-Landroid/provider/Settings$System;->AIRPLANE_MODE_TOGGLEABLE_RADIOS:Ljava/lang/String;
-Landroid/provider/Settings$System;->CAR_DOCK_SOUND:Ljava/lang/String;
-Landroid/provider/Settings$System;->CAR_UNDOCK_SOUND:Ljava/lang/String;
-Landroid/provider/Settings$System;->CLONE_TO_MANAGED_PROFILE:Ljava/util/Set;
-Landroid/provider/Settings$System;->DESK_DOCK_SOUND:Ljava/lang/String;
-Landroid/provider/Settings$System;->DESK_UNDOCK_SOUND:Ljava/lang/String;
-Landroid/provider/Settings$System;->DOCK_SOUNDS_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)I
-Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
-Landroid/provider/Settings$System;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
-Landroid/provider/Settings$System;->HEARING_AID:Ljava/lang/String;
-Landroid/provider/Settings$System;->HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY:Ljava/lang/String;
-Landroid/provider/Settings$System;->LOCKSCREEN_SOUNDS_ENABLED:Ljava/lang/String;
-Landroid/provider/Settings$System;->LOCK_SOUND:Ljava/lang/String;
-Landroid/provider/Settings$System;->MASTER_MONO:Ljava/lang/String;
-Landroid/provider/Settings$System;->MOVED_TO_GLOBAL:Ljava/util/HashSet;
-Landroid/provider/Settings$System;->MOVED_TO_SECURE:Ljava/util/HashSet;
-Landroid/provider/Settings$System;->MOVED_TO_SECURE_THEN_GLOBAL:Ljava/util/HashSet;
-Landroid/provider/Settings$System;->NOTIFICATION_LIGHT_PULSE:Ljava/lang/String;
-Landroid/provider/Settings$System;->POINTER_LOCATION:Ljava/lang/String;
-Landroid/provider/Settings$System;->POINTER_SPEED:Ljava/lang/String;
-Landroid/provider/Settings$System;->PRIVATE_SETTINGS:Ljava/util/Set;
-Landroid/provider/Settings$System;->PUBLIC_SETTINGS:Ljava/util/Set;
-Landroid/provider/Settings$System;->putIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
-Landroid/provider/Settings$System;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
-Landroid/provider/Settings$System;->SCREEN_AUTO_BRIGHTNESS_ADJ:Ljava/lang/String;
-Landroid/provider/Settings$System;->SETTINGS_TO_BACKUP:[Ljava/lang/String;
-Landroid/provider/Settings$System;->SHOW_TOUCHES:Ljava/lang/String;
-Landroid/provider/Settings$System;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
-Landroid/provider/Settings$System;->sProviderHolder:Landroid/provider/Settings$ContentProviderHolder;
-Landroid/provider/Settings$System;->TTY_MODE:Ljava/lang/String;
-Landroid/provider/Settings$System;->UNLOCK_SOUND:Ljava/lang/String;
-Landroid/provider/Settings$System;->VALIDATORS:Ljava/util/Map;
-Landroid/provider/Settings$System;->VIBRATE_IN_SILENT:Ljava/lang/String;
-Landroid/provider/Settings;->ACTION_TRUSTED_CREDENTIALS_USER:Ljava/lang/String;
-Landroid/provider/Settings;->ACTION_USER_DICTIONARY_INSERT:Ljava/lang/String;
-Landroid/provider/Settings;->EXTRA_APP_UID:Ljava/lang/String;
-Landroid/provider/Settings;->isCallingPackageAllowedToDrawOverlays(Landroid/content/Context;ILjava/lang/String;Z)Z
-Landroid/provider/Settings;->isCallingPackageAllowedToPerformAppOpsProtectedOperation(Landroid/content/Context;ILjava/lang/String;ZI[Ljava/lang/String;Z)Z
-Landroid/provider/Settings;->isCallingPackageAllowedToWriteSettings(Landroid/content/Context;ILjava/lang/String;Z)Z
-Landroid/provider/Telephony$Mms;->extractAddrSpec(Ljava/lang/String;)Ljava/lang/String;
-Landroid/provider/Telephony$Mms;->isPhoneNumber(Ljava/lang/String;)Z
-Landroid/provider/Telephony$Mms;->NAME_ADDR_EMAIL_PATTERN:Ljava/util/regex/Pattern;
-Landroid/provider/Telephony$Sms$Draft;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms$Inbox;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms$Inbox;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms$Sent;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms$Sent;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms;->addMessageToUri(ILandroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZ)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms;->addMessageToUri(ILandroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZJ)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms;->addMessageToUri(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZ)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms;->addMessageToUri(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZZJ)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms;->isOutgoingFolder(I)Z
-Landroid/provider/Telephony$Sms;->moveMessageToFolder(Landroid/content/Context;Landroid/net/Uri;II)Z
-Landroid/provider/Telephony$Sms;->query(Landroid/content/ContentResolver;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
-Landroid/provider/Telephony$Threads;->ID_PROJECTION:[Ljava/lang/String;
-Landroid/provider/Telephony$Threads;->THREAD_ID_CONTENT_URI:Landroid/net/Uri;
Landroid/R$styleable;->ActionBar:[I
Landroid/R$styleable;->ActionBar_background:I
Landroid/R$styleable;->ActionBar_backgroundSplit:I
@@ -4213,11 +1517,6 @@
Landroid/R$styleable;->Window_windowBackground:I
Landroid/R$styleable;->Window_windowFrame:I
Landroid/security/Credentials;->convertToPem([Ljava/security/cert/Certificate;)[B
-Landroid/security/Credentials;->getInstance()Landroid/security/Credentials;
-Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/lang/String;[B)V
-Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/security/KeyPair;)V
-Landroid/security/Credentials;->unlock(Landroid/content/Context;)V
-Landroid/security/GateKeeper;->getSecureUserId()J
Landroid/security/IKeyChainService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/security/IKeyChainService;
Landroid/security/IKeyChainService;->requestPrivateKey(Ljava/lang/String;)Ljava/lang/String;
Landroid/security/IKeystoreService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/security/IKeystoreService;
@@ -4236,42 +1535,8 @@
Landroid/security/IKeystoreService;->sign(Ljava/lang/String;[B)[B
Landroid/security/IKeystoreService;->ungrant(Ljava/lang/String;I)I
Landroid/security/IKeystoreService;->verify(Ljava/lang/String;[B[B)I
-Landroid/security/keymaster/ExportResult;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/security/keymaster/KeyCharacteristics;-><init>()V
-Landroid/security/keymaster/KeyCharacteristics;->readFromParcel(Landroid/os/Parcel;)V
-Landroid/security/keymaster/KeymasterArguments;-><init>()V
-Landroid/security/keymaster/KeymasterArguments;->addEnum(II)V
-Landroid/security/keymaster/KeymasterArguments;->addUnsignedInt(IJ)V
-Landroid/security/keymaster/KeymasterArguments;->addUnsignedLong(ILjava/math/BigInteger;)V
-Landroid/security/keymaster/KeymasterArguments;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/security/keymaster/KeymasterArguments;->readFromParcel(Landroid/os/Parcel;)V
-Landroid/security/keymaster/KeymasterBlob;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/security/keymaster/OperationResult;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/security/KeyStore$State;->LOCKED:Landroid/security/KeyStore$State;
-Landroid/security/KeyStore$State;->UNLOCKED:Landroid/security/KeyStore$State;
-Landroid/security/keystore/AndroidKeyStoreProvider;->getKeyStoreOperationHandle(Ljava/lang/Object;)J
-Landroid/security/keystore/KeyGenParameterSpec;->getUid()I
-Landroid/security/keystore/KeyGenParameterSpec;->isUniqueIdIncluded()Z
-Landroid/security/KeyStore;->delete(Ljava/lang/String;)Z
-Landroid/security/KeyStore;->get(Ljava/lang/String;)[B
-Landroid/security/KeyStore;->getApplicationContext()Landroid/content/Context;
-Landroid/security/KeyStore;->getInstance()Landroid/security/KeyStore;
-Landroid/security/KeyStore;->getKeyStoreException(I)Landroid/security/KeyStoreException;
-Landroid/security/KeyStore;->isEmpty()Z
-Landroid/security/KeyStore;->NO_ERROR:I
-Landroid/security/KeyStore;->reset()Z
-Landroid/security/KeyStore;->state()Landroid/security/KeyStore$State;
-Landroid/security/KeyStore;->state(I)Landroid/security/KeyStore$State;
-Landroid/security/KeyStore;->unlock(Ljava/lang/String;)Z
-Landroid/security/KeystoreArguments;-><init>([[B)V
-Landroid/security/KeystoreArguments;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/security/net/config/RootTrustManager;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
Landroid/service/carrier/ICarrierMessagingCallback$Stub;-><init>()V
Landroid/service/carrier/ICarrierMessagingService;->filterSms(Landroid/service/carrier/MessagePdu;Ljava/lang/String;IILandroid/service/carrier/ICarrierMessagingCallback;)V
-Landroid/service/dreams/DreamService;->getDozeScreenBrightness()I
-Landroid/service/dreams/DreamService;->setDozeScreenBrightness(I)V
-Landroid/service/dreams/DreamService;->setDozeScreenState(I)V
-Landroid/service/dreams/DreamService;->setWindowless(Z)V
Landroid/service/dreams/IDreamManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/dreams/IDreamManager;
Landroid/service/dreams/IDreamManager;->awaken()V
Landroid/service/dreams/IDreamManager;->dream()V
@@ -4295,46 +1560,8 @@
Landroid/service/media/IMediaBrowserServiceCallbacks;->onConnectFailed()V
Landroid/service/media/IMediaBrowserServiceCallbacks;->onLoadChildren(Ljava/lang/String;Landroid/content/pm/ParceledListSlice;)V
Landroid/service/media/IMediaBrowserServiceCallbacks;->onLoadChildrenWithOptions(Ljava/lang/String;Landroid/content/pm/ParceledListSlice;Landroid/os/Bundle;)V
-Landroid/service/media/MediaBrowserService$Result;->mFlags:I
-Landroid/service/media/MediaBrowserService;->KEY_MEDIA_ITEM:Ljava/lang/String;
Landroid/service/notification/INotificationListener$Stub;-><init>()V
-Landroid/service/notification/NotificationListenerService$Ranking;->getVisibilityOverride()I
-Landroid/service/notification/NotificationListenerService;->getNotificationInterface()Landroid/app/INotificationManager;
-Landroid/service/notification/NotificationListenerService;->isBound()Z
-Landroid/service/notification/NotificationListenerService;->mHandler:Landroid/os/Handler;
-Landroid/service/notification/NotificationListenerService;->mNoMan:Landroid/app/INotificationManager;
-Landroid/service/notification/NotificationListenerService;->mWrapper:Landroid/service/notification/NotificationListenerService$NotificationListenerWrapper;
-Landroid/service/notification/NotificationListenerService;->TAG:Ljava/lang/String;
-Landroid/service/notification/StatusBarNotification;->getInitialPid()I
-Landroid/service/notification/StatusBarNotification;->getOpPkg()Ljava/lang/String;
-Landroid/service/notification/StatusBarNotification;->getPackageContext(Landroid/content/Context;)Landroid/content/Context;
-Landroid/service/notification/StatusBarNotification;->getUid()I
-Landroid/service/notification/StatusBarNotification;->id:I
-Landroid/service/notification/StatusBarNotification;->initialPid:I
-Landroid/service/notification/StatusBarNotification;->notification:Landroid/app/Notification;
-Landroid/service/notification/StatusBarNotification;->pkg:Ljava/lang/String;
-Landroid/service/notification/StatusBarNotification;->postTime:J
-Landroid/service/notification/StatusBarNotification;->tag:Ljava/lang/String;
-Landroid/service/notification/StatusBarNotification;->uid:I
-Landroid/service/notification/StatusBarNotification;->user:Landroid/os/UserHandle;
-Landroid/service/notification/ZenModeConfig$ScheduleInfo;->days:[I
-Landroid/service/notification/ZenModeConfig$ScheduleInfo;->endHour:I
-Landroid/service/notification/ZenModeConfig$ScheduleInfo;->endMinute:I
-Landroid/service/notification/ZenModeConfig$ScheduleInfo;->startHour:I
-Landroid/service/notification/ZenModeConfig$ScheduleInfo;->startMinute:I
-Landroid/service/notification/ZenModeConfig$ZenRule;->conditionId:Landroid/net/Uri;
-Landroid/service/notification/ZenModeConfig$ZenRule;->creationTime:J
-Landroid/service/notification/ZenModeConfig$ZenRule;->enabled:Z
-Landroid/service/notification/ZenModeConfig$ZenRule;->name:Ljava/lang/String;
-Landroid/service/notification/ZenModeConfig$ZenRule;->snoozing:Z
-Landroid/service/notification/ZenModeConfig$ZenRule;->zenMode:I
-Landroid/service/notification/ZenModeConfig;-><init>()V
-Landroid/service/notification/ZenModeConfig;->allowAlarms:Z
-Landroid/service/notification/ZenModeConfig;->automaticRules:Landroid/util/ArrayMap;
-Landroid/service/notification/ZenModeConfig;->tryParseScheduleConditionId(Landroid/net/Uri;)Landroid/service/notification/ZenModeConfig$ScheduleInfo;
Landroid/service/persistentdata/IPersistentDataBlockService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/persistentdata/IPersistentDataBlockService;
-Landroid/service/voice/AlwaysOnHotwordDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
-Landroid/service/voice/VoiceInteractionService;->isKeyphraseAndLocaleSupportedForHotword(Ljava/lang/String;Ljava/util/Locale;)Z
Landroid/service/vr/IVrManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/vr/IVrManager;
Landroid/service/vr/IVrManager;->getVr2dDisplayId()I
Landroid/service/vr/IVrManager;->getVrModeState()Z
@@ -4345,21 +1572,7 @@
Landroid/service/wallpaper/IWallpaperEngine;->setDesiredSize(II)V
Landroid/service/wallpaper/IWallpaperEngine;->setVisibility(Z)V
Landroid/service/wallpaper/IWallpaperService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/wallpaper/IWallpaperService;
-Landroid/service/wallpaper/WallpaperService$Engine;->mPendingXOffset:F
-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
@@ -4416,505 +1629,8 @@
Landroid/system/OsConstants;->XATTR_REPLACE:I
Landroid/system/OsConstants;->_LINUX_CAPABILITY_VERSION_3:I
Landroid/system/StructTimeval;->fromMillis(J)Landroid/system/StructTimeval;
-Landroid/telephony/CarrierConfigManager;->KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY:Ljava/lang/String;
-Landroid/telephony/CarrierConfigManager;->KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL:Ljava/lang/String;
Landroid/telephony/CarrierMessagingServiceManager;-><init>()V
-Landroid/telephony/cdma/CdmaCellLocation;->equalsHandlesNulls(Ljava/lang/Object;Ljava/lang/Object;)Z
-Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationId:I
-Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationLatitude:I
-Landroid/telephony/cdma/CdmaCellLocation;->mBaseStationLongitude:I
-Landroid/telephony/cdma/CdmaCellLocation;->mNetworkId:I
-Landroid/telephony/cdma/CdmaCellLocation;->mSystemId:I
-Landroid/telephony/CellBroadcastMessage;-><init>(Landroid/telephony/SmsCbMessage;)V
-Landroid/telephony/CellBroadcastMessage;->createFromCursor(Landroid/database/Cursor;)Landroid/telephony/CellBroadcastMessage;
-Landroid/telephony/CellBroadcastMessage;->getContentValues()Landroid/content/ContentValues;
-Landroid/telephony/CellBroadcastMessage;->getDeliveryTime()J
-Landroid/telephony/CellBroadcastMessage;->getEtwsWarningInfo()Landroid/telephony/SmsCbEtwsInfo;
-Landroid/telephony/CellBroadcastMessage;->getLanguageCode()Ljava/lang/String;
-Landroid/telephony/CellBroadcastMessage;->getMessageBody()Ljava/lang/String;
-Landroid/telephony/CellBroadcastMessage;->getSerialNumber()I
-Landroid/telephony/CellBroadcastMessage;->getServiceCategory()I
-Landroid/telephony/CellBroadcastMessage;->getSpokenDateString(Landroid/content/Context;)Ljava/lang/String;
-Landroid/telephony/CellBroadcastMessage;->isCmasMessage()Z
-Landroid/telephony/CellBroadcastMessage;->isEmergencyAlertMessage()Z
-Landroid/telephony/CellBroadcastMessage;->isEtwsMessage()Z
-Landroid/telephony/CellBroadcastMessage;->isRead()Z
-Landroid/telephony/CellIdentityCdma;-><init>(IIIII)V
-Landroid/telephony/CellIdentityGsm;-><init>()V
-Landroid/telephony/CellIdentityGsm;->mArfcn:I
-Landroid/telephony/CellIdentityGsm;->mBsic:I
-Landroid/telephony/CellIdentityLte;-><init>()V
-Landroid/telephony/CellIdentityLte;-><init>(IIIII)V
-Landroid/telephony/CellIdentityLte;->mEarfcn:I
-Landroid/telephony/CellIdentityWcdma;->mUarfcn:I
-Landroid/telephony/CellInfo;->getTimeStampType()I
-Landroid/telephony/CellInfo;->timeStampTypeToString(I)Ljava/lang/String;
-Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_ANTENNA:I
-Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_JAVA_RIL:I
-Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_MODEM:I
-Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_OEM_RIL:I
-Landroid/telephony/CellInfo;->TIMESTAMP_TYPE_UNKNOWN:I
-Landroid/telephony/CellInfoCdma;-><init>()V
-Landroid/telephony/CellInfoCdma;-><init>(Landroid/telephony/CellInfoCdma;)V
-Landroid/telephony/CellInfoCdma;->setCellIdentity(Landroid/telephony/CellIdentityCdma;)V
-Landroid/telephony/CellInfoGsm;-><init>()V
-Landroid/telephony/CellInfoLte;-><init>()V
-Landroid/telephony/CellInfoLte;->setCellIdentity(Landroid/telephony/CellIdentityLte;)V
-Landroid/telephony/CellInfoLte;->setCellSignalStrength(Landroid/telephony/CellSignalStrengthLte;)V
-Landroid/telephony/CellLocation;->fillInNotifierBundle(Landroid/os/Bundle;)V
-Landroid/telephony/CellLocation;->isEmpty()Z
-Landroid/telephony/CellLocation;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/CellLocation;
-Landroid/telephony/CellSignalStrengthGsm;-><init>()V
-Landroid/telephony/CellSignalStrengthGsm;->mBitErrorRate:I
-Landroid/telephony/CellSignalStrengthGsm;->mSignalStrength:I
-Landroid/telephony/CellSignalStrengthGsm;->mTimingAdvance:I
-Landroid/telephony/CellSignalStrengthLte;-><init>()V
-Landroid/telephony/CellSignalStrengthLte;->mCqi:I
-Landroid/telephony/CellSignalStrengthLte;->mRsrp:I
-Landroid/telephony/CellSignalStrengthLte;->mRsrq:I
-Landroid/telephony/CellSignalStrengthLte;->mRssnr:I
-Landroid/telephony/CellSignalStrengthLte;->mSignalStrength:I
-Landroid/telephony/CellSignalStrengthLte;->mTimingAdvance:I
-Landroid/telephony/CellSignalStrengthWcdma;->mBitErrorRate:I
-Landroid/telephony/CellSignalStrengthWcdma;->mSignalStrength:I
-Landroid/telephony/DisconnectCause;->toString(I)Ljava/lang/String;
-Landroid/telephony/euicc/EuiccInfo;->osVersion:Ljava/lang/String;
-Landroid/telephony/gsm/GsmCellLocation;->setPsc(I)V
-Landroid/telephony/ims/ImsSsInfo;-><init>()V
-Landroid/telephony/NeighboringCellInfo;->mCid:I
-Landroid/telephony/NeighboringCellInfo;->mLac:I
-Landroid/telephony/NeighboringCellInfo;->mNetworkType:I
-Landroid/telephony/NeighboringCellInfo;->mPsc:I
-Landroid/telephony/NeighboringCellInfo;->mRssi:I
-Landroid/telephony/PhoneNumberFormattingTextWatcher;->mFormatter:Lcom/android/i18n/phonenumbers/AsYouTypeFormatter;
-Landroid/telephony/PhoneNumberUtils;->cdmaCheckAndProcessPlusCode(Ljava/lang/String;)Ljava/lang/String;
-Landroid/telephony/PhoneNumberUtils;->compare(Ljava/lang/String;Ljava/lang/String;Z)Z
-Landroid/telephony/PhoneNumberUtils;->compareLoosely(Ljava/lang/String;Ljava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->compareStrictly(Ljava/lang/String;Ljava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->compareStrictly(Ljava/lang/String;Ljava/lang/String;Z)Z
-Landroid/telephony/PhoneNumberUtils;->convertPreDial(Ljava/lang/String;)Ljava/lang/String;
-Landroid/telephony/PhoneNumberUtils;->extractNetworkPortionAlt(Ljava/lang/String;)Ljava/lang/String;
-Landroid/telephony/PhoneNumberUtils;->getUsernameFromUriNumber(Ljava/lang/String;)Ljava/lang/String;
-Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(Ljava/lang/String;Ljava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isNanp(Ljava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;Ljava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isUriNumber(Ljava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isVoiceMailNumber(Landroid/content/Context;ILjava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->MIN_MATCH:I
-Landroid/telephony/PhoneNumberUtils;->ttsSpanAsPhoneNumber(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
-Landroid/telephony/PhoneStateListener;-><init>(Landroid/os/Looper;)V
-Landroid/telephony/PhoneStateListener;->callback:Lcom/android/internal/telephony/IPhoneStateListener;
-Landroid/telephony/PhoneStateListener;->LISTEN_PRECISE_CALL_STATE:I
-Landroid/telephony/PhoneStateListener;->mSubId:Ljava/lang/Integer;
-Landroid/telephony/PhoneStateListener;->onDataConnectionRealTimeInfoChanged(Landroid/telephony/DataConnectionRealTimeInfo;)V
-Landroid/telephony/PhoneStateListener;->onOemHookRawEvent([B)V
-Landroid/telephony/PhoneStateListener;->onOtaspChanged(I)V
-Landroid/telephony/PhoneStateListener;->onPreciseCallStateChanged(Landroid/telephony/PreciseCallState;)V
-Landroid/telephony/PhoneStateListener;->onPreciseDataConnectionStateChanged(Landroid/telephony/PreciseDataConnectionState;)V
-Landroid/telephony/PhoneStateListener;->onVoLteServiceStateChanged(Landroid/telephony/VoLteServiceState;)V
-Landroid/telephony/PreciseCallState;-><init>(IIIII)V
-Landroid/telephony/PreciseCallState;->getDisconnectCause()I
-Landroid/telephony/PreciseCallState;->getPreciseDisconnectCause()I
-Landroid/telephony/PreciseCallState;->getRingingCallState()I
-Landroid/telephony/PreciseDataConnectionState;-><init>(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/net/LinkProperties;Ljava/lang/String;)V
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionAPN()Ljava/lang/String;
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionAPNType()Ljava/lang/String;
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionChangeReason()Ljava/lang/String;
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionFailCause()Ljava/lang/String;
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionLinkProperties()Landroid/net/LinkProperties;
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionNetworkType()I
-Landroid/telephony/PreciseDataConnectionState;->getDataConnectionState()I
-Landroid/telephony/RadioAccessFamily;->getNetworkTypeFromRaf(I)I
-Landroid/telephony/RadioAccessFamily;->getPhoneId()I
-Landroid/telephony/RadioAccessFamily;->getRadioAccessFamily()I
-Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/telephony/Rlog;->v(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/telephony/Rlog;->w(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/telephony/Rlog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/telephony/ServiceState;->bearerBitmapHasCdma(I)Z
-Landroid/telephony/ServiceState;->equalsHandlesNulls(Ljava/lang/Object;Ljava/lang/Object;)Z
-Landroid/telephony/ServiceState;->fillInNotifierBundle(Landroid/os/Bundle;)V
-Landroid/telephony/ServiceState;->getCdmaDefaultRoamingIndicator()I
-Landroid/telephony/ServiceState;->getCdmaEriIconIndex()I
-Landroid/telephony/ServiceState;->getCdmaEriIconMode()I
-Landroid/telephony/ServiceState;->getCdmaRoamingIndicator()I
-Landroid/telephony/ServiceState;->getCssIndicator()I
-Landroid/telephony/ServiceState;->getDataNetworkType()I
-Landroid/telephony/ServiceState;->getDataOperatorAlphaShort()Ljava/lang/String;
-Landroid/telephony/ServiceState;->getDataOperatorNumeric()Ljava/lang/String;
-Landroid/telephony/ServiceState;->getDataRoamingType()I
-Landroid/telephony/ServiceState;->getRadioTechnology()I
-Landroid/telephony/ServiceState;->getRilVoiceRadioTechnology()I
-Landroid/telephony/ServiceState;->getVoiceOperatorAlphaLong()Ljava/lang/String;
-Landroid/telephony/ServiceState;->getVoiceOperatorAlphaShort()Ljava/lang/String;
-Landroid/telephony/ServiceState;->getVoiceOperatorNumeric()Ljava/lang/String;
-Landroid/telephony/ServiceState;->getVoiceRoaming()Z
-Landroid/telephony/ServiceState;->getVoiceRoamingType()I
-Landroid/telephony/ServiceState;->mCdmaDefaultRoamingIndicator:I
-Landroid/telephony/ServiceState;->mCdmaEriIconIndex:I
-Landroid/telephony/ServiceState;->mCdmaEriIconMode:I
-Landroid/telephony/ServiceState;->mCdmaRoamingIndicator:I
-Landroid/telephony/ServiceState;->mCssIndicator:Z
-Landroid/telephony/ServiceState;->mIsManualNetworkSelection:Z
-Landroid/telephony/ServiceState;->mIsUsingCarrierAggregation:Z
-Landroid/telephony/ServiceState;->mNetworkId:I
-Landroid/telephony/ServiceState;->mSystemId:I
-Landroid/telephony/ServiceState;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/ServiceState;
-Landroid/telephony/ServiceState;->RIL_RADIO_TECHNOLOGY_IWLAN:I
-Landroid/telephony/ServiceState;->setCdmaDefaultRoamingIndicator(I)V
-Landroid/telephony/ServiceState;->setCdmaEriIconIndex(I)V
-Landroid/telephony/ServiceState;->setCdmaEriIconMode(I)V
-Landroid/telephony/ServiceState;->setCdmaRoamingIndicator(I)V
-Landroid/telephony/ServiceState;->setCssIndicator(I)V
-Landroid/telephony/ServiceState;->setDataRegState(I)V
-Landroid/telephony/ServiceState;->setDataRoaming(Z)V
-Landroid/telephony/ServiceState;->setDataRoamingFromRegistration(Z)V
-Landroid/telephony/ServiceState;->setDataRoamingType(I)V
-Landroid/telephony/ServiceState;->setEmergencyOnly(Z)V
-Landroid/telephony/ServiceState;->setFromNotifierBundle(Landroid/os/Bundle;)V
-Landroid/telephony/ServiceState;->setOperatorAlphaLong(Ljava/lang/String;)V
-Landroid/telephony/ServiceState;->setVoiceRegState(I)V
-Landroid/telephony/ServiceState;->setVoiceRoaming(Z)V
-Landroid/telephony/ServiceState;->setVoiceRoamingType(I)V
-Landroid/telephony/SignalStrength;-><init>()V
-Landroid/telephony/SignalStrength;-><init>(Landroid/os/Parcel;)V
-Landroid/telephony/SignalStrength;-><init>(Landroid/telephony/SignalStrength;)V
-Landroid/telephony/SignalStrength;-><init>(Z)V
-Landroid/telephony/SignalStrength;->copyFrom(Landroid/telephony/SignalStrength;)V
-Landroid/telephony/SignalStrength;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/telephony/SignalStrength;->fillInNotifierBundle(Landroid/os/Bundle;)V
-Landroid/telephony/SignalStrength;->getAsuLevel()I
-Landroid/telephony/SignalStrength;->getCdmaAsuLevel()I
-Landroid/telephony/SignalStrength;->getCdmaLevel()I
-Landroid/telephony/SignalStrength;->getDbm()I
-Landroid/telephony/SignalStrength;->getEvdoAsuLevel()I
-Landroid/telephony/SignalStrength;->getEvdoLevel()I
-Landroid/telephony/SignalStrength;->getGsmAsuLevel()I
-Landroid/telephony/SignalStrength;->getGsmDbm()I
-Landroid/telephony/SignalStrength;->getGsmLevel()I
-Landroid/telephony/SignalStrength;->getLteAsuLevel()I
-Landroid/telephony/SignalStrength;->getLteCqi()I
-Landroid/telephony/SignalStrength;->getLteDbm()I
-Landroid/telephony/SignalStrength;->getLteLevel()I
-Landroid/telephony/SignalStrength;->getLteRsrp()I
-Landroid/telephony/SignalStrength;->getLteRsrq()I
-Landroid/telephony/SignalStrength;->getLteRssnr()I
-Landroid/telephony/SignalStrength;->getLteSignalStrength()I
-Landroid/telephony/SignalStrength;->getTdScdmaAsuLevel()I
-Landroid/telephony/SignalStrength;->getTdScdmaDbm()I
-Landroid/telephony/SignalStrength;->getTdScdmaLevel()I
-Landroid/telephony/SignalStrength;->mCdmaDbm:I
-Landroid/telephony/SignalStrength;->mCdmaEcio:I
-Landroid/telephony/SignalStrength;->mEvdoDbm:I
-Landroid/telephony/SignalStrength;->mEvdoEcio:I
-Landroid/telephony/SignalStrength;->mEvdoSnr:I
-Landroid/telephony/SignalStrength;->mGsmBitErrorRate:I
-Landroid/telephony/SignalStrength;->mGsmSignalStrength:I
-Landroid/telephony/SignalStrength;->mLteCqi:I
-Landroid/telephony/SignalStrength;->mLteRsrp:I
-Landroid/telephony/SignalStrength;->mLteRsrpBoost:I
-Landroid/telephony/SignalStrength;->mLteRsrq:I
-Landroid/telephony/SignalStrength;->mLteRssnr:I
-Landroid/telephony/SignalStrength;->mLteSignalStrength:I
-Landroid/telephony/SignalStrength;->mTdScdmaRscp:I
-Landroid/telephony/SignalStrength;->mWcdmaRscp:I
-Landroid/telephony/SignalStrength;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/SignalStrength;
-Landroid/telephony/SignalStrength;->NUM_SIGNAL_STRENGTH_BINS:I
-Landroid/telephony/SignalStrength;->setFromNotifierBundle(Landroid/os/Bundle;)V
-Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_GOOD:I
-Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_GREAT:I
-Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_MODERATE:I
-Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_NONE_OR_UNKNOWN:I
-Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_POOR:I
-Landroid/telephony/SignalStrength;->validateInput()V
-Landroid/telephony/SmsManager;->copyMessageToIcc([B[BI)Z
-Landroid/telephony/SmsManager;->deleteMessageFromIcc(I)Z
-Landroid/telephony/SmsManager;->disableCellBroadcastRange(III)Z
-Landroid/telephony/SmsManager;->enableCellBroadcastRange(III)Z
-Landroid/telephony/SmsManager;->getAllMessagesFromIcc()Ljava/util/ArrayList;
-Landroid/telephony/SmsManager;->isSMSPromptEnabled()Z
-Landroid/telephony/SmsManager;->mSubId:I
-Landroid/telephony/SmsManager;->sendMultipartTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;IZI)V
-Landroid/telephony/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
-Landroid/telephony/SmsManager;->sendTextMessageWithoutPersisting(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
-Landroid/telephony/SmsManager;->updateMessageOnIcc(II[B)Z
-Landroid/telephony/SmsMessage;->fragmentText(Ljava/lang/String;)Ljava/util/ArrayList;
-Landroid/telephony/SmsMessage;->getSubId()I
-Landroid/telephony/SmsMessage;->mSubId:I
-Landroid/telephony/SmsMessage;->mWrappedSmsMessage:Lcom/android/internal/telephony/SmsMessageBase;
-Landroid/telephony/SmsMessage;->setSubId(I)V
-Landroid/telephony/SmsMessage;->useCdmaFormatForMoSms()Z
-Landroid/telephony/SmsMessage;->useCdmaFormatForMoSms(I)Z
-Landroid/telephony/SubscriptionInfo;->getNameSource()I
-Landroid/telephony/SubscriptionManager;-><init>(Landroid/content/Context;)V
-Landroid/telephony/SubscriptionManager;->CONTENT_URI:Landroid/net/Uri;
-Landroid/telephony/SubscriptionManager;->DEFAULT_SUBSCRIPTION_ID:I
-Landroid/telephony/SubscriptionManager;->getActiveSubscriptionIdList()[I
-Landroid/telephony/SubscriptionManager;->getAllSubscriptionInfoCount()I
-Landroid/telephony/SubscriptionManager;->getAllSubscriptionInfoList()Ljava/util/List;
-Landroid/telephony/SubscriptionManager;->getDefaultDataPhoneId()I
-Landroid/telephony/SubscriptionManager;->getDefaultDataSubscriptionInfo()Landroid/telephony/SubscriptionInfo;
-Landroid/telephony/SubscriptionManager;->getDefaultSmsPhoneId()I
-Landroid/telephony/SubscriptionManager;->getDefaultVoiceSubscriptionInfo()Landroid/telephony/SubscriptionInfo;
-Landroid/telephony/SubscriptionManager;->getPhoneId(I)I
-Landroid/telephony/SubscriptionManager;->getSlotIndex(I)I
-Landroid/telephony/SubscriptionManager;->getSubId(I)[I
-Landroid/telephony/SubscriptionManager;->NAME_SOURCE_USER_INPUT:I
-Landroid/telephony/SubscriptionManager;->setDataRoaming(II)I
-Landroid/telephony/SubscriptionManager;->setDefaultDataSubId(I)V
-Landroid/telephony/SubscriptionManager;->setDefaultSmsSubId(I)V
-Landroid/telephony/SubscriptionManager;->setDisplayNumber(Ljava/lang/String;I)I
-Landroid/telephony/TelephonyManager$MultiSimVariants;->TSTS:Landroid/telephony/TelephonyManager$MultiSimVariants;
-Landroid/telephony/TelephonyManager$MultiSimVariants;->UNKNOWN:Landroid/telephony/TelephonyManager$MultiSimVariants;
Landroid/telephony/TelephonyManager$MultiSimVariants;->values()[Landroid/telephony/TelephonyManager$MultiSimVariants;
-Landroid/telephony/TelephonyManager;-><init>()V
-Landroid/telephony/TelephonyManager;-><init>(Landroid/content/Context;)V
-Landroid/telephony/TelephonyManager;-><init>(Landroid/content/Context;I)V
-Landroid/telephony/TelephonyManager;->ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED:Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->from(Landroid/content/Context;)Landroid/telephony/TelephonyManager;
-Landroid/telephony/TelephonyManager;->getCallState(I)I
-Landroid/telephony/TelephonyManager;->getCdmaEriIconIndex(I)I
-Landroid/telephony/TelephonyManager;->getCdmaEriIconMode(I)I
-Landroid/telephony/TelephonyManager;->getCdmaEriText(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getDataNetworkType(I)I
-Landroid/telephony/TelephonyManager;->getDefault()Landroid/telephony/TelephonyManager;
-Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getGroupIdLevel1(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getIccAuthentication(IIILjava/lang/String;)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getImsConfig(II)Landroid/telephony/ims/aidl/IImsConfig;
-Landroid/telephony/TelephonyManager;->getImsRegistration(II)Landroid/telephony/ims/aidl/IImsRegistration;
-Landroid/telephony/TelephonyManager;->getIsimImpi()Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getIsimImpu()[Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getIsimPcscf()[Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getITelephony()Lcom/android/internal/telephony/ITelephony;
-Landroid/telephony/TelephonyManager;->getLine1AlphaTag(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getLine1Number(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getLteOnCdmaMode()I
-Landroid/telephony/TelephonyManager;->getLteOnCdmaMode(I)I
-Landroid/telephony/TelephonyManager;->getLteOnCdmaModeStatic()I
-Landroid/telephony/TelephonyManager;->getMergedSubscriberIds()[Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getMsisdn()Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getMsisdn(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getMultiSimConfiguration()Landroid/telephony/TelephonyManager$MultiSimVariants;
-Landroid/telephony/TelephonyManager;->getNai(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkClass(I)I
-Landroid/telephony/TelephonyManager;->getNetworkCountryIso(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkCountryIsoForPhone(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkOperator(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkOperatorForPhone(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkOperatorName(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkType(I)I
-Landroid/telephony/TelephonyManager;->getNetworkTypeName(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getOtaSpNumberSchemaForPhone(ILjava/lang/String;)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getPhoneId(I)I
-Landroid/telephony/TelephonyManager;->getPhoneType(I)I
-Landroid/telephony/TelephonyManager;->getPhoneTypeFromProperty(I)I
-Landroid/telephony/TelephonyManager;->getProcCmdLine()Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimCount()I
-Landroid/telephony/TelephonyManager;->getSimCountryIso(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimCountryIsoForPhone(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimOperator(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimOperatorName(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimOperatorNameForPhone(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimOperatorNumeric()Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimOperatorNumeric(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimOperatorNumericForPhone(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSimSerialNumber(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSlotIndex()I
-Landroid/telephony/TelephonyManager;->getSubId(I)I
-Landroid/telephony/TelephonyManager;->getSubIdForPhoneAccount(Landroid/telecom/PhoneAccount;)I
-Landroid/telephony/TelephonyManager;->getSubscriberId(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getSubscriberInfo()Lcom/android/internal/telephony/IPhoneSubInfo;
-Landroid/telephony/TelephonyManager;->getTelephonyProperty(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getTelephonyProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getVoiceMailAlphaTag(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getVoiceMailNumber(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getVoiceMessageCount(I)I
-Landroid/telephony/TelephonyManager;->hasIccCard(I)Z
-Landroid/telephony/TelephonyManager;->isMultiSimEnabled()Z
-Landroid/telephony/TelephonyManager;->isNetworkRoaming(I)Z
-Landroid/telephony/TelephonyManager;->isVideoTelephonyAvailable()Z
-Landroid/telephony/TelephonyManager;->isVolteAvailable()Z
-Landroid/telephony/TelephonyManager;->isWifiCallingAvailable()Z
-Landroid/telephony/TelephonyManager;->mSubscriptionManager:Landroid/telephony/SubscriptionManager;
-Landroid/telephony/TelephonyManager;->NETWORK_CLASS_2_G:I
-Landroid/telephony/TelephonyManager;->NETWORK_CLASS_3_G:I
-Landroid/telephony/TelephonyManager;->NETWORK_CLASS_4_G:I
-Landroid/telephony/TelephonyManager;->NETWORK_TYPE_LTE_CA:I
-Landroid/telephony/TelephonyManager;->nvReadItem(I)Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->setBasebandVersionForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setDataNetworkTypeForPhone(II)V
-Landroid/telephony/TelephonyManager;->setImsRegistrationState(Z)V
-Landroid/telephony/TelephonyManager;->setNetworkOperatorNameForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setNetworkOperatorNumericForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setNetworkRoamingForPhone(IZ)V
-Landroid/telephony/TelephonyManager;->setPhoneType(II)V
-Landroid/telephony/TelephonyManager;->setRoamingOverride(Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Z
-Landroid/telephony/TelephonyManager;->setSimCountryIsoForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setSimOperatorNameForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setSimOperatorNumericForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setSimStateForPhone(ILjava/lang/String;)V
-Landroid/telephony/TelephonyManager;->setTelephonyProperty(ILjava/lang/String;Ljava/lang/String;)V
-Landroid/telephony/VoLteServiceState;-><init>(I)V
-Landroid/text/AndroidBidi;->bidi(I[C[B)I
-Landroid/text/BoringLayout;->isBoring(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/TextDirectionHeuristic;Landroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;
-Landroid/text/DynamicLayout;-><init>(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZIIILandroid/text/TextUtils$TruncateAt;I)V
-Landroid/text/DynamicLayout;->getBlockEndLines()[I
-Landroid/text/DynamicLayout;->getBlockIndices()[I
-Landroid/text/DynamicLayout;->getIndexFirstChangedBlock()I
-Landroid/text/DynamicLayout;->getNumberOfBlocks()I
-Landroid/text/DynamicLayout;->setIndexFirstChangedBlock(I)V
-Landroid/text/DynamicLayout;->sStaticLayout:Landroid/text/StaticLayout;
-Landroid/text/FontConfig$Family;->getFonts()[Landroid/text/FontConfig$Font;
-Landroid/text/FontConfig$Family;->getName()Ljava/lang/String;
-Landroid/text/FontConfig$Family;->getVariant()I
-Landroid/text/FontConfig$Font;->getAxes()[Landroid/graphics/fonts/FontVariationAxis;
-Landroid/text/FontConfig$Font;->getTtcIndex()I
-Landroid/text/FontConfig$Font;->getWeight()I
-Landroid/text/FontConfig$Font;->isItalic()Z
-Landroid/text/FontConfig;->getFamilies()[Landroid/text/FontConfig$Family;
-Landroid/text/format/DateFormat;->getTimeFormatString(Landroid/content/Context;)Ljava/lang/String;
-Landroid/text/format/DateFormat;->getTimeFormatString(Landroid/content/Context;I)Ljava/lang/String;
-Landroid/text/format/DateFormat;->hasDesignator(Ljava/lang/CharSequence;C)Z
-Landroid/text/format/DateFormat;->hasSeconds(Ljava/lang/CharSequence;)Z
-Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;I)Z
-Landroid/text/format/DateUtils;->formatDuration(J)Ljava/lang/CharSequence;
-Landroid/text/format/DateUtils;->formatDuration(JI)Ljava/lang/CharSequence;
-Landroid/text/format/Formatter;->formatBytes(Landroid/content/res/Resources;JI)Landroid/text/format/Formatter$BytesResult;
-Landroid/text/format/Formatter;->formatShortElapsedTime(Landroid/content/Context;J)Ljava/lang/String;
-Landroid/text/format/Formatter;->formatShortElapsedTimeRoundingUpToMinutes(Landroid/content/Context;J)Ljava/lang/String;
-Landroid/text/Html;->withinStyle(Ljava/lang/StringBuilder;Ljava/lang/CharSequence;II)V
-Landroid/text/InputFilter$LengthFilter;->mMax:I
-Landroid/text/Layout$Alignment;->ALIGN_LEFT:Landroid/text/Layout$Alignment;
-Landroid/text/Layout$Alignment;->ALIGN_RIGHT:Landroid/text/Layout$Alignment;
-Landroid/text/Layout;->DIRS_ALL_LEFT_TO_RIGHT:Landroid/text/Layout$Directions;
-Landroid/text/Layout;->DIRS_ALL_RIGHT_TO_LEFT:Landroid/text/Layout$Directions;
-Landroid/text/Layout;->DIR_REQUEST_DEFAULT_LTR:I
-Landroid/text/Layout;->drawBackground(Landroid/graphics/Canvas;Landroid/graphics/Path;Landroid/graphics/Paint;III)V
-Landroid/text/Layout;->drawText(Landroid/graphics/Canvas;II)V
-Landroid/text/Layout;->getLineRangeForDraw(Landroid/graphics/Canvas;)J
-Landroid/text/Layout;->getPrimaryHorizontal(IZ)F
-Landroid/text/Layout;->getSecondaryHorizontal(IZ)F
-Landroid/text/Layout;->isLevelBoundary(I)Z
-Landroid/text/Layout;->mPaint:Landroid/text/TextPaint;
-Landroid/text/Layout;->shouldClampCursor(I)Z
-Landroid/text/method/AllCapsTransformationMethod;-><init>(Landroid/content/Context;)V
-Landroid/text/method/HideReturnsTransformationMethod;->sInstance:Landroid/text/method/HideReturnsTransformationMethod;
-Landroid/text/method/LinkMovementMethod;->sInstance:Landroid/text/method/LinkMovementMethod;
-Landroid/text/method/MetaKeyKeyListener;->startSelecting(Landroid/view/View;Landroid/text/Spannable;)V
-Landroid/text/method/MetaKeyKeyListener;->stopSelecting(Landroid/view/View;Landroid/text/Spannable;)V
-Landroid/text/method/PasswordTransformationMethod;->DOT:C
-Landroid/text/method/PasswordTransformationMethod;->sInstance:Landroid/text/method/PasswordTransformationMethod;
-Landroid/text/method/TransformationMethod2;->setLengthChangesAllowed(Z)V
-Landroid/text/method/WordIterator;-><init>(Ljava/util/Locale;)V
-Landroid/text/method/WordIterator;->following(I)I
-Landroid/text/method/WordIterator;->getBeginning(I)I
-Landroid/text/method/WordIterator;->getEnd(I)I
-Landroid/text/method/WordIterator;->getNextWordEndOnTwoWordBoundary(I)I
-Landroid/text/method/WordIterator;->getPrevWordBeginningOnTwoWordsBoundary(I)I
-Landroid/text/method/WordIterator;->getPunctuationBeginning(I)I
-Landroid/text/method/WordIterator;->getPunctuationEnd(I)I
-Landroid/text/method/WordIterator;->isAfterPunctuation(I)Z
-Landroid/text/method/WordIterator;->isBoundary(I)Z
-Landroid/text/method/WordIterator;->isOnPunctuation(I)Z
-Landroid/text/method/WordIterator;->nextBoundary(I)I
-Landroid/text/method/WordIterator;->preceding(I)I
-Landroid/text/method/WordIterator;->prevBoundary(I)I
-Landroid/text/method/WordIterator;->setCharSequence(Ljava/lang/CharSequence;II)V
-Landroid/text/Selection;->moveToFollowing(Landroid/text/Spannable;Landroid/text/Selection$PositionIterator;Z)Z
-Landroid/text/Selection;->moveToPreceding(Landroid/text/Spannable;Landroid/text/Selection$PositionIterator;Z)Z
-Landroid/text/SpannableStringBuilder;->getSpans(IILjava/lang/Class;Z)[Ljava/lang/Object;
-Landroid/text/SpannableStringBuilder;->mGapLength:I
-Landroid/text/SpannableStringBuilder;->mGapStart:I
-Landroid/text/SpannableStringBuilder;->mSpanCount:I
-Landroid/text/SpannableStringBuilder;->mSpanEnds:[I
-Landroid/text/SpannableStringBuilder;->mSpanFlags:[I
-Landroid/text/SpannableStringBuilder;->mSpans:[Ljava/lang/Object;
-Landroid/text/SpannableStringBuilder;->mSpanStarts:[I
-Landroid/text/SpannableStringBuilder;->mText:[C
-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
-Landroid/text/SpannableStringInternal;->copySpans(Landroid/text/Spanned;II)V
-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;
-Landroid/text/SpannableStringInternal;->mText:Ljava/lang/String;
-Landroid/text/SpannableStringInternal;->nextSpanTransition(IILjava/lang/Class;)I
-Landroid/text/SpannableStringInternal;->region(II)Ljava/lang/String;
-Landroid/text/SpannableStringInternal;->removeSpan(Ljava/lang/Object;)V
-Landroid/text/SpannableStringInternal;->sendSpanAdded(Ljava/lang/Object;II)V
-Landroid/text/SpannableStringInternal;->sendSpanChanged(Ljava/lang/Object;IIII)V
-Landroid/text/SpannableStringInternal;->sendSpanRemoved(Ljava/lang/Object;II)V
-Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;III)V
-Landroid/text/SpannableStringInternal;->setSpan(Ljava/lang/Object;IIIZ)V
-Landroid/text/SpannableStringInternal;->START:I
-Landroid/text/SpanSet;->spans:[Ljava/lang/Object;
-Landroid/text/StaticLayout$LineBreaks;->ascents:[F
-Landroid/text/StaticLayout$LineBreaks;->breaks:[I
-Landroid/text/StaticLayout$LineBreaks;->descents:[F
-Landroid/text/StaticLayout$LineBreaks;->flags:[I
-Landroid/text/StaticLayout$LineBreaks;->widths:[F
-Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;Landroid/text/TextDirectionHeuristic;FFZLandroid/text/TextUtils$TruncateAt;II)V
-Landroid/text/StaticLayout;->ELLIPSIS_START:I
-Landroid/text/StaticLayout;->getHeight(Z)I
-Landroid/text/StaticLayout;->mColumns:I
-Landroid/text/StaticLayout;->mLineCount:I
-Landroid/text/StaticLayout;->mLineDirections:[Landroid/text/Layout$Directions;
-Landroid/text/StaticLayout;->mLines:[I
-Landroid/text/StaticLayout;->mMaximumVisibleLineCount:I
-Landroid/text/style/BulletSpan;->mColor:I
-Landroid/text/style/BulletSpan;->mGapWidth:I
-Landroid/text/style/BulletSpan;->mWantColor:Z
-Landroid/text/style/DynamicDrawableSpan;->mDrawableRef:Ljava/lang/ref/WeakReference;
-Landroid/text/style/EasyEditSpan;->getPendingIntent()Landroid/app/PendingIntent;
-Landroid/text/style/EasyEditSpan;->isDeleteEnabled()Z
-Landroid/text/style/EasyEditSpan;->setDeleteEnabled(Z)V
-Landroid/text/style/ImageSpan;->mDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/text/style/SpellCheckSpan;-><init>()V
-Landroid/text/style/SpellCheckSpan;-><init>(Landroid/os/Parcel;)V
-Landroid/text/style/SpellCheckSpan;->isSpellCheckInProgress()Z
-Landroid/text/style/SpellCheckSpan;->setSpellCheckInProgress(Z)V
-Landroid/text/style/SuggestionRangeSpan;-><init>()V
-Landroid/text/style/SuggestionRangeSpan;-><init>(Landroid/os/Parcel;)V
-Landroid/text/style/SuggestionRangeSpan;->setBackgroundColor(I)V
-Landroid/text/style/SuggestionSpan;->getNotificationTargetClassName()Ljava/lang/String;
-Landroid/text/style/SuggestionSpan;->getUnderlineColor()I
-Landroid/text/style/SuggestionSpan;->mEasyCorrectUnderlineColor:I
-Landroid/text/style/SuggestionSpan;->mEasyCorrectUnderlineThickness:F
-Landroid/text/style/SuggestionSpan;->notifySelection(Landroid/content/Context;Ljava/lang/String;I)V
-Landroid/text/TextLine;->mCharacterStyleSpanSet:Landroid/text/SpanSet;
-Landroid/text/TextLine;->mMetricAffectingSpanSpanSet:Landroid/text/SpanSet;
-Landroid/text/TextLine;->mReplacementSpanSpanSet:Landroid/text/SpanSet;
-Landroid/text/TextLine;->mSpanned:Landroid/text/Spanned;
-Landroid/text/TextLine;->mText:Ljava/lang/CharSequence;
-Landroid/text/TextLine;->obtain()Landroid/text/TextLine;
-Landroid/text/TextLine;->sCached:[Landroid/text/TextLine;
-Landroid/text/TextPaint;->setUnderlineText(IF)V
-Landroid/text/TextPaint;->underlineColor:I
-Landroid/text/TextPaint;->underlineThickness:F
-Landroid/text/TextUtils$TruncateAt;->END_SMALL:Landroid/text/TextUtils$TruncateAt;
-Landroid/text/TextUtils;->packRangeInLong(II)J
-Landroid/text/TextUtils;->unpackRangeEndFromLong(J)I
-Landroid/text/TextUtils;->unpackRangeStartFromLong(J)I
-Landroid/text/util/Linkify;->gatherTelLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Landroid/content/Context;)V
Landroid/transition/ChangeBounds;->BOTTOM_RIGHT_ONLY_PROPERTY:Landroid/util/Property;
Landroid/transition/ChangeBounds;->POSITION_PROPERTY:Landroid/util/Property;
Landroid/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
@@ -4926,128 +1642,7 @@
Landroid/transition/TransitionManager;->getRunningTransitions()Landroid/util/ArrayMap;
Landroid/transition/TransitionManager;->sPendingTransitions:Ljava/util/ArrayList;
Landroid/transition/TransitionManager;->sRunningTransitions:Ljava/lang/ThreadLocal;
-Landroid/util/ArrayMap;->allocArrays(I)V
-Landroid/util/ArrayMap;->append(Ljava/lang/Object;Ljava/lang/Object;)V
-Landroid/util/ArrayMap;->CACHE_SIZE:I
-Landroid/util/ArrayMap;->EMPTY:Landroid/util/ArrayMap;
-Landroid/util/ArrayMap;->EMPTY_IMMUTABLE_INTS:[I
-Landroid/util/ArrayMap;->freeArrays([I[Ljava/lang/Object;I)V
-Landroid/util/ArrayMap;->indexOf(Ljava/lang/Object;I)I
-Landroid/util/ArrayMap;->indexOfNull()I
-Landroid/util/ArrayMap;->indexOfValue(Ljava/lang/Object;)I
-Landroid/util/ArrayMap;->mArray:[Ljava/lang/Object;
-Landroid/util/ArrayMap;->mBaseCache:[Ljava/lang/Object;
-Landroid/util/ArrayMap;->mBaseCacheSize:I
-Landroid/util/ArrayMap;->mHashes:[I
-Landroid/util/ArrayMap;->mSize:I
-Landroid/util/ArrayMap;->mTwiceBaseCache:[Ljava/lang/Object;
-Landroid/util/ArrayMap;->mTwiceBaseCacheSize:I
-Landroid/util/ArraySet;-><init>(Ljava/util/Collection;)V
-Landroid/util/ArraySet;->allocArrays(I)V
-Landroid/util/ArraySet;->freeArrays([I[Ljava/lang/Object;I)V
-Landroid/util/ArraySet;->indexOf(Ljava/lang/Object;I)I
-Landroid/util/ArraySet;->indexOfNull()I
-Landroid/util/ArraySet;->mArray:[Ljava/lang/Object;
-Landroid/util/ArraySet;->mHashes:[I
-Landroid/util/ArraySet;->mSize:I
-Landroid/util/Base64;-><init>()V
-Landroid/util/Base64OutputStream;-><init>(Ljava/io/OutputStream;IZ)V
-Landroid/util/DebugUtils;->buildShortClassTag(Ljava/lang/Object;Ljava/lang/StringBuilder;)V
-Landroid/util/DisplayMetrics;->DENSITY_DEVICE:I
-Landroid/util/DisplayMetrics;->noncompatDensityDpi:I
-Landroid/util/DisplayMetrics;->noncompatHeightPixels:I
-Landroid/util/DisplayMetrics;->noncompatWidthPixels:I
-Landroid/util/EventLog$Event;-><init>([B)V
-Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/ApplicationInfo;)Landroid/graphics/drawable/Drawable;
-Landroid/util/LocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
-Landroid/util/Log;->println_native(IILjava/lang/String;Ljava/lang/String;)I
-Landroid/util/Log;->wtf(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ZZ)I
-Landroid/util/LogWriter;-><init>(ILjava/lang/String;)V
-Landroid/util/LongSparseLongArray;->mKeys:[J
-Landroid/util/LongSparseLongArray;->mSize:I
-Landroid/util/LongSparseLongArray;->mValues:[J
-Landroid/util/LruCache;->map:Ljava/util/LinkedHashMap;
-Landroid/util/MathUtils;->abs(F)F
-Landroid/util/MathUtils;->constrain(FFF)F
-Landroid/util/MathUtils;->constrain(III)I
-Landroid/util/MathUtils;->lerp(FFF)F
-Landroid/util/MathUtils;->max(II)F
-Landroid/util/NtpTrustedTime;->currentTimeMillis()J
-Landroid/util/NtpTrustedTime;->forceRefresh()Z
-Landroid/util/NtpTrustedTime;->getCachedNtpTime()J
-Landroid/util/NtpTrustedTime;->getCachedNtpTimeReference()J
-Landroid/util/NtpTrustedTime;->getInstance(Landroid/content/Context;)Landroid/util/NtpTrustedTime;
-Landroid/util/NtpTrustedTime;->hasCache()Z
-Landroid/util/PathParser;->createPathFromPathData(Ljava/lang/String;)Landroid/graphics/Path;
-Landroid/util/Pools$Pool;->acquire()Ljava/lang/Object;
-Landroid/util/Pools$Pool;->release(Ljava/lang/Object;)Z
-Landroid/util/Pools$SimplePool;-><init>(I)V
-Landroid/util/Pools$SimplePool;->acquire()Ljava/lang/Object;
-Landroid/util/Pools$SimplePool;->mPool:[Ljava/lang/Object;
-Landroid/util/Pools$SimplePool;->release(Ljava/lang/Object;)Z
-Landroid/util/Pools$SynchronizedPool;-><init>(I)V
-Landroid/util/Pools$SynchronizedPool;->acquire()Ljava/lang/Object;
-Landroid/util/Pools$SynchronizedPool;->release(Ljava/lang/Object;)Z
-Landroid/util/Rational;->mDenominator:I
-Landroid/util/Rational;->mNumerator:I
Landroid/util/Singleton;-><init>()V
-Landroid/util/Singleton;->get()Ljava/lang/Object;
-Landroid/util/Singleton;->mInstance:Ljava/lang/Object;
-Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/util/Slog;->v(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/util/Slog;->wtfStack(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/util/SparseArray;->mKeys:[I
-Landroid/util/SparseArray;->mSize:I
-Landroid/util/SparseArray;->mValues:[Ljava/lang/Object;
-Landroid/util/SparseBooleanArray;->mKeys:[I
-Landroid/util/SparseBooleanArray;->mSize:I
-Landroid/util/SparseBooleanArray;->mValues:[Z
-Landroid/util/SparseIntArray;->mKeys:[I
-Landroid/util/SparseIntArray;->mSize:I
-Landroid/util/SparseIntArray;->mValues:[I
-Landroid/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;)V
-Landroid/util/TimeUtils;->formatDuration(JLjava/io/PrintWriter;I)V
-Landroid/util/TimeUtils;->logTimeOfDay(J)Ljava/lang/String;
-Landroid/util/TrustedTime;->currentTimeMillis()J
-Landroid/util/TrustedTime;->forceRefresh()Z
-Landroid/util/TrustedTime;->getCacheAge()J
-Landroid/util/TrustedTime;->hasCache()Z
-Landroid/view/accessibility/AccessibilityEvent;->mAction:I
-Landroid/view/accessibility/AccessibilityEvent;->mEventType:I
-Landroid/view/accessibility/AccessibilityInteractionClient;->clearCache()V
-Landroid/view/accessibility/AccessibilityInteractionClient;->getInstance()Landroid/view/accessibility/AccessibilityInteractionClient;
-Landroid/view/accessibility/AccessibilityInteractionClient;->setSameThreadMessage(Landroid/os/Message;)V
-Landroid/view/accessibility/AccessibilityManager;->DALTONIZER_SIMULATE_MONOCHROMACY:I
-Landroid/view/accessibility/AccessibilityManager;->getInstance(Landroid/content/Context;)Landroid/view/accessibility/AccessibilityManager;
-Landroid/view/accessibility/AccessibilityManager;->isHighTextContrastEnabled()Z
-Landroid/view/accessibility/AccessibilityManager;->mAccessibilityStateChangeListeners:Landroid/util/ArrayMap;
-Landroid/view/accessibility/AccessibilityManager;->mHandler:Landroid/os/Handler;
-Landroid/view/accessibility/AccessibilityManager;->mIsEnabled:Z
-Landroid/view/accessibility/AccessibilityManager;->mIsHighTextContrastEnabled:Z
-Landroid/view/accessibility/AccessibilityManager;->mLock:Ljava/lang/Object;
-Landroid/view/accessibility/AccessibilityManager;->mService:Landroid/view/accessibility/IAccessibilityManager;
-Landroid/view/accessibility/AccessibilityManager;->mUserId:I
-Landroid/view/accessibility/AccessibilityManager;->setStateLocked(I)V
-Landroid/view/accessibility/AccessibilityManager;->sInstance:Landroid/view/accessibility/AccessibilityManager;
-Landroid/view/accessibility/AccessibilityManager;->sInstanceSync:Ljava/lang/Object;
-Landroid/view/accessibility/AccessibilityNodeInfo;->getAccessibilityViewId(J)I
-Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J
-Landroid/view/accessibility/AccessibilityNodeInfo;->getVirtualDescendantId(J)I
-Landroid/view/accessibility/AccessibilityNodeInfo;->isSealed()Z
-Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray;
-Landroid/view/accessibility/AccessibilityNodeInfo;->mSealed:Z
-Landroid/view/accessibility/AccessibilityNodeInfo;->mSourceNodeId:J
-Landroid/view/accessibility/AccessibilityNodeInfo;->refresh(Landroid/os/Bundle;Z)Z
-Landroid/view/accessibility/AccessibilityNodeInfo;->setSealed(Z)V
-Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J
-Landroid/view/accessibility/AccessibilityRecord;->mSealed:Z
-Landroid/view/accessibility/AccessibilityRecord;->mSourceNodeId:J
-Landroid/view/accessibility/CaptioningManager$CaptionStyle;->PRESETS:[Landroid/view/accessibility/CaptioningManager$CaptionStyle;
Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setFindAccessibilityNodeInfoResult(Landroid/view/accessibility/AccessibilityNodeInfo;I)V
Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setFindAccessibilityNodeInfosResult(Ljava/util/List;I)V
Landroid/view/accessibility/IAccessibilityInteractionConnectionCallback;->setPerformAccessibilityActionResult(ZI)V
@@ -5056,129 +1651,12 @@
Landroid/view/accessibility/IAccessibilityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/accessibility/IAccessibilityManager;
Landroid/view/accessibility/IAccessibilityManager;->getEnabledAccessibilityServiceList(II)Ljava/util/List;
Landroid/view/AccessibilityIterators$AbstractTextSegmentIterator;-><init>()V
-Landroid/view/AccessibilityIterators$AbstractTextSegmentIterator;->mText:Ljava/lang/String;
-Landroid/view/ActionProvider;->reset()V
-Landroid/view/ActionProvider;->setSubUiVisibilityListener(Landroid/view/ActionProvider$SubUiVisibilityListener;)V
Landroid/view/autofill/IAutoFillManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/view/autofill/IAutoFillManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/autofill/IAutoFillManager;
-Landroid/view/Choreographer$CallbackQueue;->addCallbackLocked(JLjava/lang/Object;Ljava/lang/Object;)V
-Landroid/view/Choreographer$CallbackRecord;->run(J)V
-Landroid/view/Choreographer;->doFrame(JI)V
-Landroid/view/Choreographer;->getFrameTime()J
-Landroid/view/Choreographer;->getFrameTimeNanos()J
-Landroid/view/Choreographer;->mCallbackQueues:[Landroid/view/Choreographer$CallbackQueue;
-Landroid/view/Choreographer;->mDisplayEventReceiver:Landroid/view/Choreographer$FrameDisplayEventReceiver;
-Landroid/view/Choreographer;->mFrameIntervalNanos:J
-Landroid/view/Choreographer;->mLastFrameTimeNanos:J
-Landroid/view/Choreographer;->mLock:Ljava/lang/Object;
-Landroid/view/Choreographer;->scheduleVsyncLocked()V
-Landroid/view/Choreographer;->USE_VSYNC:Z
-Landroid/view/ContextThemeWrapper;->getThemeResId()I
-Landroid/view/ContextThemeWrapper;->initializeTheme()V
-Landroid/view/ContextThemeWrapper;->mInflater:Landroid/view/LayoutInflater;
-Landroid/view/ContextThemeWrapper;->mResources:Landroid/content/res/Resources;
-Landroid/view/ContextThemeWrapper;->mTheme:Landroid/content/res/Resources$Theme;
-Landroid/view/ContextThemeWrapper;->mThemeResource:I
-Landroid/view/Display$HdrCapabilities;-><init>([IFFF)V
-Landroid/view/Display$Mode;-><init>(IIIF)V
-Landroid/view/Display;->getAddress()Ljava/lang/String;
-Landroid/view/Display;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
-Landroid/view/Display;->getDisplayInfo(Landroid/view/DisplayInfo;)Z
-Landroid/view/Display;->getMaximumSizeDimension()I
-Landroid/view/Display;->getOwnerPackageName()Ljava/lang/String;
-Landroid/view/Display;->getType()I
-Landroid/view/Display;->mDisplayInfo:Landroid/view/DisplayInfo;
-Landroid/view/Display;->TYPE_HDMI:I
-Landroid/view/Display;->TYPE_UNKNOWN:I
-Landroid/view/Display;->TYPE_VIRTUAL:I
-Landroid/view/Display;->TYPE_WIFI:I
-Landroid/view/DisplayAdjustments;-><init>()V
-Landroid/view/DisplayAdjustments;->getConfiguration()Landroid/content/res/Configuration;
-Landroid/view/DisplayAdjustments;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
-Landroid/view/DisplayEventReceiver;-><init>(Landroid/os/Looper;)V
-Landroid/view/DisplayEventReceiver;->dispatchHotplug(JIZ)V
-Landroid/view/DisplayEventReceiver;->dispatchVsync(JII)V
-Landroid/view/DisplayEventReceiver;->mReceiverPtr:J
-Landroid/view/DisplayEventReceiver;->onHotplug(JIZ)V
-Landroid/view/DisplayEventReceiver;->onVsync(JII)V
-Landroid/view/DisplayEventReceiver;->scheduleVsync()V
-Landroid/view/DisplayInfo;-><init>()V
-Landroid/view/DisplayInfo;->displayCutout:Landroid/view/DisplayCutout;
-Landroid/view/DisplayInfo;->logicalHeight:I
-Landroid/view/DisplayInfo;->logicalWidth:I
-Landroid/view/DisplayInfo;->rotation:I
-Landroid/view/DisplayListCanvas;->callDrawGLFunction2(J)V
-Landroid/view/DisplayListCanvas;->drawCircle(Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;Landroid/graphics/CanvasProperty;)V
-Landroid/view/DisplayListCanvas;->drawGLFunctor2(JLjava/lang/Runnable;)V
-Landroid/view/DragEvent;->mClipData:Landroid/content/ClipData;
-Landroid/view/DragEvent;->mClipDescription:Landroid/content/ClipDescription;
-Landroid/view/DragEvent;->obtain(Landroid/view/DragEvent;)Landroid/view/DragEvent;
-Landroid/view/FrameMetrics;->mTimingData:[J
-Landroid/view/FrameMetricsObserver;->mFrameMetrics:Landroid/view/FrameMetrics;
-Landroid/view/FrameMetricsObserver;->mMessageQueue:Landroid/os/MessageQueue;
-Landroid/view/FrameMetricsObserver;->notifyDataAvailable(I)V
-Landroid/view/GestureDetector;->LONGPRESS_TIMEOUT:I
-Landroid/view/GestureDetector;->mAlwaysInTapRegion:Z
-Landroid/view/GestureDetector;->mListener:Landroid/view/GestureDetector$OnGestureListener;
-Landroid/view/GestureDetector;->mMinimumFlingVelocity:I
-Landroid/view/GestureDetector;->mTouchSlopSquare:I
-Landroid/view/GhostView;->addGhost(Landroid/view/View;Landroid/view/ViewGroup;)Landroid/view/GhostView;
-Landroid/view/GhostView;->addGhost(Landroid/view/View;Landroid/view/ViewGroup;Landroid/graphics/Matrix;)Landroid/view/GhostView;
-Landroid/view/GhostView;->removeGhost(Landroid/view/View;)V
Landroid/view/IApplicationToken$Stub;-><init>()V
Landroid/view/IDockedStackListener$Stub;-><init>()V
Landroid/view/IGraphicsStats$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/view/IGraphicsStats$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IGraphicsStats;
-Landroid/view/InputChannel;-><init>()V
-Landroid/view/InputChannel;->CREATOR:Landroid/os/Parcelable$Creator;
-Landroid/view/InputChannel;->mPtr:J
-Landroid/view/InputDevice;-><init>(IIILjava/lang/String;IILjava/lang/String;ZIILandroid/view/KeyCharacterMap;ZZZ)V
-Landroid/view/InputDevice;->addMotionRange(IIFFFFF)V
-Landroid/view/InputDevice;->isExternal()Z
-Landroid/view/InputDevice;->mIsExternal:Z
-Landroid/view/InputEvent;->getSequenceNumber()I
-Landroid/view/InputEventConsistencyVerifier;-><init>(Ljava/lang/Object;I)V
-Landroid/view/InputEventConsistencyVerifier;->isInstrumentationEnabled()Z
-Landroid/view/InputEventConsistencyVerifier;->onTouchEvent(Landroid/view/MotionEvent;I)V
-Landroid/view/InputEventConsistencyVerifier;->onUnhandledEvent(Landroid/view/InputEvent;I)V
-Landroid/view/InputEventReceiver;->dispatchBatchedInputEventPending()V
-Landroid/view/InputEventReceiver;->dispatchInputEvent(ILandroid/view/InputEvent;)V
-Landroid/view/InputEventSender;->dispatchInputEventFinished(IZ)V
-Landroid/view/InputFilter;-><init>(Landroid/os/Looper;)V
-Landroid/view/InputFilter;->onInputEvent(Landroid/view/InputEvent;I)V
-Landroid/view/inputmethod/InputMethodInfo;->isDefault(Landroid/content/Context;)Z
-Landroid/view/inputmethod/InputMethodInfo;->mSubtypes:Landroid/view/inputmethod/InputMethodSubtypeArray;
-Landroid/view/inputmethod/InputMethodManager;->checkFocus()V
-Landroid/view/inputmethod/InputMethodManager;->closeCurrentInput()V
-Landroid/view/inputmethod/InputMethodManager;->finishInputLocked()V
-Landroid/view/inputmethod/InputMethodManager;->focusIn(Landroid/view/View;)V
-Landroid/view/inputmethod/InputMethodManager;->focusOut(Landroid/view/View;)V
-Landroid/view/inputmethod/InputMethodManager;->getClient()Lcom/android/internal/view/IInputMethodClient;
-Landroid/view/inputmethod/InputMethodManager;->getInputContext()Lcom/android/internal/view/IInputContext;
-Landroid/view/inputmethod/InputMethodManager;->getInputMethodWindowVisibleHeight()I
-Landroid/view/inputmethod/InputMethodManager;->getInstance()Landroid/view/inputmethod/InputMethodManager;
-Landroid/view/inputmethod/InputMethodManager;->isCursorAnchorInfoEnabled()Z
-Landroid/view/inputmethod/InputMethodManager;->mCurId:Ljava/lang/String;
-Landroid/view/inputmethod/InputMethodManager;->mCurMethod:Lcom/android/internal/view/IInputMethodSession;
-Landroid/view/inputmethod/InputMethodManager;->mCurRootView:Landroid/view/View;
-Landroid/view/inputmethod/InputMethodManager;->mCursorRect:Landroid/graphics/Rect;
-Landroid/view/inputmethod/InputMethodManager;->mH:Landroid/view/inputmethod/InputMethodManager$H;
-Landroid/view/inputmethod/InputMethodManager;->mNextServedView:Landroid/view/View;
-Landroid/view/inputmethod/InputMethodManager;->mServedInputConnectionWrapper:Landroid/view/inputmethod/InputMethodManager$ControlledInputConnectionWrapper;
-Landroid/view/inputmethod/InputMethodManager;->mServedView:Landroid/view/View;
-Landroid/view/inputmethod/InputMethodManager;->mService:Lcom/android/internal/view/IInputMethodManager;
-Landroid/view/inputmethod/InputMethodManager;->mTmpCursorRect:Landroid/graphics/Rect;
-Landroid/view/inputmethod/InputMethodManager;->notifySuggestionPicked(Landroid/text/style/SuggestionSpan;Ljava/lang/String;I)V
-Landroid/view/inputmethod/InputMethodManager;->notifyUserAction()V
-Landroid/view/inputmethod/InputMethodManager;->onPreWindowFocus(Landroid/view/View;Z)V
-Landroid/view/inputmethod/InputMethodManager;->peekInstance()Landroid/view/inputmethod/InputMethodManager;
-Landroid/view/inputmethod/InputMethodManager;->registerSuggestionSpansForNotification([Landroid/text/style/SuggestionSpan;)V
-Landroid/view/inputmethod/InputMethodManager;->setUpdateCursorAnchorInfoMode(I)V
-Landroid/view/inputmethod/InputMethodManager;->showSoftInputUnchecked(ILandroid/os/ResultReceiver;)V
-Landroid/view/inputmethod/InputMethodManager;->sInstance:Landroid/view/inputmethod/InputMethodManager;
-Landroid/view/inputmethod/InputMethodManager;->windowDismissed(Landroid/os/IBinder;)V
-Landroid/view/inputmethod/InputMethodSubtypeArray;-><init>(Ljava/util/List;)V
-Landroid/view/InputQueue;->finishInputEvent(JZ)V
Landroid/view/IOnKeyguardExitResult;->onKeyguardExitResult(Z)V
Landroid/view/IRecentsAnimationController;->setAnimationTargetsBehindSystemBars(Z)V
Landroid/view/IRotationWatcher$Stub;-><init>()V
@@ -5235,1279 +1713,19 @@
Landroid/view/IWindowSession;->setTransparentRegion(Landroid/view/IWindow;Landroid/graphics/Region;)V
Landroid/view/IWindowSession;->wallpaperCommandComplete(Landroid/os/IBinder;Landroid/os/Bundle;)V
Landroid/view/IWindowSession;->wallpaperOffsetsComplete(Landroid/os/IBinder;)V
-Landroid/view/KeyCharacterMap$FallbackAction;->keyCode:I
-Landroid/view/KeyCharacterMap$FallbackAction;->metaState:I
-Landroid/view/KeyCharacterMap;-><init>(J)V
-Landroid/view/KeyEvent;->isConfirmKey(I)Z
-Landroid/view/KeyEvent;->isDown()Z
-Landroid/view/KeyEvent;->mAction:I
-Landroid/view/KeyEvent;->mCharacters:Ljava/lang/String;
-Landroid/view/KeyEvent;->mDeviceId:I
-Landroid/view/KeyEvent;->mDownTime:J
-Landroid/view/KeyEvent;->META_ALL_MASK:I
-Landroid/view/KeyEvent;->META_ALT_LOCKED:I
-Landroid/view/KeyEvent;->META_CAP_LOCKED:I
-Landroid/view/KeyEvent;->META_INVALID_MODIFIER_MASK:I
-Landroid/view/KeyEvent;->META_LOCK_MASK:I
-Landroid/view/KeyEvent;->META_MODIFIER_MASK:I
-Landroid/view/KeyEvent;->META_SELECTING:I
-Landroid/view/KeyEvent;->META_SYMBOLIC_NAMES:[Ljava/lang/String;
-Landroid/view/KeyEvent;->META_SYM_LOCKED:I
-Landroid/view/KeyEvent;->META_SYNTHETIC_MASK:I
-Landroid/view/KeyEvent;->mEventTime:J
-Landroid/view/KeyEvent;->mFlags:I
-Landroid/view/KeyEvent;->mKeyCode:I
-Landroid/view/KeyEvent;->mMetaState:I
-Landroid/view/KeyEvent;->mRepeatCount:I
-Landroid/view/KeyEvent;->mScanCode:I
-Landroid/view/KeyEvent;->mSource:I
-Landroid/view/KeyEvent;->obtain(JJIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;
-Landroid/view/KeyEvent;->recycle()V
-Landroid/view/LayoutInflater;->ATTRS_THEME:[I
-Landroid/view/LayoutInflater;->createViewFromTag(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
-Landroid/view/LayoutInflater;->createViewFromTag(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Z)Landroid/view/View;
-Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object;
-Landroid/view/LayoutInflater;->mConstructorSignature:[Ljava/lang/Class;
-Landroid/view/LayoutInflater;->mContext:Landroid/content/Context;
-Landroid/view/LayoutInflater;->mFactory2:Landroid/view/LayoutInflater$Factory2;
-Landroid/view/LayoutInflater;->mFactory:Landroid/view/LayoutInflater$Factory;
-Landroid/view/LayoutInflater;->mFactorySet:Z
-Landroid/view/LayoutInflater;->mPrivateFactory:Landroid/view/LayoutInflater$Factory2;
-Landroid/view/LayoutInflater;->parseInclude(Lorg/xmlpull/v1/XmlPullParser;Landroid/content/Context;Landroid/view/View;Landroid/util/AttributeSet;)V
-Landroid/view/LayoutInflater;->sConstructorMap:Ljava/util/HashMap;
-Landroid/view/LayoutInflater;->setPrivateFactory(Landroid/view/LayoutInflater$Factory2;)V
-Landroid/view/MotionEvent$PointerCoords;->createArray(I)[Landroid/view/MotionEvent$PointerCoords;
-Landroid/view/MotionEvent$PointerCoords;->mPackedAxisBits:J
-Landroid/view/MotionEvent$PointerCoords;->mPackedAxisValues:[F
-Landroid/view/MotionEvent$PointerProperties;->createArray(I)[Landroid/view/MotionEvent$PointerProperties;
-Landroid/view/MotionEvent;->addBatch(Landroid/view/MotionEvent;)Z
-Landroid/view/MotionEvent;->copy()Landroid/view/MotionEvent;
-Landroid/view/MotionEvent;->getEventTimeNano()J
-Landroid/view/MotionEvent;->getPointerIdBits()I
-Landroid/view/MotionEvent;->HISTORY_CURRENT:I
-Landroid/view/MotionEvent;->mNativePtr:J
-Landroid/view/MotionEvent;->nativeGetRawAxisValue(JIII)F
-Landroid/view/MotionEvent;->obtain()Landroid/view/MotionEvent;
-Landroid/view/MotionEvent;->scale(F)V
-Landroid/view/MotionEvent;->setDownTime(J)V
-Landroid/view/MotionEvent;->split(I)Landroid/view/MotionEvent;
-Landroid/view/NotificationHeaderView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/view/PointerIcon;->load(Landroid/content/Context;)Landroid/view/PointerIcon;
-Landroid/view/PointerIcon;->mBitmap:Landroid/graphics/Bitmap;
-Landroid/view/PointerIcon;->mBitmapFrames:[Landroid/graphics/Bitmap;
-Landroid/view/PointerIcon;->mDurationPerFrame:I
-Landroid/view/PointerIcon;->mHotSpotX:F
-Landroid/view/PointerIcon;->mHotSpotY:F
-Landroid/view/PointerIcon;->mType:I
-Landroid/view/RemoteAnimationDefinition;->addRemoteAnimation(IILandroid/view/RemoteAnimationAdapter;)V
-Landroid/view/RemoteAnimationTarget;->clipRect:Landroid/graphics/Rect;
-Landroid/view/RemoteAnimationTarget;->contentInsets:Landroid/graphics/Rect;
-Landroid/view/RemoteAnimationTarget;->isNotInRecents:Z
-Landroid/view/RemoteAnimationTarget;->isTranslucent:Z
-Landroid/view/RemoteAnimationTarget;->leash:Landroid/view/SurfaceControl;
-Landroid/view/RemoteAnimationTarget;->mode:I
-Landroid/view/RemoteAnimationTarget;->position:Landroid/graphics/Point;
-Landroid/view/RemoteAnimationTarget;->prefixOrderIndex:I
-Landroid/view/RemoteAnimationTarget;->sourceContainerBounds:Landroid/graphics/Rect;
-Landroid/view/RemoteAnimationTarget;->taskId:I
-Landroid/view/RemoteAnimationTarget;->windowConfiguration:Landroid/app/WindowConfiguration;
-Landroid/view/RenderNode;->discardDisplayList()V
-Landroid/view/RenderNode;->offsetLeftAndRight(I)Z
-Landroid/view/RenderNode;->output()V
-Landroid/view/RenderNode;->setHasOverlappingRendering(Z)Z
-Landroid/view/RenderNode;->setProjectBackwards(Z)Z
-Landroid/view/RenderNodeAnimator;-><init>(IF)V
-Landroid/view/RenderNodeAnimator;-><init>(Landroid/graphics/CanvasProperty;F)V
-Landroid/view/RenderNodeAnimator;-><init>(Landroid/graphics/CanvasProperty;IF)V
-Landroid/view/RenderNodeAnimator;->callOnFinished(Landroid/view/RenderNodeAnimator;)V
-Landroid/view/RenderNodeAnimator;->mapViewPropertyToRenderProperty(I)I
-Landroid/view/RenderNodeAnimator;->setStartValue(F)V
-Landroid/view/RenderNodeAnimator;->setTarget(Landroid/view/View;)V
-Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
-Landroid/view/ScaleGestureDetector;->mMinSpan:I
-Landroid/view/ScaleGestureDetector;->mSpanSlop:I
-Landroid/view/Surface;-><init>()V
-Landroid/view/Surface;-><init>(J)V
-Landroid/view/Surface;->copyFrom(Landroid/view/SurfaceControl;)V
-Landroid/view/Surface;->destroy()V
-Landroid/view/Surface;->mLock:Ljava/lang/Object;
-Landroid/view/Surface;->mLockedObject:J
-Landroid/view/Surface;->mName:Ljava/lang/String;
-Landroid/view/Surface;->mNativeObject:J
-Landroid/view/Surface;->nativeRelease(J)V
-Landroid/view/Surface;->transferFrom(Landroid/view/Surface;)V
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;-><init>()V
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->appVsyncOffsetNanos:J
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->density:F
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->height:I
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->presentationDeadlineNanos:J
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->refreshRate:F
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->secure:Z
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->width:I
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->xDpi:F
-Landroid/view/SurfaceControl$PhysicalDisplayInfo;->yDpi:F
-Landroid/view/SurfaceControl;->closeTransaction()V
-Landroid/view/SurfaceControl;->createDisplay(Ljava/lang/String;Z)Landroid/os/IBinder;
-Landroid/view/SurfaceControl;->destroyDisplay(Landroid/os/IBinder;)V
-Landroid/view/SurfaceControl;->getBuiltInDisplay(I)Landroid/os/IBinder;
-Landroid/view/SurfaceControl;->getDisplayConfigs(Landroid/os/IBinder;)[Landroid/view/SurfaceControl$PhysicalDisplayInfo;
-Landroid/view/SurfaceControl;->HIDDEN:I
-Landroid/view/SurfaceControl;->hide()V
-Landroid/view/SurfaceControl;->openTransaction()V
-Landroid/view/SurfaceControl;->screenshot(Landroid/graphics/Rect;III)Landroid/graphics/Bitmap;
-Landroid/view/SurfaceControl;->screenshot(Landroid/graphics/Rect;IIIIZI)Landroid/graphics/Bitmap;
-Landroid/view/SurfaceControl;->screenshot(Landroid/os/IBinder;Landroid/view/Surface;Landroid/graphics/Rect;IIIIZZ)V
-Landroid/view/SurfaceControl;->setDisplayLayerStack(Landroid/os/IBinder;I)V
-Landroid/view/SurfaceControl;->setDisplayProjection(Landroid/os/IBinder;ILandroid/graphics/Rect;Landroid/graphics/Rect;)V
-Landroid/view/SurfaceControl;->setDisplaySurface(Landroid/os/IBinder;Landroid/view/Surface;)V
-Landroid/view/SurfaceControl;->setLayer(I)V
-Landroid/view/SurfaceControl;->setPosition(FF)V
-Landroid/view/SurfaceControl;->show()V
-Landroid/view/SurfaceSession;-><init>()V
-Landroid/view/SurfaceSession;->kill()V
-Landroid/view/SurfaceSession;->mNativeClient:J
-Landroid/view/SurfaceView;->isFixedSize()Z
-Landroid/view/SurfaceView;->mCallbacks:Ljava/util/ArrayList;
-Landroid/view/SurfaceView;->mDrawingStopped:Z
-Landroid/view/SurfaceView;->mDrawListener:Landroid/view/ViewTreeObserver$OnPreDrawListener;
-Landroid/view/SurfaceView;->mFormat:I
-Landroid/view/SurfaceView;->mHaveFrame:Z
-Landroid/view/SurfaceView;->mIsCreating:Z
-Landroid/view/SurfaceView;->mLastLockTime:J
-Landroid/view/SurfaceView;->mRequestedFormat:I
-Landroid/view/SurfaceView;->mRequestedHeight:I
-Landroid/view/SurfaceView;->mRequestedWidth:I
-Landroid/view/SurfaceView;->mSurface:Landroid/view/Surface;
-Landroid/view/SurfaceView;->mSurfaceFrame:Landroid/graphics/Rect;
-Landroid/view/SurfaceView;->mSurfaceHolder:Landroid/view/SurfaceHolder;
-Landroid/view/SurfaceView;->mSurfaceLock:Ljava/util/concurrent/locks/ReentrantLock;
-Landroid/view/SurfaceView;->setFrame(IIII)Z
-Landroid/view/SurfaceView;->surfacePositionLost_uiRtSync(J)V
-Landroid/view/SurfaceView;->updateSurfacePosition_renderWorker(JIIII)V
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V
-Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V
-Landroid/view/textclassifier/TextClassificationManager;->getTextClassifier(I)Landroid/view/textclassifier/TextClassifier;
-Landroid/view/textclassifier/TextClassifier;->classifyText(Ljava/lang/CharSequence;IILandroid/view/textclassifier/TextClassification$Options;)Landroid/view/textclassifier/TextClassification;
-Landroid/view/textclassifier/TextClassifier;->generateLinks(Ljava/lang/CharSequence;Landroid/view/textclassifier/TextLinks$Options;)Landroid/view/textclassifier/TextLinks;
-Landroid/view/textclassifier/TextClassifier;->suggestSelection(Ljava/lang/CharSequence;IILandroid/view/textclassifier/TextSelection$Options;)Landroid/view/textclassifier/TextSelection;
-Landroid/view/textclassifier/TextLinks$Options;-><init>()V
-Landroid/view/textservice/SpellCheckerSession;->mSpellCheckerSessionListener:Landroid/view/textservice/SpellCheckerSession$SpellCheckerSessionListener;
-Landroid/view/textservice/TextServicesManager;->getCurrentSpellChecker()Landroid/view/textservice/SpellCheckerInfo;
-Landroid/view/textservice/TextServicesManager;->getCurrentSpellCheckerSubtype(Z)Landroid/view/textservice/SpellCheckerSubtype;
-Landroid/view/textservice/TextServicesManager;->getEnabledSpellCheckers()[Landroid/view/textservice/SpellCheckerInfo;
-Landroid/view/textservice/TextServicesManager;->getInstance()Landroid/view/textservice/TextServicesManager;
-Landroid/view/textservice/TextServicesManager;->isSpellCheckerEnabled()Z
-Landroid/view/TextureView;->destroyHardwareLayer()V
-Landroid/view/TextureView;->destroyHardwareResources()V
-Landroid/view/TextureView;->mLayer:Landroid/view/TextureLayer;
-Landroid/view/TextureView;->mNativeWindow:J
-Landroid/view/TextureView;->mOpaque:Z
-Landroid/view/TextureView;->mSurface:Landroid/graphics/SurfaceTexture;
-Landroid/view/TextureView;->mUpdateListener:Landroid/graphics/SurfaceTexture$OnFrameAvailableListener;
-Landroid/view/TextureView;->mUpdateSurface:Z
-Landroid/view/TextureView;->nCreateNativeWindow(Landroid/graphics/SurfaceTexture;)V
-Landroid/view/TextureView;->nDestroyNativeWindow()V
-Landroid/view/TextureView;->onDetachedFromWindowInternal()V
-Landroid/view/ThreadedRenderer;->addRenderNode(Landroid/view/RenderNode;Z)V
-Landroid/view/ThreadedRenderer;->drawRenderNode(Landroid/view/RenderNode;)V
-Landroid/view/ThreadedRenderer;->removeRenderNode(Landroid/view/RenderNode;)V
-Landroid/view/ThreadedRenderer;->setContentDrawBounds(IIII)V
-Landroid/view/ThreadedRenderer;->setupDiskCache(Ljava/io/File;)V
-Landroid/view/TouchDelegate;->mDelegateTargeted:Z
-Landroid/view/VelocityTracker$Estimator;->confidence:F
-Landroid/view/VelocityTracker$Estimator;->degree:I
-Landroid/view/VelocityTracker$Estimator;->xCoeff:[F
-Landroid/view/VelocityTracker$Estimator;->yCoeff:[F
-Landroid/view/VelocityTracker;->obtain(Ljava/lang/String;)Landroid/view/VelocityTracker;
-Landroid/view/View$AccessibilityDelegate;->createAccessibilityNodeInfo(Landroid/view/View;)Landroid/view/accessibility/AccessibilityNodeInfo;
Landroid/view/View$AttachInfo$InvalidateInfo;-><init>()V
-Landroid/view/View$AttachInfo$InvalidateInfo;->bottom:I
-Landroid/view/View$AttachInfo$InvalidateInfo;->left:I
-Landroid/view/View$AttachInfo$InvalidateInfo;->right:I
-Landroid/view/View$AttachInfo$InvalidateInfo;->target:Landroid/view/View;
-Landroid/view/View$AttachInfo$InvalidateInfo;->top:I
-Landroid/view/View$AttachInfo;->mApplicationScale:F
-Landroid/view/View$AttachInfo;->mContentInsets:Landroid/graphics/Rect;
-Landroid/view/View$AttachInfo;->mDisplayState:I
-Landroid/view/View$AttachInfo;->mDrawingTime:J
-Landroid/view/View$AttachInfo;->mGivenInternalInsets:Landroid/view/ViewTreeObserver$InternalInsetsInfo;
-Landroid/view/View$AttachInfo;->mHandler:Landroid/os/Handler;
-Landroid/view/View$AttachInfo;->mHasWindowFocus:Z
-Landroid/view/View$AttachInfo;->mInTouchMode:Z
-Landroid/view/View$AttachInfo;->mKeepScreenOn:Z
-Landroid/view/View$AttachInfo;->mKeyDispatchState:Landroid/view/KeyEvent$DispatcherState;
-Landroid/view/View$AttachInfo;->mRecomputeGlobalAttributes:Z
-Landroid/view/View$AttachInfo;->mScalingRequired:Z
-Landroid/view/View$AttachInfo;->mScrollContainers:Ljava/util/ArrayList;
-Landroid/view/View$AttachInfo;->mSession:Landroid/view/IWindowSession;
-Landroid/view/View$AttachInfo;->mStableInsets:Landroid/graphics/Rect;
-Landroid/view/View$AttachInfo;->mTreeObserver:Landroid/view/ViewTreeObserver;
-Landroid/view/View$AttachInfo;->mViewScrollChanged:Z
-Landroid/view/View$AttachInfo;->mViewVisibilityChanged:Z
-Landroid/view/View$AttachInfo;->mVisibleInsets:Landroid/graphics/Rect;
-Landroid/view/View$AttachInfo;->mWindow:Landroid/view/IWindow;
-Landroid/view/View$DragShadowBuilder;->mView:Ljava/lang/ref/WeakReference;
Landroid/view/View$ListenerInfo;-><init>()V
-Landroid/view/View$ListenerInfo;->mOnClickListener:Landroid/view/View$OnClickListener;
-Landroid/view/View$ListenerInfo;->mOnCreateContextMenuListener:Landroid/view/View$OnCreateContextMenuListener;
-Landroid/view/View$ListenerInfo;->mOnDragListener:Landroid/view/View$OnDragListener;
-Landroid/view/View$ListenerInfo;->mOnFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
-Landroid/view/View$ListenerInfo;->mOnGenericMotionListener:Landroid/view/View$OnGenericMotionListener;
-Landroid/view/View$ListenerInfo;->mOnHoverListener:Landroid/view/View$OnHoverListener;
-Landroid/view/View$ListenerInfo;->mOnKeyListener:Landroid/view/View$OnKeyListener;
-Landroid/view/View$ListenerInfo;->mOnLongClickListener:Landroid/view/View$OnLongClickListener;
-Landroid/view/View$ListenerInfo;->mOnTouchListener:Landroid/view/View$OnTouchListener;
-Landroid/view/View$MeasureSpec;->makeSafeMeasureSpec(II)I
-Landroid/view/View$ScrollabilityCache;->host:Landroid/view/View;
-Landroid/view/View$ScrollabilityCache;->scrollBar:Landroid/widget/ScrollBarDrawable;
-Landroid/view/View$ScrollabilityCache;->state:I
-Landroid/view/View;-><init>()V
-Landroid/view/View;->applyDrawableToTransparentRegion(Landroid/graphics/drawable/Drawable;Landroid/graphics/Region;)V
-Landroid/view/View;->assignParent(Landroid/view/ViewParent;)V
-Landroid/view/View;->cancel(Landroid/view/View$SendViewScrolledAccessibilityEvent;)V
-Landroid/view/View;->clearAccessibilityFocus()V
-Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
-Landroid/view/View;->computeOpaqueFlags()V
-Landroid/view/View;->createSnapshot(Landroid/view/ViewDebug$CanvasProvider;Z)Landroid/graphics/Bitmap;
-Landroid/view/View;->DBG:Z
-Landroid/view/View;->debug()V
-Landroid/view/View;->debug(I)V
-Landroid/view/View;->DEBUG_LAYOUT_PROPERTY:Ljava/lang/String;
-Landroid/view/View;->destroyHardwareResources()V
-Landroid/view/View;->dispatchAttachedToWindow(Landroid/view/View$AttachInfo;I)V
-Landroid/view/View;->dispatchDetachedFromWindow()V
-Landroid/view/View;->dispatchPointerEvent(Landroid/view/MotionEvent;)Z
-Landroid/view/View;->drawBackground(Landroid/graphics/Canvas;)V
-Landroid/view/View;->ensureTransformationInfo()V
-Landroid/view/View;->findViewByAccessibilityId(I)Landroid/view/View;
-Landroid/view/View;->fitsSystemWindows()Z
-Landroid/view/View;->gatherTransparentRegion(Landroid/graphics/Region;)Z
-Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate;
-Landroid/view/View;->getAccessibilityViewId()I
-Landroid/view/View;->getBoundsOnScreen(Landroid/graphics/Rect;)V
-Landroid/view/View;->getBoundsOnScreen(Landroid/graphics/Rect;Z)V
-Landroid/view/View;->getHorizontalScrollFactor()F
-Landroid/view/View;->getInverseMatrix()Landroid/graphics/Matrix;
-Landroid/view/View;->getIterableTextForAccessibility()Ljava/lang/CharSequence;
-Landroid/view/View;->getIteratorForGranularity(I)Landroid/view/AccessibilityIterators$TextSegmentIterator;
-Landroid/view/View;->getListenerInfo()Landroid/view/View$ListenerInfo;
-Landroid/view/View;->getLocationInSurface([I)V
-Landroid/view/View;->getLocationOnScreen()[I
-Landroid/view/View;->getRawTextAlignment()I
-Landroid/view/View;->getRawTextDirection()I
-Landroid/view/View;->getScrollCache()Landroid/view/View$ScrollabilityCache;
-Landroid/view/View;->getThreadedRenderer()Landroid/view/ThreadedRenderer;
-Landroid/view/View;->getTransitionAlpha()F
-Landroid/view/View;->getVerticalScrollFactor()F
-Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl;
-Landroid/view/View;->getWindowDisplayFrame(Landroid/graphics/Rect;)V
-Landroid/view/View;->getWindowSession()Landroid/view/IWindowSession;
-Landroid/view/View;->hasIdentityMatrix()Z
-Landroid/view/View;->hasRtlSupport()Z
-Landroid/view/View;->includeForAccessibility()Z
-Landroid/view/View;->initializeScrollbarsInternal(Landroid/content/res/TypedArray;)V
-Landroid/view/View;->internalSetPadding(IIII)V
-Landroid/view/View;->invalidate(Z)V
-Landroid/view/View;->invalidateParentCaches()V
-Landroid/view/View;->invalidateParentIfNeeded()V
-Landroid/view/View;->invalidateViewProperty(ZZ)V
-Landroid/view/View;->isDraggingScrollBar()Z
-Landroid/view/View;->isInScrollingContainer()Z
-Landroid/view/View;->isLayoutRtl()Z
-Landroid/view/View;->isOnScrollbarThumb(FF)Z
-Landroid/view/View;->isPaddingResolved()Z
-Landroid/view/View;->isRootNamespace()Z
-Landroid/view/View;->isVisibleToUser()Z
-Landroid/view/View;->isVisibleToUser(Landroid/graphics/Rect;)Z
-Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate;
-Landroid/view/View;->mAccessibilityViewId:I
-Landroid/view/View;->makeOptionalFitsSystemWindows()V
-Landroid/view/View;->mAnimator:Landroid/view/ViewPropertyAnimator;
-Landroid/view/View;->mAttachInfo:Landroid/view/View$AttachInfo;
-Landroid/view/View;->mBackground:Landroid/graphics/drawable/Drawable;
-Landroid/view/View;->mBackgroundResource:I
-Landroid/view/View;->mBottom:I
-Landroid/view/View;->mCachingFailed:Z
-Landroid/view/View;->mContext:Landroid/content/Context;
-Landroid/view/View;->mDrawingCache:Landroid/graphics/Bitmap;
-Landroid/view/View;->mHasPerformedLongPress:Z
-Landroid/view/View;->mKeyedTags:Landroid/util/SparseArray;
-Landroid/view/View;->mLayoutParams:Landroid/view/ViewGroup$LayoutParams;
-Landroid/view/View;->mLeft:I
-Landroid/view/View;->mListenerInfo:Landroid/view/View$ListenerInfo;
-Landroid/view/View;->mMeasuredHeight:I
-Landroid/view/View;->mMeasuredWidth:I
-Landroid/view/View;->mMinHeight:I
-Landroid/view/View;->mMinWidth:I
-Landroid/view/View;->mPaddingBottom:I
-Landroid/view/View;->mPaddingLeft:I
-Landroid/view/View;->mPaddingRight:I
-Landroid/view/View;->mPaddingTop:I
-Landroid/view/View;->mParent:Landroid/view/ViewParent;
-Landroid/view/View;->mPendingCheckForTap:Landroid/view/View$CheckForTap;
-Landroid/view/View;->mPrivateFlags2:I
-Landroid/view/View;->mPrivateFlags3:I
-Landroid/view/View;->mPrivateFlags:I
-Landroid/view/View;->mRecreateDisplayList:Z
-Landroid/view/View;->mRenderNode:Landroid/view/RenderNode;
-Landroid/view/View;->mResources:Landroid/content/res/Resources;
-Landroid/view/View;->mRight:I
-Landroid/view/View;->mScrollCache:Landroid/view/View$ScrollabilityCache;
-Landroid/view/View;->mScrollX:I
-Landroid/view/View;->mScrollY:I
-Landroid/view/View;->mStartActivityRequestWho:Ljava/lang/String;
-Landroid/view/View;->mTag:Ljava/lang/Object;
-Landroid/view/View;->mTop:I
-Landroid/view/View;->mTransformationInfo:Landroid/view/View$TransformationInfo;
-Landroid/view/View;->mUnscaledDrawingCache:Landroid/graphics/Bitmap;
-Landroid/view/View;->mVerticalScrollbarPosition:I
-Landroid/view/View;->mViewFlags:I
-Landroid/view/View;->NAVIGATION_BAR_TRANSIENT:I
-Landroid/view/View;->notifySubtreeAccessibilityStateChangedIfNeeded()V
-Landroid/view/View;->notifyViewAccessibilityStateChangedIfNeeded(I)V
-Landroid/view/View;->onCloseSystemDialogs(Ljava/lang/String;)V
-Landroid/view/View;->onDetachedFromWindowInternal()V
-Landroid/view/View;->onDrawHorizontalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
-Landroid/view/View;->onDrawVerticalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
-Landroid/view/View;->onFocusLost()V
-Landroid/view/View;->onInitializeAccessibilityEventInternal(Landroid/view/accessibility/AccessibilityEvent;)V
-Landroid/view/View;->performAccessibilityActionInternal(ILandroid/os/Bundle;)Z
-Landroid/view/View;->pointInView(FFF)Z
-Landroid/view/View;->recomputePadding()V
-Landroid/view/View;->removePerformClickCallback()V
-Landroid/view/View;->requestAccessibilityFocus()Z
-Landroid/view/View;->resetDisplayList()V
-Landroid/view/View;->resetPaddingToInitialValues()V
-Landroid/view/View;->resetResolvedDrawables()V
-Landroid/view/View;->resetResolvedLayoutDirection()V
-Landroid/view/View;->resetResolvedPadding()V
-Landroid/view/View;->resetResolvedTextAlignment()V
-Landroid/view/View;->resetResolvedTextDirection()V
-Landroid/view/View;->resetRtlProperties()V
-Landroid/view/View;->resolvePadding()V
-Landroid/view/View;->setAlphaNoInvalidation(F)Z
-Landroid/view/View;->setAnimationMatrix(Landroid/graphics/Matrix;)V
-Landroid/view/View;->setAssistBlocked(Z)V
-Landroid/view/View;->setDisabledSystemUiVisibility(I)V
-Landroid/view/View;->setFlags(II)V
-Landroid/view/View;->setFrame(IIII)Z
-Landroid/view/View;->setIsRootNamespace(Z)V
-Landroid/view/View;->setLeftTopRightBottom(IIII)V
-Landroid/view/View;->setTagInternal(ILjava/lang/Object;)V
-Landroid/view/View;->setTransitionAlpha(F)V
-Landroid/view/View;->startActivityForResult(Landroid/content/Intent;I)V
-Landroid/view/View;->STATUS_BAR_DISABLE_BACK:I
-Landroid/view/View;->STATUS_BAR_DISABLE_EXPAND:I
-Landroid/view/View;->STATUS_BAR_DISABLE_HOME:I
-Landroid/view/View;->STATUS_BAR_DISABLE_RECENT:I
-Landroid/view/View;->toGlobalMotionEvent(Landroid/view/MotionEvent;)Z
-Landroid/view/View;->toLocalMotionEvent(Landroid/view/MotionEvent;)Z
-Landroid/view/View;->transformMatrixToGlobal(Landroid/graphics/Matrix;)V
-Landroid/view/View;->transformMatrixToLocal(Landroid/graphics/Matrix;)V
-Landroid/view/View;->updateDisplayListIfDirty()Landroid/view/RenderNode;
-Landroid/view/ViewConfiguration;->getDeviceGlobalActionKeyTimeout()J
-Landroid/view/ViewConfiguration;->getDoubleTapMinTime()I
-Landroid/view/ViewConfiguration;->getDoubleTapSlop()I
-Landroid/view/ViewConfiguration;->getHoverTapSlop()I
-Landroid/view/ViewConfiguration;->getScaledDoubleTapTouchSlop()I
-Landroid/view/ViewConfiguration;->isFadingMarqueeEnabled()Z
-Landroid/view/ViewConfiguration;->mFadingMarqueeEnabled:Z
-Landroid/view/ViewConfiguration;->sConfigurations:Landroid/util/SparseArray;
-Landroid/view/ViewConfiguration;->SCROLL_FRICTION:F
-Landroid/view/ViewConfiguration;->sHasPermanentMenuKey:Z
-Landroid/view/ViewConfiguration;->sHasPermanentMenuKeySet:Z
-Landroid/view/ViewDebug;->dispatchCommand(Landroid/view/View;Ljava/lang/String;Ljava/lang/String;Ljava/io/OutputStream;)V
-Landroid/view/ViewDebug;->dump(Landroid/view/View;ZZLjava/io/OutputStream;)V
-Landroid/view/ViewDebug;->getViewInstanceCount()J
-Landroid/view/ViewDebug;->getViewRootImplCount()J
-Landroid/view/ViewGroup$LayoutParams;-><init>()V
-Landroid/view/ViewGroup$MarginLayoutParams;->endMargin:I
-Landroid/view/ViewGroup$MarginLayoutParams;->setMarginsRelative(IIII)V
-Landroid/view/ViewGroup$MarginLayoutParams;->startMargin:I
-Landroid/view/ViewGroup$TouchTarget;-><init>()V
-Landroid/view/ViewGroup$TouchTarget;->child:Landroid/view/View;
-Landroid/view/ViewGroup;->addTransientView(Landroid/view/View;I)V
-Landroid/view/ViewGroup;->cancelTouchTarget(Landroid/view/View;)V
-Landroid/view/ViewGroup;->DBG:Z
-Landroid/view/ViewGroup;->dispatchAttachedToWindow(Landroid/view/View$AttachInfo;I)V
-Landroid/view/ViewGroup;->dispatchDetachedFromWindow()V
-Landroid/view/ViewGroup;->dispatchGetDisplayList()V
-Landroid/view/ViewGroup;->dispatchViewAdded(Landroid/view/View;)V
-Landroid/view/ViewGroup;->dispatchViewRemoved(Landroid/view/View;)V
-Landroid/view/ViewGroup;->encodeProperties(Landroid/view/ViewHierarchyEncoder;)V
-Landroid/view/ViewGroup;->FLAG_DISALLOW_INTERCEPT:I
-Landroid/view/ViewGroup;->FLAG_SUPPORT_STATIC_TRANSFORMATIONS:I
-Landroid/view/ViewGroup;->FLAG_USE_CHILD_DRAWING_ORDER:I
-Landroid/view/ViewGroup;->getTransientView(I)Landroid/view/View;
-Landroid/view/ViewGroup;->getTransientViewCount()I
-Landroid/view/ViewGroup;->isTransformedTouchPointInView(FFLandroid/view/View;Landroid/graphics/PointF;)Z
-Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
-Landroid/view/ViewGroup;->mChildren:[Landroid/view/View;
-Landroid/view/ViewGroup;->mChildrenCount:I
-Landroid/view/ViewGroup;->mDisappearingChildren:Ljava/util/ArrayList;
-Landroid/view/ViewGroup;->mFirstTouchTarget:Landroid/view/ViewGroup$TouchTarget;
-Landroid/view/ViewGroup;->mFocused:Landroid/view/View;
-Landroid/view/ViewGroup;->mGroupFlags:I
-Landroid/view/ViewGroup;->mOnHierarchyChangeListener:Landroid/view/ViewGroup$OnHierarchyChangeListener;
-Landroid/view/ViewGroup;->mPersistentDrawingCache:I
-Landroid/view/ViewGroup;->offsetChildrenTopAndBottom(I)V
-Landroid/view/ViewGroup;->onChildVisibilityChanged(Landroid/view/View;II)V
-Landroid/view/ViewGroup;->onInitializeAccessibilityNodeInfoInternal(Landroid/view/accessibility/AccessibilityNodeInfo;)V
-Landroid/view/ViewGroup;->removeTransientView(Landroid/view/View;)V
-Landroid/view/ViewGroup;->resetResolvedDrawables()V
-Landroid/view/ViewGroup;->resetResolvedLayoutDirection()V
-Landroid/view/ViewGroup;->resetResolvedPadding()V
-Landroid/view/ViewGroup;->resetResolvedTextAlignment()V
-Landroid/view/ViewGroup;->resetResolvedTextDirection()V
-Landroid/view/ViewGroup;->resolvePadding()V
-Landroid/view/ViewGroup;->suppressLayout(Z)V
-Landroid/view/ViewGroup;->transformPointToViewLocal([FLandroid/view/View;)V
-Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;F)V
-Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;I)V
-Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/view/ViewHierarchyEncoder;->addProperty(Ljava/lang/String;Z)V
-Landroid/view/ViewOverlay;->getOverlayView()Landroid/view/ViewGroup;
-Landroid/view/ViewOverlay;->isEmpty()Z
-Landroid/view/ViewRootImpl$CalledFromWrongThreadException;-><init>(Ljava/lang/String;)V
-Landroid/view/ViewRootImpl;->addConfigCallback(Landroid/view/ViewRootImpl$ConfigChangedCallback;)V
-Landroid/view/ViewRootImpl;->cancelInvalidate(Landroid/view/View;)V
-Landroid/view/ViewRootImpl;->detachFunctor(J)V
-Landroid/view/ViewRootImpl;->dispatchInputEvent(Landroid/view/InputEvent;)V
-Landroid/view/ViewRootImpl;->dispatchInputEvent(Landroid/view/InputEvent;Landroid/view/InputEventReceiver;)V
-Landroid/view/ViewRootImpl;->dispatchKeyFromIme(Landroid/view/KeyEvent;)V
-Landroid/view/ViewRootImpl;->dispatchResized(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;ZLandroid/util/MergedConfiguration;Landroid/graphics/Rect;ZZILandroid/view/DisplayCutout$ParcelableWrapper;)V
-Landroid/view/ViewRootImpl;->dispatchUnhandledInputEvent(Landroid/view/InputEvent;)V
-Landroid/view/ViewRootImpl;->enableHardwareAcceleration(Landroid/view/WindowManager$LayoutParams;)V
-Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;)V
-Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;Landroid/view/InputEventReceiver;IZ)V
-Landroid/view/ViewRootImpl;->ensureTouchMode(Z)Z
-Landroid/view/ViewRootImpl;->getAccessibilityFocusedHost()Landroid/view/View;
-Landroid/view/ViewRootImpl;->getAccessibilityFocusedVirtualView()Landroid/view/accessibility/AccessibilityNodeInfo;
-Landroid/view/ViewRootImpl;->getLastTouchPoint(Landroid/graphics/Point;)V
-Landroid/view/ViewRootImpl;->getView()Landroid/view/View;
-Landroid/view/ViewRootImpl;->getWindowFlags()I
-Landroid/view/ViewRootImpl;->invalidate()V
-Landroid/view/ViewRootImpl;->invokeFunctor(JZ)V
-Landroid/view/ViewRootImpl;->mAdded:Z
-Landroid/view/ViewRootImpl;->mAttachInfo:Landroid/view/View$AttachInfo;
-Landroid/view/ViewRootImpl;->mContext:Landroid/content/Context;
-Landroid/view/ViewRootImpl;->mDirty:Landroid/graphics/Rect;
-Landroid/view/ViewRootImpl;->mFallbackEventHandler:Landroid/view/FallbackEventHandler;
-Landroid/view/ViewRootImpl;->mHeight:I
-Landroid/view/ViewRootImpl;->mLastScrolledFocus:Ljava/lang/ref/WeakReference;
-Landroid/view/ViewRootImpl;->mStopped:Z
-Landroid/view/ViewRootImpl;->mSurface:Landroid/view/Surface;
-Landroid/view/ViewRootImpl;->mView:Landroid/view/View;
-Landroid/view/ViewRootImpl;->mWidth:I
-Landroid/view/ViewRootImpl;->mWindowSession:Landroid/view/IWindowSession;
-Landroid/view/ViewRootImpl;->scheduleTraversals()V
-Landroid/view/ViewRootImpl;->setLocalDragState(Ljava/lang/Object;)V
-Landroid/view/ViewRootImpl;->sRunQueues:Ljava/lang/ThreadLocal;
Landroid/view/ViewTreeObserver$InternalInsetsInfo;-><init>()V
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->contentInsets:Landroid/graphics/Rect;
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->mTouchableInsets:I
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->set(Landroid/view/ViewTreeObserver$InternalInsetsInfo;)V
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->setTouchableInsets(I)V
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->touchableRegion:Landroid/graphics/Region;
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->TOUCHABLE_INSETS_REGION:I
-Landroid/view/ViewTreeObserver$InternalInsetsInfo;->visibleInsets:Landroid/graphics/Rect;
-Landroid/view/ViewTreeObserver;->addOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
-Landroid/view/ViewTreeObserver;->dispatchOnComputeInternalInsets(Landroid/view/ViewTreeObserver$InternalInsetsInfo;)V
-Landroid/view/ViewTreeObserver;->dispatchOnGlobalFocusChange(Landroid/view/View;Landroid/view/View;)V
-Landroid/view/ViewTreeObserver;->dispatchOnScrollChanged()V
-Landroid/view/ViewTreeObserver;->dispatchOnTouchModeChanged(Z)V
-Landroid/view/ViewTreeObserver;->hasComputeInternalInsetsListeners()Z
-Landroid/view/ViewTreeObserver;->mOnComputeInternalInsetsListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
-Landroid/view/ViewTreeObserver;->mOnGlobalLayoutListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
-Landroid/view/ViewTreeObserver;->mOnScrollChangedListeners:Landroid/view/ViewTreeObserver$CopyOnWriteArray;
-Landroid/view/ViewTreeObserver;->mOnTouchModeChangeListeners:Ljava/util/concurrent/CopyOnWriteArrayList;
-Landroid/view/ViewTreeObserver;->removeOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
-Landroid/view/Window;->addPrivateFlags(I)V
-Landroid/view/Window;->alwaysReadCloseOnTouchAttr()V
-Landroid/view/Window;->FEATURE_MAX:I
-Landroid/view/Window;->isDestroyed()Z
-Landroid/view/Window;->mAppName:Ljava/lang/String;
-Landroid/view/Window;->mAppToken:Landroid/os/IBinder;
-Landroid/view/Window;->mCallback:Landroid/view/Window$Callback;
-Landroid/view/Window;->mContext:Landroid/content/Context;
-Landroid/view/Window;->mDestroyed:Z
-Landroid/view/Window;->mFeatures:I
-Landroid/view/Window;->mHardwareAccelerated:Z
-Landroid/view/Window;->mLocalFeatures:I
-Landroid/view/Window;->mWindowAttributes:Landroid/view/WindowManager$LayoutParams;
-Landroid/view/Window;->mWindowManager:Landroid/view/WindowManager;
-Landroid/view/Window;->mWindowStyle:Landroid/content/res/TypedArray;
-Landroid/view/Window;->setCloseOnTouchOutside(Z)V
-Landroid/view/Window;->setCloseOnTouchOutsideIfNotSet(Z)V
-Landroid/view/Window;->setNeedsMenuKey(I)V
-Landroid/view/Window;->shouldCloseOnTouch(Landroid/content/Context;Landroid/view/MotionEvent;)Z
-Landroid/view/WindowAnimationFrameStats;->init(J[J)V
-Landroid/view/WindowContentFrameStats;->init(J[J[J[J)V
-Landroid/view/WindowInsets;-><init>(Landroid/graphics/Rect;)V
-Landroid/view/WindowInsets;->CONSUMED:Landroid/view/WindowInsets;
-Landroid/view/WindowInsets;->getSystemWindowInsets()Landroid/graphics/Rect;
-Landroid/view/WindowInsets;->inset(IIII)Landroid/view/WindowInsets;
-Landroid/view/WindowLeaked;-><init>(Ljava/lang/String;)V
-Landroid/view/WindowManager$LayoutParams;->backup()V
-Landroid/view/WindowManager$LayoutParams;->FLAG_SLIPPERY:I
-Landroid/view/WindowManager$LayoutParams;->hasSystemUiListeners:Z
-Landroid/view/WindowManager$LayoutParams;->hideTimeoutMilliseconds:J
-Landroid/view/WindowManager$LayoutParams;->inputFeatures:I
-Landroid/view/WindowManager$LayoutParams;->INPUT_FEATURE_DISABLE_USER_ACTIVITY:I
-Landroid/view/WindowManager$LayoutParams;->needsMenuKey:I
-Landroid/view/WindowManager$LayoutParams;->NEEDS_MENU_SET_FALSE:I
-Landroid/view/WindowManager$LayoutParams;->NEEDS_MENU_SET_TRUE:I
-Landroid/view/WindowManager$LayoutParams;->PRIVATE_FLAG_SHOW_FOR_ALL_USERS:I
-Landroid/view/WindowManager$LayoutParams;->restore()V
-Landroid/view/WindowManager$LayoutParams;->subtreeSystemUiVisibility:I
-Landroid/view/WindowManager$LayoutParams;->TYPE_APPLICATION_MEDIA_OVERLAY:I
-Landroid/view/WindowManager$LayoutParams;->TYPE_DISPLAY_OVERLAY:I
-Landroid/view/WindowManager$LayoutParams;->TYPE_SECURE_SYSTEM_OVERLAY:I
-Landroid/view/WindowManager$LayoutParams;->userActivityTimeout:J
-Landroid/view/WindowManagerGlobal;->getInstance()Landroid/view/WindowManagerGlobal;
-Landroid/view/WindowManagerGlobal;->getRootView(Ljava/lang/String;)Landroid/view/View;
-Landroid/view/WindowManagerGlobal;->getRootViews(Landroid/os/IBinder;)Ljava/util/ArrayList;
-Landroid/view/WindowManagerGlobal;->getViewRootNames()[Ljava/lang/String;
-Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
-Landroid/view/WindowManagerGlobal;->getWindowSession()Landroid/view/IWindowSession;
-Landroid/view/WindowManagerGlobal;->initialize()V
-Landroid/view/WindowManagerGlobal;->mLock:Ljava/lang/Object;
-Landroid/view/WindowManagerGlobal;->mParams:Ljava/util/ArrayList;
-Landroid/view/WindowManagerGlobal;->mRoots:Ljava/util/ArrayList;
-Landroid/view/WindowManagerGlobal;->mViews:Ljava/util/ArrayList;
-Landroid/view/WindowManagerGlobal;->peekWindowSession()Landroid/view/IWindowSession;
-Landroid/view/WindowManagerGlobal;->removeView(Landroid/view/View;Z)V
-Landroid/view/WindowManagerGlobal;->sDefaultWindowManager:Landroid/view/WindowManagerGlobal;
-Landroid/view/WindowManagerGlobal;->sWindowManagerService:Landroid/view/IWindowManager;
-Landroid/view/WindowManagerGlobal;->sWindowSession:Landroid/view/IWindowSession;
-Landroid/view/WindowManagerGlobal;->trimMemory(I)V
-Landroid/view/WindowManagerImpl;->mGlobal:Landroid/view/WindowManagerGlobal;
Landroid/webkit/CacheManager$CacheResult;-><init>()V
-Landroid/webkit/CacheManager$CacheResult;->contentdisposition:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->contentLength:J
-Landroid/webkit/CacheManager$CacheResult;->crossDomain:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->encoding:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->etag:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->expires:J
-Landroid/webkit/CacheManager$CacheResult;->expiresString:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getContentDisposition()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getContentLength()J
-Landroid/webkit/CacheManager$CacheResult;->getEncoding()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getETag()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getExpires()J
-Landroid/webkit/CacheManager$CacheResult;->getExpiresString()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getHttpStatusCode()I
-Landroid/webkit/CacheManager$CacheResult;->getInputStream()Ljava/io/InputStream;
-Landroid/webkit/CacheManager$CacheResult;->getLastModified()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getLocalPath()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getLocation()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getMimeType()Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->getOutputStream()Ljava/io/OutputStream;
-Landroid/webkit/CacheManager$CacheResult;->httpStatusCode:I
-Landroid/webkit/CacheManager$CacheResult;->inStream:Ljava/io/InputStream;
-Landroid/webkit/CacheManager$CacheResult;->lastModified:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->localPath:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->location:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->mimeType:Ljava/lang/String;
-Landroid/webkit/CacheManager$CacheResult;->outFile:Ljava/io/File;
-Landroid/webkit/CacheManager$CacheResult;->outStream:Ljava/io/OutputStream;
-Landroid/webkit/CacheManager$CacheResult;->setEncoding(Ljava/lang/String;)V
-Landroid/webkit/CacheManager$CacheResult;->setInputStream(Ljava/io/InputStream;)V
-Landroid/webkit/CacheManager;->cacheDisabled()Z
-Landroid/webkit/CacheManager;->endCacheTransaction()Z
-Landroid/webkit/CacheManager;->getCacheFile(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/CacheManager$CacheResult;
-Landroid/webkit/CacheManager;->getCacheFileBaseDir()Ljava/io/File;
-Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;JLandroid/webkit/CacheManager$CacheResult;)V
-Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;Landroid/webkit/CacheManager$CacheResult;)V
-Landroid/webkit/CacheManager;->startCacheTransaction()Z
-Landroid/webkit/ConsoleMessage;->mLevel:Landroid/webkit/ConsoleMessage$MessageLevel;
-Landroid/webkit/ConsoleMessage;->mLineNumber:I
-Landroid/webkit/ConsoleMessage;->mMessage:Ljava/lang/String;
-Landroid/webkit/ConsoleMessage;->mSourceId:Ljava/lang/String;
Landroid/webkit/IWebViewUpdateService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/webkit/IWebViewUpdateService$Stub$Proxy;->waitForAndGetProvider()Landroid/webkit/WebViewProviderResponse;
Landroid/webkit/IWebViewUpdateService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/webkit/IWebViewUpdateService;
Landroid/webkit/IWebViewUpdateService;->getCurrentWebViewPackageName()Ljava/lang/String;
Landroid/webkit/IWebViewUpdateService;->getValidWebViewPackages()[Landroid/webkit/WebViewProviderInfo;
Landroid/webkit/IWebViewUpdateService;->isFallbackPackage(Ljava/lang/String;)Z
-Landroid/webkit/JsResult;->mReceiver:Landroid/webkit/JsResult$ResultReceiver;
-Landroid/webkit/PluginData;-><init>(Ljava/io/InputStream;JLjava/util/Map;I)V
-Landroid/webkit/PluginData;->getContentLength()J
-Landroid/webkit/PluginData;->getHeaders()Ljava/util/Map;
-Landroid/webkit/PluginData;->getInputStream()Ljava/io/InputStream;
-Landroid/webkit/PluginData;->getStatusCode()I
-Landroid/webkit/UrlInterceptHandler;->getPluginData(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/PluginData;
-Landroid/webkit/UrlInterceptHandler;->service(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/CacheManager$CacheResult;
-Landroid/webkit/UrlInterceptRegistry;->getPluginData(Ljava/lang/String;Ljava/util/Map;)Landroid/webkit/PluginData;
-Landroid/webkit/UrlInterceptRegistry;->registerHandler(Landroid/webkit/UrlInterceptHandler;)Z
-Landroid/webkit/UrlInterceptRegistry;->setUrlInterceptDisabled(Z)V
-Landroid/webkit/UrlInterceptRegistry;->unregisterHandler(Landroid/webkit/UrlInterceptHandler;)Z
-Landroid/webkit/URLUtil;->isResourceUrl(Ljava/lang/String;)Z
-Landroid/webkit/URLUtil;->parseContentDisposition(Ljava/lang/String;)Ljava/lang/String;
-Landroid/webkit/URLUtil;->verifyURLEncoding(Ljava/lang/String;)Z
-Landroid/webkit/WebResourceResponse;->mImmutable:Z
-Landroid/webkit/WebResourceResponse;->mStatusCode:I
-Landroid/webkit/WebSettings$TextSize;->value:I
-Landroid/webkit/WebSyncManager;->syncFromRamToFlash()V
-Landroid/webkit/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILjava/util/Map;Z)V
-Landroid/webkit/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;ILjava/util/Map;Z)V
-Landroid/webkit/WebView;->checkThread()V
-Landroid/webkit/WebView;->debugDump()V
-Landroid/webkit/WebView;->disablePlatformNotifications()V
-Landroid/webkit/WebView;->emulateShiftHeld()V
-Landroid/webkit/WebView;->enablePlatformNotifications()V
-Landroid/webkit/WebView;->freeMemoryForTests()V
-Landroid/webkit/WebView;->getContentWidth()I
-Landroid/webkit/WebView;->getFactory()Landroid/webkit/WebViewFactoryProvider;
-Landroid/webkit/WebView;->getTouchIconUrl()Ljava/lang/String;
-Landroid/webkit/WebView;->getVisibleTitleHeight()I
-Landroid/webkit/WebView;->isPaused()Z
-Landroid/webkit/WebView;->mProvider:Landroid/webkit/WebViewProvider;
-Landroid/webkit/WebView;->mWebViewThread:Landroid/os/Looper;
-Landroid/webkit/WebView;->notifyFindDialogDismissed()V
-Landroid/webkit/WebView;->onDrawVerticalScrollBar(Landroid/graphics/Canvas;Landroid/graphics/drawable/Drawable;IIII)V
-Landroid/webkit/WebView;->restorePicture(Landroid/os/Bundle;Ljava/io/File;)Z
-Landroid/webkit/WebView;->savePicture(Landroid/os/Bundle;Ljava/io/File;)Z
-Landroid/webkit/WebView;->sEnforceThreadChecking:Z
-Landroid/webkit/WebView;->setFrame(IIII)Z
-Landroid/webkit/WebViewDelegate;-><init>()V
-Landroid/webkit/WebViewFactory;->getProvider()Landroid/webkit/WebViewFactoryProvider;
-Landroid/webkit/WebViewFactory;->getProviderClass()Ljava/lang/Class;
-Landroid/webkit/WebViewFactory;->getUpdateService()Landroid/webkit/IWebViewUpdateService;
-Landroid/webkit/WebViewFactory;->getWebViewContextAndSetProvider()Landroid/content/Context;
-Landroid/webkit/WebViewFactory;->sPackageInfo:Landroid/content/pm/PackageInfo;
-Landroid/webkit/WebViewFactory;->sProviderInstance:Landroid/webkit/WebViewFactoryProvider;
-Landroid/webkit/WebViewProviderInfo;-><init>(Landroid/os/Parcel;)V
-Landroid/webkit/WebViewProviderResponse;->packageInfo:Landroid/content/pm/PackageInfo;
-Landroid/webkit/WebViewUpdateService;-><init>()V
-Landroid/widget/AbsListView$FlingRunnable;->endFling()V
-Landroid/widget/AbsListView$FlingRunnable;->mScroller:Landroid/widget/OverScroller;
-Landroid/widget/AbsListView$FlingRunnable;->start(I)V
-Landroid/widget/AbsListView$LayoutParams;->scrappedFromPosition:I
-Landroid/widget/AbsListView$LayoutParams;->viewType:I
-Landroid/widget/AbsListView$RecycleBin;->clear()V
-Landroid/widget/AbsListView$RecycleBin;->mRecyclerListener:Landroid/widget/AbsListView$RecyclerListener;
-Landroid/widget/AbsListView$SavedState;->firstId:J
-Landroid/widget/AbsListView$SavedState;->viewTop:I
-Landroid/widget/AbsListView;->canScrollDown()Z
-Landroid/widget/AbsListView;->canScrollUp()Z
-Landroid/widget/AbsListView;->findMotionRow(I)I
-Landroid/widget/AbsListView;->invokeOnItemScrollListener()V
-Landroid/widget/AbsListView;->isVerticalScrollBarHidden()Z
-Landroid/widget/AbsListView;->mActivePointerId:I
-Landroid/widget/AbsListView;->mAdapter:Landroid/widget/ListAdapter;
-Landroid/widget/AbsListView;->mChoiceActionMode:Landroid/view/ActionMode;
-Landroid/widget/AbsListView;->mContextMenuInfo:Landroid/view/ContextMenu$ContextMenuInfo;
-Landroid/widget/AbsListView;->mDataSetObserver:Landroid/widget/AbsListView$AdapterDataSetObserver;
-Landroid/widget/AbsListView;->mEdgeGlowBottom:Landroid/widget/EdgeEffect;
-Landroid/widget/AbsListView;->mEdgeGlowTop:Landroid/widget/EdgeEffect;
-Landroid/widget/AbsListView;->mFastScroll:Landroid/widget/FastScroller;
-Landroid/widget/AbsListView;->mFlingRunnable:Landroid/widget/AbsListView$FlingRunnable;
-Landroid/widget/AbsListView;->mIsChildViewEnabled:Z
-Landroid/widget/AbsListView;->mLayoutMode:I
-Landroid/widget/AbsListView;->mMaximumVelocity:I
-Landroid/widget/AbsListView;->mMotionPosition:I
-Landroid/widget/AbsListView;->mMotionY:I
-Landroid/widget/AbsListView;->mOnScrollListener:Landroid/widget/AbsListView$OnScrollListener;
-Landroid/widget/AbsListView;->mOverflingDistance:I
-Landroid/widget/AbsListView;->mOverscrollDistance:I
-Landroid/widget/AbsListView;->mPendingCheckForLongPress:Landroid/widget/AbsListView$CheckForLongPress;
-Landroid/widget/AbsListView;->mPendingCheckForTap:Landroid/widget/AbsListView$CheckForTap;
-Landroid/widget/AbsListView;->mPopup:Landroid/widget/PopupWindow;
-Landroid/widget/AbsListView;->mPositionScroller:Landroid/widget/AbsListView$AbsPositionScroller;
-Landroid/widget/AbsListView;->mRecycler:Landroid/widget/AbsListView$RecycleBin;
-Landroid/widget/AbsListView;->mSelectionBottomPadding:I
-Landroid/widget/AbsListView;->mSelectionTopPadding:I
-Landroid/widget/AbsListView;->mSelector:Landroid/graphics/drawable/Drawable;
-Landroid/widget/AbsListView;->mSelectorPosition:I
-Landroid/widget/AbsListView;->mSelectorRect:Landroid/graphics/Rect;
-Landroid/widget/AbsListView;->mTouchMode:I
-Landroid/widget/AbsListView;->mTouchSlop:I
-Landroid/widget/AbsListView;->mVelocityTracker:Landroid/view/VelocityTracker;
-Landroid/widget/AbsListView;->performLongPress(Landroid/view/View;IJ)Z
-Landroid/widget/AbsListView;->performLongPress(Landroid/view/View;IJFF)Z
-Landroid/widget/AbsListView;->positionSelector(ILandroid/view/View;ZFF)V
-Landroid/widget/AbsListView;->reportScrollStateChange(I)V
-Landroid/widget/AbsListView;->resurrectSelectionIfNeeded()Z
-Landroid/widget/AbsListView;->smoothScrollBy(IIZZ)V
-Landroid/widget/AbsListView;->trackMotionScroll(II)Z
-Landroid/widget/AbsListView;->updateSelectorState()V
-Landroid/widget/AbsSeekBar;->drawThumb(Landroid/graphics/Canvas;)V
-Landroid/widget/AbsSeekBar;->mDisabledAlpha:F
-Landroid/widget/AbsSeekBar;->mIsDragging:Z
-Landroid/widget/AbsSeekBar;->mIsUserSeekable:Z
-Landroid/widget/AbsSeekBar;->mSplitTrack:Z
-Landroid/widget/AbsSeekBar;->mThumb:Landroid/graphics/drawable/Drawable;
-Landroid/widget/AbsSeekBar;->mTouchProgressOffset:F
-Landroid/widget/AbsSeekBar;->trackTouchEvent(Landroid/view/MotionEvent;)V
-Landroid/widget/ActionMenuPresenter;->dismissPopupMenus()Z
-Landroid/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
-Landroid/widget/ActionMenuPresenter;->onRestoreInstanceState(Landroid/os/Parcelable;)V
-Landroid/widget/ActionMenuPresenter;->onSaveInstanceState()Landroid/os/Parcelable;
-Landroid/widget/ActionMenuView$ActionMenuChildView;->needsDividerBefore()Z
-Landroid/widget/ActionMenuView$LayoutParams;->cellsUsed:I
-Landroid/widget/ActionMenuView$LayoutParams;->expandable:Z
-Landroid/widget/ActionMenuView$LayoutParams;->expanded:Z
-Landroid/widget/ActionMenuView$LayoutParams;->extraPixels:I
-Landroid/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
-Landroid/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
-Landroid/widget/ActionMenuView;->hasDividerBeforeChildAt(I)Z
-Landroid/widget/ActionMenuView;->isOverflowMenuShowPending()Z
-Landroid/widget/ActionMenuView;->isOverflowReserved()Z
-Landroid/widget/ActionMenuView;->peekMenu()Lcom/android/internal/view/menu/MenuBuilder;
-Landroid/widget/ActionMenuView;->setExpandedActionViewsExclusive(Z)V
-Landroid/widget/ActionMenuView;->setMenuCallbacks(Lcom/android/internal/view/menu/MenuPresenter$Callback;Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
-Landroid/widget/ActivityChooserModel;->chooseActivity(I)Landroid/content/Intent;
-Landroid/widget/ActivityChooserModel;->get(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/ActivityChooserModel;
-Landroid/widget/ActivityChooserModel;->getActivity(I)Landroid/content/pm/ResolveInfo;
-Landroid/widget/ActivityChooserModel;->getActivityCount()I
-Landroid/widget/ActivityChooserModel;->setIntent(Landroid/content/Intent;)V
-Landroid/widget/ActivityChooserModel;->setOnChooseActivityListener(Landroid/widget/ActivityChooserModel$OnChooseActivityListener;)V
-Landroid/widget/ActivityChooserView;->setExpandActivityOverflowButtonDrawable(Landroid/graphics/drawable/Drawable;)V
-Landroid/widget/AdapterView;->mDataChanged:Z
-Landroid/widget/AdapterView;->mFirstPosition:I
-Landroid/widget/AdapterView;->mNeedSync:Z
-Landroid/widget/AdapterView;->mNextSelectedPosition:I
-Landroid/widget/AdapterView;->mNextSelectedRowId:J
-Landroid/widget/AdapterView;->mOldSelectedPosition:I
-Landroid/widget/AdapterView;->mOnItemClickListener:Landroid/widget/AdapterView$OnItemClickListener;
-Landroid/widget/AdapterView;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
-Landroid/widget/AdapterView;->mSelectedPosition:I
-Landroid/widget/AdapterView;->mSyncPosition:I
-Landroid/widget/AdapterView;->selectionChanged()V
-Landroid/widget/AdapterView;->setNextSelectedPositionInt(I)V
-Landroid/widget/AdapterView;->setSelectedPositionInt(I)V
-Landroid/widget/AnalogClock;->mDial:Landroid/graphics/drawable/Drawable;
-Landroid/widget/AnalogClock;->mHourHand:Landroid/graphics/drawable/Drawable;
-Landroid/widget/AnalogClock;->mMinuteHand:Landroid/graphics/drawable/Drawable;
-Landroid/widget/AppSecurityPermissions;-><init>(Landroid/content/Context;Ljava/lang/String;)V
-Landroid/widget/AppSecurityPermissions;->getPermissionCount()I
-Landroid/widget/AppSecurityPermissions;->getPermissionsView()Landroid/view/View;
-Landroid/widget/ArrayAdapter;->mLock:Ljava/lang/Object;
-Landroid/widget/ArrayAdapter;->mObjects:Ljava/util/List;
-Landroid/widget/ArrayAdapter;->mOriginalValues:Ljava/util/ArrayList;
-Landroid/widget/AutoCompleteTextView;->doAfterTextChanged()V
-Landroid/widget/AutoCompleteTextView;->doBeforeTextChanged()V
-Landroid/widget/AutoCompleteTextView;->ensureImeVisible(Z)V
-Landroid/widget/AutoCompleteTextView;->isInputMethodNotNeeded()Z
-Landroid/widget/AutoCompleteTextView;->mHintView:Landroid/widget/TextView;
-Landroid/widget/AutoCompleteTextView;->mObserver:Landroid/widget/AutoCompleteTextView$PopupDataSetObserver;
-Landroid/widget/AutoCompleteTextView;->mPassThroughClickListener:Landroid/widget/AutoCompleteTextView$PassThroughClickListener;
-Landroid/widget/AutoCompleteTextView;->mPopup:Landroid/widget/ListPopupWindow;
-Landroid/widget/AutoCompleteTextView;->setDropDownAlwaysVisible(Z)V
-Landroid/widget/AutoCompleteTextView;->setDropDownAnimationStyle(I)V
-Landroid/widget/AutoCompleteTextView;->setDropDownDismissedOnCompletion(Z)V
-Landroid/widget/AutoCompleteTextView;->setForceIgnoreOutsideTouch(Z)V
-Landroid/widget/AutoCompleteTextView;->showDropDownAfterLayout()V
-Landroid/widget/BaseAdapter;->mDataSetObservable:Landroid/database/DataSetObservable;
-Landroid/widget/CalendarView;->mDelegate:Landroid/widget/CalendarView$CalendarViewDelegate;
-Landroid/widget/CheckedTextView;->mCheckMarkDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/CheckedTextView;->mCheckMarkGravity:I
-Landroid/widget/CompoundButton;->mBroadcasting:Z
-Landroid/widget/CompoundButton;->mButtonDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/CompoundButton;->mOnCheckedChangeListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;
-Landroid/widget/CursorAdapter;->mChangeObserver:Landroid/widget/CursorAdapter$ChangeObserver;
-Landroid/widget/CursorAdapter;->mContext:Landroid/content/Context;
-Landroid/widget/CursorAdapter;->mCursor:Landroid/database/Cursor;
-Landroid/widget/CursorAdapter;->mDataSetObserver:Landroid/database/DataSetObserver;
-Landroid/widget/CursorAdapter;->mDataValid:Z
-Landroid/widget/CursorAdapter;->mRowIDColumn:I
-Landroid/widget/DatePicker;->mDelegate:Landroid/widget/DatePicker$DatePickerDelegate;
-Landroid/widget/DatePicker;->setValidationCallback(Landroid/widget/DatePicker$ValidationCallback;)V
-Landroid/widget/DateTimeView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/widget/DateTimeView;->setTime(J)V
-Landroid/widget/DateTimeView;->update()V
-Landroid/widget/EdgeEffect;->mGlowScaleY:F
-Landroid/widget/EdgeEffect;->mPaint:Landroid/graphics/Paint;
-Landroid/widget/Editor$InputContentType;->privateImeOptions:Ljava/lang/String;
-Landroid/widget/Editor;->invalidateTextDisplayList()V
-Landroid/widget/Editor;->mCreatedWithASelection:Z
-Landroid/widget/Editor;->mInsertionControllerEnabled:Z
-Landroid/widget/Editor;->mSelectHandleCenter:Landroid/graphics/drawable/Drawable;
-Landroid/widget/Editor;->mSelectHandleLeft:Landroid/graphics/drawable/Drawable;
-Landroid/widget/Editor;->mSelectHandleRight:Landroid/graphics/drawable/Drawable;
-Landroid/widget/Editor;->mSelectionControllerEnabled:Z
-Landroid/widget/Editor;->mShowCursor:J
-Landroid/widget/Editor;->mShowSoftInputOnFocus:Z
-Landroid/widget/ExpandableListView;->GROUP_STATE_SETS:[[I
-Landroid/widget/ExpandableListView;->mChildDivider:Landroid/graphics/drawable/Drawable;
-Landroid/widget/ExpandableListView;->mConnector:Landroid/widget/ExpandableListConnector;
-Landroid/widget/ExpandableListView;->mGroupIndicator:Landroid/graphics/drawable/Drawable;
-Landroid/widget/ExpandableListView;->mIndicatorLeft:I
-Landroid/widget/ExpandableListView;->mIndicatorRight:I
-Landroid/widget/ExpandableListView;->mOnChildClickListener:Landroid/widget/ExpandableListView$OnChildClickListener;
-Landroid/widget/ExpandableListView;->mOnGroupClickListener:Landroid/widget/ExpandableListView$OnGroupClickListener;
-Landroid/widget/ExpandableListView;->mOnGroupCollapseListener:Landroid/widget/ExpandableListView$OnGroupCollapseListener;
-Landroid/widget/ExpandableListView;->mOnGroupExpandListener:Landroid/widget/ExpandableListView$OnGroupExpandListener;
-Landroid/widget/FastScroller;-><init>(Landroid/widget/AbsListView;I)V
-Landroid/widget/FastScroller;->mContainerRect:Landroid/graphics/Rect;
-Landroid/widget/FastScroller;->mHeaderCount:I
-Landroid/widget/FastScroller;->mLongList:Z
-Landroid/widget/FastScroller;->mMinimumTouchTarget:I
-Landroid/widget/FastScroller;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/FastScroller;->mThumbImage:Landroid/widget/ImageView;
-Landroid/widget/FastScroller;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/FastScroller;->mTrackImage:Landroid/widget/ImageView;
-Landroid/widget/FastScroller;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
-Landroid/widget/FastScroller;->onSizeChanged(IIII)V
-Landroid/widget/FastScroller;->onTouchEvent(Landroid/view/MotionEvent;)Z
-Landroid/widget/FastScroller;->remove()V
-Landroid/widget/FastScroller;->setState(I)V
-Landroid/widget/Filter;->setDelayer(Landroid/widget/Filter$Delayer;)V
-Landroid/widget/FrameLayout;->mForegroundPaddingBottom:I
-Landroid/widget/FrameLayout;->mForegroundPaddingLeft:I
-Landroid/widget/FrameLayout;->mForegroundPaddingRight:I
-Landroid/widget/FrameLayout;->mForegroundPaddingTop:I
-Landroid/widget/FrameLayout;->mMeasureAllChildren:Z
-Landroid/widget/Gallery$FlingRunnable;->startUsingVelocity(I)V
-Landroid/widget/Gallery;->fillToGalleryLeft()V
-Landroid/widget/Gallery;->fillToGalleryRight()V
-Landroid/widget/Gallery;->getCenterOfGallery()I
-Landroid/widget/Gallery;->getCenterOfView(Landroid/view/View;)I
-Landroid/widget/Gallery;->makeAndAddView(IIIZ)Landroid/view/View;
-Landroid/widget/Gallery;->mDownTouchPosition:I
-Landroid/widget/Gallery;->mDownTouchView:Landroid/view/View;
-Landroid/widget/Gallery;->mFlingRunnable:Landroid/widget/Gallery$FlingRunnable;
-Landroid/widget/Gallery;->mGestureDetector:Landroid/view/GestureDetector;
-Landroid/widget/Gallery;->moveDirection(I)Z
-Landroid/widget/Gallery;->mSelectedChild:Landroid/view/View;
-Landroid/widget/Gallery;->mSpacing:I
-Landroid/widget/Gallery;->trackMotionScroll(I)V
-Landroid/widget/GridLayout;->UNDEFINED_ALIGNMENT:Landroid/widget/GridLayout$Alignment;
-Landroid/widget/GridView;->determineColumns(I)Z
-Landroid/widget/GridView;->fillDown(II)Landroid/view/View;
-Landroid/widget/GridView;->fillUp(II)Landroid/view/View;
-Landroid/widget/GridView;->mColumnWidth:I
-Landroid/widget/GridView;->mHorizontalSpacing:I
-Landroid/widget/GridView;->mNumColumns:I
-Landroid/widget/GridView;->mRequestedColumnWidth:I
-Landroid/widget/GridView;->mRequestedHorizontalSpacing:I
-Landroid/widget/GridView;->mRequestedNumColumns:I
-Landroid/widget/GridView;->mVerticalSpacing:I
-Landroid/widget/GridView;->sequenceScroll(I)Z
-Landroid/widget/HeaderViewListAdapter;->mAdapter:Landroid/widget/ListAdapter;
-Landroid/widget/HeaderViewListAdapter;->mFooterViewInfos:Ljava/util/ArrayList;
-Landroid/widget/HeaderViewListAdapter;->mHeaderViewInfos:Ljava/util/ArrayList;
-Landroid/widget/HorizontalScrollView;->mChildToScrollTo:Landroid/view/View;
-Landroid/widget/HorizontalScrollView;->mEdgeGlowLeft:Landroid/widget/EdgeEffect;
-Landroid/widget/HorizontalScrollView;->mEdgeGlowRight:Landroid/widget/EdgeEffect;
-Landroid/widget/HorizontalScrollView;->mIsBeingDragged:Z
-Landroid/widget/HorizontalScrollView;->mLastMotionX:I
-Landroid/widget/HorizontalScrollView;->mOverflingDistance:I
-Landroid/widget/HorizontalScrollView;->mOverscrollDistance:I
-Landroid/widget/HorizontalScrollView;->mScroller:Landroid/widget/OverScroller;
-Landroid/widget/HorizontalScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;
-Landroid/widget/HorizontalScrollView;->recycleVelocityTracker()V
-Landroid/widget/ImageView;->animateTransform(Landroid/graphics/Matrix;)V
-Landroid/widget/ImageView;->mAdjustViewBounds:Z
-Landroid/widget/ImageView;->mAlpha:I
-Landroid/widget/ImageView;->mCropToPadding:Z
-Landroid/widget/ImageView;->mDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/ImageView;->mDrawableHeight:I
-Landroid/widget/ImageView;->mDrawableWidth:I
-Landroid/widget/ImageView;->mDrawMatrix:Landroid/graphics/Matrix;
-Landroid/widget/ImageView;->mMaxHeight:I
-Landroid/widget/ImageView;->mMaxWidth:I
-Landroid/widget/ImageView;->mRecycleableBitmapDrawable:Landroid/graphics/drawable/BitmapDrawable;
-Landroid/widget/ImageView;->mResource:I
-Landroid/widget/ImageView;->mUri:Landroid/net/Uri;
-Landroid/widget/ImageView;->resizeFromDrawable()V
-Landroid/widget/ImageView;->resolveUri()V
-Landroid/widget/ImageView;->scaleTypeToScaleToFit(Landroid/widget/ImageView$ScaleType;)Landroid/graphics/Matrix$ScaleToFit;
-Landroid/widget/ImageView;->setImageResourceAsync(I)Ljava/lang/Runnable;
-Landroid/widget/ImageView;->setImageURIAsync(Landroid/net/Uri;)Ljava/lang/Runnable;
-Landroid/widget/ImageView;->updateDrawable(Landroid/graphics/drawable/Drawable;)V
-Landroid/widget/LinearLayout$LayoutParams;->encodeProperties(Landroid/view/ViewHierarchyEncoder;)V
-Landroid/widget/LinearLayout;->INDEX_BOTTOM:I
-Landroid/widget/LinearLayout;->INDEX_TOP:I
-Landroid/widget/LinearLayout;->mDivider:Landroid/graphics/drawable/Drawable;
-Landroid/widget/LinearLayout;->mGravity:I
-Landroid/widget/LinearLayout;->mMaxAscent:[I
-Landroid/widget/LinearLayout;->mMaxDescent:[I
-Landroid/widget/LinearLayout;->mTotalLength:I
-Landroid/widget/LinearLayout;->mUseLargestChild:Z
-Landroid/widget/ListPopupWindow;->buildDropDown()I
-Landroid/widget/ListPopupWindow;->isDropDownAlwaysVisible()Z
-Landroid/widget/ListPopupWindow;->mDropDownList:Landroid/widget/DropDownListView;
-Landroid/widget/ListPopupWindow;->mPopup:Landroid/widget/PopupWindow;
-Landroid/widget/ListPopupWindow;->setDropDownAlwaysVisible(Z)V
-Landroid/widget/ListPopupWindow;->setForceIgnoreOutsideTouch(Z)V
-Landroid/widget/ListPopupWindow;->setListItemExpandMax(I)V
-Landroid/widget/ListView;->arrowScroll(I)Z
-Landroid/widget/ListView;->correctTooHigh(I)V
-Landroid/widget/ListView;->correctTooLow(I)V
-Landroid/widget/ListView;->fillDown(II)Landroid/view/View;
-Landroid/widget/ListView;->fillSpecific(II)Landroid/view/View;
-Landroid/widget/ListView;->fillUp(II)Landroid/view/View;
-Landroid/widget/ListView;->getHeightForPosition(I)I
-Landroid/widget/ListView;->isDirectChildHeaderOrFooter(Landroid/view/View;)Z
-Landroid/widget/ListView;->makeAndAddView(IIZIZ)Landroid/view/View;
-Landroid/widget/ListView;->mAreAllItemsSelectable:Z
-Landroid/widget/ListView;->mDivider:Landroid/graphics/drawable/Drawable;
-Landroid/widget/ListView;->mDividerHeight:I
-Landroid/widget/ListView;->measureHeightOfChildren(IIIII)I
-Landroid/widget/ListView;->mFooterViewInfos:Ljava/util/ArrayList;
-Landroid/widget/ListView;->mHeaderViewInfos:Ljava/util/ArrayList;
-Landroid/widget/ListView;->scrollListItemsBy(I)V
-Landroid/widget/ListView;->setSelectionInt(I)V
-Landroid/widget/ListView;->trackMotionScroll(II)Z
-Landroid/widget/MediaController;->mAnchor:Landroid/view/View;
-Landroid/widget/MediaController;->mContext:Landroid/content/Context;
-Landroid/widget/MediaController;->mCurrentTime:Landroid/widget/TextView;
-Landroid/widget/MediaController;->mDecor:Landroid/view/View;
-Landroid/widget/MediaController;->mDecorLayoutParams:Landroid/view/WindowManager$LayoutParams;
-Landroid/widget/MediaController;->mEndTime:Landroid/widget/TextView;
-Landroid/widget/MediaController;->mFfwdButton:Landroid/widget/ImageButton;
-Landroid/widget/MediaController;->mFfwdListener:Landroid/view/View$OnClickListener;
-Landroid/widget/MediaController;->mNextButton:Landroid/widget/ImageButton;
-Landroid/widget/MediaController;->mPauseButton:Landroid/widget/ImageButton;
-Landroid/widget/MediaController;->mPlayer:Landroid/widget/MediaController$MediaPlayerControl;
-Landroid/widget/MediaController;->mPrevButton:Landroid/widget/ImageButton;
-Landroid/widget/MediaController;->mProgress:Landroid/widget/ProgressBar;
-Landroid/widget/MediaController;->mRewButton:Landroid/widget/ImageButton;
-Landroid/widget/MediaController;->mRewListener:Landroid/view/View$OnClickListener;
-Landroid/widget/MediaController;->mRoot:Landroid/view/View;
-Landroid/widget/MediaController;->mSeekListener:Landroid/widget/SeekBar$OnSeekBarChangeListener;
-Landroid/widget/MediaController;->mShowing:Z
-Landroid/widget/MediaController;->mWindow:Landroid/view/Window;
-Landroid/widget/MediaController;->mWindowManager:Landroid/view/WindowManager;
-Landroid/widget/MediaController;->updatePausePlay()V
-Landroid/widget/NumberPicker;->changeValueByOne(Z)V
-Landroid/widget/NumberPicker;->getTwoDigitFormatter()Landroid/widget/NumberPicker$Formatter;
-Landroid/widget/NumberPicker;->initializeSelectorWheelIndices()V
-Landroid/widget/NumberPicker;->mFlingScroller:Landroid/widget/Scroller;
-Landroid/widget/NumberPicker;->mInputText:Landroid/widget/EditText;
-Landroid/widget/NumberPicker;->mMaximumFlingVelocity:I
-Landroid/widget/NumberPicker;->mMaxValue:I
-Landroid/widget/NumberPicker;->mMinHeight:I
-Landroid/widget/NumberPicker;->mMinWidth:I
-Landroid/widget/NumberPicker;->mOnValueChangeListener:Landroid/widget/NumberPicker$OnValueChangeListener;
-Landroid/widget/NumberPicker;->mSelectionDivider:Landroid/graphics/drawable/Drawable;
-Landroid/widget/NumberPicker;->mSelectionDividerHeight:I
-Landroid/widget/NumberPicker;->mSelectorIndices:[I
-Landroid/widget/NumberPicker;->mSelectorWheelPaint:Landroid/graphics/Paint;
-Landroid/widget/NumberPicker;->mTextSize:I
-Landroid/widget/NumberPicker;->SELECTOR_MIDDLE_ITEM_INDEX:I
-Landroid/widget/NumberPicker;->SELECTOR_WHEEL_ITEM_COUNT:I
-Landroid/widget/OverScroller$SplineOverScroller;->mCurrVelocity:F
-Landroid/widget/OverScroller;-><init>(Landroid/content/Context;Landroid/view/animation/Interpolator;Z)V
-Landroid/widget/OverScroller;->extendDuration(I)V
-Landroid/widget/OverScroller;->isScrollingInDirection(FF)Z
-Landroid/widget/OverScroller;->mInterpolator:Landroid/view/animation/Interpolator;
-Landroid/widget/OverScroller;->mScrollerY:Landroid/widget/OverScroller$SplineOverScroller;
-Landroid/widget/OverScroller;->setInterpolator(Landroid/view/animation/Interpolator;)V
-Landroid/widget/PopupMenu;->mContext:Landroid/content/Context;
-Landroid/widget/PopupMenu;->mPopup:Lcom/android/internal/view/menu/MenuPopupHelper;
-Landroid/widget/PopupWindow;->computeAnimationResource()I
-Landroid/widget/PopupWindow;->createPopupLayoutParams(Landroid/os/IBinder;)Landroid/view/WindowManager$LayoutParams;
-Landroid/widget/PopupWindow;->invokePopup(Landroid/view/WindowManager$LayoutParams;)V
-Landroid/widget/PopupWindow;->mAboveAnchor:Z
-Landroid/widget/PopupWindow;->mAboveAnchorBackgroundDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/PopupWindow;->mAnchor:Ljava/lang/ref/WeakReference;
-Landroid/widget/PopupWindow;->mAnimationStyle:I
-Landroid/widget/PopupWindow;->mBackgroundView:Landroid/view/View;
-Landroid/widget/PopupWindow;->mBelowAnchorBackgroundDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/PopupWindow;->mContentView:Landroid/view/View;
-Landroid/widget/PopupWindow;->mContext:Landroid/content/Context;
-Landroid/widget/PopupWindow;->mDecorView:Landroid/widget/PopupWindow$PopupDecorView;
-Landroid/widget/PopupWindow;->mHeightMode:I
-Landroid/widget/PopupWindow;->mIsDropdown:Z
-Landroid/widget/PopupWindow;->mIsShowing:Z
-Landroid/widget/PopupWindow;->mLastHeight:I
-Landroid/widget/PopupWindow;->mLastWidth:I
-Landroid/widget/PopupWindow;->mLayoutInScreen:Z
-Landroid/widget/PopupWindow;->mNotTouchModal:Z
-Landroid/widget/PopupWindow;->mOnDismissListener:Landroid/widget/PopupWindow$OnDismissListener;
-Landroid/widget/PopupWindow;->mOnScrollChangedListener:Landroid/view/ViewTreeObserver$OnScrollChangedListener;
-Landroid/widget/PopupWindow;->mOverlapAnchor:Z
-Landroid/widget/PopupWindow;->mTouchInterceptor:Landroid/view/View$OnTouchListener;
-Landroid/widget/PopupWindow;->mWidthMode:I
-Landroid/widget/PopupWindow;->mWindowLayoutType:I
-Landroid/widget/PopupWindow;->mWindowManager:Landroid/view/WindowManager;
-Landroid/widget/PopupWindow;->preparePopup(Landroid/view/WindowManager$LayoutParams;)V
-Landroid/widget/PopupWindow;->setAllowScrollingAnchorParent(Z)V
-Landroid/widget/PopupWindow;->setClipToScreenEnabled(Z)V
-Landroid/widget/PopupWindow;->setEpicenterBounds(Landroid/graphics/Rect;)V
-Landroid/widget/PopupWindow;->setLayoutInScreenEnabled(Z)V
-Landroid/widget/PopupWindow;->setLayoutInsetDecor(Z)V
-Landroid/widget/PopupWindow;->setTouchModal(Z)V
-Landroid/widget/PopupWindow;->showAtLocation(Landroid/os/IBinder;III)V
-Landroid/widget/PopupWindow;->updateAboveAnchor(Z)V
-Landroid/widget/ProgressBar;->mCurrentDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/ProgressBar;->mDuration:I
-Landroid/widget/ProgressBar;->mIndeterminate:Z
-Landroid/widget/ProgressBar;->mMaxHeight:I
-Landroid/widget/ProgressBar;->mMinHeight:I
-Landroid/widget/ProgressBar;->mMinWidth:I
-Landroid/widget/ProgressBar;->mMirrorForRtl:Z
-Landroid/widget/ProgressBar;->mOnlyIndeterminate:Z
-Landroid/widget/ProgressBar;->refreshProgress(IIZZ)V
-Landroid/widget/ProgressBar;->setProgressInternal(IZZ)Z
-Landroid/widget/ProgressBar;->startAnimation()V
-Landroid/widget/ProgressBar;->stopAnimation()V
-Landroid/widget/ProgressBar;->tileify(Landroid/graphics/drawable/Drawable;Z)Landroid/graphics/drawable/Drawable;
-Landroid/widget/QuickContactBadge;->mOverlay:Landroid/graphics/drawable/Drawable;
-Landroid/widget/RadioGroup;->mChildOnCheckedChangeListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;
-Landroid/widget/RadioGroup;->mOnCheckedChangeListener:Landroid/widget/RadioGroup$OnCheckedChangeListener;
-Landroid/widget/RatingBar;->mOnRatingBarChangeListener:Landroid/widget/RatingBar$OnRatingBarChangeListener;
Landroid/widget/RelativeLayout$DependencyGraph$Node;-><init>()V
-Landroid/widget/RelativeLayout$LayoutParams;->mBottom:I
-Landroid/widget/RelativeLayout$LayoutParams;->mLeft:I
-Landroid/widget/RelativeLayout$LayoutParams;->mRight:I
-Landroid/widget/RelativeLayout$LayoutParams;->mTop:I
-Landroid/widget/RelativeLayout;->mGravity:I
-Landroid/widget/RemoteViews$Action;->mergeBehavior()I
-Landroid/widget/RemoteViews$Action;->viewId:I
-Landroid/widget/RemoteViews$BitmapCache;->mBitmaps:Ljava/util/ArrayList;
-Landroid/widget/RemoteViews$BitmapReflectionAction;->bitmap:Landroid/graphics/Bitmap;
-Landroid/widget/RemoteViews$BitmapReflectionAction;->methodName:Ljava/lang/String;
Landroid/widget/RemoteViews$OnClickHandler;-><init>()V
-Landroid/widget/RemoteViews$OnClickHandler;->onClickHandler(Landroid/view/View;Landroid/app/PendingIntent;Landroid/content/Intent;)Z
-Landroid/widget/RemoteViews$ReflectionAction;->methodName:Ljava/lang/String;
-Landroid/widget/RemoteViews$ReflectionAction;->value:Ljava/lang/Object;
-Landroid/widget/RemoteViews$SetOnClickPendingIntent;->pendingIntent:Landroid/app/PendingIntent;
-Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;
-Landroid/widget/RemoteViews$ViewGroupActionAdd;->mNestedViews:Landroid/widget/RemoteViews;
-Landroid/widget/RemoteViews;->addView(ILandroid/widget/RemoteViews;I)V
-Landroid/widget/RemoteViews;->estimateMemoryUsage()I
-Landroid/widget/RemoteViews;->mActions:Ljava/util/ArrayList;
-Landroid/widget/RemoteViews;->mApplication:Landroid/content/pm/ApplicationInfo;
-Landroid/widget/RemoteViews;->mBitmapCache:Landroid/widget/RemoteViews$BitmapCache;
-Landroid/widget/RemoteViews;->mergeRemoteViews(Landroid/widget/RemoteViews;)V
-Landroid/widget/RemoteViews;->mLayoutId:I
-Landroid/widget/RemoteViews;->mPortrait:Landroid/widget/RemoteViews;
-Landroid/widget/RemoteViews;->setIsWidgetCollectionChild(Z)V
-Landroid/widget/RemoteViews;->setRemoteAdapter(ILjava/util/ArrayList;I)V
-Landroid/widget/RemoteViewsAdapter;->getRemoteViewsServiceIntent()Landroid/content/Intent;
-Landroid/widget/RemoteViewsAdapter;->isDataReady()Z
-Landroid/widget/RemoteViewsAdapter;->mCache:Landroid/widget/RemoteViewsAdapter$FixedSizeRemoteViewsCache;
-Landroid/widget/RemoteViewsAdapter;->mWorkerThread:Landroid/os/HandlerThread;
-Landroid/widget/RemoteViewsAdapter;->saveRemoteViewsCache()V
-Landroid/widget/RemoteViewsAdapter;->setRemoteViewsOnClickHandler(Landroid/widget/RemoteViews$OnClickHandler;)V
-Landroid/widget/RemoteViewsAdapter;->setVisibleRangeHint(II)V
Landroid/widget/ScrollBarDrawable;-><init>()V
-Landroid/widget/ScrollBarDrawable;->mVerticalThumb:Landroid/graphics/drawable/Drawable;
-Landroid/widget/ScrollBarDrawable;->setHorizontalThumbDrawable(Landroid/graphics/drawable/Drawable;)V
-Landroid/widget/ScrollBarDrawable;->setVerticalThumbDrawable(Landroid/graphics/drawable/Drawable;)V
-Landroid/widget/Scroller;->DECELERATION_RATE:F
-Landroid/widget/Scroller;->INFLEXION:F
-Landroid/widget/Scroller;->mDeceleration:F
-Landroid/widget/Scroller;->mDuration:I
-Landroid/widget/Scroller;->mInterpolator:Landroid/view/animation/Interpolator;
-Landroid/widget/Scroller;->mPhysicalCoeff:F
-Landroid/widget/ScrollView;->canScroll()Z
-Landroid/widget/ScrollView;->endDrag()V
-Landroid/widget/ScrollView;->mChildToScrollTo:Landroid/view/View;
-Landroid/widget/ScrollView;->mEdgeGlowBottom:Landroid/widget/EdgeEffect;
-Landroid/widget/ScrollView;->mEdgeGlowTop:Landroid/widget/EdgeEffect;
-Landroid/widget/ScrollView;->mFlingStrictSpan:Landroid/os/StrictMode$Span;
-Landroid/widget/ScrollView;->mIsBeingDragged:Z
-Landroid/widget/ScrollView;->mLastMotionY:I
-Landroid/widget/ScrollView;->mLastScroll:J
-Landroid/widget/ScrollView;->mMinimumVelocity:I
-Landroid/widget/ScrollView;->mOverflingDistance:I
-Landroid/widget/ScrollView;->mOverscrollDistance:I
-Landroid/widget/ScrollView;->mScroller:Landroid/widget/OverScroller;
-Landroid/widget/ScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;
-Landroid/widget/SearchView$SearchAutoComplete;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/widget/SearchView;->mClearingFocus:Z
-Landroid/widget/SearchView;->mCloseButton:Landroid/widget/ImageView;
-Landroid/widget/SearchView;->mCollapsedImeOptions:I
-Landroid/widget/SearchView;->mExpandedInActionView:Z
-Landroid/widget/SearchView;->mIconified:Z
-Landroid/widget/SearchView;->mIconifiedByDefault:Z
-Landroid/widget/SearchView;->mOnClickListener:Landroid/view/View$OnClickListener;
-Landroid/widget/SearchView;->mOnItemClickListener:Landroid/widget/AdapterView$OnItemClickListener;
-Landroid/widget/SearchView;->mOnQueryChangeListener:Landroid/widget/SearchView$OnQueryTextListener;
-Landroid/widget/SearchView;->mSearchButton:Landroid/widget/ImageView;
-Landroid/widget/SearchView;->mSearchEditFrame:Landroid/view/View;
-Landroid/widget/SearchView;->mSearchHintIcon:Landroid/graphics/drawable/Drawable;
-Landroid/widget/SearchView;->mSearchPlate:Landroid/view/View;
-Landroid/widget/SearchView;->mSearchSrcTextView:Landroid/widget/SearchView$SearchAutoComplete;
-Landroid/widget/SearchView;->mSubmitArea:Landroid/view/View;
-Landroid/widget/SearchView;->mSuggestionsAdapter:Landroid/widget/CursorAdapter;
-Landroid/widget/SearchView;->mUserQuery:Ljava/lang/CharSequence;
-Landroid/widget/SearchView;->mVoiceButton:Landroid/widget/ImageView;
-Landroid/widget/SearchView;->mVoiceButtonEnabled:Z
-Landroid/widget/SearchView;->onCloseClicked()V
-Landroid/widget/SearchView;->setQuery(Ljava/lang/CharSequence;)V
-Landroid/widget/SearchView;->updateSubmitArea()V
-Landroid/widget/SearchView;->updateSubmitButton(Z)V
-Landroid/widget/SearchView;->updateViewsVisibility(Z)V
-Landroid/widget/SeekBar;->mOnSeekBarChangeListener:Landroid/widget/SeekBar$OnSeekBarChangeListener;
-Landroid/widget/SeekBar;->onProgressRefresh(FZI)V
-Landroid/widget/SimpleAdapter;->mData:Ljava/util/List;
-Landroid/widget/SimpleCursorAdapter;->mFrom:[I
-Landroid/widget/SimpleCursorAdapter;->mTo:[I
-Landroid/widget/SlidingDrawer;->mTopOffset:I
-Landroid/widget/SlidingDrawer;->mTouchDelta:I
-Landroid/widget/SlidingDrawer;->mTracking:Z
-Landroid/widget/SlidingDrawer;->mVelocityTracker:Landroid/view/VelocityTracker;
-Landroid/widget/SlidingDrawer;->prepareContent()V
-Landroid/widget/SlidingDrawer;->prepareTracking(I)V
-Landroid/widget/Spinner$DialogPopup;->isShowing()Z
-Landroid/widget/Spinner$SpinnerPopup;->isShowing()Z
-Landroid/widget/Spinner;->mForwardingListener:Landroid/widget/ForwardingListener;
-Landroid/widget/Spinner;->mPopup:Landroid/widget/Spinner$SpinnerPopup;
-Landroid/widget/Spinner;->setOnItemClickListenerInt(Landroid/widget/AdapterView$OnItemClickListener;)V
-Landroid/widget/Switch;->cancelPositionAnimator()V
-Landroid/widget/Switch;->mOffLayout:Landroid/text/Layout;
-Landroid/widget/Switch;->mOnLayout:Landroid/text/Layout;
-Landroid/widget/Switch;->mSwitchHeight:I
-Landroid/widget/Switch;->mSwitchMinWidth:I
-Landroid/widget/Switch;->mSwitchWidth:I
-Landroid/widget/Switch;->mThumbDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/Switch;->mThumbWidth:I
-Landroid/widget/Switch;->mTrackDrawable:Landroid/graphics/drawable/Drawable;
-Landroid/widget/Switch;->setThumbPosition(F)V
-Landroid/widget/TabHost$IntentContentStrategy;->getContentView()Landroid/view/View;
-Landroid/widget/TabHost$IntentContentStrategy;->tabClosed()V
-Landroid/widget/TabHost$TabSpec;->mContentStrategy:Landroid/widget/TabHost$ContentStrategy;
-Landroid/widget/TabHost$TabSpec;->mIndicatorStrategy:Landroid/widget/TabHost$IndicatorStrategy;
-Landroid/widget/TabHost;->mCurrentTab:I
-Landroid/widget/TabHost;->mOnTabChangeListener:Landroid/widget/TabHost$OnTabChangeListener;
-Landroid/widget/TabHost;->mTabSpecs:Ljava/util/List;
-Landroid/widget/TabWidget;->mDrawBottomStrips:Z
-Landroid/widget/TabWidget;->mSelectedTab:I
-Landroid/widget/TabWidget;->setTabSelectionListener(Landroid/widget/TabWidget$OnTabSelectionChanged;)V
-Landroid/widget/TextClock;->getFormat()Ljava/lang/CharSequence;
-Landroid/widget/TextClock;->onTimeChanged()V
-Landroid/widget/TextView$SavedState;->text:Ljava/lang/CharSequence;
-Landroid/widget/TextView;->assumeLayout()V
-Landroid/widget/TextView;->bringTextIntoView()Z
-Landroid/widget/TextView;->canPaste()Z
-Landroid/widget/TextView;->checkForRelayout()V
-Landroid/widget/TextView;->compressText(F)Z
-Landroid/widget/TextView;->createEditorIfNeeded()V
-Landroid/widget/TextView;->deleteText_internal(II)V
-Landroid/widget/TextView;->getHintLayout()Landroid/text/Layout;
-Landroid/widget/TextView;->getHorizontallyScrolling()Z
-Landroid/widget/TextView;->getIterableTextForAccessibility()Ljava/lang/CharSequence;
-Landroid/widget/TextView;->getLayoutAlignment()Landroid/text/Layout$Alignment;
-Landroid/widget/TextView;->getLineAtCoordinate(F)I
-Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic;
-Landroid/widget/TextView;->getTextForAccessibility()Ljava/lang/CharSequence;
-Landroid/widget/TextView;->getTextServicesLocale(Z)Ljava/util/Locale;
-Landroid/widget/TextView;->getTransformedText(II)Ljava/lang/CharSequence;
-Landroid/widget/TextView;->getUpdatedHighlightPath()Landroid/graphics/Path;
-Landroid/widget/TextView;->getVerticalOffset(Z)I
-Landroid/widget/TextView;->isSingleLine()Z
-Landroid/widget/TextView;->isTextEditable()Z
-Landroid/widget/TextView;->LINES:I
-Landroid/widget/TextView;->makeNewLayout(IILandroid/text/BoringLayout$Metrics;Landroid/text/BoringLayout$Metrics;IZ)V
-Landroid/widget/TextView;->mAllowTransformationLengthChange:Z
-Landroid/widget/TextView;->mBoring:Landroid/text/BoringLayout$Metrics;
-Landroid/widget/TextView;->mBufferType:Landroid/widget/TextView$BufferType;
-Landroid/widget/TextView;->mChangeWatcher:Landroid/widget/TextView$ChangeWatcher;
-Landroid/widget/TextView;->mCharWrapper:Landroid/widget/TextView$CharWrapper;
-Landroid/widget/TextView;->mCurHintTextColor:I
-Landroid/widget/TextView;->mCursorDrawableRes:I
-Landroid/widget/TextView;->mCurTextColor:I
-Landroid/widget/TextView;->mDesiredHeightAtMeasure:I
-Landroid/widget/TextView;->mDrawables:Landroid/widget/TextView$Drawables;
-Landroid/widget/TextView;->mEditableFactory:Landroid/text/Editable$Factory;
-Landroid/widget/TextView;->mEditor:Landroid/widget/Editor;
-Landroid/widget/TextView;->mGravity:I
-Landroid/widget/TextView;->mHighlightColor:I
-Landroid/widget/TextView;->mHighlightPaint:Landroid/graphics/Paint;
-Landroid/widget/TextView;->mHighlightPathBogus:Z
-Landroid/widget/TextView;->mHintBoring:Landroid/text/BoringLayout$Metrics;
-Landroid/widget/TextView;->mHintLayout:Landroid/text/Layout;
-Landroid/widget/TextView;->mHorizontallyScrolling:Z
-Landroid/widget/TextView;->mIncludePad:Z
-Landroid/widget/TextView;->mLayout:Landroid/text/Layout;
-Landroid/widget/TextView;->mListeners:Ljava/util/ArrayList;
-Landroid/widget/TextView;->mMarquee:Landroid/widget/TextView$Marquee;
-Landroid/widget/TextView;->mMarqueeFadeMode:I
-Landroid/widget/TextView;->mMaximum:I
-Landroid/widget/TextView;->mMaxMode:I
-Landroid/widget/TextView;->mMaxWidth:I
-Landroid/widget/TextView;->mMaxWidthMode:I
-Landroid/widget/TextView;->mMinimum:I
-Landroid/widget/TextView;->mMinMode:I
-Landroid/widget/TextView;->mMinWidth:I
-Landroid/widget/TextView;->mMinWidthMode:I
-Landroid/widget/TextView;->mOldMaximum:I
-Landroid/widget/TextView;->mOldMaxMode:I
-Landroid/widget/TextView;->mRestartMarquee:Z
-Landroid/widget/TextView;->mSavedHintLayout:Landroid/text/BoringLayout;
-Landroid/widget/TextView;->mSavedLayout:Landroid/text/BoringLayout;
-Landroid/widget/TextView;->mSavedMarqueeModeLayout:Landroid/text/Layout;
-Landroid/widget/TextView;->mShadowDx:F
-Landroid/widget/TextView;->mShadowDy:F
-Landroid/widget/TextView;->mShadowRadius:F
-Landroid/widget/TextView;->mSingleLine:Z
-Landroid/widget/TextView;->mSpacingAdd:F
-Landroid/widget/TextView;->mSpacingMult:F
-Landroid/widget/TextView;->mSpannableFactory:Landroid/text/Spannable$Factory;
-Landroid/widget/TextView;->mText:Ljava/lang/CharSequence;
-Landroid/widget/TextView;->mTextDir:Landroid/text/TextDirectionHeuristic;
-Landroid/widget/TextView;->mTextPaint:Landroid/text/TextPaint;
-Landroid/widget/TextView;->mTextSelectHandleLeftRes:I
-Landroid/widget/TextView;->mTextSelectHandleRes:I
-Landroid/widget/TextView;->mTextSelectHandleRightRes:I
-Landroid/widget/TextView;->mTransformed:Ljava/lang/CharSequence;
-Landroid/widget/TextView;->mUserSetTextScaleX:Z
-Landroid/widget/TextView;->nullLayouts()V
-Landroid/widget/TextView;->setInputType(IZ)V
-Landroid/widget/TextView;->setRawTextSize(FZ)V
-Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;ZI)V
-Landroid/widget/TextView;->startMarquee()V
-Landroid/widget/TextView;->startStopMarquee(Z)V
-Landroid/widget/TextView;->stopTextActionMode()V
-Landroid/widget/TextView;->updateTextServicesLocaleLocked()V
-Landroid/widget/TextView;->viewportToContentVerticalOffset()I
-Landroid/widget/TimePicker;->mDelegate:Landroid/widget/TimePicker$TimePickerDelegate;
-Landroid/widget/Toast$TN;->handleHide()V
-Landroid/widget/Toast$TN;->mGravity:I
-Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
-Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
-Landroid/widget/Toast$TN;->mView:Landroid/view/View;
-Landroid/widget/Toast$TN;->mY:I
-Landroid/widget/Toast$TN;->show(Landroid/os/IBinder;)V
-Landroid/widget/Toast;->getService()Landroid/app/INotificationManager;
-Landroid/widget/Toast;->getWindowParams()Landroid/view/WindowManager$LayoutParams;
-Landroid/widget/Toast;->mDuration:I
-Landroid/widget/Toast;->mTN:Landroid/widget/Toast$TN;
-Landroid/widget/Toast;->sService:Landroid/app/INotificationManager;
-Landroid/widget/Toolbar;->mNavButtonView:Landroid/widget/ImageButton;
-Landroid/widget/Toolbar;->mTitleMarginBottom:I
-Landroid/widget/Toolbar;->mTitleMarginEnd:I
-Landroid/widget/Toolbar;->mTitleMarginStart:I
-Landroid/widget/Toolbar;->mTitleMarginTop:I
-Landroid/widget/Toolbar;->mTitleTextView:Landroid/widget/TextView;
-Landroid/widget/VideoView2$OnViewTypeChangedListener;->onViewTypeChanged(Landroid/view/View;I)V
-Landroid/widget/VideoView2;->getMediaController()Landroid/media/session/MediaController;
-Landroid/widget/VideoView2;->setOnViewTypeChangedListener(Landroid/widget/VideoView2$OnViewTypeChangedListener;)V
-Landroid/widget/VideoView2;->setVideoPath(Ljava/lang/String;)V
-Landroid/widget/VideoView;->mCurrentBufferPercentage:I
-Landroid/widget/VideoView;->mCurrentState:I
-Landroid/widget/VideoView;->mErrorListener:Landroid/media/MediaPlayer$OnErrorListener;
-Landroid/widget/VideoView;->mHeaders:Ljava/util/Map;
-Landroid/widget/VideoView;->mMediaController:Landroid/widget/MediaController;
-Landroid/widget/VideoView;->mMediaPlayer:Landroid/media/MediaPlayer;
-Landroid/widget/VideoView;->mPreparedListener:Landroid/media/MediaPlayer$OnPreparedListener;
-Landroid/widget/VideoView;->mSHCallback:Landroid/view/SurfaceHolder$Callback;
-Landroid/widget/VideoView;->mSurfaceHolder:Landroid/view/SurfaceHolder;
-Landroid/widget/VideoView;->mTargetState:I
-Landroid/widget/VideoView;->mUri:Landroid/net/Uri;
-Landroid/widget/VideoView;->mVideoHeight:I
-Landroid/widget/VideoView;->mVideoWidth:I
-Landroid/widget/VideoView;->release(Z)V
-Landroid/widget/VideoView;->STATE_IDLE:I
-Landroid/widget/ViewAnimator;->mFirstTime:Z
-Landroid/widget/ViewAnimator;->mWhichChild:I
-Landroid/widget/ViewAnimator;->showOnly(IZ)V
-Landroid/widget/ViewFlipper;->mUserPresent:Z
-Landroid/widget/ViewFlipper;->updateRunning(Z)V
-Landroid/widget/ZoomControls;->mZoomIn:Landroid/widget/ZoomButton;
-Landroid/widget/ZoomControls;->mZoomOut:Landroid/widget/ZoomButton;
Lcom/android/ims/ImsConfigListener$Stub;-><init>()V
Lcom/android/ims/internal/IImsCallSession$Stub;-><init>()V
Lcom/android/ims/internal/IImsCallSession$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/ims/internal/IImsCallSession;
@@ -6527,48 +1745,6 @@
Lcom/android/ims/internal/IImsVideoCallProvider$Stub;-><init>()V
Lcom/android/ims/internal/IImsVideoCallProvider;->setCallback(Lcom/android/ims/internal/IImsVideoCallCallback;)V
Lcom/android/ims/internal/uce/uceservice/IUceListener$Stub;-><init>()V
-Lcom/android/internal/app/AlertController$AlertParams;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/app/AlertController$AlertParams;->apply(Lcom/android/internal/app/AlertController;)V
-Lcom/android/internal/app/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;
-Lcom/android/internal/app/AlertController$AlertParams;->mCancelable:Z
-Lcom/android/internal/app/AlertController$AlertParams;->mCheckedItem:I
-Lcom/android/internal/app/AlertController$AlertParams;->mCheckedItems:[Z
-Lcom/android/internal/app/AlertController$AlertParams;->mContext:Landroid/content/Context;
-Lcom/android/internal/app/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;
-Lcom/android/internal/app/AlertController$AlertParams;->mCustomTitleView:Landroid/view/View;
-Lcom/android/internal/app/AlertController$AlertParams;->mIcon:Landroid/graphics/drawable/Drawable;
-Lcom/android/internal/app/AlertController$AlertParams;->mInflater:Landroid/view/LayoutInflater;
-Lcom/android/internal/app/AlertController$AlertParams;->mIsCheckedColumn:Ljava/lang/String;
-Lcom/android/internal/app/AlertController$AlertParams;->mIsMultiChoice:Z
-Lcom/android/internal/app/AlertController$AlertParams;->mIsSingleChoice:Z
-Lcom/android/internal/app/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;
-Lcom/android/internal/app/AlertController$AlertParams;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController$AlertParams;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;
-Lcom/android/internal/app/AlertController$RecycleListView;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/app/AlertController$RecycleListView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Lcom/android/internal/app/AlertController;-><init>(Landroid/content/Context;Landroid/content/DialogInterface;Landroid/view/Window;)V
-Lcom/android/internal/app/AlertController;->getListView()Landroid/widget/ListView;
-Lcom/android/internal/app/AlertController;->installContent()V
-Lcom/android/internal/app/AlertController;->mCustomTitleView:Landroid/view/View;
-Lcom/android/internal/app/AlertController;->mForceInverseBackground:Z
-Lcom/android/internal/app/AlertController;->mTitle:Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController;->mView:Landroid/view/View;
-Lcom/android/internal/app/AlertController;->onKeyDown(ILandroid/view/KeyEvent;)Z
-Lcom/android/internal/app/AlertController;->onKeyUp(ILandroid/view/KeyEvent;)Z
-Lcom/android/internal/app/AlertController;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;Landroid/os/Message;)V
-Lcom/android/internal/app/AlertController;->setCustomTitle(Landroid/view/View;)V
-Lcom/android/internal/app/AlertController;->setIcon(I)V
-Lcom/android/internal/app/AlertController;->setIcon(Landroid/graphics/drawable/Drawable;)V
-Lcom/android/internal/app/AlertController;->setMessage(Ljava/lang/CharSequence;)V
-Lcom/android/internal/app/AlertController;->setTitle(Ljava/lang/CharSequence;)V
-Lcom/android/internal/app/AlertController;->setView(Landroid/view/View;)V
Lcom/android/internal/app/IAppOpsCallback$Stub;-><init>()V
Lcom/android/internal/app/IAppOpsService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Lcom/android/internal/app/IAppOpsService$Stub$Proxy;->checkOperation(IILjava/lang/String;)I
@@ -6639,181 +1815,13 @@
Lcom/android/internal/backup/IBackupTransport;->requestBackupTime()J
Lcom/android/internal/backup/IBackupTransport;->startRestore(J[Landroid/content/pm/PackageInfo;)I
Lcom/android/internal/backup/IBackupTransport;->transportDirName()Ljava/lang/String;
-Lcom/android/internal/content/PackageMonitor;->isPackageDisappearing(Ljava/lang/String;)I
-Lcom/android/internal/content/PackageMonitor;->isPackageModified(Ljava/lang/String;)Z
-Lcom/android/internal/content/PackageMonitor;->onPackageChanged(Ljava/lang/String;I[Ljava/lang/String;)Z
-Lcom/android/internal/content/PackageMonitor;->onPackageRemoved(Ljava/lang/String;I)V
-Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Z)V
-Lcom/android/internal/content/ReferrerIntent;-><init>(Landroid/content/Intent;Ljava/lang/String;)V
-Lcom/android/internal/content/ReferrerIntent;->mReferrer:Ljava/lang/String;
Lcom/android/internal/location/ILocationProvider$Stub;-><init>()V
Lcom/android/internal/logging/MetricsLogger;-><init>()V
-Lcom/android/internal/logging/MetricsLogger;->write(Landroid/metrics/LogMaker;)V
Lcom/android/internal/net/LegacyVpnInfo;-><init>()V
-Lcom/android/internal/net/LegacyVpnInfo;->CREATOR:Landroid/os/Parcelable$Creator;
-Lcom/android/internal/net/LegacyVpnInfo;->key:Ljava/lang/String;
-Lcom/android/internal/net/LegacyVpnInfo;->state:I
Lcom/android/internal/net/VpnConfig;-><init>()V
-Lcom/android/internal/net/VpnProfile;-><init>(Landroid/os/Parcel;)V
-Lcom/android/internal/net/VpnProfile;->decode(Ljava/lang/String;[B)Lcom/android/internal/net/VpnProfile;
-Lcom/android/internal/net/VpnProfile;->key:Ljava/lang/String;
-Lcom/android/internal/net/VpnProfile;->name:Ljava/lang/String;
-Lcom/android/internal/net/VpnProfile;->saveLogin:Z
-Lcom/android/internal/net/VpnProfile;->server:Ljava/lang/String;
-Lcom/android/internal/net/VpnProfile;->type:I
-Lcom/android/internal/net/VpnProfile;->username:Ljava/lang/String;
-Lcom/android/internal/os/AtomicFile;-><init>(Ljava/io/File;)V
-Lcom/android/internal/os/AtomicFile;->failWrite(Ljava/io/FileOutputStream;)V
-Lcom/android/internal/os/AtomicFile;->finishWrite(Ljava/io/FileOutputStream;)V
-Lcom/android/internal/os/AtomicFile;->getBaseFile()Ljava/io/File;
-Lcom/android/internal/os/AtomicFile;->openAppend()Ljava/io/FileOutputStream;
-Lcom/android/internal/os/AtomicFile;->openRead()Ljava/io/FileInputStream;
-Lcom/android/internal/os/AtomicFile;->readFully()[B
-Lcom/android/internal/os/AtomicFile;->startWrite()Ljava/io/FileOutputStream;
-Lcom/android/internal/os/AtomicFile;->truncate()V
-Lcom/android/internal/os/BatterySipper$DrainType;->APP:Lcom/android/internal/os/BatterySipper$DrainType;
Lcom/android/internal/os/BatterySipper$DrainType;->values()[Lcom/android/internal/os/BatterySipper$DrainType;
-Lcom/android/internal/os/BatterySipper;-><init>(Lcom/android/internal/os/BatterySipper$DrainType;Landroid/os/BatteryStats$Uid;D)V
-Lcom/android/internal/os/BatterySipper;->add(Lcom/android/internal/os/BatterySipper;)V
-Lcom/android/internal/os/BatterySipper;->cpuFgTimeMs:J
-Lcom/android/internal/os/BatterySipper;->cpuPowerMah:D
-Lcom/android/internal/os/BatterySipper;->cpuTimeMs:J
-Lcom/android/internal/os/BatterySipper;->drainType:Lcom/android/internal/os/BatterySipper$DrainType;
-Lcom/android/internal/os/BatterySipper;->getPackages()[Ljava/lang/String;
-Lcom/android/internal/os/BatterySipper;->getUid()I
-Lcom/android/internal/os/BatterySipper;->gpsTimeMs:J
-Lcom/android/internal/os/BatterySipper;->mPackages:[Ljava/lang/String;
-Lcom/android/internal/os/BatterySipper;->packageWithHighestDrain:Ljava/lang/String;
-Lcom/android/internal/os/BatterySipper;->totalPowerMah:D
-Lcom/android/internal/os/BatterySipper;->uidObj:Landroid/os/BatteryStats$Uid;
-Lcom/android/internal/os/BatterySipper;->usageTimeMs:J
-Lcom/android/internal/os/BatterySipper;->userId:I
-Lcom/android/internal/os/BatterySipper;->wakeLockTimeMs:J
-Lcom/android/internal/os/BatterySipper;->wifiRunningTimeMs:J
-Lcom/android/internal/os/BatteryStatsHelper;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/os/BatteryStatsHelper;-><init>(Landroid/content/Context;Z)V
-Lcom/android/internal/os/BatteryStatsHelper;-><init>(Landroid/content/Context;ZZ)V
-Lcom/android/internal/os/BatteryStatsHelper;->clearStats()V
-Lcom/android/internal/os/BatteryStatsHelper;->create(Landroid/os/Bundle;)V
-Lcom/android/internal/os/BatteryStatsHelper;->dropFile(Landroid/content/Context;Ljava/lang/String;)V
-Lcom/android/internal/os/BatteryStatsHelper;->getBatteryBroadcast()Landroid/content/Intent;
-Lcom/android/internal/os/BatteryStatsHelper;->getMaxPower()D
-Lcom/android/internal/os/BatteryStatsHelper;->getStats()Landroid/os/BatteryStats;
-Lcom/android/internal/os/BatteryStatsHelper;->getTotalPower()D
-Lcom/android/internal/os/BatteryStatsHelper;->getUsageList()Ljava/util/List;
-Lcom/android/internal/os/BatteryStatsHelper;->load()V
-Lcom/android/internal/os/BatteryStatsHelper;->mBatteryInfo:Lcom/android/internal/app/IBatteryStats;
-Lcom/android/internal/os/BatteryStatsHelper;->mPowerProfile:Lcom/android/internal/os/PowerProfile;
-Lcom/android/internal/os/BatteryStatsHelper;->mUsageList:Ljava/util/List;
-Lcom/android/internal/os/BatteryStatsHelper;->refreshStats(II)V
-Lcom/android/internal/os/BatteryStatsHelper;->refreshStats(ILandroid/util/SparseArray;)V
-Lcom/android/internal/os/BatteryStatsHelper;->refreshStats(ILjava/util/List;)V
-Lcom/android/internal/os/BatteryStatsHelper;->storeState()V
-Lcom/android/internal/os/BatteryStatsImpl$Counter;->mCount:Ljava/util/concurrent/atomic/AtomicInteger;
-Lcom/android/internal/os/BatteryStatsImpl$StopwatchTimer;->detach()V
-Lcom/android/internal/os/BatteryStatsImpl$Timer;->getCountLocked(I)I
-Lcom/android/internal/os/BatteryStatsImpl$Timer;->getTotalTimeLocked(JI)J
-Lcom/android/internal/os/BatteryStatsImpl$Timer;->writeTimerToParcel(Landroid/os/Parcel;Lcom/android/internal/os/BatteryStatsImpl$Timer;J)V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->getBatteryStats()Lcom/android/internal/os/BatteryStatsImpl;
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->startLaunchedLocked()V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->startRunningLocked()V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->stopLaunchedLocked()V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;->stopRunningLocked()V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->addCpuTimeLocked(II)V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->addForegroundTimeLocked(J)V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getForegroundTime(I)J
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getStarts(I)I
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getSystemTime(I)J
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->getUserTime(I)J
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;->incStartsLocked()V
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Sensor;->getHandle()I
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Sensor;->getSensorTime()Lcom/android/internal/os/BatteryStatsImpl$Timer;
-Lcom/android/internal/os/BatteryStatsImpl$Uid$Wakelock;->getWakeTime(I)Lcom/android/internal/os/BatteryStatsImpl$Timer;
-Lcom/android/internal/os/BatteryStatsImpl$Uid;->getProcessStats()Landroid/util/ArrayMap;
-Lcom/android/internal/os/BatteryStatsImpl$Uid;->getSensorStats()Landroid/util/SparseArray;
-Lcom/android/internal/os/BatteryStatsImpl$Uid;->getUid()I
-Lcom/android/internal/os/BatteryStatsImpl$Uid;->getWakelockStats()Landroid/util/ArrayMap;
-Lcom/android/internal/os/BatteryStatsImpl$Uid;->getWifiRunningTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl$Uid;->getWifiScanTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;-><init>(Landroid/os/Parcel;)V
-Lcom/android/internal/os/BatteryStatsImpl;->computeBatteryRealtime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->computeBatteryTimeRemaining(J)J
-Lcom/android/internal/os/BatteryStatsImpl;->computeBatteryUptime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->CREATOR:Landroid/os/Parcelable$Creator;
-Lcom/android/internal/os/BatteryStatsImpl;->getAwakeTimeBattery()J
-Lcom/android/internal/os/BatteryStatsImpl;->getAwakeTimePlugged()J
-Lcom/android/internal/os/BatteryStatsImpl;->getBatteryRealtime(J)J
-Lcom/android/internal/os/BatteryStatsImpl;->getDischargeAmount(I)I
-Lcom/android/internal/os/BatteryStatsImpl;->getDischargeAmountScreenOff()I
-Lcom/android/internal/os/BatteryStatsImpl;->getDischargeAmountScreenOn()I
-Lcom/android/internal/os/BatteryStatsImpl;->getGlobalWifiRunningTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getKernelWakelockStats()Ljava/util/Map;
-Lcom/android/internal/os/BatteryStatsImpl;->getMobileRadioActiveTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getNetworkActivityBytes(II)J
-Lcom/android/internal/os/BatteryStatsImpl;->getNextHistoryLocked(Landroid/os/BatteryStats$HistoryItem;)Z
-Lcom/android/internal/os/BatteryStatsImpl;->getPackageStatsLocked(ILjava/lang/String;)Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg;
-Lcom/android/internal/os/BatteryStatsImpl;->getPhoneDataConnectionCount(II)I
-Lcom/android/internal/os/BatteryStatsImpl;->getPhoneDataConnectionTime(IJI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalStrengthCount(II)I
-Lcom/android/internal/os/BatteryStatsImpl;->getProcessStatsLocked(ILjava/lang/String;)Lcom/android/internal/os/BatteryStatsImpl$Uid$Proc;
-Lcom/android/internal/os/BatteryStatsImpl;->getScreenOnTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getServiceStatsLocked(ILjava/lang/String;Ljava/lang/String;)Lcom/android/internal/os/BatteryStatsImpl$Uid$Pkg$Serv;
-Lcom/android/internal/os/BatteryStatsImpl;->getUidStats()Landroid/util/SparseArray;
-Lcom/android/internal/os/BatteryStatsImpl;->getUidStatsLocked(I)Lcom/android/internal/os/BatteryStatsImpl$Uid;
-Lcom/android/internal/os/BatteryStatsImpl;->isOnBattery()Z
-Lcom/android/internal/os/BatteryStatsImpl;->mFullTimers:Ljava/util/ArrayList;
-Lcom/android/internal/os/BatteryStatsImpl;->mPartialTimers:Ljava/util/ArrayList;
-Lcom/android/internal/os/BatteryStatsImpl;->mWindowTimers:Ljava/util/ArrayList;
-Lcom/android/internal/os/BatteryStatsImpl;->noteAudioOffLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteAudioOnLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteFullWifiLockAcquiredLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteFullWifiLockReleasedLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->notePhoneDataConnectionStateLocked(IZ)V
-Lcom/android/internal/os/BatteryStatsImpl;->notePhoneOffLocked()V
-Lcom/android/internal/os/BatteryStatsImpl;->notePhoneOnLocked()V
-Lcom/android/internal/os/BatteryStatsImpl;->notePhoneSignalStrengthLocked(Landroid/telephony/SignalStrength;)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteScreenBrightnessLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteUserActivityLocked(II)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteVideoOffLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteVideoOnLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteWifiMulticastDisabledLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->noteWifiMulticastEnabledLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->readLocked()V
-Lcom/android/internal/os/BatteryStatsImpl;->removeUidStatsLocked(I)V
-Lcom/android/internal/os/BatteryStatsImpl;->startIteratingHistoryLocked()Z
-Lcom/android/internal/os/FuseAppLoop;->onCommand(IJJJI[B)V
-Lcom/android/internal/os/FuseAppLoop;->onOpen(JJ)[B
-Lcom/android/internal/os/HandlerCaller;->obtainMessage(I)Landroid/os/Message;
-Lcom/android/internal/os/HandlerCaller;->obtainMessageIO(IILjava/lang/Object;)Landroid/os/Message;
-Lcom/android/internal/os/HandlerCaller;->obtainMessageIOO(IILjava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
-Lcom/android/internal/os/HandlerCaller;->obtainMessageO(ILjava/lang/Object;)Landroid/os/Message;
-Lcom/android/internal/os/HandlerCaller;->obtainMessageOO(ILjava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
-Lcom/android/internal/os/HandlerCaller;->obtainMessageOOO(ILjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Landroid/os/Message;
-Lcom/android/internal/os/HandlerCaller;->sendMessage(Landroid/os/Message;)V
Lcom/android/internal/os/IDropBoxManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/os/IDropBoxManagerService;
Lcom/android/internal/os/IDropBoxManagerService;->getNextEntry(Ljava/lang/String;JLjava/lang/String;)Landroid/os/DropBoxManager$Entry;
-Lcom/android/internal/os/PowerProfile;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/os/PowerProfile;->getAveragePower(Ljava/lang/String;)D
-Lcom/android/internal/os/PowerProfile;->getAveragePower(Ljava/lang/String;I)D
-Lcom/android/internal/os/PowerProfile;->getBatteryCapacity()D
-Lcom/android/internal/os/PowerProfile;->getNumCpuClusters()I
-Lcom/android/internal/os/PowerProfile;->getNumSpeedStepsInCpuCluster(I)I
-Lcom/android/internal/os/PowerProfile;->POWER_BLUETOOTH_AT_CMD:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_BLUETOOTH_ON:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_CPU_ACTIVE:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_CPU_IDLE:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_GPS_ON:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_RADIO_ACTIVE:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_RADIO_ON:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_RADIO_SCANNING:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_SCREEN_FULL:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_SCREEN_ON:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_WIFI_ACTIVE:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_WIFI_ON:Ljava/lang/String;
-Lcom/android/internal/os/PowerProfile;->POWER_WIFI_SCAN:Ljava/lang/String;
-Lcom/android/internal/os/SomeArgs;->arg1:Ljava/lang/Object;
-Lcom/android/internal/os/SomeArgs;->argi2:I
-Lcom/android/internal/os/SomeArgs;->argi3:I
Lcom/android/internal/policy/IKeyguardService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/policy/IKeyguardService;
Lcom/android/internal/policy/IKeyguardService;->doKeyguardTimeout(Landroid/os/Bundle;)V
Lcom/android/internal/policy/IKeyguardService;->setKeyguardEnabled(Z)V
@@ -7469,34 +2477,8 @@
Lcom/android/internal/telephony/SmsRawData;->CREATOR:Landroid/os/Parcelable$Creator;
Lcom/android/internal/telephony/SmsRawData;->getBytes()[B
Lcom/android/internal/textservice/ITextServicesManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
-Lcom/android/internal/util/AsyncChannel;->cmdToString(I)Ljava/lang/String;
-Lcom/android/internal/util/AsyncChannel;->CMD_CHANNEL_FULL_CONNECTION:I
-Lcom/android/internal/util/AsyncChannel;->CMD_CHANNEL_HALF_CONNECTED:I
-Lcom/android/internal/util/AsyncChannel;->connected(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)V
-Lcom/android/internal/util/AsyncChannel;->connectSync(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)I
-Lcom/android/internal/util/AsyncChannel;->disconnect()V
-Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;I)V
-Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;II)V
-Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;IIILjava/lang/Object;)V
-Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;ILjava/lang/Object;)V
-Lcom/android/internal/util/AsyncChannel;->replyToMessage(Landroid/os/Message;Landroid/os/Message;)V
-Lcom/android/internal/util/AsyncChannel;->sendMessage(I)V
-Lcom/android/internal/util/AsyncChannel;->sendMessage(II)V
-Lcom/android/internal/util/AsyncChannel;->sendMessage(III)V
-Lcom/android/internal/util/AsyncChannel;->sendMessage(IIILjava/lang/Object;)V
-Lcom/android/internal/util/AsyncChannel;->sendMessageSynchronously(III)Landroid/os/Message;
-Lcom/android/internal/util/AsyncChannel;->sendMessageSynchronously(Landroid/os/Message;)Landroid/os/Message;
-Lcom/android/internal/util/AsyncChannel;->STATUS_SUCCESSFUL:I
-Lcom/android/internal/util/FastPrintWriter;-><init>(Ljava/io/OutputStream;)V
Lcom/android/internal/util/HexDump;->toHexString([BZ)Ljava/lang/String;
-Lcom/android/internal/util/XmlUtils;->convertValueToBoolean(Ljava/lang/CharSequence;Z)Z
-Lcom/android/internal/util/XmlUtils;->convertValueToInt(Ljava/lang/CharSequence;I)I
-Lcom/android/internal/util/XmlUtils;->readMapXml(Ljava/io/InputStream;)Ljava/util/HashMap;
-Lcom/android/internal/util/XmlUtils;->skipCurrentTag(Lorg/xmlpull/v1/XmlPullParser;)V
-Lcom/android/internal/util/XmlUtils;->writeMapXml(Ljava/util/Map;Ljava/io/OutputStream;)V
Lcom/android/internal/view/BaseIWindow;-><init>()V
-Lcom/android/internal/view/IInputConnectionWrapper;->mInputConnection:Landroid/view/inputmethod/InputConnection;
-Lcom/android/internal/view/IInputConnectionWrapper;->mLock:Ljava/lang/Object;
Lcom/android/internal/view/IInputMethod$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethod;
Lcom/android/internal/view/IInputMethod;->attachToken(Landroid/os/IBinder;)V
Lcom/android/internal/view/IInputMethod;->bindInput(Landroid/view/inputmethod/InputBinding;)V
@@ -7513,53 +2495,6 @@
Lcom/android/internal/view/IInputMethodManager;->addClient(Lcom/android/internal/view/IInputMethodClient;Lcom/android/internal/view/IInputContext;II)V
Lcom/android/internal/view/IInputMethodManager;->removeClient(Lcom/android/internal/view/IInputMethodClient;)V
Lcom/android/internal/view/IInputMethodSession$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/view/IInputMethodSession;
-Lcom/android/internal/view/InputBindResult;->CREATOR:Landroid/os/Parcelable$Creator;
-Lcom/android/internal/view/InputBindResult;->method:Lcom/android/internal/view/IInputMethodSession;
-Lcom/android/internal/view/menu/ActionMenuItemView;->hasText()Z
-Lcom/android/internal/view/menu/MenuBuilder$Callback;->onMenuItemSelected(Lcom/android/internal/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
-Lcom/android/internal/view/menu/MenuBuilder$Callback;->onMenuModeChange(Lcom/android/internal/view/menu/MenuBuilder;)V
-Lcom/android/internal/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/view/menu/MenuBuilder;->addMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;)V
-Lcom/android/internal/view/menu/MenuBuilder;->addMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;Landroid/content/Context;)V
-Lcom/android/internal/view/menu/MenuBuilder;->collapseItemActionView(Lcom/android/internal/view/menu/MenuItemImpl;)Z
-Lcom/android/internal/view/menu/MenuBuilder;->getContext()Landroid/content/Context;
-Lcom/android/internal/view/menu/MenuBuilder;->getHeaderIcon()Landroid/graphics/drawable/Drawable;
-Lcom/android/internal/view/menu/MenuBuilder;->getHeaderTitle()Ljava/lang/CharSequence;
-Lcom/android/internal/view/menu/MenuBuilder;->getNonActionItems()Ljava/util/ArrayList;
-Lcom/android/internal/view/menu/MenuBuilder;->getRootMenu()Lcom/android/internal/view/menu/MenuBuilder;
-Lcom/android/internal/view/menu/MenuBuilder;->getVisibleItems()Ljava/util/ArrayList;
-Lcom/android/internal/view/menu/MenuBuilder;->mContext:Landroid/content/Context;
-Lcom/android/internal/view/menu/MenuBuilder;->removeMenuPresenter(Lcom/android/internal/view/menu/MenuPresenter;)V
-Lcom/android/internal/view/menu/MenuBuilder;->setCallback(Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
-Lcom/android/internal/view/menu/MenuBuilder;->setCurrentMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
-Lcom/android/internal/view/menu/MenuBuilder;->setDefaultShowAsAction(I)Lcom/android/internal/view/menu/MenuBuilder;
-Lcom/android/internal/view/menu/MenuBuilder;->setOptionalIconsVisible(Z)V
-Lcom/android/internal/view/menu/MenuBuilder;->startDispatchingItemsChanged()V
-Lcom/android/internal/view/menu/MenuBuilder;->stopDispatchingItemsChanged()V
-Lcom/android/internal/view/menu/MenuItemImpl;->invoke()Z
-Lcom/android/internal/view/menu/MenuItemImpl;->isActionButton()Z
-Lcom/android/internal/view/menu/MenuItemImpl;->mIconResId:I
-Lcom/android/internal/view/menu/MenuItemImpl;->requestsActionButton()Z
-Lcom/android/internal/view/menu/MenuItemImpl;->requiresActionButton()Z
-Lcom/android/internal/view/menu/MenuItemImpl;->setActionViewExpanded(Z)V
-Lcom/android/internal/view/menu/MenuItemImpl;->setExclusiveCheckable(Z)V
-Lcom/android/internal/view/menu/MenuItemImpl;->setMenuInfo(Landroid/view/ContextMenu$ContextMenuInfo;)V
-Lcom/android/internal/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Lcom/android/internal/view/menu/MenuBuilder;)V
-Lcom/android/internal/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Lcom/android/internal/view/menu/MenuBuilder;Landroid/view/View;)V
-Lcom/android/internal/view/menu/MenuPopupHelper;->dismiss()V
-Lcom/android/internal/view/menu/MenuPopupHelper;->getPopup()Lcom/android/internal/view/menu/MenuPopup;
-Lcom/android/internal/view/menu/MenuPopupHelper;->mForceShowIcon:Z
-Lcom/android/internal/view/menu/MenuPopupHelper;->setAnchorView(Landroid/view/View;)V
-Lcom/android/internal/view/menu/MenuPopupHelper;->setForceShowIcon(Z)V
-Lcom/android/internal/view/menu/MenuPopupHelper;->setGravity(I)V
-Lcom/android/internal/view/menu/MenuPopupHelper;->show()V
-Lcom/android/internal/view/menu/MenuPopupHelper;->tryShow()Z
-Lcom/android/internal/view/menu/MenuPresenter$Callback;->onOpenSubMenu(Lcom/android/internal/view/menu/MenuBuilder;)Z
-Lcom/android/internal/view/menu/MenuView$ItemView;->getItemData()Lcom/android/internal/view/menu/MenuItemImpl;
-Lcom/android/internal/view/menu/MenuView;->getWindowAnimations()I
-Lcom/android/internal/view/menu/SubMenuBuilder;->getRootMenu()Lcom/android/internal/view/menu/MenuBuilder;
-Lcom/android/internal/view/menu/SubMenuBuilder;->setCallback(Lcom/android/internal/view/menu/MenuBuilder$Callback;)V
-Lcom/android/internal/widget/CachingIconView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
Lcom/android/internal/widget/ILockSettings$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/widget/ILockSettings;
Lcom/android/internal/widget/ILockSettings;->getBoolean(Ljava/lang/String;ZI)Z
Lcom/android/internal/widget/ILockSettings;->getLong(Ljava/lang/String;JI)J
@@ -7579,16 +2514,6 @@
Lcom/android/internal/widget/IRemoteViewsFactory;->isCreated()Z
Lcom/android/internal/widget/IRemoteViewsFactory;->onDataSetChanged()V
Lcom/android/internal/widget/ScrollBarUtils;->getThumbLength(IIII)I
-Lcom/android/internal/widget/ScrollingTabContainerView;-><init>(Landroid/content/Context;)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->addTab(Landroid/app/ActionBar$Tab;IZ)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->addTab(Landroid/app/ActionBar$Tab;Z)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->animateToTab(I)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->animateToVisibility(I)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->removeAllTabs()V
-Lcom/android/internal/widget/ScrollingTabContainerView;->removeTabAt(I)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->setAllowCollapse(Z)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->setTabSelected(I)V
-Lcom/android/internal/widget/ScrollingTabContainerView;->updateTab(I)V
Lcom/android/okhttp/Connection;->getSocket()Ljava/net/Socket;
Lcom/android/okhttp/ConnectionPool;->connections:Ljava/util/Deque;
Lcom/android/okhttp/ConnectionPool;->keepAliveDurationNs:J
@@ -8131,7 +3056,6 @@
Ljava/util/zip/ZipOutputStream;->method:I
Ljava/util/zip/ZipOutputStream;->names:Ljava/util/HashSet;
Ljava/util/zip/ZipOutputStream;->written:J
-Ljavax/microedition/khronos/egl/EGL10;->eglReleaseThread()Z
Ljavax/net/ssl/SSLServerSocketFactory;->defaultServerSocketFactory:Ljavax/net/ssl/SSLServerSocketFactory;
Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/io/InputStream;Z)Ljava/net/Socket;
Ljavax/net/ssl/SSLSocketFactory;->defaultSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
@@ -8147,15 +3071,6 @@
Llibcore/io/Streams;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)I
Llibcore/util/BasicLruCache;->map:Ljava/util/LinkedHashMap;
Llibcore/util/ZoneInfo;->mTransitions:[J
-Lorg/apache/http/conn/ssl/AbstractVerifier;->BAD_COUNTRY_2LDS:[Ljava/lang/String;
-Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>()V
-Lorg/apache/http/conn/ssl/SSLSocketFactory;-><init>(Ljavax/net/ssl/SSLSocketFactory;)V
-Lorg/apache/http/conn/ssl/SSLSocketFactory;->createKeyManagers(Ljava/security/KeyStore;Ljava/lang/String;)[Ljavax/net/ssl/KeyManager;
-Lorg/apache/http/conn/ssl/SSLSocketFactory;->createTrustManagers(Ljava/security/KeyStore;)[Ljavax/net/ssl/TrustManager;
-Lorg/apache/http/conn/ssl/SSLSocketFactory;->hostnameVerifier:Lorg/apache/http/conn/ssl/X509HostnameVerifier;
-Lorg/apache/http/conn/ssl/SSLSocketFactory;->nameResolver:Lorg/apache/http/conn/scheme/HostNameResolver;
-Lorg/apache/http/conn/ssl/SSLSocketFactory;->socketfactory:Ljavax/net/ssl/SSLSocketFactory;
-Lorg/apache/http/conn/ssl/SSLSocketFactory;->sslcontext:Ljavax/net/ssl/SSLContext;
Lorg/ccil/cowan/tagsoup/AttributesImpl;->data:[Ljava/lang/String;
Lorg/ccil/cowan/tagsoup/AttributesImpl;->length:I
Lorg/ccil/cowan/tagsoup/ElementType;->theAtts:Lorg/ccil/cowan/tagsoup/AttributesImpl;
diff --git a/config/hiddenapi-p-light-greylist.txt b/config/hiddenapi-p-light-greylist.txt
index e360879..e26a4c7 100644
--- a/config/hiddenapi-p-light-greylist.txt
+++ b/config/hiddenapi-p-light-greylist.txt
@@ -534,7 +534,7 @@
Landroid/app/INotificationManager;->cancelAllNotifications(Ljava/lang/String;I)V
Landroid/app/INotificationManager;->cancelNotificationWithTag(Ljava/lang/String;Ljava/lang/String;II)V
Landroid/app/INotificationManager;->cancelToast(Ljava/lang/String;Landroid/app/ITransientNotification;)V
-Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;I)V
+Landroid/app/INotificationManager;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;II)V
Landroid/app/IProcessObserver$Stub;-><init>()V
Landroid/app/ISearchManager$Stub$Proxy;->getGlobalSearchActivity()Landroid/content/ComponentName;
Landroid/app/ISearchManager$Stub$Proxy;->getWebSearchActivity()Landroid/content/ComponentName;
diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt
index 0353e65..9e6abe4 100644
--- a/config/hiddenapi-vendor-list.txt
+++ b/config/hiddenapi-vendor-list.txt
@@ -1,19 +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;
-Landroid/app/ActivityManager$TaskSnapshot;->getSnapshot()Landroid/graphics/GraphicBuffer;
-Landroid/app/ActivityManagerNative;->broadcastStickyIntent(Landroid/content/Intent;Ljava/lang/String;I)V
-Landroid/app/ActivityOptions;->makeRemoteAnimation(Landroid/view/RemoteAnimationAdapter;)Landroid/app/ActivityOptions;
-Landroid/app/ActivityOptions;->setSplitScreenCreateMode(I)V
-Landroid/app/ActivityView;-><init>(Landroid/content/Context;)V
-Landroid/app/ActivityView;->release()V
-Landroid/app/ActivityView;->startActivity(Landroid/app/PendingIntent;)V
-Landroid/app/ActivityView;->startActivity(Landroid/content/Intent;)V
-Landroid/app/AppOpsManager$OpEntry;->getOp()I
-Landroid/app/AppOpsManager$OpEntry;->getTime()J
-Landroid/app/AppOpsManager;->getPackagesForOps([I)Ljava/util/List;
-Landroid/app/AppOpsManager;->getToken(Lcom/android/internal/app/IAppOpsService;)Landroid/os/IBinder;
Landroid/app/IActivityController$Stub;-><init>()V
Landroid/app/IActivityManager;->cancelRecentsAnimation(Z)V
Landroid/app/IActivityManager;->cancelTaskWindowTransition(I)V
@@ -35,53 +19,11 @@
Landroid/app/IAssistDataReceiver$Stub;-><init>()V
Landroid/app/IAssistDataReceiver;->onHandleAssistData(Landroid/os/Bundle;)V
Landroid/app/IAssistDataReceiver;->onHandleAssistScreenshot(Landroid/graphics/Bitmap;)V
-Landroid/app/KeyguardManager;->isDeviceLocked(I)Z
-Landroid/app/NotificationManager;->cancelAsUser(Ljava/lang/String;ILandroid/os/UserHandle;)V
-Landroid/app/StatusBarManager;->removeIcon(Ljava/lang/String;)V
-Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
-Landroid/app/TaskInfo;->configuration:Landroid/content/res/Configuration;
-Landroid/app/TaskStackListener;->onActivityDismissingDockedStack()V
-Landroid/app/TaskStackListener;->onActivityForcedResizable(Ljava/lang/String;II)V
-Landroid/app/TaskStackListener;->onActivityLaunchOnSecondaryDisplayFailed()V
-Landroid/app/TaskStackListener;->onActivityPinned(Ljava/lang/String;III)V
-Landroid/app/TaskStackListener;->onActivityRequestedOrientationChanged(II)V
-Landroid/app/TaskStackListener;->onActivityUnpinned()V
-Landroid/app/TaskStackListener;->onPinnedActivityRestartAttempt(Z)V
-Landroid/app/TaskStackListener;->onPinnedStackAnimationEnded()V
-Landroid/app/TaskStackListener;->onPinnedStackAnimationStarted()V
-Landroid/app/TaskStackListener;->onTaskMovedToFront(I)V
-Landroid/app/TaskStackListener;->onTaskProfileLocked(II)V
-Landroid/app/TaskStackListener;->onTaskRemoved(I)V
-Landroid/app/TaskStackListener;->onTaskSnapshotChanged(ILandroid/app/ActivityManager$TaskSnapshot;)V
-Landroid/app/TaskStackListener;->onTaskStackChanged()V
-Landroid/app/WallpaperColors;-><init>(Landroid/graphics/Color;Landroid/graphics/Color;Landroid/graphics/Color;I)V
Landroid/bluetooth/IBluetooth;->sendConnectionStateChange(Landroid/bluetooth/BluetoothDevice;III)V
-Landroid/companion/AssociationRequest;->getDeviceFilters()Ljava/util/List;
-Landroid/companion/AssociationRequest;->isSingleDevice()Z
-Landroid/companion/BluetoothDeviceFilter;->getAddress()Ljava/lang/String;
-Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String;
-Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceDisplayNameInternal(Landroid/net/wifi/ScanResult;)Ljava/lang/String;
-Landroid/companion/BluetoothDeviceFilterUtils;->getDeviceMacAddress(Landroid/os/Parcelable;)Ljava/lang/String;
-Landroid/companion/BluetoothLeDeviceFilter;->getScanFilter()Landroid/bluetooth/le/ScanFilter;
-Landroid/companion/DeviceFilter;->getDeviceDisplayName(Landroid/os/Parcelable;)Ljava/lang/String;
-Landroid/companion/DeviceFilter;->matches(Landroid/os/Parcelable;)Z
Landroid/companion/ICompanionDeviceDiscoveryService$Stub;-><init>()V
Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelected(Ljava/lang/String;ILjava/lang/String;)V
Landroid/companion/ICompanionDeviceDiscoveryServiceCallback;->onDeviceSelectionCancel()V
Landroid/companion/IFindDeviceCallback;->onSuccess(Landroid/app/PendingIntent;)V
-Landroid/content/ContentProvider;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;[Landroid/content/pm/PathPermission;)V
-Landroid/content/ContentProvider;->attachInfoForTesting(Landroid/content/Context;Landroid/content/pm/ProviderInfo;)V
-Landroid/content/ContentProvider;->getIContentProvider()Landroid/content/IContentProvider;
-Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
-Landroid/content/ContentValues;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;
-Landroid/content/ContentValues;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V
-Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
-Landroid/content/Context;->startActivityAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
-Landroid/content/Context;->startServiceAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)Landroid/content/ComponentName;
-Landroid/content/ContextWrapper;->getThemeResId()I
-Landroid/content/Intent;->getExtra(Ljava/lang/String;)Ljava/lang/Object;
-Landroid/content/Intent;->getIBinderExtra(Ljava/lang/String;)Landroid/os/IBinder;
-Landroid/content/Intent;->resolveSystemService(Landroid/content/pm/PackageManager;I)Landroid/content/ComponentName;
Landroid/content/pm/IPackageDataObserver$Stub;-><init>()V
Landroid/content/pm/IPackageDeleteObserver$Stub;-><init>()V
Landroid/content/pm/IPackageDeleteObserver;->packageDeleted(Ljava/lang/String;I)V
@@ -90,12 +32,6 @@
Landroid/content/pm/IPackageManager;->getHomeActivities(Ljava/util/List;)Landroid/content/ComponentName;
Landroid/content/pm/IPackageManager;->getPackageInfo(Ljava/lang/String;II)Landroid/content/pm/PackageInfo;
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;
@@ -104,21 +40,6 @@
Landroid/location/ILocationManager;->reportLocation(Landroid/location/Location;Z)V
Landroid/location/INetInitiatedListener$Stub;-><init>()V
Landroid/location/INetInitiatedListener;->sendNiResponse(II)Z
-Landroid/location/Location;->setExtraLocation(Ljava/lang/String;Landroid/location/Location;)V
-Landroid/media/AudioManager;->registerAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
-Landroid/media/AudioManager;->unregisterAudioPortUpdateListener(Landroid/media/AudioManager$OnAudioPortUpdateListener;)V
-Landroid/media/AudioSystem;->checkAudioFlinger()I
-Landroid/media/AudioSystem;->getForceUse(I)I
-Landroid/media/AudioSystem;->getParameters(Ljava/lang/String;)Ljava/lang/String;
-Landroid/media/AudioSystem;->setForceUse(II)I
-Landroid/media/AudioSystem;->setParameters(Ljava/lang/String;)I
-Landroid/media/MediaDrm$Certificate;->getContent()[B
-Landroid/media/MediaDrm$Certificate;->getWrappedPrivateKey()[B
-Landroid/media/MediaDrm$CertificateRequest;->getData()[B
-Landroid/media/MediaDrm$CertificateRequest;->getDefaultUrl()Ljava/lang/String;
-Landroid/media/MediaDrm;->getCertificateRequest(ILjava/lang/String;)Landroid/media/MediaDrm$CertificateRequest;
-Landroid/media/MediaDrm;->provideCertificateResponse([B)Landroid/media/MediaDrm$Certificate;
-Landroid/media/MediaDrm;->signRSA([BLjava/lang/String;[B[B)[B
Landroid/media/tv/ITvRemoteProvider$Stub;-><init>()V
Landroid/media/tv/ITvRemoteServiceInput;->clearInputBridge(Landroid/os/IBinder;)V
Landroid/media/tv/ITvRemoteServiceInput;->closeInputBridge(Landroid/os/IBinder;)V
@@ -129,23 +50,7 @@
Landroid/media/tv/ITvRemoteServiceInput;->sendPointerSync(Landroid/os/IBinder;)V
Landroid/media/tv/ITvRemoteServiceInput;->sendPointerUp(Landroid/os/IBinder;I)V
Landroid/media/tv/ITvRemoteServiceInput;->sendTimestamp(Landroid/os/IBinder;J)V
-Landroid/net/ConnectivityManager$PacketKeepalive;->stop()V
Landroid/net/ConnectivityManager$PacketKeepaliveCallback;-><init>()V
-Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onError(I)V
-Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStarted()V
-Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStopped()V
-Landroid/net/ConnectivityManager;->getActiveNetworkQuotaInfo()Landroid/net/NetworkQuotaInfo;
-Landroid/net/ConnectivityManager;->setAirplaneMode(Z)V
-Landroid/net/ConnectivityManager;->startNattKeepalive(Landroid/net/Network;ILandroid/net/ConnectivityManager$PacketKeepaliveCallback;Ljava/net/InetAddress;ILjava/net/InetAddress;)Landroid/net/ConnectivityManager$PacketKeepalive;
-Landroid/net/ConnectivityManager;->tether(Ljava/lang/String;)I
-Landroid/net/ConnectivityManager;->untether(Ljava/lang/String;)I
-Landroid/net/DhcpResults;-><init>()V
-Landroid/net/DhcpResults;-><init>(Landroid/net/DhcpResults;)V
-Landroid/net/DhcpResults;-><init>(Landroid/net/StaticIpConfiguration;)V
-Landroid/net/DhcpResults;->leaseDuration:I
-Landroid/net/DhcpResults;->mtu:I
-Landroid/net/DhcpResults;->serverAddress:Ljava/net/Inet4Address;
-Landroid/net/DhcpResults;->vendorInfo:Ljava/lang/String;
Landroid/net/IConnectivityManager;->getAllNetworkState()[Landroid/net/NetworkState;
Landroid/net/INetd$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetd;
Landroid/net/INetd;->interfaceAddAddress(Ljava/lang/String;Ljava/lang/String;I)V
@@ -154,149 +59,7 @@
Landroid/net/INetworkStatsSession;->getHistoryForNetwork(Landroid/net/NetworkTemplate;I)Landroid/net/NetworkStatsHistory;
Landroid/net/INetworkStatsSession;->getHistoryForUid(Landroid/net/NetworkTemplate;IIII)Landroid/net/NetworkStatsHistory;
Landroid/net/InterfaceConfiguration;-><init>()V
-Landroid/net/InterfaceConfiguration;->setLinkAddress(Landroid/net/LinkAddress;)V
-Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V
-Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V
-Landroid/net/LinkAddress;->isIPv6()Z
-Landroid/net/LinkAddress;->isSameAddressAs(Landroid/net/LinkAddress;)Z
-Landroid/net/LinkProperties$ProvisioningChange;->GAINED_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
-Landroid/net/LinkProperties$ProvisioningChange;->LOST_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
-Landroid/net/LinkProperties$ProvisioningChange;->STILL_NOT_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
-Landroid/net/LinkProperties$ProvisioningChange;->STILL_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties$ProvisioningChange;->values()[Landroid/net/LinkProperties$ProvisioningChange;
-Landroid/net/LinkProperties;-><init>()V
-Landroid/net/LinkProperties;-><init>(Landroid/net/LinkProperties;)V
-Landroid/net/LinkProperties;->addDnsServer(Ljava/net/InetAddress;)Z
-Landroid/net/LinkProperties;->addRoute(Landroid/net/RouteInfo;)Z
-Landroid/net/LinkProperties;->addStackedLink(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->clear()V
-Landroid/net/LinkProperties;->compareProvisioning(Landroid/net/LinkProperties;Landroid/net/LinkProperties;)Landroid/net/LinkProperties$ProvisioningChange;
-Landroid/net/LinkProperties;->getAllInterfaceNames()Ljava/util/List;
-Landroid/net/LinkProperties;->getAllRoutes()Ljava/util/List;
-Landroid/net/LinkProperties;->getMtu()I
-Landroid/net/LinkProperties;->getStackedLinks()Ljava/util/List;
-Landroid/net/LinkProperties;->hasGlobalIPv6Address()Z
-Landroid/net/LinkProperties;->hasIPv4Address()Z
-Landroid/net/LinkProperties;->hasIPv4DefaultRoute()Z
-Landroid/net/LinkProperties;->hasIPv4DnsServer()Z
-Landroid/net/LinkProperties;->hasIPv6DefaultRoute()Z
-Landroid/net/LinkProperties;->hasIPv6DnsServer()Z
-Landroid/net/LinkProperties;->isIdenticalAddresses(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->isIdenticalDnses(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->isIdenticalRoutes(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->isIdenticalStackedLinks(Landroid/net/LinkProperties;)Z
-Landroid/net/LinkProperties;->isIPv6Provisioned()Z
-Landroid/net/LinkProperties;->isProvisioned()Z
-Landroid/net/LinkProperties;->isReachable(Ljava/net/InetAddress;)Z
-Landroid/net/LinkProperties;->removeDnsServer(Ljava/net/InetAddress;)Z
-Landroid/net/LinkProperties;->removeRoute(Landroid/net/RouteInfo;)Z
-Landroid/net/LinkProperties;->setDnsServers(Ljava/util/Collection;)V
-Landroid/net/LinkProperties;->setDomains(Ljava/lang/String;)V
-Landroid/net/LinkProperties;->setInterfaceName(Ljava/lang/String;)V
-Landroid/net/LinkProperties;->setLinkAddresses(Ljava/util/Collection;)V
-Landroid/net/LinkProperties;->setMtu(I)V
-Landroid/net/LinkProperties;->setTcpBufferSizes(Ljava/lang/String;)V
-Landroid/net/MacAddress;->ALL_ZEROS_ADDRESS:Landroid/net/MacAddress;
-Landroid/net/metrics/ApfProgramEvent;-><init>()V
-Landroid/net/metrics/ApfProgramEvent;->actualLifetime:J
-Landroid/net/metrics/ApfProgramEvent;->currentRas:I
-Landroid/net/metrics/ApfProgramEvent;->filteredRas:I
-Landroid/net/metrics/ApfProgramEvent;->flags:I
-Landroid/net/metrics/ApfProgramEvent;->flagsFor(ZZ)I
-Landroid/net/metrics/ApfProgramEvent;->lifetime:J
-Landroid/net/metrics/ApfProgramEvent;->programLength:I
-Landroid/net/metrics/ApfStats;-><init>()V
-Landroid/net/metrics/ApfStats;->droppedRas:I
-Landroid/net/metrics/ApfStats;->durationMs:J
-Landroid/net/metrics/ApfStats;->matchingRas:I
-Landroid/net/metrics/ApfStats;->maxProgramSize:I
-Landroid/net/metrics/ApfStats;->parseErrors:I
-Landroid/net/metrics/ApfStats;->programUpdates:I
-Landroid/net/metrics/ApfStats;->programUpdatesAll:I
-Landroid/net/metrics/ApfStats;->programUpdatesAllowingMulticast:I
-Landroid/net/metrics/ApfStats;->receivedRas:I
-Landroid/net/metrics/ApfStats;->zeroLifetimeRas:I
-Landroid/net/metrics/DhcpClientEvent;-><init>(Ljava/lang/String;I)V
-Landroid/net/metrics/DhcpErrorEvent;-><init>(I)V
-Landroid/net/metrics/DhcpErrorEvent;->BOOTP_TOO_SHORT:I
-Landroid/net/metrics/DhcpErrorEvent;->BUFFER_UNDERFLOW:I
-Landroid/net/metrics/DhcpErrorEvent;->DHCP_BAD_MAGIC_COOKIE:I
-Landroid/net/metrics/DhcpErrorEvent;->DHCP_INVALID_OPTION_LENGTH:I
-Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_COOKIE:I
-Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_MSG_TYPE:I
-Landroid/net/metrics/DhcpErrorEvent;->DHCP_UNKNOWN_MSG_TYPE:I
-Landroid/net/metrics/DhcpErrorEvent;->errorCodeWithOption(II)I
-Landroid/net/metrics/DhcpErrorEvent;->L2_TOO_SHORT:I
-Landroid/net/metrics/DhcpErrorEvent;->L2_WRONG_ETH_TYPE:I
-Landroid/net/metrics/DhcpErrorEvent;->L3_INVALID_IP:I
-Landroid/net/metrics/DhcpErrorEvent;->L3_NOT_IPV4:I
-Landroid/net/metrics/DhcpErrorEvent;->L3_TOO_SHORT:I
-Landroid/net/metrics/DhcpErrorEvent;->L4_NOT_UDP:I
-Landroid/net/metrics/DhcpErrorEvent;->L4_WRONG_PORT:I
-Landroid/net/metrics/DhcpErrorEvent;->PARSING_ERROR:I
-Landroid/net/metrics/DhcpErrorEvent;->RECEIVE_ERROR:I
-Landroid/net/metrics/IpConnectivityLog;-><init>()V
-Landroid/net/metrics/IpConnectivityLog;->log(Landroid/os/Parcelable;)Z
-Landroid/net/metrics/IpConnectivityLog;->log(Ljava/lang/String;Landroid/os/Parcelable;)Z
-Landroid/net/metrics/IpManagerEvent;-><init>(IJ)V
-Landroid/net/metrics/IpReachabilityEvent;-><init>(I)V
-Landroid/net/metrics/IpReachabilityEvent;->nudFailureEventType(ZZ)I
-Landroid/net/metrics/RaEvent$Builder;-><init>()V
-Landroid/net/metrics/RaEvent$Builder;->build()Landroid/net/metrics/RaEvent;
-Landroid/net/metrics/RaEvent$Builder;->updateDnsslLifetime(J)Landroid/net/metrics/RaEvent$Builder;
-Landroid/net/metrics/RaEvent$Builder;->updatePrefixPreferredLifetime(J)Landroid/net/metrics/RaEvent$Builder;
-Landroid/net/metrics/RaEvent$Builder;->updatePrefixValidLifetime(J)Landroid/net/metrics/RaEvent$Builder;
-Landroid/net/metrics/RaEvent$Builder;->updateRdnssLifetime(J)Landroid/net/metrics/RaEvent$Builder;
-Landroid/net/metrics/RaEvent$Builder;->updateRouteInfoLifetime(J)Landroid/net/metrics/RaEvent$Builder;
-Landroid/net/metrics/RaEvent$Builder;->updateRouterLifetime(J)Landroid/net/metrics/RaEvent$Builder;
-Landroid/net/Network;-><init>(I)V
-Landroid/net/Network;->netId:I
-Landroid/net/NetworkCapabilities;->getNetworkSpecifier()Landroid/net/NetworkSpecifier;
-Landroid/net/NetworkCapabilities;->getSignalStrength()I
-Landroid/net/NetworkCapabilities;->hasSignalStrength()Z
-Landroid/net/NetworkCapabilities;->transportNamesOf([I)Ljava/lang/String;
-Landroid/net/NetworkQuotaInfo;->getEstimatedBytes()J
-Landroid/net/NetworkQuotaInfo;->getHardLimitBytes()J
-Landroid/net/NetworkQuotaInfo;->getSoftLimitBytes()J
-Landroid/net/NetworkRequest$Builder;->setSignalStrength(I)Landroid/net/NetworkRequest$Builder;
-Landroid/net/NetworkRequest;->networkCapabilities:Landroid/net/NetworkCapabilities;
-Landroid/net/NetworkState;->network:Landroid/net/Network;
-Landroid/net/NetworkStats$Entry;-><init>()V
-Landroid/net/NetworkStats$Entry;->iface:Ljava/lang/String;
-Landroid/net/NetworkStats$Entry;->rxBytes:J
-Landroid/net/NetworkStats$Entry;->rxPackets:J
-Landroid/net/NetworkStats$Entry;->set:I
-Landroid/net/NetworkStats$Entry;->tag:I
-Landroid/net/NetworkStats$Entry;->txBytes:J
-Landroid/net/NetworkStats$Entry;->txPackets:J
-Landroid/net/NetworkStats$Entry;->uid:I
-Landroid/net/NetworkStats;-><init>(JI)V
-Landroid/net/NetworkStats;->combineValues(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats;
-Landroid/net/NetworkStatsHistory$Entry;->txBytes:J
-Landroid/net/NetworkStatsHistory;->getStart()J
-Landroid/net/NetworkStatsHistory;->getValues(JJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
-Landroid/net/NetworkTemplate;->buildTemplateMobileAll(Ljava/lang/String;)Landroid/net/NetworkTemplate;
-Landroid/net/NetworkUtils;->attachControlPacketFilter(Ljava/io/FileDescriptor;I)V
-Landroid/net/NetworkUtils;->attachDhcpFilter(Ljava/io/FileDescriptor;)V
-Landroid/net/NetworkUtils;->attachRaFilter(Ljava/io/FileDescriptor;I)V
-Landroid/net/NetworkUtils;->getImplicitNetmask(Ljava/net/Inet4Address;)I
-Landroid/net/NetworkUtils;->netmaskToPrefixLength(Ljava/net/Inet4Address;)I
-Landroid/net/NetworkUtils;->protectFromVpn(Ljava/io/FileDescriptor;)Z
-Landroid/net/RouteInfo;-><init>(Landroid/net/IpPrefix;Ljava/net/InetAddress;Ljava/lang/String;)V
-Landroid/net/RouteInfo;->hasGateway()Z
-Landroid/net/RouteInfo;->selectBestRoute(Ljava/util/Collection;Ljava/net/InetAddress;)Landroid/net/RouteInfo;
-Landroid/net/SntpClient;->getNtpTime()J
-Landroid/net/SntpClient;->getNtpTimeReference()J
-Landroid/net/SntpClient;->getRoundTripTime()J
-Landroid/net/SntpClient;->requestTime(Ljava/lang/String;I)Z
-Landroid/net/StaticIpConfiguration;->dnsServers:Ljava/util/ArrayList;
-Landroid/net/StaticIpConfiguration;->domains:Ljava/lang/String;
-Landroid/net/StaticIpConfiguration;->getRoutes(Ljava/lang/String;)Ljava/util/List;
-Landroid/net/StringNetworkSpecifier;->specifier:Ljava/lang/String;
-Landroid/net/TrafficStats;->getMobileTcpRxPackets()J
-Landroid/net/TrafficStats;->getMobileTcpTxPackets()J
-Landroid/net/wifi/WifiInfo;->is5GHz()Z
-Landroid/net/wifi/WifiInfo;->score:I
Landroid/os/AsyncResult;-><init>(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Throwable;)V
Landroid/os/AsyncResult;->exception:Ljava/lang/Throwable;
Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;Ljava/lang/Object;Ljava/lang/Throwable;)Landroid/os/AsyncResult;
@@ -365,22 +128,7 @@
Landroid/os/UserHandle;->isSameApp(II)Z
Landroid/os/UserManager;->hasUserRestriction(Ljava/lang/String;Landroid/os/UserHandle;)Z
Landroid/os/UserManager;->isAdminUser()Z
-Landroid/provider/CalendarContract$Events;->PROVIDER_WRITABLE_COLUMNS:[Ljava/lang/String;
-Landroid/provider/ContactsContract$CommonDataKinds$Phone;->getDisplayLabel(Landroid/content/Context;ILjava/lang/CharSequence;)Ljava/lang/CharSequence;
-Landroid/provider/Settings$Global;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
-Landroid/provider/Settings$Secure;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;
-Landroid/provider/Telephony$Mms;->isEmailAddress(Ljava/lang/String;)Z
-Landroid/provider/Telephony$Sms$Draft;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;)Landroid/net/Uri;
-Landroid/provider/Telephony$Sms$Outbox;->addMessage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;ZJ)Landroid/net/Uri;
Landroid/R$styleable;->CheckBoxPreference:[I
-Landroid/service/dreams/DreamService;->canDoze()Z
-Landroid/service/dreams/DreamService;->isDozing()Z
-Landroid/service/dreams/DreamService;->startDozing()V
-Landroid/service/dreams/DreamService;->stopDozing()V
-Landroid/service/euicc/EuiccProfileInfo;-><init>(Ljava/lang/String;[Landroid/telephony/UiccAccessRule;Ljava/lang/String;)V
-Landroid/service/euicc/GetDefaultDownloadableSubscriptionListResult;->result:I
-Landroid/service/euicc/GetDownloadableSubscriptionMetadataResult;->result:I
-Landroid/service/vr/VrListenerService;->onCurrentVrActivityChanged(Landroid/content/ComponentName;ZI)V
Landroid/system/NetlinkSocketAddress;-><init>(II)V
Landroid/system/Os;->bind(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
Landroid/system/Os;->connect(Ljava/io/FileDescriptor;Ljava/net/SocketAddress;)V
@@ -389,42 +137,10 @@
Landroid/system/Os;->setsockoptTimeval(Ljava/io/FileDescriptor;IILandroid/system/StructTimeval;)V
Landroid/system/PacketSocketAddress;-><init>(I[B)V
Landroid/system/PacketSocketAddress;-><init>(SI)V
-Landroid/telephony/euicc/DownloadableSubscription;->encodedActivationCode:Ljava/lang/String;
-Landroid/telephony/euicc/DownloadableSubscription;->setAccessRules([Landroid/telephony/UiccAccessRule;)V
-Landroid/telephony/euicc/DownloadableSubscription;->setCarrierName(Ljava/lang/String;)V
-Landroid/telephony/ims/compat/feature/ImsFeature;->getFeatureState()I
-Landroid/telephony/ims/compat/feature/ImsFeature;->setFeatureState(I)V
Landroid/telephony/ims/compat/feature/MMTelFeature;-><init>()V
Landroid/telephony/ims/compat/ImsService;-><init>()V
-Landroid/telephony/ims/compat/ImsService;->mImsServiceController:Landroid/os/IBinder;
Landroid/telephony/ims/compat/stub/ImsCallSessionImplBase;-><init>()V
-Landroid/telephony/ims/compat/stub/ImsConfigImplBase;-><init>(Landroid/content/Context;)V
-Landroid/telephony/ims/compat/stub/ImsConfigImplBase;->getIImsConfig()Lcom/android/ims/internal/IImsConfig;
Landroid/telephony/ims/compat/stub/ImsUtListenerImplBase;-><init>()V
-Landroid/telephony/ims/ImsCallForwardInfo;-><init>()V
-Landroid/telephony/ims/ImsCallForwardInfo;->mCondition:I
-Landroid/telephony/ims/ImsCallForwardInfo;->mNumber:Ljava/lang/String;
-Landroid/telephony/ims/ImsCallForwardInfo;->mServiceClass:I
-Landroid/telephony/ims/ImsCallForwardInfo;->mStatus:I
-Landroid/telephony/ims/ImsCallForwardInfo;->mTimeSeconds:I
-Landroid/telephony/ims/ImsCallForwardInfo;->mToA:I
-Landroid/telephony/ims/ImsCallProfile;->mCallExtras:Landroid/os/Bundle;
-Landroid/telephony/ims/ImsCallProfile;->mCallType:I
-Landroid/telephony/ims/ImsCallProfile;->mMediaProfile:Landroid/telephony/ims/ImsStreamMediaProfile;
-Landroid/telephony/ims/ImsCallProfile;->mRestrictCause:I
-Landroid/telephony/ims/ImsCallProfile;->presentationToOIR(I)I
-Landroid/telephony/ims/ImsExternalCallState;-><init>(ILandroid/net/Uri;ZIIZ)V
-Landroid/telephony/ims/ImsReasonInfo;-><init>(II)V
-Landroid/telephony/ims/ImsReasonInfo;->mCode:I
-Landroid/telephony/ims/ImsReasonInfo;->mExtraCode:I
-Landroid/telephony/ims/ImsReasonInfo;->mExtraMessage:Ljava/lang/String;
-Landroid/telephony/ims/ImsSsInfo;->mIcbNum:Ljava/lang/String;
-Landroid/telephony/ims/ImsSsInfo;->mStatus:I
-Landroid/telephony/ims/ImsStreamMediaProfile;-><init>()V
-Landroid/telephony/ims/ImsStreamMediaProfile;->mAudioDirection:I
-Landroid/telephony/ims/ImsStreamMediaProfile;->mAudioQuality:I
-Landroid/telephony/ims/ImsStreamMediaProfile;->mVideoDirection:I
-Landroid/telephony/ims/ImsVideoCallProvider;->getInterface()Lcom/android/ims/internal/IImsVideoCallProvider;
Landroid/telephony/mbms/IMbmsStreamingSessionCallback$Stub;-><init>()V
Landroid/telephony/mbms/IStreamingServiceCallback$Stub;-><init>()V
Landroid/telephony/mbms/vendor/IMbmsStreamingService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/telephony/mbms/vendor/IMbmsStreamingService;
@@ -432,81 +148,7 @@
Landroid/telephony/mbms/vendor/IMbmsStreamingService;->initialize(Landroid/telephony/mbms/IMbmsStreamingSessionCallback;I)I
Landroid/telephony/mbms/vendor/IMbmsStreamingService;->requestUpdateStreamingServices(ILjava/util/List;)I
Landroid/telephony/mbms/vendor/IMbmsStreamingService;->startStreaming(ILjava/lang/String;Landroid/telephony/mbms/IStreamingServiceCallback;)I
-Landroid/telephony/PhoneNumberUtils;->formatNumber(Ljava/lang/String;I)Ljava/lang/String;
-Landroid/telephony/PhoneNumberUtils;->isEmergencyNumber(ILjava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isPotentialEmergencyNumber(ILjava/lang/String;)Z
-Landroid/telephony/PhoneNumberUtils;->isPotentialLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
-Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;)V
-Landroid/telephony/PhoneStateListener;-><init>(Ljava/lang/Integer;Landroid/os/Looper;)V
-Landroid/telephony/PreciseCallState;->getBackgroundCallState()I
-Landroid/telephony/PreciseCallState;->getForegroundCallState()I
-Landroid/telephony/RadioAccessFamily;-><init>(II)V
-Landroid/telephony/RadioAccessFamily;->getRafFromNetworkType(I)I
-Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/telephony/Rlog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/telephony/Rlog;->i(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/telephony/ServiceState;->bitmaskHasTech(II)Z
-Landroid/telephony/ServiceState;->getDataRegState()I
-Landroid/telephony/ServiceState;->getDataRoaming()Z
-Landroid/telephony/ServiceState;->getRilDataRadioTechnology()I
-Landroid/telephony/ServiceState;->getVoiceNetworkType()I
-Landroid/telephony/ServiceState;->getVoiceRegState()I
-Landroid/telephony/ServiceState;->isCdma(I)Z
-Landroid/telephony/ServiceState;->isEmergencyOnly()Z
-Landroid/telephony/ServiceState;->isGsm(I)Z
-Landroid/telephony/ServiceState;->mergeServiceStates(Landroid/telephony/ServiceState;Landroid/telephony/ServiceState;)Landroid/telephony/ServiceState;
-Landroid/telephony/ServiceState;->rilRadioTechnologyToString(I)Ljava/lang/String;
-Landroid/telephony/SubscriptionInfo;->setDisplayName(Ljava/lang/CharSequence;)V
-Landroid/telephony/SubscriptionInfo;->setIconTint(I)V
-Landroid/telephony/SubscriptionManager;->clearDefaultsForInactiveSubIds()V
-Landroid/telephony/SubscriptionManager;->getDefaultVoicePhoneId()I
-Landroid/telephony/SubscriptionManager;->getResourcesForSubId(Landroid/content/Context;I)Landroid/content/res/Resources;
-Landroid/telephony/SubscriptionManager;->isActiveSubId(I)Z
-Landroid/telephony/SubscriptionManager;->isUsableSubIdValue(I)Z
-Landroid/telephony/SubscriptionManager;->isValidPhoneId(I)Z
-Landroid/telephony/SubscriptionManager;->isValidSlotIndex(I)Z
-Landroid/telephony/SubscriptionManager;->isValidSubscriptionId(I)Z
-Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;I)V
-Landroid/telephony/SubscriptionManager;->putPhoneIdAndSubIdExtra(Landroid/content/Intent;II)V
-Landroid/telephony/SubscriptionManager;->setDisplayName(Ljava/lang/String;IJ)I
-Landroid/telephony/SubscriptionManager;->setIconTint(II)I
-Landroid/telephony/TelephonyManager$MultiSimVariants;->DSDA:Landroid/telephony/TelephonyManager$MultiSimVariants;
-Landroid/telephony/TelephonyManager$MultiSimVariants;->DSDS:Landroid/telephony/TelephonyManager$MultiSimVariants;
-Landroid/telephony/TelephonyManager;->getIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;I)I
-Landroid/telephony/TelephonyManager;->getIsimDomain()Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getNetworkTypeName()Ljava/lang/String;
-Landroid/telephony/TelephonyManager;->getPreferredNetworkType(I)I
-Landroid/telephony/TelephonyManager;->getServiceStateForSubscriber(I)Landroid/telephony/ServiceState;
-Landroid/telephony/TelephonyManager;->getVoiceMessageCount()I
-Landroid/telephony/TelephonyManager;->getVoiceNetworkType(I)I
-Landroid/telephony/TelephonyManager;->isImsRegistered()Z
-Landroid/telephony/TelephonyManager;->nvResetConfig(I)Z
-Landroid/telephony/TelephonyManager;->putIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
-Landroid/telephony/TelephonyManager;->setPreferredNetworkType(II)Z
-Landroid/text/TextUtils;->isPrintableAsciiOnly(Ljava/lang/CharSequence;)Z
-Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;I)Landroid/graphics/drawable/Drawable;
-Landroid/util/IconDrawableFactory;->newInstance(Landroid/content/Context;)Landroid/util/IconDrawableFactory;
-Landroid/util/LocalLog$ReadOnlyLocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
-Landroid/util/LocalLog;-><init>(I)V
-Landroid/util/LocalLog;->log(Ljava/lang/String;)V
-Landroid/util/LocalLog;->readOnlyLocalLog()Landroid/util/LocalLog$ReadOnlyLocalLog;
-Landroid/util/LongArray;-><init>()V
-Landroid/util/LongArray;->add(IJ)V
-Landroid/util/LongArray;->get(I)J
-Landroid/util/LongArray;->size()I
-Landroid/util/RecurrenceRule;->buildRecurringMonthly(ILjava/time/ZoneId;)Landroid/util/RecurrenceRule;
-Landroid/util/RecurrenceRule;->start:Ljava/time/ZonedDateTime;
-Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
-Landroid/util/Slog;->println(ILjava/lang/String;Ljava/lang/String;)I
-Landroid/util/Slog;->wtf(Ljava/lang/String;Ljava/lang/String;)I
-Landroid/view/AppTransitionAnimationSpec;-><init>(ILandroid/graphics/GraphicBuffer;Landroid/graphics/Rect;)V
-Landroid/view/BatchedInputEventReceiver;-><init>(Landroid/view/InputChannel;Landroid/os/Looper;Landroid/view/Choreographer;)V
-Landroid/view/Choreographer;->getSfInstance()Landroid/view/Choreographer;
-Landroid/view/DisplayListCanvas;->drawRenderNode(Landroid/view/RenderNode;)V
Landroid/view/IAppTransitionAnimationSpecsFuture$Stub;-><init>()V
-Landroid/view/InputEventReceiver;->onInputEvent(Landroid/view/InputEvent;)V
Landroid/view/IRecentsAnimationController;->finish(Z)V
Landroid/view/IRecentsAnimationController;->screenshotTask(I)Landroid/app/ActivityManager$TaskSnapshot;
Landroid/view/IRecentsAnimationController;->setInputConsumerEnabled(Z)V
@@ -524,42 +166,6 @@
Landroid/view/IWindowManager;->overridePendingAppTransitionMultiThumbFuture(Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/os/IRemoteCallback;Z)V
Landroid/view/IWindowManager;->overridePendingAppTransitionRemote(Landroid/view/RemoteAnimationAdapter;)V
Landroid/view/IWindowManager;->setNavBarVirtualKeyHapticFeedbackEnabled(Z)V
-Landroid/view/RemoteAnimationAdapter;-><init>(Landroid/view/IRemoteAnimationRunner;JJ)V
-Landroid/view/RemoteAnimationDefinition;-><init>()V
-Landroid/view/RemoteAnimationDefinition;->addRemoteAnimation(ILandroid/view/RemoteAnimationAdapter;)V
-Landroid/view/RenderNode;->create(Ljava/lang/String;Landroid/view/View;)Landroid/view/RenderNode;
-Landroid/view/RenderNode;->end(Landroid/view/DisplayListCanvas;)V
-Landroid/view/RenderNode;->isValid()Z
-Landroid/view/RenderNode;->setClipToBounds(Z)Z
-Landroid/view/RenderNode;->setLeftTopRightBottom(IIII)Z
-Landroid/view/RenderNode;->start(II)Landroid/view/DisplayListCanvas;
-Landroid/view/Surface;->getNextFrameNumber()J
-Landroid/view/SurfaceControl$Transaction;-><init>()V
-Landroid/view/SurfaceControl$Transaction;->apply()V
-Landroid/view/SurfaceControl$Transaction;->deferTransactionUntil(Landroid/view/SurfaceControl;Landroid/os/IBinder;J)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->deferTransactionUntilSurface(Landroid/view/SurfaceControl;Landroid/view/Surface;J)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->hide(Landroid/view/SurfaceControl;)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setAlpha(Landroid/view/SurfaceControl;F)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setColor(Landroid/view/SurfaceControl;[F)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setFinalCrop(Landroid/view/SurfaceControl;Landroid/graphics/Rect;)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setLayer(Landroid/view/SurfaceControl;I)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setMatrix(Landroid/view/SurfaceControl;FFFF)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setMatrix(Landroid/view/SurfaceControl;Landroid/graphics/Matrix;[F)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setPosition(Landroid/view/SurfaceControl;FF)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setSize(Landroid/view/SurfaceControl;II)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->setWindowCrop(Landroid/view/SurfaceControl;Landroid/graphics/Rect;)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/SurfaceControl$Transaction;->show(Landroid/view/SurfaceControl;)Landroid/view/SurfaceControl$Transaction;
-Landroid/view/ThreadedRenderer;->createHardwareBitmap(Landroid/view/RenderNode;II)Landroid/graphics/Bitmap;
-Landroid/view/View;->hideTooltip()V
-Landroid/view/View;->setTooltip(Ljava/lang/CharSequence;)V
-Landroid/webkit/WebSettings;->getPluginsPath()Ljava/lang/String;
-Landroid/webkit/WebSettings;->getUseDoubleTree()Z
-Landroid/webkit/WebSettings;->setPluginsPath(Ljava/lang/String;)V
-Landroid/webkit/WebSettings;->setUseDoubleTree(Z)V
-Landroid/webkit/WebView;->getPluginList()Landroid/webkit/PluginList;
-Landroid/webkit/WebView;->getZoomControls()Landroid/view/View;
-Landroid/webkit/WebView;->refreshPlugins(Z)V
-Landroid/widget/ListView;->lookForSelectablePosition(IZ)I
Lcom/android/ims/ImsConfigListener;->onSetFeatureResponse(IIII)V
Lcom/android/ims/internal/IImsCallSessionListener;->callSessionConferenceStateUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsConferenceState;)V
Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandover(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
@@ -642,19 +248,8 @@
Lcom/android/ims/internal/uce/uceservice/IUceService;->isServiceStarted()Z
Lcom/android/ims/internal/uce/uceservice/IUceService;->startService(Lcom/android/ims/internal/uce/uceservice/IUceListener;)Z
Lcom/android/ims/internal/uce/uceservice/IUceService;->stopService()Z
-Lcom/android/internal/app/AlertController$AlertParams;->mIconId:I
-Lcom/android/internal/app/AlertController$AlertParams;->mMessage:Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController$AlertParams;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController$AlertParams;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;
-Lcom/android/internal/app/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController$AlertParams;->mTitle:Ljava/lang/CharSequence;
-Lcom/android/internal/app/AlertController$AlertParams;->mView:Landroid/view/View;
-Lcom/android/internal/app/AlertController;->getButton(I)Landroid/widget/Button;
Lcom/android/internal/app/IAppOpsService;->finishOperation(Landroid/os/IBinder;IILjava/lang/String;)V
Lcom/android/internal/content/PackageMonitor;-><init>()V
-Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Landroid/os/UserHandle;Z)V
-Lcom/android/internal/content/PackageMonitor;->unregister()V
Lcom/android/internal/location/ILocationProvider$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/location/ILocationProvider;
Lcom/android/internal/location/ILocationProvider;->disable()V
Lcom/android/internal/location/ILocationProvider;->enable()V
@@ -663,21 +258,6 @@
Lcom/android/internal/location/ILocationProvider;->getStatusUpdateTime()J
Lcom/android/internal/location/ILocationProvider;->sendExtraCommand(Ljava/lang/String;Landroid/os/Bundle;)Z
Lcom/android/internal/location/ILocationProvider;->setRequest(Lcom/android/internal/location/ProviderRequest;Landroid/os/WorkSource;)V
-Lcom/android/internal/location/ProviderRequest;-><init>()V
-Lcom/android/internal/location/ProviderRequest;->interval:J
-Lcom/android/internal/location/ProviderRequest;->locationRequests:Ljava/util/List;
-Lcom/android/internal/location/ProviderRequest;->reportLocation:Z
-Lcom/android/internal/os/BatteryStatsImpl;->getDischargeCurrentLevel()I
-Lcom/android/internal/os/BatteryStatsImpl;->getDischargeStartLevel()I
-Lcom/android/internal/os/BatteryStatsImpl;->getPhoneOnTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalScanningTime(JI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getPhoneSignalStrengthTime(IJI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getScreenBrightnessTime(IJI)J
-Lcom/android/internal/os/BatteryStatsImpl;->getWifiOnTime(JI)J
-Lcom/android/internal/os/SomeArgs;->arg2:Ljava/lang/Object;
-Lcom/android/internal/os/SomeArgs;->arg3:Ljava/lang/Object;
-Lcom/android/internal/os/SomeArgs;->obtain()Lcom/android/internal/os/SomeArgs;
-Lcom/android/internal/os/SomeArgs;->recycle()V
Lcom/android/internal/R$styleable;->NumberPicker:[I
Lcom/android/internal/R$styleable;->TwoLineListItem:[I
Lcom/android/internal/telephony/GsmAlphabet;->gsm7BitPackedToString([BII)Ljava/lang/String;
@@ -691,14 +271,6 @@
Lcom/android/internal/telephony/OperatorInfo;->getOperatorAlphaShort()Ljava/lang/String;
Lcom/android/internal/telephony/OperatorInfo;->getOperatorNumeric()Ljava/lang/String;
Lcom/android/internal/telephony/OperatorInfo;->getState()Lcom/android/internal/telephony/OperatorInfo$State;
-Lcom/android/internal/util/AsyncChannel;-><init>()V
-Lcom/android/internal/util/AsyncChannel;->connect(Landroid/content/Context;Landroid/os/Handler;Landroid/os/Messenger;)V
-Lcom/android/internal/util/AsyncChannel;->sendMessage(Landroid/os/Message;)V
-Lcom/android/internal/util/IndentingPrintWriter;-><init>(Ljava/io/Writer;Ljava/lang/String;)V
-Lcom/android/internal/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/internal/util/IndentingPrintWriter;
-Lcom/android/internal/util/IndentingPrintWriter;->increaseIndent()Lcom/android/internal/util/IndentingPrintWriter;
-Lcom/android/internal/util/XmlUtils;->beginDocument(Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V
-Lcom/android/internal/util/XmlUtils;->nextElement(Lorg/xmlpull/v1/XmlPullParser;)V
Ljava/lang/System;->arraycopy([BI[BII)V
Ljava/net/Inet4Address;->ALL:Ljava/net/InetAddress;
Ljava/net/Inet4Address;->ANY:Ljava/net/InetAddress;
diff --git a/config/preloaded-classes b/config/preloaded-classes
index 0014793..63c583f 100644
--- a/config/preloaded-classes
+++ b/config/preloaded-classes
@@ -6236,9 +6236,9 @@
org.json.JSONStringer
org.json.JSONStringer$Scope
org.json.JSONTokener
-org.kxml2.io.KXmlParser
-org.kxml2.io.KXmlParser$ValueContext
-org.kxml2.io.KXmlSerializer
+com.android.org.kxml2.io.KXmlParser
+com.android.org.kxml2.io.KXmlParser$ValueContext
+com.android.org.kxml2.io.KXmlSerializer
org.w3c.dom.CharacterData
org.w3c.dom.DOMImplementation
org.w3c.dom.Document
diff --git a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
index be2e2fa..f0a0e88 100644
--- a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
+++ b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
@@ -30,7 +30,6 @@
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.hardware.fingerprint.FingerprintManager;
-import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
@@ -190,12 +189,10 @@
* content and also the accessibility service will receive accessibility events from
* them.
* <p>
- * <strong>Note:</strong> For accessibility services targeting API version
- * {@link Build.VERSION_CODES#JELLY_BEAN} or higher this flag has to be explicitly
- * set for the system to regard views that are not important for accessibility. For
- * accessibility services targeting API version lower than
- * {@link Build.VERSION_CODES#JELLY_BEAN} this flag is ignored and all views are
- * regarded for accessibility purposes.
+ * <strong>Note:</strong> For accessibility services targeting Android 4.1 (API level 16) or
+ * higher, this flag has to be explicitly set for the system to regard views that are not
+ * important for accessibility. For accessibility services targeting Android 4.0.4 (API level
+ * 15) or lower, this flag is ignored and all views are regarded for accessibility purposes.
* </p>
* <p>
* Usually views not important for accessibility are layout managers that do not
@@ -220,19 +217,19 @@
* flag does not guarantee that the device will not be in touch exploration
* mode since there may be another enabled service that requested it.
* <p>
- * For accessibility services targeting API version higher than
- * {@link Build.VERSION_CODES#JELLY_BEAN_MR1} that want to set
- * this flag have to declare this capability in their meta-data by setting
- * the attribute {@link android.R.attr#canRequestTouchExplorationMode
- * canRequestTouchExplorationMode} to true, otherwise this flag will
+ * For accessibility services targeting Android 4.3 (API level 18) or higher
+ * that want to set this flag have to declare this capability in their
+ * meta-data by setting the attribute
+ * {@link android.R.attr#canRequestTouchExplorationMode
+ * canRequestTouchExplorationMode} to true. Otherwise, this flag will
* be ignored. For how to declare the meta-data of a service refer to
* {@value AccessibilityService#SERVICE_META_DATA}.
* </p>
* <p>
- * Services targeting API version equal to or lower than
- * {@link Build.VERSION_CODES#JELLY_BEAN_MR1} will work normally, i.e.
- * the first time they are run, if this flag is specified, a dialog is
- * shown to the user to confirm enabling explore by touch.
+ * Services targeting Android 4.2.2 (API level 17) or lower will work
+ * normally. In other words, the first time they are run, if this flag is
+ * specified, a dialog is shown to the user to confirm enabling explore by
+ * touch.
* </p>
* @see android.R.styleable#AccessibilityService_canRequestTouchExplorationMode
*/
@@ -388,10 +385,10 @@
public int feedbackType;
/**
- * The timeout after the most recent event of a given type before an
+ * The timeout, in milliseconds, after the most recent event of a given type before an
* {@link AccessibilityService} is notified.
* <p>
- * <strong>Can be dynamically set at runtime.</strong>.
+ * <strong>Can be dynamically set at runtime.</strong>
* </p>
* <p>
* <strong>Note:</strong> The event notification timeout is useful to avoid propagating
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/ActionBar.java b/core/java/android/app/ActionBar.java
index 04ff48c..831cac2 100644
--- a/core/java/android/app/ActionBar.java
+++ b/core/java/android/app/ActionBar.java
@@ -22,6 +22,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -210,6 +211,7 @@
* Allow the title to wrap onto multiple lines if space is available
* @hide pending API approval
*/
+ @UnsupportedAppUsage
public static final int DISPLAY_TITLE_MULTIPLE_LINES = 0x20;
/**
@@ -1050,6 +1052,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setShowHideAnimationEnabled(boolean enabled) {
}
@@ -1092,6 +1095,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean collapseActionView() {
return false;
}
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 6638dd9..8d5b96b 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -31,6 +31,7 @@
import android.annotation.RequiresPermission;
import android.annotation.StyleRes;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.VoiceInteractor.Request;
import android.app.admin.DevicePolicyManager;
import android.app.assist.AssistContent;
@@ -735,6 +736,7 @@
*/
public static final int FINISH_TASK_WITH_ACTIVITY = 2;
+ @UnsupportedAppUsage
static final String FRAGMENTS_TAG = "android:fragments";
private static final String LAST_AUTOFILL_ID = "android:lastAutofillId";
@@ -768,22 +770,38 @@
private SparseArray<ManagedDialog> mManagedDialogs;
// set by the thread after the constructor and before onCreate(Bundle savedInstanceState) is called.
+ @UnsupportedAppUsage
private Instrumentation mInstrumentation;
+ @UnsupportedAppUsage
private IBinder mToken;
+ @UnsupportedAppUsage
private int mIdent;
+ @UnsupportedAppUsage
/*package*/ String mEmbeddedID;
+ @UnsupportedAppUsage
private Application mApplication;
+ @UnsupportedAppUsage
/*package*/ Intent mIntent;
+ @UnsupportedAppUsage
/*package*/ String mReferrer;
+ @UnsupportedAppUsage
private ComponentName mComponent;
+ @UnsupportedAppUsage
/*package*/ ActivityInfo mActivityInfo;
+ @UnsupportedAppUsage
/*package*/ ActivityThread mMainThread;
+ @UnsupportedAppUsage
Activity mParent;
+ @UnsupportedAppUsage
boolean mCalled;
+ @UnsupportedAppUsage
/*package*/ boolean mResumed;
+ @UnsupportedAppUsage
/*package*/ boolean mStopped;
+ @UnsupportedAppUsage
boolean mFinished;
boolean mStartedActivity;
+ @UnsupportedAppUsage
private boolean mDestroyed;
private boolean mDoReportFullyDrawn = true;
private boolean mRestoredFromBundle;
@@ -795,7 +813,9 @@
/*package*/ boolean mTemporaryPause = false;
/** true if the activity is being destroyed in order to recreate it with a new configuration */
/*package*/ boolean mChangingConfigurations = false;
+ @UnsupportedAppUsage
/*package*/ int mConfigChangeFlags;
+ @UnsupportedAppUsage
/*package*/ Configuration mCurrentConfig;
private SearchManager mSearchManager;
private MenuInflater mMenuInflater;
@@ -810,25 +830,34 @@
ArrayMap<String, LoaderManager> loaders;
VoiceInteractor voiceInteractor;
}
+ @UnsupportedAppUsage
/* package */ NonConfigurationInstances mLastNonConfigurationInstances;
+ @UnsupportedAppUsage
private Window mWindow;
+ @UnsupportedAppUsage
private WindowManager mWindowManager;
/*package*/ View mDecor = null;
+ @UnsupportedAppUsage
/*package*/ boolean mWindowAdded = false;
/*package*/ boolean mVisibleFromServer = false;
+ @UnsupportedAppUsage
/*package*/ boolean mVisibleFromClient = true;
/*package*/ ActionBar mActionBar = null;
private boolean mEnableDefaultActionBarUp;
+ @UnsupportedAppUsage
private VoiceInteractor mVoiceInteractor;
+ @UnsupportedAppUsage
private CharSequence mTitle;
private int mTitleColor = 0;
// we must have a handler before the FragmentController is constructed
+ @UnsupportedAppUsage
final Handler mHandler = new Handler();
+ @UnsupportedAppUsage
final FragmentController mFragments = FragmentController.createController(new HostCallbacks());
private static final class ManagedCursor {
@@ -847,8 +876,10 @@
private final ArrayList<ManagedCursor> mManagedCursors = new ArrayList<>();
@GuardedBy("this")
+ @UnsupportedAppUsage
int mResultCode = RESULT_CANCELED;
@GuardedBy("this")
+ @UnsupportedAppUsage
Intent mResultData = null;
private TranslucentConversionListener mTranslucentCallback;
@@ -872,6 +903,7 @@
private Thread mUiThread;
+ @UnsupportedAppUsage
ActivityTransitionState mActivityTransitionState = new ActivityTransitionState();
SharedElementCallback mEnterTransitionListener = SharedElementCallback.NULL_CALLBACK;
SharedElementCallback mExitTransitionListener = SharedElementCallback.NULL_CALLBACK;
@@ -1663,6 +1695,7 @@
*
* @param outState place to store the saved state.
*/
+ @UnsupportedAppUsage
private void saveManagedDialogs(Bundle outState) {
if (mManagedDialogs == null) {
return;
@@ -2521,6 +2554,7 @@
* @deprecated Use {@link CursorLoader} instead.
*/
@Deprecated
+ @UnsupportedAppUsage
public final Cursor managedQuery(Uri uri, String[] projection, String selection,
String sortOrder) {
Cursor c = getContentResolver().query(uri, projection, selection, null, sortOrder);
@@ -2641,6 +2675,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setPersistent(boolean isPersistent) {
}
@@ -4663,6 +4698,7 @@
/**
* @hide Implement to provide correct calling token.
*/
+ @UnsupportedAppUsage
public void startActivityForResultAsUser(Intent intent, int requestCode, UserHandle user) {
startActivityForResultAsUser(intent, requestCode, null, user);
}
@@ -4708,6 +4744,7 @@
/**
* @hide Implement to provide correct calling token.
*/
+ @UnsupportedAppUsage
public void startActivityAsUser(Intent intent, UserHandle user) {
startActivityAsUser(intent, null, user);
}
@@ -5271,6 +5308,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public void startActivityForResult(
String who, Intent intent, int requestCode, @Nullable Bundle options) {
Uri referrer = onProvideReferrer();
@@ -5597,6 +5635,7 @@
* Finishes the current activity and specifies whether to remove the task associated with this
* activity.
*/
+ @UnsupportedAppUsage
private void finish(int finishTask) {
if (mParent == null) {
int resultCode;
@@ -6343,6 +6382,10 @@
}
void dumpInner(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
+ if (args != null && args.length > 0 && args[0].equals("--autofill")) {
+ dumpAutofillManager(prefix, writer);
+ return;
+ }
writer.print(prefix); writer.print("Local Activity ");
writer.print(Integer.toHexString(System.identityHashCode(this)));
writer.println(" State:");
@@ -6370,16 +6413,20 @@
mHandler.getLooper().dump(new PrintWriterPrinter(writer), prefix);
+ dumpAutofillManager(prefix, writer);
+
+ ResourcesManager.getInstance().dump(prefix, writer);
+ }
+
+ void dumpAutofillManager(String prefix, PrintWriter writer) {
final AutofillManager afm = getAutofillManager();
if (afm != null) {
+ afm.dump(prefix, writer);
writer.print(prefix); writer.print("Autofill Compat Mode: ");
writer.println(isAutofillCompatibilityEnabled());
- afm.dump(prefix, writer);
} else {
writer.print(prefix); writer.println("No AutofillManager");
}
-
- ResourcesManager.getInstance().dump(prefix, writer);
}
/**
@@ -6521,6 +6568,7 @@
* @return The ActivityOptions passed to {@link #convertToTranslucent}.
* @hide
*/
+ @UnsupportedAppUsage
ActivityOptions getActivityOptions() {
try {
return ActivityOptions.fromBundle(
@@ -7041,10 +7089,12 @@
// ------------------ Internal API ------------------
+ @UnsupportedAppUsage
final void setParent(Activity parent) {
mParent = parent;
}
+ @UnsupportedAppUsage
final void attach(Context context, ActivityThread aThread,
Instrumentation instr, IBinder token, int ident,
Application application, Intent intent, ActivityInfo info,
@@ -7117,6 +7167,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final IBinder getActivityToken() {
return mParent != null ? mParent.getActivityToken() : mToken;
}
@@ -7131,6 +7182,7 @@
performCreate(icicle, null);
}
+ @UnsupportedAppUsage
final void performCreate(Bundle icicle, PersistableBundle persistentState) {
mCanEnterPictureInPicture = true;
restoreHasCurrentPermissionRequest(icicle);
@@ -7431,6 +7483,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final boolean isResumed() {
return mResumed;
}
@@ -7448,6 +7501,7 @@
}
}
+ @UnsupportedAppUsage
void dispatchActivityResult(String who, int requestCode, int resultCode, Intent data,
String reason) {
if (false) Log.v(
@@ -7815,6 +7869,7 @@
* @param disable {@code true} to disable preview screenshots; {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public void setDisablePreviewScreenshots(boolean disable) {
try {
ActivityTaskManager.getService().setDisablePreviewScreenshots(mToken, disable);
@@ -7878,6 +7933,7 @@
* @hide
*/
@RequiresPermission(CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS)
+ @UnsupportedAppUsage
public void registerRemoteAnimations(RemoteAnimationDefinition definition) {
try {
ActivityTaskManager.getService().registerRemoteAnimations(mToken, definition);
diff --git a/core/java/android/app/ActivityGroup.java b/core/java/android/app/ActivityGroup.java
index 228067c..d4aa01b 100644
--- a/core/java/android/app/ActivityGroup.java
+++ b/core/java/android/app/ActivityGroup.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Bundle;
@@ -37,6 +38,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected LocalActivityManager mLocalActivityManager;
public ActivityGroup() {
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 1105ed6..c12d8e2 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -27,6 +27,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -123,6 +124,7 @@
public class ActivityManager {
private static String TAG = "ActivityManager";
+ @UnsupportedAppUsage
private final Context mContext;
private static volatile boolean sSystemReady = false;
@@ -425,6 +427,7 @@
* for a startActivity operation.
* @hide
*/
+ @UnsupportedAppUsage
public static final int INTENT_SENDER_ACTIVITY = 2;
/**
@@ -488,18 +491,22 @@
/** @hide Process is hosting the current top activities. Note that this covers
* all activities that are visible to the user. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_TOP = 2;
/** @hide Process is hosting a foreground service. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_FOREGROUND_SERVICE = 3;
/** @hide Process is hosting a foreground service due to a system binding. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 4;
/** @hide Process is important to the user, and something they are aware of. */
public static final int PROCESS_STATE_IMPORTANT_FOREGROUND = 5;
/** @hide Process is important to the user, but not something they are aware of. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_IMPORTANT_BACKGROUND = 6;
/** @hide Process is in the background transient so we will try to keep running. */
@@ -511,12 +518,14 @@
/** @hide Process is in the background running a service. Unlike oom_adj, this level
* is used for both the normal running in background state and the executing
* operations state. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_SERVICE = 9;
/** @hide Process is in the background running a receiver. Note that from the
* perspective of oom_adj, receivers run at a higher foreground level, but for our
* prioritization here that is not necessary and putting them below services means
* many fewer changes in some process states as they receive broadcasts. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_RECEIVER = 10;
/** @hide Same as {@link #PROCESS_STATE_TOP} but while device is sleeping. */
@@ -527,12 +536,14 @@
public static final int PROCESS_STATE_HEAVY_WEIGHT = 12;
/** @hide Process is in the background but hosts the home activity. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_HOME = 13;
/** @hide Process is in the background but hosts the last shown activity. */
public static final int PROCESS_STATE_LAST_ACTIVITY = 14;
/** @hide Process is being cached for later use and contains activities. */
+ @UnsupportedAppUsage
public static final int PROCESS_STATE_CACHED_ACTIVITY = 15;
/** @hide Process is being cached for later use and is a client of another cached
@@ -679,6 +690,7 @@
Point mAppTaskThumbnailSize;
+ @UnsupportedAppUsage
/*package*/ ActivityManager(Context context, Handler handler) {
mContext = context;
}
@@ -810,6 +822,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
static public int staticGetMemoryClass() {
// Really brain dead right now -- just take this from the configured
// vm heap size, and assume it is in megabytes and thus ends with "m".
@@ -856,6 +869,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean isLowRamDeviceStatic() {
return RoSystemProperties.CONFIG_LOW_RAM ||
(Build.IS_DEBUGGABLE && DEVELOPMENT_FORCE_LOW_RAM);
@@ -879,6 +893,7 @@
* (which tends to consume a lot more RAM).
* @hide
*/
+ @UnsupportedAppUsage
static public boolean isHighEndGfx() {
return !isLowRamDeviceStatic()
&& !RoSystemProperties.CONFIG_AVOID_GFX_ACCEL
@@ -903,6 +918,7 @@
* @deprecated Use {@link ActivityTaskManager#getMaxRecentTasksStatic()}
*/
@Deprecated
+ @UnsupportedAppUsage
static public int getMaxRecentTasksStatic() {
return ActivityTaskManager.getMaxRecentTasksStatic();
}
@@ -1122,6 +1138,7 @@
* Sets the icon for this task description.
* @hide
*/
+ @UnsupportedAppUsage
public void setIcon(Bitmap icon) {
mIcon = icon;
}
@@ -1174,11 +1191,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public Bitmap getInMemoryIcon() {
return mIcon;
}
/** @hide */
+ @UnsupportedAppUsage
public static Bitmap loadTaskDescriptionIcon(String iconFilename, int userId) {
if (iconFilename != null) {
try {
@@ -1202,6 +1221,7 @@
* @return The background color.
* @hide
*/
+ @UnsupportedAppUsage
public int getBackgroundColor() {
return mColorBackground;
}
@@ -1763,6 +1783,7 @@
/**
* @return The graphic buffer representing the screenshot.
*/
+ @UnsupportedAppUsage
public GraphicBuffer getSnapshot() {
return mSnapshot;
}
@@ -1770,6 +1791,7 @@
/**
* @return The screen orientation the screenshot was taken in.
*/
+ @UnsupportedAppUsage
public int getOrientation() {
return mOrientation;
}
@@ -1778,6 +1800,7 @@
* @return The system/content insets on the snapshot. These can be clipped off in order to
* remove any areas behind system bars in the snapshot.
*/
+ @UnsupportedAppUsage
public Rect getContentInsets() {
return mContentInsets;
}
@@ -1785,6 +1808,7 @@
/**
* @return Whether this snapshot is a down-sampled version of the full resolution.
*/
+ @UnsupportedAppUsage
public boolean isReducedResolution() {
return mReducedResolution;
}
@@ -1793,6 +1817,7 @@
* @return Whether or not the snapshot is a real snapshot or an app-theme generated snapshot
* due to the task having a secure window or having previews disabled.
*/
+ @UnsupportedAppUsage
public boolean isRealSnapshot() {
return mIsRealSnapshot;
}
@@ -1823,6 +1848,7 @@
/**
* @return The scale this snapshot was taken in.
*/
+ @UnsupportedAppUsage
public float getScale() {
return mScale;
}
@@ -2163,12 +2189,16 @@
public boolean lowMemory;
/** @hide */
+ @UnsupportedAppUsage
public long hiddenAppThreshold;
/** @hide */
+ @UnsupportedAppUsage
public long secondaryServerThreshold;
/** @hide */
+ @UnsupportedAppUsage
public long visibleAppThreshold;
/** @hide */
+ @UnsupportedAppUsage
public long foregroundAppThreshold;
public MemoryInfo() {
@@ -2238,17 +2268,28 @@
* @hide
*/
public static class StackInfo implements Parcelable {
+ @UnsupportedAppUsage
public int stackId;
+ @UnsupportedAppUsage
public Rect bounds = new Rect();
+ @UnsupportedAppUsage
public int[] taskIds;
+ @UnsupportedAppUsage
public String[] taskNames;
+ @UnsupportedAppUsage
public Rect[] taskBounds;
+ @UnsupportedAppUsage
public int[] taskUserIds;
+ @UnsupportedAppUsage
public ComponentName topActivity;
+ @UnsupportedAppUsage
public int displayId;
+ @UnsupportedAppUsage
public int userId;
+ @UnsupportedAppUsage
public boolean visible;
// Index of the stack in the display's stack list, can be used for comparison of stack order
+ @UnsupportedAppUsage
public int position;
/**
* The full configuration the stack is currently running in.
@@ -2338,6 +2379,7 @@
readFromParcel(source);
}
+ @UnsupportedAppUsage
public String toString(String prefix) {
StringBuilder sb = new StringBuilder(256);
sb.append(prefix); sb.append("Stack id="); sb.append(stackId);
@@ -2375,6 +2417,7 @@
*/
@RequiresPermission(anyOf={Manifest.permission.CLEAR_APP_USER_DATA,
Manifest.permission.ACCESS_INSTANT_APPS})
+ @UnsupportedAppUsage
public boolean clearApplicationUserData(String packageName, IPackageDataObserver observer) {
try {
return getService().clearApplicationUserData(packageName, false,
@@ -2592,6 +2635,7 @@
* persistent system app.
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_PERSISTENT = 1<<1;
/**
@@ -2599,6 +2643,7 @@
* persistent system app.
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_HAS_ACTIVITIES = 1<<2;
/**
@@ -2606,6 +2651,7 @@
* {@link #FLAG_CANT_SAVE_STATE}.
* @hide
*/
+ @UnsupportedAppUsage
public int flags;
/**
@@ -2759,6 +2805,7 @@
* will be passed to a client, use {@link #procStateToImportanceForClient}.
* @hide
*/
+ @UnsupportedAppUsage
public static @Importance int procStateToImportance(int procState) {
if (procState == PROCESS_STATE_NONEXISTENT) {
return IMPORTANCE_GONE;
@@ -2911,6 +2958,7 @@
* Current process state, as per PROCESS_STATE_* constants.
* @hide
*/
+ @UnsupportedAppUsage
public int processState;
/**
@@ -3299,6 +3347,7 @@
* it allowing them to break other applications by stopping their
* services, removing their alarms, etc.
*/
+ @UnsupportedAppUsage
public void forceStopPackageAsUser(String packageName, int userId) {
try {
getService().forceStopPackage(packageName, userId);
@@ -3311,7 +3360,7 @@
* @see #forceStopPackageAsUser(String, int)
* @hide
*/
- @SystemApi
+ @SystemApi @TestApi
@RequiresPermission(Manifest.permission.FORCE_STOP_PACKAGES)
public void forceStopPackage(String packageName) {
forceStopPackageAsUser(packageName, mContext.getUserId());
@@ -3475,6 +3524,7 @@
}*/
/** @hide */
+ @UnsupportedAppUsage
public static int checkComponentPermission(String permission, int uid,
int owningUid, boolean exported) {
// Root, system server get to do everything.
@@ -3582,6 +3632,7 @@
* @param userid the user's id. Zero indicates the default user.
* @hide
*/
+ @UnsupportedAppUsage
public boolean switchUser(int userid) {
try {
return getService().switchUser(userid);
@@ -3625,6 +3676,7 @@
* @param userId the user's id. Zero indicates the default user.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isUserRunning(int userId) {
try {
return getService().isUserRunning(userId, 0);
@@ -3756,6 +3808,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static IActivityManager getService() {
return IActivityManagerSingleton.get();
}
@@ -3764,6 +3817,7 @@
return ActivityTaskManager.getService();
}
+ @UnsupportedAppUsage
private static final Singleton<IActivityManager> IActivityManagerSingleton =
new Singleton<IActivityManager>() {
@Override
@@ -3933,6 +3987,19 @@
}
/**
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(Manifest.permission.CHANGE_CONFIGURATION)
+ public void scheduleApplicationInfoChanged(List<String> packages, int userId) {
+ try {
+ getService().scheduleApplicationInfoChanged(packages, userId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* The AppTask allows you to manage your own application's tasks.
* See {@link android.app.ActivityManager#getAppTasks()}
*/
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/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 4c558f3..37509e1 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -15,6 +15,7 @@
*/
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.IBinder;
@@ -30,6 +31,7 @@
*
* @deprecated use IActivityManager.Stub.asInterface instead.
*/
+ @UnsupportedAppUsage
static public IActivityManager asInterface(IBinder obj) {
return IActivityManager.Stub.asInterface(obj);
}
@@ -39,6 +41,7 @@
*
* @deprecated use ActivityManager.getService instead.
*/
+ @UnsupportedAppUsage
static public IActivityManager getDefault() {
return ActivityManager.getService();
}
@@ -48,6 +51,7 @@
*
* @deprecated use ActivityManagerInternal.isSystemReady instead.
*/
+ @UnsupportedAppUsage
static public boolean isSystemReady() {
return ActivityManager.isSystemReady();
}
@@ -55,6 +59,7 @@
/**
* @deprecated use ActivityManager.broadcastStickyIntent instead.
*/
+ @UnsupportedAppUsage
static public void broadcastStickyIntent(Intent intent, String permission, int userId) {
broadcastStickyIntent(intent, permission, AppOpsManager.OP_NONE, userId);
}
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 8914535..63c61d3 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -25,6 +25,7 @@
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -357,6 +358,7 @@
* supply these options as the options Bundle when starting an activity.
* @hide
*/
+ @UnsupportedAppUsage
public static ActivityOptions makeCustomAnimation(Context context,
int enterResId, int exitResId, Handler handler, OnAnimationStartedListener listener) {
ActivityOptions opts = new ActivityOptions();
@@ -582,6 +584,7 @@
* thumbnails are aspect scaled to/from a new location.
* @hide
*/
+ @UnsupportedAppUsage
public static ActivityOptions makeMultiThumbFutureAspectScaleAnimation(Context context,
Handler handler, IAppTransitionAnimationSpecsFuture specsFuture,
OnAnimationStartedListener listener, boolean scaleUp) {
@@ -847,6 +850,7 @@
* @hide
*/
@RequiresPermission(CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS)
+ @UnsupportedAppUsage
public static ActivityOptions makeRemoteAnimation(
RemoteAnimationAdapter remoteAnimationAdapter) {
final ActivityOptions opts = new ActivityOptions();
@@ -956,14 +960,15 @@
}
/**
- * Sets the bounds (window size) that the activity should be launched in.
+ * Sets the bounds (window size and position) that the activity should be launched in.
* Rect position should be provided in pixels and in screen coordinates.
- * Set to null explicitly for fullscreen.
+ * Set to {@code null} to explicitly launch fullscreen.
* <p>
- * <strong>NOTE:<strong/> This value is ignored on devices that don't have
+ * <strong>NOTE:</strong> This value is ignored on devices that don't have
* {@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or
* {@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled.
- * @param screenSpacePixelRect Launch bounds to use for the activity or null for fullscreen.
+ * @param screenSpacePixelRect launch bounds or {@code null} for fullscreen
+ * @return {@code this} {@link ActivityOptions} instance
*/
public ActivityOptions setLaunchBounds(@Nullable Rect screenSpacePixelRect) {
mLaunchBounds = screenSpacePixelRect != null ? new Rect(screenSpacePixelRect) : null;
@@ -1278,6 +1283,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setSplitScreenCreateMode(int splitScreenCreateMode) {
mSplitScreenCreateMode = splitScreenCreateMode;
}
diff --git a/core/java/android/app/ActivityTaskManager.java b/core/java/android/app/ActivityTaskManager.java
index 2f18b89..af8aa4e 100644
--- a/core/java/android/app/ActivityTaskManager.java
+++ b/core/java/android/app/ActivityTaskManager.java
@@ -29,6 +29,8 @@
import android.os.ServiceManager;
import android.util.Singleton;
+import java.util.List;
+
/**
* This class gives information about, and interacts with activities and their containers like task,
* stacks, and displays.
@@ -263,4 +265,140 @@
&& Resources.getSystem().getBoolean(
com.android.internal.R.bool.config_supportsSplitScreenMultiWindow);
}
+
+ /**
+ * Moves the top activity in the input stackId to the pinned stack.
+ * @param stackId Id of stack to move the top activity to pinned stack.
+ * @param bounds Bounds to use for pinned stack.
+ * @return True if the top activity of stack was successfully moved to the pinned stack.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) {
+ try {
+ return getService().moveTopActivityToPinnedStack(stackId, bounds);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Start to enter lock task mode for given task by system(UI).
+ * @param taskId Id of task to lock.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public void startSystemLockTaskMode(int taskId) {
+ try {
+ getService().startSystemLockTaskMode(taskId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Stop lock task mode by system(UI).
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public void stopSystemLockTaskMode() {
+ try {
+ getService().stopSystemLockTaskMode();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Move task to stack with given id.
+ * @param taskId Id of the task to move.
+ * @param stackId Id of the stack for task moving.
+ * @param toTop Whether the given task should shown to top of stack.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public void moveTaskToStack(int taskId, int stackId, boolean toTop) {
+ try {
+ getService().moveTaskToStack(taskId, stackId, toTop);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Resize the input stack id to the given bounds with animate setting.
+ * @param stackId Id of the stack to resize.
+ * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
+ * @param animate Whether we should play an animation for resizing stack.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public void resizeStack(int stackId, Rect bounds, boolean animate) {
+ try {
+ getService().resizeStack(stackId, bounds, false, false, animate /* animate */,
+ -1 /* animationDuration */);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Resize task to given bounds.
+ * @param taskId Id of task to resize.
+ * @param bounds Bounds to resize task.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public void resizeTask(int taskId, Rect bounds) {
+ try {
+ getService().resizeTask(taskId, bounds, RESIZE_MODE_SYSTEM);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Resize docked stack & its task to given stack & task bounds.
+ * @param stackBounds Bounds to resize stack.
+ * @param taskBounds Bounds to resize task.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public void resizeDockedStack(Rect stackBounds, Rect taskBounds) {
+ try {
+ getService().resizeDockedStack(stackBounds, taskBounds, null, null, null);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * List all activity stacks information.
+ * @hide
+ */
+ @TestApi
+ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+ public String listAllStacks() {
+ final List<ActivityManager.StackInfo> stacks;
+ try {
+ stacks = getService().getAllStackInfos();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+
+ final StringBuilder sb = new StringBuilder();
+ if (stacks != null) {
+ for (ActivityManager.StackInfo info : stacks) {
+ sb.append(info).append("\n");
+ }
+ }
+ return sb.toString();
+ }
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 2a3fc04..a010c72 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -27,6 +27,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.assist.AssistContent;
import android.app.assist.AssistStructure;
import android.app.backup.BackupAgent;
@@ -249,15 +250,21 @@
@GuardedBy("mNetworkPolicyLock")
private long mNetworkBlockSeq = INVALID_PROC_STATE_SEQ;
+ @UnsupportedAppUsage
private ContextImpl mSystemContext;
private ContextImpl mSystemUiContext;
+ @UnsupportedAppUsage
static volatile IPackageManager sPackageManager;
+ @UnsupportedAppUsage
final ApplicationThread mAppThread = new ApplicationThread();
+ @UnsupportedAppUsage
final Looper mLooper = Looper.myLooper();
+ @UnsupportedAppUsage
final H mH = new H();
final Executor mExecutor = new HandlerExecutor(mH);
+ @UnsupportedAppUsage
final ArrayMap<IBinder, ActivityClientRecord> mActivities = new ArrayMap<>();
/** The activities to be truly destroyed (not include relaunch). */
final Map<IBinder, ClientTransactionItem> mActivitiesToBeDestroyed =
@@ -266,28 +273,40 @@
// be reported when next we idle.
ActivityClientRecord mNewActivities = null;
// Number of activities that are currently visible on-screen.
+ @UnsupportedAppUsage
int mNumVisibleActivities = 0;
ArrayList<WeakReference<AssistStructure>> mLastAssistStructures = new ArrayList<>();
private int mLastSessionId;
+ @UnsupportedAppUsage
final ArrayMap<IBinder, Service> mServices = new ArrayMap<>();
+ @UnsupportedAppUsage
AppBindData mBoundApplication;
Profiler mProfiler;
+ @UnsupportedAppUsage
int mCurDefaultDisplayDpi;
+ @UnsupportedAppUsage
boolean mDensityCompatMode;
+ @UnsupportedAppUsage
Configuration mConfiguration;
Configuration mCompatConfiguration;
+ @UnsupportedAppUsage
Application mInitialApplication;
+ @UnsupportedAppUsage
final ArrayList<Application> mAllApplications
= new ArrayList<Application>();
// set of instantiated backup agents, keyed by package name
final ArrayMap<String, BackupAgent> mBackupAgents = new ArrayMap<String, BackupAgent>();
/** Reference to singleton {@link ActivityThread} */
+ @UnsupportedAppUsage
private static volatile ActivityThread sCurrentActivityThread;
+ @UnsupportedAppUsage
Instrumentation mInstrumentation;
String mInstrumentationPackageName = null;
+ @UnsupportedAppUsage
String mInstrumentationAppDir = null;
String[] mInstrumentationSplitAppDirs = null;
String mInstrumentationLibDir = null;
+ @UnsupportedAppUsage
String mInstrumentedAppDir = null;
String[] mInstrumentedSplitAppDirs = null;
String mInstrumentedLibDir = null;
@@ -307,16 +326,20 @@
// or window manager or anything that depends on them while holding this lock.
// These LoadedApk are only valid for the userId that we're running as.
@GuardedBy("mResourcesManager")
+ @UnsupportedAppUsage
final ArrayMap<String, WeakReference<LoadedApk>> mPackages = new ArrayMap<>();
@GuardedBy("mResourcesManager")
+ @UnsupportedAppUsage
final ArrayMap<String, WeakReference<LoadedApk>> mResourcePackages = new ArrayMap<>();
@GuardedBy("mResourcesManager")
final ArrayList<ActivityClientRecord> mRelaunchingActivities = new ArrayList<>();
@GuardedBy("mResourcesManager")
+ @UnsupportedAppUsage
Configuration mPendingConfiguration = null;
// An executor that performs multi-step transactions.
private final TransactionExecutor mTransactionExecutor = new TransactionExecutor(this);
+ @UnsupportedAppUsage
private final ResourcesManager mResourcesManager;
private static final class ProviderKey {
@@ -344,12 +367,16 @@
}
// The lock of mProviderMap protects the following variables.
+ @UnsupportedAppUsage
final ArrayMap<ProviderKey, ProviderClientRecord> mProviderMap
= new ArrayMap<ProviderKey, ProviderClientRecord>();
+ @UnsupportedAppUsage
final ArrayMap<IBinder, ProviderRefCount> mProviderRefCountMap
= new ArrayMap<IBinder, ProviderRefCount>();
+ @UnsupportedAppUsage
final ArrayMap<IBinder, ProviderClientRecord> mLocalProviders
= new ArrayMap<IBinder, ProviderClientRecord>();
+ @UnsupportedAppUsage
final ArrayMap<ComponentName, ProviderClientRecord> mLocalProvidersByName
= new ArrayMap<ComponentName, ProviderClientRecord>();
@@ -366,26 +393,32 @@
final GcIdler mGcIdler = new GcIdler();
boolean mGcIdlerScheduled = false;
+ @UnsupportedAppUsage
static volatile Handler sMainThreadHandler; // set once in main()
Bundle mCoreSettings = null;
/** Activity client record, used for bookkeeping for the real {@link Activity} instance. */
public static final class ActivityClientRecord {
+ @UnsupportedAppUsage
public IBinder token;
int ident;
+ @UnsupportedAppUsage
Intent intent;
String referrer;
IVoiceInteractor voiceInteractor;
Bundle state;
PersistableBundle persistentState;
+ @UnsupportedAppUsage
Activity activity;
Window window;
Activity parent;
String embeddedID;
Activity.NonConfigurationInstances lastNonConfigurationInstances;
// TODO(lifecycler): Use mLifecycleState instead.
+ @UnsupportedAppUsage
boolean paused;
+ @UnsupportedAppUsage
boolean stopped;
boolean hideForNow;
Configuration newConfig;
@@ -399,8 +432,11 @@
ProfilerInfo profilerInfo;
+ @UnsupportedAppUsage
ActivityInfo activityInfo;
+ @UnsupportedAppUsage
CompatibilityInfo compatInfo;
+ @UnsupportedAppUsage
public LoadedApk packageInfo;
List<ResultInfo> pendingResults;
@@ -412,12 +448,14 @@
Window mPendingRemoveWindow;
WindowManager mPendingRemoveWindowManager;
+ @UnsupportedAppUsage
boolean mPreserveWindow;
@LifecycleState
private int mLifecycleState = PRE_ON_CREATE;
@VisibleForTesting
+ @UnsupportedAppUsage
public ActivityClientRecord() {
this.isForward = false;
init();
@@ -553,8 +591,11 @@
final class ProviderClientRecord {
final String[] mNames;
+ @UnsupportedAppUsage
final IContentProvider mProvider;
+ @UnsupportedAppUsage
final ContentProvider mLocalProvider;
+ @UnsupportedAppUsage
final ContentProviderHolder mHolder;
ProviderClientRecord(String[] names, IContentProvider provider,
@@ -574,8 +615,11 @@
this.intent = intent;
}
+ @UnsupportedAppUsage
Intent intent;
+ @UnsupportedAppUsage
ActivityInfo info;
+ @UnsupportedAppUsage
CompatibilityInfo compatInfo;
public String toString() {
return "ReceiverData{intent=" + intent + " packageName=" +
@@ -597,9 +641,13 @@
}
static final class CreateServiceData {
+ @UnsupportedAppUsage
IBinder token;
+ @UnsupportedAppUsage
ServiceInfo info;
+ @UnsupportedAppUsage
CompatibilityInfo compatInfo;
+ @UnsupportedAppUsage
Intent intent;
public String toString() {
return "CreateServiceData{token=" + token + " className="
@@ -609,7 +657,9 @@
}
static final class BindServiceData {
+ @UnsupportedAppUsage
IBinder token;
+ @UnsupportedAppUsage
Intent intent;
boolean rebind;
public String toString() {
@@ -618,10 +668,12 @@
}
static final class ServiceArgsData {
+ @UnsupportedAppUsage
IBinder token;
boolean taskRemoved;
int startId;
int flags;
+ @UnsupportedAppUsage
Intent args;
public String toString() {
return "ServiceArgsData{token=" + token + " startId=" + startId
@@ -630,20 +682,28 @@
}
static final class AppBindData {
+ @UnsupportedAppUsage
LoadedApk info;
+ @UnsupportedAppUsage
String processName;
+ @UnsupportedAppUsage
ApplicationInfo appInfo;
+ @UnsupportedAppUsage
List<ProviderInfo> providers;
ComponentName instrumentationName;
+ @UnsupportedAppUsage
Bundle instrumentationArgs;
IInstrumentationWatcher instrumentationWatcher;
IUiAutomationConnection instrumentationUiAutomationConnection;
int debugMode;
boolean enableBinderTracking;
boolean trackAllocation;
+ @UnsupportedAppUsage
boolean restrictedBackupMode;
+ @UnsupportedAppUsage
boolean persistent;
Configuration config;
+ @UnsupportedAppUsage
CompatibilityInfo compatInfo;
String buildSerial;
@@ -1355,14 +1415,69 @@
IoUtils.closeQuietly(pfd);
}
- private void dumpDatabaseInfo(ParcelFileDescriptor pfd, String[] args) {
+ private File getDatabasesDir(Context context) {
+ // There's no simple way to get the databases/ path, so do it this way.
+ return context.getDatabasePath("a").getParentFile();
+ }
+
+ private void dumpDatabaseInfo(ParcelFileDescriptor pfd, String[] args, boolean isSystem) {
PrintWriter pw = new FastPrintWriter(
new FileOutputStream(pfd.getFileDescriptor()));
PrintWriterPrinter printer = new PrintWriterPrinter(pw);
SQLiteDebug.dump(printer, args);
+
+ if (isSystem) {
+ dumpDatabaseFileSizes(pw, Environment.getDataSystemDirectory(), true);
+ dumpDatabaseFileSizes(pw, Environment.getDataSystemDeDirectory(), true);
+ dumpDatabaseFileSizes(pw, Environment.getDataSystemCeDirectory(), true);
+ } else {
+ Context context = getApplication();
+ if (context != null) {
+ dumpDatabaseFileSizes(pw,
+ getDatabasesDir(context.createDeviceProtectedStorageContext()),
+ false);
+ dumpDatabaseFileSizes(pw,
+ getDatabasesDir(context.createCredentialProtectedStorageContext()),
+ false);
+ }
+ }
pw.flush();
}
+ private void dumpDatabaseFileSizes(PrintWriter pw, File dir, boolean isSystem) {
+ final File[] files = dir.listFiles();
+ if (files == null || files.length == 0) {
+ return;
+ }
+ Arrays.sort(files, (a, b) -> a.getName().compareTo(b.getName()));
+
+ boolean needHeader = true;
+ for (File f : files) {
+ if (isSystem) {
+ // If it's the system server, the directory contains other files too, so
+ // filter by file extensions.
+ // (If it's an app, just print all files because they may not use *.db
+ // extension.)
+ final String name = f.getName();
+ if (!(name.endsWith(".db") || name.endsWith(".db-wal")
+ || name.endsWith(".db-journal"))) {
+ continue;
+ }
+ }
+ if (needHeader) {
+ pw.println();
+ pw.println("Database files in " + dir.getAbsolutePath() + ":");
+ needHeader = false;
+ }
+
+ pw.print(" ");
+ pw.print(f.getName());
+ pw.print(" ");
+ pw.print(f.length());
+ pw.println(" bytes");
+ }
+ }
+
@Override
public void dumpDbInfo(final ParcelFileDescriptor pfd, final String[] args) {
if (mSystemThread) {
@@ -1383,14 +1498,14 @@
@Override
public void run() {
try {
- dumpDatabaseInfo(dup, args);
+ dumpDatabaseInfo(dup, args, true);
} finally {
IoUtils.closeQuietly(dup);
}
}
});
} else {
- dumpDatabaseInfo(pfd, args);
+ dumpDatabaseInfo(pfd, args, false);
IoUtils.closeQuietly(pfd);
}
}
@@ -1561,16 +1676,24 @@
class H extends Handler {
public static final int BIND_APPLICATION = 110;
+ @UnsupportedAppUsage
public static final int EXIT_APPLICATION = 111;
+ @UnsupportedAppUsage
public static final int RECEIVER = 113;
+ @UnsupportedAppUsage
public static final int CREATE_SERVICE = 114;
+ @UnsupportedAppUsage
public static final int SERVICE_ARGS = 115;
+ @UnsupportedAppUsage
public static final int STOP_SERVICE = 116;
public static final int CONFIGURATION_CHANGED = 118;
public static final int CLEAN_UP_CONTEXT = 119;
+ @UnsupportedAppUsage
public static final int GC_WHEN_IDLE = 120;
+ @UnsupportedAppUsage
public static final int BIND_SERVICE = 121;
+ @UnsupportedAppUsage
public static final int UNBIND_SERVICE = 122;
public static final int DUMP_SERVICE = 123;
public static final int LOW_MEMORY = 124;
@@ -1578,21 +1701,26 @@
public static final int CREATE_BACKUP_AGENT = 128;
public static final int DESTROY_BACKUP_AGENT = 129;
public static final int SUICIDE = 130;
+ @UnsupportedAppUsage
public static final int REMOVE_PROVIDER = 131;
public static final int ENABLE_JIT = 132;
public static final int DISPATCH_PACKAGE_BROADCAST = 133;
+ @UnsupportedAppUsage
public static final int SCHEDULE_CRASH = 134;
public static final int DUMP_HEAP = 135;
public static final int DUMP_ACTIVITY = 136;
public static final int SLEEPING = 137;
public static final int SET_CORE_SETTINGS = 138;
public static final int UPDATE_PACKAGE_COMPATIBILITY_INFO = 139;
+ @UnsupportedAppUsage
public static final int DUMP_PROVIDER = 141;
public static final int UNSTABLE_PROVIDER_DIED = 142;
public static final int REQUEST_ASSIST_CONTEXT_EXTRAS = 143;
public static final int TRANSLUCENT_CONVERSION_COMPLETE = 144;
+ @UnsupportedAppUsage
public static final int INSTALL_PROVIDER = 145;
public static final int ON_NEW_ACTIVITY_OPTIONS = 146;
+ @UnsupportedAppUsage
public static final int ENTER_ANIMATION_COMPLETE = 149;
public static final int START_BINDER_TRACKING = 150;
public static final int STOP_BINDER_TRACKING_AND_DUMP = 151;
@@ -1881,6 +2009,7 @@
}
}
+ @UnsupportedAppUsage
public static ActivityThread currentActivityThread() {
return sCurrentActivityThread;
}
@@ -1895,23 +2024,27 @@
? am.getApplication().getOpPackageName() : null;
}
+ @UnsupportedAppUsage
public static String currentPackageName() {
ActivityThread am = currentActivityThread();
return (am != null && am.mBoundApplication != null)
? am.mBoundApplication.appInfo.packageName : null;
}
+ @UnsupportedAppUsage
public static String currentProcessName() {
ActivityThread am = currentActivityThread();
return (am != null && am.mBoundApplication != null)
? am.mBoundApplication.processName : null;
}
+ @UnsupportedAppUsage
public static Application currentApplication() {
ActivityThread am = currentActivityThread();
return am != null ? am.mInitialApplication : null;
}
+ @UnsupportedAppUsage
public static IPackageManager getPackageManager() {
if (sPackageManager != null) {
//Slog.v("PackageManager", "returning cur default = " + sPackageManager);
@@ -1949,10 +2082,12 @@
displayId, null, pkgInfo.getCompatibilityInfo(), pkgInfo.getClassLoader());
}
+ @UnsupportedAppUsage
final Handler getHandler() {
return mH;
}
+ @UnsupportedAppUsage
public final LoadedApk getPackageInfo(String packageName, CompatibilityInfo compatInfo,
int flags) {
return getPackageInfo(packageName, compatInfo, flags, UserHandle.myUserId());
@@ -2007,6 +2142,7 @@
return null;
}
+ @UnsupportedAppUsage
public final LoadedApk getPackageInfo(ApplicationInfo ai, CompatibilityInfo compatInfo,
int flags) {
boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0;
@@ -2034,11 +2170,13 @@
}
@Override
+ @UnsupportedAppUsage
public final LoadedApk getPackageInfoNoCheck(ApplicationInfo ai,
CompatibilityInfo compatInfo) {
return getPackageInfo(ai, compatInfo, null, false, true, false);
}
+ @UnsupportedAppUsage
public final LoadedApk peekPackageInfo(String packageName, boolean includeCode) {
synchronized (mResourcesManager) {
WeakReference<LoadedApk> ref;
@@ -2098,15 +2236,18 @@
}
}
+ @UnsupportedAppUsage
ActivityThread() {
mResourcesManager = ResourcesManager.getInstance();
}
+ @UnsupportedAppUsage
public ApplicationThread getApplicationThread()
{
return mAppThread;
}
+ @UnsupportedAppUsage
public Instrumentation getInstrumentation()
{
return mInstrumentation;
@@ -2121,6 +2262,7 @@
return mProfiler.profileFile;
}
+ @UnsupportedAppUsage
public Looper getLooper() {
return mLooper;
}
@@ -2129,14 +2271,17 @@
return mExecutor;
}
+ @UnsupportedAppUsage
public Application getApplication() {
return mInitialApplication;
}
+ @UnsupportedAppUsage
public String getProcessName() {
return mBoundApplication.processName;
}
+ @UnsupportedAppUsage
public ContextImpl getSystemContext() {
synchronized (this) {
if (mSystemContext == null) {
@@ -2172,6 +2317,7 @@
}
}
+ @UnsupportedAppUsage
void scheduleGcIdler() {
if (!mGcIdlerScheduled) {
mGcIdlerScheduled = true;
@@ -2668,6 +2814,7 @@
proto.end(asToken);
}
+ @UnsupportedAppUsage
public void registerOnActivityPausedListener(Activity activity,
OnActivityPausedListener listener) {
synchronized (mOnPauseListeners) {
@@ -2680,6 +2827,7 @@
}
}
+ @UnsupportedAppUsage
public void unregisterOnActivityPausedListener(Activity activity,
OnActivityPausedListener listener) {
synchronized (mOnPauseListeners) {
@@ -2701,6 +2849,7 @@
return aInfo;
}
+ @UnsupportedAppUsage
public final Activity startActivityNow(Activity parent, String id,
Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state,
Activity.NonConfigurationInstances lastNonConfigurationInstances) {
@@ -2731,6 +2880,7 @@
return performLaunchActivity(r, null /* customIntent */);
}
+ @UnsupportedAppUsage
public final Activity getActivity(IBinder token) {
final ActivityClientRecord activityRecord = mActivities.get(token);
return activityRecord != null ? activityRecord.activity : null;
@@ -2741,6 +2891,7 @@
return mActivities.get(token);
}
+ @UnsupportedAppUsage
public final void sendActivityResult(
IBinder token, String id, int requestCode,
int resultCode, Intent data) {
@@ -3122,6 +3273,7 @@
}
}
+ @UnsupportedAppUsage
void performNewIntents(IBinder token, List<ReferrerIntent> intents, boolean andPause) {
final ActivityClientRecord r = mActivities.get(token);
if (r == null) {
@@ -3342,6 +3494,7 @@
return sCurrentBroadcastIntent.get();
}
+ @UnsupportedAppUsage
private void handleReceiver(ReceiverData data) {
// If we are getting ready to gc after going to the background, well
// we are back active so skip it.
@@ -3513,6 +3666,7 @@
}
}
+ @UnsupportedAppUsage
private void handleCreateService(CreateServiceData data) {
// If we are getting ready to gc after going to the background, well
// we are back active so skip it.
@@ -4055,6 +4209,7 @@
}
/** Called from {@link LocalActivityManager}. */
+ @UnsupportedAppUsage
final void performStopActivity(IBinder token, boolean saveState, String reason) {
ActivityClientRecord r = mActivities.get(token);
performStopActivityInner(r, null /* stopInfo */, false /* keepShown */, saveState,
@@ -5561,6 +5716,7 @@
LocaleList.setDefault(new LocaleList(bestLocale, newLocaleList));
}
+ @UnsupportedAppUsage
private void handleBindApplication(AppBindData data) {
// Register the UI Thread as a sensitive thread to the runtime.
VMRuntime.registerSensitiveThread();
@@ -5950,6 +6106,7 @@
}
}
+ @UnsupportedAppUsage
private void installContentProviders(
Context context, List<ProviderInfo> providers) {
final ArrayList<ContentProviderHolder> results = new ArrayList<>();
@@ -5979,6 +6136,7 @@
}
}
+ @UnsupportedAppUsage
public final IContentProvider acquireProvider(
Context c, String auth, int userId, boolean stable) {
final IContentProvider provider = acquireExistingProvider(c, auth, userId, stable);
@@ -6093,6 +6251,7 @@
}
}
+ @UnsupportedAppUsage
public final IContentProvider acquireExistingProvider(
Context c, String auth, int userId, boolean stable) {
synchronized (mProviderMap) {
@@ -6123,6 +6282,7 @@
}
}
+ @UnsupportedAppUsage
public final boolean releaseProvider(IContentProvider provider, boolean stable) {
if (provider == null) {
return false;
@@ -6255,6 +6415,7 @@
}
}
+ @UnsupportedAppUsage
final void handleUnstableProviderDied(IBinder provider, boolean fromClient) {
synchronized (mProviderMap) {
handleUnstableProviderDiedLocked(provider, fromClient);
@@ -6356,6 +6517,7 @@
* and returns the existing provider. This can happen due to concurrent
* attempts to acquire the same provider.
*/
+ @UnsupportedAppUsage
private ContentProviderHolder installProvider(Context context,
ContentProviderHolder holder, ProviderInfo info,
boolean noisy, boolean noReleaseNeeded, boolean stable) {
@@ -6503,6 +6665,7 @@
System.exit(0);
}
+ @UnsupportedAppUsage
private void attach(boolean system, long startSeq) {
sCurrentActivityThread = this;
mSystemThread = system;
@@ -6587,6 +6750,7 @@
ViewRootImpl.addConfigCallback(configChangedCallback);
}
+ @UnsupportedAppUsage
public static ActivityThread systemMain() {
// The system process on low-memory devices do not get to use hardware
// accelerated drawing, since this can add too much overhead to the
@@ -6601,6 +6765,7 @@
return thread;
}
+ @UnsupportedAppUsage
public final void installSystemProviders(List<ProviderInfo> providers) {
if (providers != null) {
installContentProviders(mInitialApplication, providers);
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
index c7fa33d..c879db8 100644
--- a/core/java/android/app/ActivityView.java
+++ b/core/java/android/app/ActivityView.java
@@ -17,6 +17,7 @@
package android.app;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager.StackInfo;
import android.content.Context;
import android.content.Intent;
@@ -74,6 +75,7 @@
private final CloseGuard mGuard = CloseGuard.get();
private boolean mOpened; // Protected by mGuard.
+ @UnsupportedAppUsage
public ActivityView(Context context) {
this(context, null /* attrs */);
}
@@ -156,6 +158,7 @@
* @see StateCallback
* @see #startActivity(PendingIntent)
*/
+ @UnsupportedAppUsage
public void startActivity(@NonNull Intent intent) {
final ActivityOptions options = prepareActivityOptions();
getContext().startActivity(intent, options.toBundle());
@@ -198,6 +201,7 @@
* @see StateCallback
* @see #startActivity(Intent)
*/
+ @UnsupportedAppUsage
public void startActivity(@NonNull PendingIntent pendingIntent) {
final ActivityOptions options = prepareActivityOptions();
try {
@@ -231,6 +235,7 @@
*
* @see StateCallback
*/
+ @UnsupportedAppUsage
public void release() {
if (mVirtualDisplay == null) {
throw new IllegalStateException(
diff --git a/core/java/android/app/AlarmManager.java b/core/java/android/app/AlarmManager.java
index f76f911..ec4c4db 100644
--- a/core/java/android/app/AlarmManager.java
+++ b/core/java/android/app/AlarmManager.java
@@ -21,6 +21,7 @@
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
@@ -129,8 +130,10 @@
"android.app.action.NEXT_ALARM_CLOCK_CHANGED";
/** @hide */
+ @UnsupportedAppUsage
public static final long WINDOW_EXACT = 0;
/** @hide */
+ @UnsupportedAppUsage
public static final long WINDOW_HEURISTIC = -1;
/**
@@ -138,6 +141,7 @@
* other alarms.
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_STANDALONE = 1<<0;
/**
@@ -145,6 +149,7 @@
* is, for example, an alarm for an alarm clock.
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_WAKE_FROM_IDLE = 1<<1;
/**
@@ -165,6 +170,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_ALLOW_WHILE_IDLE_UNRESTRICTED = 1<<3;
/**
@@ -174,8 +180,10 @@
* avoids scheduling any further alarms until the marker alarm is executed.
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_IDLE_UNTIL = 1<<4;
+ @UnsupportedAppUsage
private final IAlarmManager mService;
private final Context mContext;
private final String mPackageName;
@@ -628,6 +636,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void set(@AlarmType int type, long triggerAtMillis, long windowMillis,
long intervalMillis, String tag, OnAlarmListener listener, Handler targetHandler,
WorkSource workSource) {
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 07b4b9c..dbc8c5d 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -21,6 +21,7 @@
import android.annotation.DrawableRes;
import android.annotation.StringRes;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.ResourceId;
@@ -69,6 +70,7 @@
* </div>
*/
public class AlertDialog extends Dialog implements DialogInterface {
+ @UnsupportedAppUsage
private AlertController mAlert;
/**
@@ -449,6 +451,7 @@
}
public static class Builder {
+ @UnsupportedAppUsage
private final AlertController.AlertParams P;
/**
@@ -1049,6 +1052,7 @@
* @deprecated Set the padding on the view itself.
*/
@Deprecated
+ @UnsupportedAppUsage
public Builder setView(View view, int viewSpacingLeft, int viewSpacingTop,
int viewSpacingRight, int viewSpacingBottom) {
P.mView = view;
@@ -1080,6 +1084,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Builder setRecycleOnMeasureEnabled(boolean enabled) {
P.mRecycleOnMeasure = enabled;
return this;
diff --git a/core/java/android/app/AppGlobals.java b/core/java/android/app/AppGlobals.java
index 2b6db8b..1f737b6 100644
--- a/core/java/android/app/AppGlobals.java
+++ b/core/java/android/app/AppGlobals.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.IPackageManager;
/**
@@ -27,6 +28,7 @@
* Return the first Application object made in the process.
* NOTE: Only works on the main thread.
*/
+ @UnsupportedAppUsage
public static Application getInitialApplication() {
return ActivityThread.currentApplication();
}
@@ -35,6 +37,7 @@
* Return the package name of the first .apk loaded into the process.
* NOTE: Only works on the main thread.
*/
+ @UnsupportedAppUsage
public static String getInitialPackage() {
return ActivityThread.currentPackageName();
}
@@ -43,6 +46,7 @@
* Return the raw interface to the package manager.
* @return The package manager.
*/
+ @UnsupportedAppUsage
public static IPackageManager getPackageManager() {
return ActivityThread.getPackageManager();
}
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index c3404a5..fd92174 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -22,6 +22,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.usage.UsageStatsManager;
import android.content.Context;
import android.media.AudioAttributes.AttributeUsage;
@@ -75,6 +76,7 @@
*/
final Context mContext;
+ @UnsupportedAppUsage
final IAppOpsService mService;
final ArrayMap<OnOpChangedListener, IAppOpsCallback> mModeWatchers = new ArrayMap<>();
final ArrayMap<OnOpActiveChangedListener, IAppOpsActiveCallback> mActiveWatchers =
@@ -191,168 +193,246 @@
// - add the op to the appropriate template in AppOpsState.OpsTemplate (settings app)
/** @hide No operation specified. */
+ @UnsupportedAppUsage
public static final int OP_NONE = -1;
/** @hide Access to coarse location information. */
+ @UnsupportedAppUsage
public static final int OP_COARSE_LOCATION = 0;
/** @hide Access to fine location information. */
+ @UnsupportedAppUsage
public static final int OP_FINE_LOCATION = 1;
/** @hide Causing GPS to run. */
+ @UnsupportedAppUsage
public static final int OP_GPS = 2;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_VIBRATE = 3;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_READ_CONTACTS = 4;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_CONTACTS = 5;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_READ_CALL_LOG = 6;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_CALL_LOG = 7;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_READ_CALENDAR = 8;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_CALENDAR = 9;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WIFI_SCAN = 10;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_POST_NOTIFICATION = 11;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_NEIGHBORING_CELLS = 12;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_CALL_PHONE = 13;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_READ_SMS = 14;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_SMS = 15;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_RECEIVE_SMS = 16;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_RECEIVE_EMERGECY_SMS = 17;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_RECEIVE_MMS = 18;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_RECEIVE_WAP_PUSH = 19;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_SEND_SMS = 20;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_READ_ICC_SMS = 21;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_ICC_SMS = 22;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_SETTINGS = 23;
/** @hide Required to draw on top of other apps. */
@TestApi
public static final int OP_SYSTEM_ALERT_WINDOW = 24;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_ACCESS_NOTIFICATIONS = 25;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_CAMERA = 26;
/** @hide */
@TestApi
public static final int OP_RECORD_AUDIO = 27;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_PLAY_AUDIO = 28;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_READ_CLIPBOARD = 29;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WRITE_CLIPBOARD = 30;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_TAKE_MEDIA_BUTTONS = 31;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_TAKE_AUDIO_FOCUS = 32;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_MASTER_VOLUME = 33;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_VOICE_VOLUME = 34;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_RING_VOLUME = 35;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_MEDIA_VOLUME = 36;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_ALARM_VOLUME = 37;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_NOTIFICATION_VOLUME = 38;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_BLUETOOTH_VOLUME = 39;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_WAKE_LOCK = 40;
/** @hide Continually monitoring location data. */
+ @UnsupportedAppUsage
public static final int OP_MONITOR_LOCATION = 41;
/** @hide Continually monitoring location data with a relatively high power request. */
+ @UnsupportedAppUsage
public static final int OP_MONITOR_HIGH_POWER_LOCATION = 42;
/** @hide Retrieve current usage stats via {@link UsageStatsManager}. */
+ @UnsupportedAppUsage
public static final int OP_GET_USAGE_STATS = 43;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_MUTE_MICROPHONE = 44;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_TOAST_WINDOW = 45;
/** @hide Capture the device's display contents and/or audio */
+ @UnsupportedAppUsage
public static final int OP_PROJECT_MEDIA = 46;
/** @hide Activate a VPN connection without user intervention. */
+ @UnsupportedAppUsage
public static final int OP_ACTIVATE_VPN = 47;
/** @hide Access the WallpaperManagerAPI to write wallpapers. */
+ @UnsupportedAppUsage
public static final int OP_WRITE_WALLPAPER = 48;
/** @hide Received the assist structure from an app. */
+ @UnsupportedAppUsage
public static final int OP_ASSIST_STRUCTURE = 49;
/** @hide Received a screenshot from assist. */
+ @UnsupportedAppUsage
public static final int OP_ASSIST_SCREENSHOT = 50;
/** @hide Read the phone state. */
+ @UnsupportedAppUsage
public static final int OP_READ_PHONE_STATE = 51;
/** @hide Add voicemail messages to the voicemail content provider. */
+ @UnsupportedAppUsage
public static final int OP_ADD_VOICEMAIL = 52;
/** @hide Access APIs for SIP calling over VOIP or WiFi. */
+ @UnsupportedAppUsage
public static final int OP_USE_SIP = 53;
/** @hide Intercept outgoing calls. */
+ @UnsupportedAppUsage
public static final int OP_PROCESS_OUTGOING_CALLS = 54;
/** @hide User the fingerprint API. */
+ @UnsupportedAppUsage
public static final int OP_USE_FINGERPRINT = 55;
/** @hide Access to body sensors such as heart rate, etc. */
+ @UnsupportedAppUsage
public static final int OP_BODY_SENSORS = 56;
/** @hide Read previously received cell broadcast messages. */
+ @UnsupportedAppUsage
public static final int OP_READ_CELL_BROADCASTS = 57;
/** @hide Inject mock location into the system. */
+ @UnsupportedAppUsage
public static final int OP_MOCK_LOCATION = 58;
/** @hide Read external storage. */
+ @UnsupportedAppUsage
public static final int OP_READ_EXTERNAL_STORAGE = 59;
/** @hide Write external storage. */
+ @UnsupportedAppUsage
public static final int OP_WRITE_EXTERNAL_STORAGE = 60;
/** @hide Turned on the screen. */
+ @UnsupportedAppUsage
public static final int OP_TURN_SCREEN_ON = 61;
/** @hide Get device accounts. */
+ @UnsupportedAppUsage
public static final int OP_GET_ACCOUNTS = 62;
/** @hide Control whether an application is allowed to run in the background. */
+ @UnsupportedAppUsage
public static final int OP_RUN_IN_BACKGROUND = 63;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_AUDIO_ACCESSIBILITY_VOLUME = 64;
/** @hide Read the phone number. */
+ @UnsupportedAppUsage
public static final int OP_READ_PHONE_NUMBERS = 65;
/** @hide Request package installs through package installer */
+ @UnsupportedAppUsage
public static final int OP_REQUEST_INSTALL_PACKAGES = 66;
/** @hide Enter picture-in-picture. */
+ @UnsupportedAppUsage
public static final int OP_PICTURE_IN_PICTURE = 67;
/** @hide Instant app start foreground service. */
+ @UnsupportedAppUsage
public static final int OP_INSTANT_APP_START_FOREGROUND = 68;
/** @hide Answer incoming phone calls */
+ @UnsupportedAppUsage
public static final int OP_ANSWER_PHONE_CALLS = 69;
/** @hide Run jobs when in background */
+ @UnsupportedAppUsage
public static final int OP_RUN_ANY_IN_BACKGROUND = 70;
/** @hide Change Wi-Fi connectivity state */
+ @UnsupportedAppUsage
public static final int OP_CHANGE_WIFI_STATE = 71;
/** @hide Request package deletion through package installer */
+ @UnsupportedAppUsage
public static final int OP_REQUEST_DELETE_PACKAGES = 72;
/** @hide Bind an accessibility service. */
+ @UnsupportedAppUsage
public static final int OP_BIND_ACCESSIBILITY_SERVICE = 73;
/** @hide Continue handover of a call from another app */
+ @UnsupportedAppUsage
public static final int OP_ACCEPT_HANDOVER = 74;
/** @hide Create and Manage IPsec Tunnels */
+ @UnsupportedAppUsage
public static final int OP_MANAGE_IPSEC_TUNNELS = 75;
/** @hide Any app start foreground service. */
+ @UnsupportedAppUsage
public static final int OP_START_FOREGROUND = 76;
/** @hide */
+ @UnsupportedAppUsage
public static final int OP_BLUETOOTH_SCAN = 77;
/** @hide Use the face authentication API. */
public static final int OP_USE_FACE = 78;
/** @hide */
+ @UnsupportedAppUsage
public static final int _NUM_OP = 79;
/** Access to coarse location information. */
@@ -916,6 +996,7 @@
* This optionally maps a permission to an operation. If there
* is no permission associated with an operation, it is null.
*/
+ @UnsupportedAppUsage
private static String[] sOpPerms = new String[] {
android.Manifest.permission.ACCESS_COARSE_LOCATION,
android.Manifest.permission.ACCESS_FINE_LOCATION,
@@ -1404,6 +1485,7 @@
* Retrieve the op switch that controls the given operation.
* @hide
*/
+ @UnsupportedAppUsage
public static int opToSwitch(int op) {
return sOpToSwitch[op];
}
@@ -1412,6 +1494,7 @@
* Retrieve a non-localized name for the operation, for debugging output.
* @hide
*/
+ @UnsupportedAppUsage
public static String opToName(int op) {
if (op == OP_NONE) return "NONE";
return op < sOpNames.length ? sOpNames[op] : ("Unknown(" + op + ")");
@@ -1507,6 +1590,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public PackageOps(String packageName, int uid, List<OpEntry> entries) {
mPackageName = packageName;
mUid = uid;
@@ -1621,6 +1705,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getOp() {
return mOp;
}
@@ -1642,6 +1727,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public long getTime() {
return maxTime(mTimes, 0, _NUM_UID_STATE);
}
@@ -1814,6 +1900,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS)
+ @UnsupportedAppUsage
public List<AppOpsManager.PackageOps> getPackagesForOps(int[] ops) {
try {
return mService.getPackagesForOps(ops);
@@ -1944,6 +2031,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_APP_OPS_MODES)
+ @UnsupportedAppUsage
public void setRestriction(int code, @AttributeUsage int usage, int mode,
String[] exceptionPackages) {
try {
@@ -1956,6 +2044,7 @@
/** @hide */
@RequiresPermission(android.Manifest.permission.MANAGE_APP_OPS_MODES)
+ @UnsupportedAppUsage
public void resetAllModes() {
try {
mService.resetAllModes(mContext.getUserId(), null);
@@ -2356,6 +2445,7 @@
* @throws SecurityException If the app has been configured to crash on this op.
* @hide
*/
+ @UnsupportedAppUsage
public int checkOp(int op, int uid, String packageName) {
try {
int mode = mService.checkOperation(op, uid, packageName);
@@ -2373,6 +2463,7 @@
* returns {@link #MODE_ERRORED}.
* @hide
*/
+ @UnsupportedAppUsage
public int checkOpNoThrow(int op, int uid, String packageName) {
try {
int mode = mService.checkOperation(op, uid, packageName);
@@ -2443,6 +2534,7 @@
* @throws SecurityException If the app has been configured to crash on this op.
* @hide
*/
+ @UnsupportedAppUsage
public int noteOp(int op, int uid, String packageName) {
final int mode = noteOpNoThrow(op, uid, packageName);
if (mode == MODE_ERRORED) {
@@ -2469,6 +2561,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int noteProxyOp(int op, String proxiedPackageName) {
int mode = noteProxyOpNoThrow(op, proxiedPackageName);
if (mode == MODE_ERRORED) {
@@ -2499,6 +2592,7 @@
* returns {@link #MODE_ERRORED}.
* @hide
*/
+ @UnsupportedAppUsage
public int noteOpNoThrow(int op, int uid, String packageName) {
try {
return mService.noteOperation(op, uid, packageName);
@@ -2508,11 +2602,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int noteOp(int op) {
return noteOp(op, Process.myUid(), mContext.getOpPackageName());
}
/** @hide */
+ @UnsupportedAppUsage
public static IBinder getToken(IAppOpsService service) {
synchronized (AppOpsManager.class) {
if (sToken != null) {
diff --git a/core/java/android/app/Application.java b/core/java/android/app/Application.java
index 6a58d9b..636366d 100644
--- a/core/java/android/app/Application.java
+++ b/core/java/android/app/Application.java
@@ -19,6 +19,7 @@
import android.annotation.CallSuper;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentCallbacks;
import android.content.ComponentCallbacks2;
import android.content.Context;
@@ -50,13 +51,17 @@
*/
public class Application extends ContextWrapper implements ComponentCallbacks2 {
private static final String TAG = "Application";
+ @UnsupportedAppUsage
private ArrayList<ComponentCallbacks> mComponentCallbacks =
new ArrayList<ComponentCallbacks>();
+ @UnsupportedAppUsage
private ArrayList<ActivityLifecycleCallbacks> mActivityLifecycleCallbacks =
new ArrayList<ActivityLifecycleCallbacks>();
+ @UnsupportedAppUsage
private ArrayList<OnProvideAssistDataListener> mAssistCallbacks = null;
/** @hide */
+ @UnsupportedAppUsage
public LoadedApk mLoadedApk;
public interface ActivityLifecycleCallbacks {
@@ -210,11 +215,13 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
/* package */ final void attach(Context context) {
attachBaseContext(context);
mLoadedApk = ContextImpl.getImpl(context).mPackageInfo;
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivityCreated(@NonNull Activity activity,
@Nullable Bundle savedInstanceState) {
Object[] callbacks = collectActivityLifecycleCallbacks();
@@ -226,6 +233,7 @@
}
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivityStarted(@NonNull Activity activity) {
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
@@ -235,6 +243,7 @@
}
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivityResumed(@NonNull Activity activity) {
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
@@ -244,6 +253,7 @@
}
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivityPaused(@NonNull Activity activity) {
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
@@ -253,6 +263,7 @@
}
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivityStopped(@NonNull Activity activity) {
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
@@ -262,6 +273,7 @@
}
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivitySaveInstanceState(@NonNull Activity activity,
@NonNull Bundle outState) {
Object[] callbacks = collectActivityLifecycleCallbacks();
@@ -273,6 +285,7 @@
}
}
+ @UnsupportedAppUsage
/* package */ void dispatchActivityDestroyed(@NonNull Activity activity) {
Object[] callbacks = collectActivityLifecycleCallbacks();
if (callbacks != null) {
@@ -292,6 +305,7 @@
return callbacks;
}
+ @UnsupportedAppUsage
private Object[] collectActivityLifecycleCallbacks() {
Object[] callbacks = null;
synchronized (mActivityLifecycleCallbacks) {
diff --git a/core/java/android/app/ApplicationLoaders.java b/core/java/android/app/ApplicationLoaders.java
index 0ed50f2..30d6bee 100644
--- a/core/java/android/app/ApplicationLoaders.java
+++ b/core/java/android/app/ApplicationLoaders.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.GraphicsEnvironment;
import android.os.Trace;
@@ -29,6 +30,7 @@
/** @hide */
public class ApplicationLoaders {
+ @UnsupportedAppUsage
public static ApplicationLoaders getDefault() {
return gApplicationLoaders;
}
@@ -134,6 +136,7 @@
baseDexClassLoader.addNativePath(libPaths);
}
+ @UnsupportedAppUsage
private final ArrayMap<String, ClassLoader> mLoaders = new ArrayMap<>();
private static final ApplicationLoaders gApplicationLoaders = new ApplicationLoaders();
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 09a614c..264029b 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.annotation.XmlRes;
import android.content.ComponentName;
@@ -699,6 +700,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean shouldShowRequestPermissionRationale(String permission) {
try {
return mPM.shouldShowRequestPermissionRationale(permission,
@@ -1531,6 +1533,7 @@
}
}
+ @UnsupportedAppUsage
static void configurationChanged() {
synchronized (sSync) {
sIconCache.clear();
@@ -1538,6 +1541,7 @@
}
}
+ @UnsupportedAppUsage
protected ApplicationPackageManager(ContextImpl context,
IPackageManager pm) {
mContext = context;
@@ -2029,6 +2033,7 @@
}
@Override
+ @UnsupportedAppUsage
public @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app) {
final StorageManager storage = mContext.getSystemService(StorageManager.class);
return getPackageCurrentVolume(app, storage);
@@ -2182,6 +2187,7 @@
}
@Override
+ @UnsupportedAppUsage
public void deletePackage(String packageName, IPackageDeleteObserver observer, int flags) {
deletePackageAsUser(packageName, observer, flags, getUserId());
}
@@ -2306,6 +2312,7 @@
}
@Override
+ @UnsupportedAppUsage
public void getPackageSizeInfoAsUser(String packageName, int userHandle,
IPackageStatsObserver observer) {
final String msg = "Shame on you for calling the hidden API "
@@ -2749,6 +2756,7 @@
}
private final ContextImpl mContext;
+ @UnsupportedAppUsage
private final IPackageManager mPM;
/** Assume locked until we hear otherwise */
diff --git a/core/java/android/app/ContentProviderHolder.java b/core/java/android/app/ContentProviderHolder.java
index f9998f4..1098990 100644
--- a/core/java/android/app/ContentProviderHolder.java
+++ b/core/java/android/app/ContentProviderHolder.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProviderNative;
import android.content.IContentProvider;
import android.content.pm.ProviderInfo;
@@ -29,11 +30,15 @@
* @hide
*/
public class ContentProviderHolder implements Parcelable {
+ @UnsupportedAppUsage
public final ProviderInfo info;
+ @UnsupportedAppUsage
public IContentProvider provider;
public IBinder connection;
+ @UnsupportedAppUsage
public boolean noReleaseNeeded;
+ @UnsupportedAppUsage
public ContentProviderHolder(ProviderInfo _info) {
info = _info;
}
@@ -68,6 +73,7 @@
}
};
+ @UnsupportedAppUsage
private ContentProviderHolder(Parcel source) {
info = ProviderInfo.CREATOR.createFromParcel(source);
provider = ContentProviderNative.asInterface(
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 2eafb32..bbaaee8 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentProvider;
@@ -156,36 +157,50 @@
* Map from package name, to preference name, to cached preferences.
*/
@GuardedBy("ContextImpl.class")
+ @UnsupportedAppUsage
private static ArrayMap<String, ArrayMap<File, SharedPreferencesImpl>> sSharedPrefsCache;
/**
* Map from preference name to generated path.
*/
@GuardedBy("ContextImpl.class")
+ @UnsupportedAppUsage
private ArrayMap<String, File> mSharedPrefsPaths;
+ @UnsupportedAppUsage
final @NonNull ActivityThread mMainThread;
+ @UnsupportedAppUsage
final @NonNull LoadedApk mPackageInfo;
+ @UnsupportedAppUsage
private @Nullable ClassLoader mClassLoader;
private final @Nullable IBinder mActivityToken;
private final @NonNull UserHandle mUser;
+ @UnsupportedAppUsage
private final ApplicationContentResolver mContentResolver;
+ @UnsupportedAppUsage
private final String mBasePackageName;
+ @UnsupportedAppUsage
private final String mOpPackageName;
private final @NonNull ResourcesManager mResourcesManager;
+ @UnsupportedAppUsage
private @NonNull Resources mResources;
private @Nullable Display mDisplay; // may be null if default display
+ @UnsupportedAppUsage
private final int mFlags;
+ @UnsupportedAppUsage
private Context mOuterContext;
+ @UnsupportedAppUsage
private int mThemeResource = 0;
+ @UnsupportedAppUsage
private Resources.Theme mTheme = null;
+ @UnsupportedAppUsage
private PackageManager mPackageManager;
private Context mReceiverRestrictedContext = null;
@@ -200,6 +215,7 @@
@GuardedBy("mSync")
private File mDatabasesDir;
@GuardedBy("mSync")
+ @UnsupportedAppUsage
private File mPreferencesDir;
@GuardedBy("mSync")
private File mFilesDir;
@@ -211,6 +227,7 @@
private File mCodeCacheDir;
// The system service cache for the system services that are cached per-ContextImpl.
+ @UnsupportedAppUsage
final Object[] mServiceCache = SystemServiceRegistry.createServiceCache();
static final int STATE_UNINITIALIZED = 0;
@@ -235,6 +252,7 @@
@ServiceInitializationState
final int[] mServiceInitializationStateArray = new int[mServiceCache.length];
+ @UnsupportedAppUsage
static ContextImpl getImpl(Context context) {
Context nextContext;
while ((context instanceof ContextWrapper) &&
@@ -546,6 +564,7 @@
}
}
+ @UnsupportedAppUsage
private File getPreferencesDir() {
synchronized (mSync) {
if (mPreferencesDir == null) {
@@ -2220,6 +2239,7 @@
}
@Override
+ @UnsupportedAppUsage
public Display getDisplay() {
if (mDisplay == null) {
return mResourcesManager.getAdjustedDisplay(Display.DEFAULT_DISPLAY,
@@ -2317,6 +2337,7 @@
mIsAutofillCompatEnabled = autofillCompatEnabled;
}
+ @UnsupportedAppUsage
static ContextImpl createSystemContext(ActivityThread mainThread) {
LoadedApk packageInfo = new LoadedApk(mainThread);
ContextImpl context = new ContextImpl(null, mainThread, packageInfo, null, null, null, 0,
@@ -2340,6 +2361,7 @@
return context;
}
+ @UnsupportedAppUsage
static ContextImpl createAppContext(ActivityThread mainThread, LoadedApk packageInfo) {
if (packageInfo == null) throw new IllegalArgumentException("packageInfo");
ContextImpl context = new ContextImpl(null, mainThread, packageInfo, null, null, null, 0,
@@ -2348,6 +2370,7 @@
return context;
}
+ @UnsupportedAppUsage
static ContextImpl createActivityContext(ActivityThread mainThread,
LoadedApk packageInfo, ActivityInfo activityInfo, IBinder activityToken, int displayId,
Configuration overrideConfiguration) {
@@ -2462,6 +2485,7 @@
mPackageInfo.installSystemApplicationInfo(info, classLoader);
}
+ @UnsupportedAppUsage
final void scheduleFinalCleanup(String who, String what) {
mMainThread.scheduleContextCleanup(this, who, what);
}
@@ -2471,6 +2495,7 @@
mPackageInfo.removeContextRegistrations(getOuterContext(), who, what);
}
+ @UnsupportedAppUsage
final Context getReceiverRestrictedContext() {
if (mReceiverRestrictedContext != null) {
return mReceiverRestrictedContext;
@@ -2478,15 +2503,18 @@
return mReceiverRestrictedContext = new ReceiverRestrictedContext(getOuterContext());
}
+ @UnsupportedAppUsage
final void setOuterContext(Context context) {
mOuterContext = context;
}
+ @UnsupportedAppUsage
final Context getOuterContext() {
return mOuterContext;
}
@Override
+ @UnsupportedAppUsage
public IBinder getActivityToken() {
return mActivityToken;
}
@@ -2567,6 +2595,7 @@
// ----------------------------------------------------------------------
private static final class ApplicationContentResolver extends ContentResolver {
+ @UnsupportedAppUsage
private final ActivityThread mMainThread;
public ApplicationContentResolver(Context context, ActivityThread mainThread) {
@@ -2575,6 +2604,7 @@
}
@Override
+ @UnsupportedAppUsage
protected IContentProvider acquireProvider(Context context, String auth) {
return mMainThread.acquireProvider(context,
ContentProvider.getAuthorityWithoutUserId(auth),
diff --git a/core/java/android/app/DatePickerDialog.java b/core/java/android/app/DatePickerDialog.java
index bd55a06..37a05f0 100644
--- a/core/java/android/app/DatePickerDialog.java
+++ b/core/java/android/app/DatePickerDialog.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
@@ -47,6 +48,7 @@
private static final String MONTH = "month";
private static final String DAY = "day";
+ @UnsupportedAppUsage
private final DatePicker mDatePicker;
private OnDateSetListener mDateSetListener;
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 6557ac4..b7bac52 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -24,6 +24,7 @@
import android.annotation.Nullable;
import android.annotation.StringRes;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
@@ -93,11 +94,14 @@
public class Dialog implements DialogInterface, Window.Callback,
KeyEvent.Callback, OnCreateContextMenuListener, Window.OnWindowDismissedCallback {
private static final String TAG = "Dialog";
+ @UnsupportedAppUsage
private Activity mOwnerActivity;
private final WindowManager mWindowManager;
+ @UnsupportedAppUsage
final Context mContext;
+ @UnsupportedAppUsage
final Window mWindow;
View mDecor;
@@ -110,22 +114,30 @@
protected boolean mCancelable = true;
private String mCancelAndDismissTaken;
+ @UnsupportedAppUsage
private Message mCancelMessage;
+ @UnsupportedAppUsage
private Message mDismissMessage;
+ @UnsupportedAppUsage
private Message mShowMessage;
+ @UnsupportedAppUsage
private OnKeyListener mOnKeyListener;
private boolean mCreated = false;
+ @UnsupportedAppUsage
private boolean mShowing = false;
private boolean mCanceled = false;
+ @UnsupportedAppUsage
private final Handler mHandler = new Handler();
private static final int DISMISS = 0x43;
+ @UnsupportedAppUsage
private static final int CANCEL = 0x44;
private static final int SHOW = 0x45;
+ @UnsupportedAppUsage
private final Handler mListenersHandler;
private SearchEvent mSearchEvent;
@@ -361,6 +373,7 @@
}
}
+ @UnsupportedAppUsage
void dismissDialog() {
if (mDecor == null || !mShowing) {
return;
diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java
index 3a355d9..bfc15c2 100644
--- a/core/java/android/app/DialogFragment.java
+++ b/core/java/android/app/DialogFragment.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
@@ -182,11 +183,15 @@
int mTheme = 0;
boolean mCancelable = true;
boolean mShowsDialog = true;
+ @UnsupportedAppUsage
int mBackStackId = -1;
Dialog mDialog;
+ @UnsupportedAppUsage
boolean mViewDestroyed;
+ @UnsupportedAppUsage
boolean mDismissed;
+ @UnsupportedAppUsage
boolean mShownByMe;
public DialogFragment() {
@@ -236,6 +241,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void showAllowingStateLoss(FragmentManager manager, String tag) {
mDismissed = false;
mShownByMe = true;
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index b444f17..35999a2 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -21,6 +21,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
@@ -329,6 +330,7 @@
* columns to request from DownloadProvider.
* @hide
*/
+ @UnsupportedAppUsage
public static final String[] UNDERLYING_COLUMNS = new String[] {
Downloads.Impl._ID,
Downloads.Impl._DATA + " AS " + COLUMN_LOCAL_FILENAME,
@@ -381,6 +383,7 @@
@Deprecated
public static final int NETWORK_BLUETOOTH = 1 << 2;
+ @UnsupportedAppUsage
private Uri mUri;
private Uri mDestinationUri;
private List<Pair<String, String>> mRequestHeaders = new ArrayList<Pair<String, String>>();
@@ -860,6 +863,7 @@
* @return this object
* @hide
*/
+ @UnsupportedAppUsage
public Query setOnlyIncludeVisibleInDownloadsUi(boolean value) {
mOnlyIncludeVisibleInDownloadsUi = value;
return this;
@@ -875,6 +879,7 @@
* @return this object
* @hide
*/
+ @UnsupportedAppUsage
public Query orderBy(String column, int direction) {
if (direction != ORDER_ASCENDING && direction != ORDER_DESCENDING) {
throw new IllegalArgumentException("Invalid direction: " + direction);
@@ -996,6 +1001,7 @@
* /my_downloads URIs, for clients that have permission to do so.
* @hide
*/
+ @UnsupportedAppUsage
public void setAccessAllDownloads(boolean accessAllDownloads) {
if (accessAllDownloads) {
mBaseUri = Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI;
@@ -1005,6 +1011,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void setAccessFilename(boolean accessFilename) {
mAccessFilename = accessFilename;
}
@@ -1439,6 +1446,7 @@
/**
* Get a parameterized SQL WHERE clause to select a bunch of IDs.
*/
+ @UnsupportedAppUsage
static String getWhereClauseForIds(long[] ids) {
StringBuilder whereClause = new StringBuilder();
whereClause.append("(");
@@ -1456,6 +1464,7 @@
/**
* Get the selection args for a clause returned by {@link #getWhereClauseForIds(long[])}.
*/
+ @UnsupportedAppUsage
static String[] getWhereArgsForIds(long[] ids) {
String[] whereArgs = new String[ids.length];
return getWhereArgsForIds(ids, whereArgs);
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 8e8270a..9f4157f 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.Intent;
@@ -263,6 +264,7 @@
*/
@Deprecated
public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListener {
+ @UnsupportedAppUsage
private static final ArrayMap<String, Class<?>> sClassMap =
new ArrayMap<String, Class<?>>();
@@ -279,13 +281,16 @@
int mState = INITIALIZING;
// When instantiated from saved state, this is the saved state.
+ @UnsupportedAppUsage
Bundle mSavedFragmentState;
SparseArray<Parcelable> mSavedViewState;
// Index into active fragment array.
+ @UnsupportedAppUsage
int mIndex = -1;
// Internal unique name for this fragment;
+ @UnsupportedAppUsage
String mWho;
// Construction arguments;
@@ -301,6 +306,7 @@
int mTargetRequestCode;
// True if the fragment is in the list of added fragments.
+ @UnsupportedAppUsage
boolean mAdded;
// If set this fragment is being removed from its activity.
@@ -325,12 +331,15 @@
// The fragment manager we are associated with. Set as soon as the
// fragment is used in a transaction; cleared after it has been removed
// from all transactions.
+ @UnsupportedAppUsage
FragmentManagerImpl mFragmentManager;
// Activity this fragment is attached to.
+ @UnsupportedAppUsage
FragmentHostCallback mHost;
// Private fragment manager for child fragments inside of this one.
+ @UnsupportedAppUsage
FragmentManagerImpl mChildFragmentManager;
// For use when restoring fragment state and descendant fragments are retained.
@@ -343,6 +352,7 @@
// The optional identifier for this fragment -- either the container ID if it
// was dynamically added to the view hierarchy, or the ID supplied in
// layout.
+ @UnsupportedAppUsage
int mFragmentId;
// When a fragment is being dynamically added to the view hierarchy, this
@@ -380,6 +390,7 @@
ViewGroup mContainer;
// The View generated for this fragment.
+ @UnsupportedAppUsage
View mView;
// Whether this fragment should defer starting until after other fragments
@@ -390,6 +401,7 @@
boolean mUserVisibleHint = true;
LoaderManagerImpl mLoaderManager;
+ @UnsupportedAppUsage
boolean mLoadersStarted;
boolean mCheckedForLoaderManager;
diff --git a/core/java/android/app/FragmentController.java b/core/java/android/app/FragmentController.java
index 40bc248..9316be7 100644
--- a/core/java/android/app/FragmentController.java
+++ b/core/java/android/app/FragmentController.java
@@ -17,6 +17,7 @@
package android.app;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
@@ -43,6 +44,7 @@
*/
@Deprecated
public class FragmentController {
+ @UnsupportedAppUsage
private final FragmentHostCallback<?> mHost;
/**
diff --git a/core/java/android/app/FragmentHostCallback.java b/core/java/android/app/FragmentHostCallback.java
index b48817b..1a12fdc 100644
--- a/core/java/android/app/FragmentHostCallback.java
+++ b/core/java/android/app/FragmentHostCallback.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
@@ -56,6 +57,7 @@
private LoaderManagerImpl mLoaderManager;
private boolean mCheckedForLoaderManager;
/** Whether or not the fragment host loader manager was started */
+ @UnsupportedAppUsage
private boolean mLoadersStarted;
public FragmentHostCallback(Context context, Handler handler, int windowAnimations) {
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 708450f..5e7921b 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -22,6 +22,7 @@
import android.animation.AnimatorSet;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.res.Configuration;
@@ -688,7 +689,9 @@
boolean mExecutingActions;
int mNextFragmentIndex = 0;
+ @UnsupportedAppUsage
SparseArray<Fragment> mActive;
+ @UnsupportedAppUsage
final ArrayList<Fragment> mAdded = new ArrayList<>();
ArrayList<BackStackRecord> mBackStack;
ArrayList<Fragment> mCreatedMenus;
@@ -708,6 +711,7 @@
Fragment mPrimaryNav;
boolean mNeedMenuInvalidate;
+ @UnsupportedAppUsage
boolean mStateSaved;
boolean mDestroyed;
String mNoTransactionsBecause;
@@ -1097,6 +1101,7 @@
}
}
+ @UnsupportedAppUsage
Animator loadAnimator(Fragment fragment, int transit, boolean enter,
int transitionStyle) {
Animator animObj = fragment.onCreateAnimator(transit, enter, fragment.getNextAnim());
@@ -2976,6 +2981,7 @@
return 0;
}
+ @UnsupportedAppUsage
public void noteStateNotSaved() {
mSavedNonConfig = null;
mStateSaved = false;
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index cd12710..3171e3e 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -43,7 +43,7 @@
void cancelAllNotifications(String pkg, int userId);
void clearData(String pkg, int uid, boolean fromApp);
- void enqueueToast(String pkg, ITransientNotification callback, int duration);
+ void enqueueToast(String pkg, ITransientNotification callback, int duration, int displayId);
void cancelToast(String pkg, ITransientNotification callback);
void finishToken(String pkg, ITransientNotification callback);
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index d9969a7..34c2282 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
@@ -1374,6 +1375,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void callActivityOnNewIntent(Activity activity, ReferrerIntent intent) {
final String oldReferrer = activity.mReferrer;
try {
@@ -1638,6 +1640,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public ActivityResult execStartActivity(
Context who, IBinder contextThread, IBinder token, Activity target,
Intent intent, int requestCode, Bundle options) {
@@ -1691,6 +1694,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public void execStartActivities(Context who, IBinder contextThread,
IBinder token, Activity target, Intent[] intents, Bundle options) {
execStartActivitiesAsUser(who, contextThread, token, target, intents, options,
@@ -1709,6 +1713,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public int execStartActivitiesAsUser(Context who, IBinder contextThread,
IBinder token, Activity target, Intent[] intents, Bundle options,
int userId) {
@@ -1780,6 +1785,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public ActivityResult execStartActivity(
Context who, IBinder contextThread, IBinder token, String target,
Intent intent, int requestCode, Bundle options) {
@@ -1847,6 +1853,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public ActivityResult execStartActivity(
Context who, IBinder contextThread, IBinder token, String resultWho,
Intent intent, int requestCode, Bundle options, UserHandle user) {
@@ -1892,6 +1899,7 @@
* Special version!
* @hide
*/
+ @UnsupportedAppUsage
public ActivityResult execStartActivityAsCaller(
Context who, IBinder contextThread, IBinder token, Activity target,
Intent intent, int requestCode, Bundle options, boolean ignoreTargetSecurity,
@@ -1938,6 +1946,7 @@
* Special version!
* @hide
*/
+ @UnsupportedAppUsage
public void execStartActivityFromAppTask(
Context who, IBinder contextThread, IAppTask appTask,
Intent intent, Bundle options) {
@@ -1997,6 +2006,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void checkStartActivityResult(int res, Object intent) {
if (!ActivityManager.isStartResultFatalError(res)) {
return;
diff --git a/core/java/android/app/IntentService.java b/core/java/android/app/IntentService.java
index 95ec24c..11c747f 100644
--- a/core/java/android/app/IntentService.java
+++ b/core/java/android/app/IntentService.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import android.annotation.Nullable;
import android.content.Intent;
@@ -62,6 +63,7 @@
*/
public abstract class IntentService extends Service {
private volatile Looper mServiceLooper;
+ @UnsupportedAppUsage
private volatile ServiceHandler mServiceHandler;
private String mName;
private boolean mRedelivery;
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/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 9ceecd9..3085fe5 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -22,6 +22,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.trust.ITrustManager;
import android.content.Context;
import android.content.Intent;
@@ -414,6 +415,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isDeviceLocked(int userId) {
try {
return mTrustManager.isDeviceLocked(userId);
@@ -439,6 +441,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isDeviceSecure(int userId) {
try {
return mTrustManager.isDeviceSecure(userId);
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 494b547..ddd9441 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -73,12 +74,14 @@
import java.util.Objects;
final class IntentReceiverLeaked extends AndroidRuntimeException {
+ @UnsupportedAppUsage
public IntentReceiverLeaked(String msg) {
super(msg);
}
}
final class ServiceConnectionLeaked extends AndroidRuntimeException {
+ @UnsupportedAppUsage
public ServiceConnectionLeaked(String msg) {
super(msg);
}
@@ -93,36 +96,52 @@
static final boolean DEBUG = false;
private static final String PROPERTY_NAME_APPEND_NATIVE = "pi.append_native_lib_paths";
+ @UnsupportedAppUsage
private final ActivityThread mActivityThread;
+ @UnsupportedAppUsage
final String mPackageName;
+ @UnsupportedAppUsage
private ApplicationInfo mApplicationInfo;
+ @UnsupportedAppUsage
private String mAppDir;
+ @UnsupportedAppUsage
private String mResDir;
private String[] mOverlayDirs;
+ @UnsupportedAppUsage
private String mDataDir;
+ @UnsupportedAppUsage
private String mLibDir;
+ @UnsupportedAppUsage
private File mDataDirFile;
private File mDeviceProtectedDataDirFile;
private File mCredentialProtectedDataDirFile;
+ @UnsupportedAppUsage
private final ClassLoader mBaseClassLoader;
private final boolean mSecurityViolation;
private final boolean mIncludeCode;
private final boolean mRegisterPackage;
+ @UnsupportedAppUsage
private final DisplayAdjustments mDisplayAdjustments = new DisplayAdjustments();
/** WARNING: This may change. Don't hold external references to it. */
+ @UnsupportedAppUsage
Resources mResources;
+ @UnsupportedAppUsage
private ClassLoader mClassLoader;
+ @UnsupportedAppUsage
private Application mApplication;
private String[] mSplitNames;
private String[] mSplitAppDirs;
+ @UnsupportedAppUsage
private String[] mSplitResDirs;
private String[] mSplitClassLoaderNames;
+ @UnsupportedAppUsage
private final ArrayMap<Context, ArrayMap<BroadcastReceiver, ReceiverDispatcher>> mReceivers
= new ArrayMap<>();
private final ArrayMap<Context, ArrayMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>> mUnregisteredReceivers
= new ArrayMap<>();
+ @UnsupportedAppUsage
private final ArrayMap<Context, ArrayMap<ServiceConnection, LoadedApk.ServiceDispatcher>> mServices
= new ArrayMap<>();
private final ArrayMap<Context, ArrayMap<ServiceConnection, LoadedApk.ServiceDispatcher>> mUnboundServices
@@ -236,10 +255,12 @@
return mAppComponentFactory;
}
+ @UnsupportedAppUsage
public String getPackageName() {
return mPackageName;
}
+ @UnsupportedAppUsage
public ApplicationInfo getApplicationInfo() {
return mApplicationInfo;
}
@@ -252,6 +273,7 @@
return mSecurityViolation;
}
+ @UnsupportedAppUsage
public CompatibilityInfo getCompatibilityInfo() {
return mDisplayAdjustments.getCompatibilityInfo();
}
@@ -804,6 +826,7 @@
}
}
+ @UnsupportedAppUsage
public ClassLoader getClassLoader() {
synchronized (this) {
if (mClassLoader == null) {
@@ -972,6 +995,7 @@
}
}
+ @UnsupportedAppUsage
public String getAppDir() {
return mAppDir;
}
@@ -980,6 +1004,7 @@
return mLibDir;
}
+ @UnsupportedAppUsage
public String getResDir() {
return mResDir;
}
@@ -988,10 +1013,12 @@
return mSplitAppDirs;
}
+ @UnsupportedAppUsage
public String[] getSplitResDirs() {
return mSplitResDirs;
}
+ @UnsupportedAppUsage
public String[] getOverlayDirs() {
return mOverlayDirs;
}
@@ -1000,6 +1027,7 @@
return mDataDir;
}
+ @UnsupportedAppUsage
public File getDataDirFile() {
return mDataDirFile;
}
@@ -1012,10 +1040,12 @@
return mCredentialProtectedDataDirFile;
}
+ @UnsupportedAppUsage
public AssetManager getAssets() {
return getResources().getAssets();
}
+ @UnsupportedAppUsage
public Resources getResources() {
if (mResources == null) {
final String[] splitPaths;
@@ -1034,6 +1064,7 @@
return mResources;
}
+ @UnsupportedAppUsage
public Application makeApplication(boolean forceDefaultAppClass,
Instrumentation instrumentation) {
if (mApplication != null) {
@@ -1102,6 +1133,7 @@
return app;
}
+ @UnsupportedAppUsage
private void rewriteRValues(ClassLoader cl, String packageName, int id) {
final Class<?> rClazz;
try {
@@ -1324,7 +1356,9 @@
}
final IIntentReceiver.Stub mIIntentReceiver;
+ @UnsupportedAppUsage
final BroadcastReceiver mReceiver;
+ @UnsupportedAppUsage
final Context mContext;
final Handler mActivityThread;
final Instrumentation mInstrumentation;
@@ -1448,10 +1482,12 @@
return mLocation;
}
+ @UnsupportedAppUsage
BroadcastReceiver getIntentReceiver() {
return mReceiver;
}
+ @UnsupportedAppUsage
IIntentReceiver getIIntentReceiver() {
return mIIntentReceiver;
}
@@ -1489,6 +1525,7 @@
}
+ @UnsupportedAppUsage
public final IServiceConnection getServiceDispatcher(ServiceConnection c,
Context context, Handler handler, int flags) {
synchronized (mServices) {
@@ -1566,7 +1603,9 @@
static final class ServiceDispatcher {
private final ServiceDispatcher.InnerConnection mIServiceConnection;
+ @UnsupportedAppUsage
private final ServiceConnection mConnection;
+ @UnsupportedAppUsage
private final Context mContext;
private final Handler mActivityThread;
private final ServiceConnectionLeaked mLocation;
@@ -1582,6 +1621,7 @@
}
private static class InnerConnection extends IServiceConnection.Stub {
+ @UnsupportedAppUsage
final WeakReference<LoadedApk.ServiceDispatcher> mDispatcher;
InnerConnection(LoadedApk.ServiceDispatcher sd) {
@@ -1600,6 +1640,7 @@
private final ArrayMap<ComponentName, ServiceDispatcher.ConnectionInfo> mActiveConnections
= new ArrayMap<ComponentName, ServiceDispatcher.ConnectionInfo>();
+ @UnsupportedAppUsage
ServiceDispatcher(ServiceConnection conn,
Context context, Handler activityThread, int flags) {
mIServiceConnection = new InnerConnection(this);
@@ -1645,6 +1686,7 @@
return mConnection;
}
+ @UnsupportedAppUsage
IServiceConnection getIServiceConnection() {
return mIServiceConnection;
}
diff --git a/core/java/android/app/LocalActivityManager.java b/core/java/android/app/LocalActivityManager.java
index e297719..a52fb1a 100644
--- a/core/java/android/app/LocalActivityManager.java
+++ b/core/java/android/app/LocalActivityManager.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread.ActivityClientRecord;
import android.app.servertransaction.PendingTransactionActions;
import android.content.Intent;
@@ -73,18 +74,23 @@
/** Thread our activities are running in. */
private final ActivityThread mActivityThread;
/** The containing activity that owns the activities we create. */
+ @UnsupportedAppUsage
private final Activity mParent;
/** The activity that is currently resumed. */
+ @UnsupportedAppUsage
private LocalActivityRecord mResumed;
/** id -> record of all known activities. */
+ @UnsupportedAppUsage
private final Map<String, LocalActivityRecord> mActivities
= new HashMap<String, LocalActivityRecord>();
/** array of all known activities for easy iterating. */
+ @UnsupportedAppUsage
private final ArrayList<LocalActivityRecord> mActivityArray
= new ArrayList<LocalActivityRecord>();
/** True if only one activity can be resumed at a time */
+ @UnsupportedAppUsage
private boolean mSingleMode;
/** Set to true once we find out the container is finishing. */
@@ -111,6 +117,7 @@
mSingleMode = singleMode;
}
+ @UnsupportedAppUsage
private void moveToState(LocalActivityRecord r, int desiredState) {
if (r.curState == RESTORED || r.curState == DESTROYED) {
// startActivity() has not yet been called, so nothing to do.
diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java
index ca663fd..25eb958 100644
--- a/core/java/android/app/NativeActivity.java
+++ b/core/java/android/app/NativeActivity.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
@@ -70,6 +71,7 @@
private NativeContentView mNativeContentView;
private InputMethodManager mIMM;
+ @UnsupportedAppUsage
private long mNativeHandle;
private InputQueue mCurInputQueue;
@@ -85,6 +87,7 @@
private boolean mDestroyed;
+ @UnsupportedAppUsage
private native long loadNativeCode(String path, String funcname, MessageQueue queue,
String internalDataPath, String obbPath, String externalDataPath, int sdkVersion,
AssetManager assetMgr, byte[] savedState, ClassLoader classLoader, String libraryPath);
@@ -312,18 +315,22 @@
}
}
+ @UnsupportedAppUsage
void setWindowFlags(int flags, int mask) {
getWindow().setFlags(flags, mask);
}
+ @UnsupportedAppUsage
void setWindowFormat(int format) {
getWindow().setFormat(format);
}
+ @UnsupportedAppUsage
void showIme(int mode) {
mIMM.showSoftInput(mNativeContentView, mode);
}
+ @UnsupportedAppUsage
void hideIme(int mode) {
mIMM.hideSoftInputFromWindow(mNativeContentView.getWindowToken(), mode);
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 74d3c0d..9dca061 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -27,6 +27,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
@@ -873,6 +874,7 @@
*/
public String category;
+ @UnsupportedAppUsage
private String mGroupKey;
/**
@@ -918,6 +920,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public ArraySet<PendingIntent> allPendingIntents;
/**
@@ -1257,9 +1260,12 @@
*/
public static final String EXTRA_FOREGROUND_APPS = "android.foregroundApps";
+ @UnsupportedAppUsage
private Icon mSmallIcon;
+ @UnsupportedAppUsage
private Icon mLargeIcon;
+ @UnsupportedAppUsage
private String mChannelId;
private long mTimeout;
@@ -1411,6 +1417,7 @@
public static final int SEMANTIC_ACTION_CALL = 10;
private final Bundle mExtras;
+ @UnsupportedAppUsage
private Icon mIcon;
private final RemoteInput[] mRemoteInputs;
private boolean mAllowGeneratedReplies = true;
@@ -2065,6 +2072,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Notification(Context context, int icon, CharSequence tickerText, long when,
CharSequence contentTitle, CharSequence contentText, Intent contentIntent)
{
@@ -3077,6 +3085,7 @@
* Used when notifying to clean up legacy small icons.
* @hide
*/
+ @UnsupportedAppUsage
public void setSmallIcon(Icon icon) {
mSmallIcon = icon;
}
@@ -3093,6 +3102,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isGroupSummary() {
return mGroupKey != null && (flags & FLAG_GROUP_SUMMARY) != 0;
}
@@ -3100,6 +3110,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isGroupChild() {
return mGroupKey != null && (flags & FLAG_GROUP_SUMMARY) == 0;
}
@@ -3176,6 +3187,7 @@
private Notification mN;
private Bundle mUserExtras = new Bundle();
private Style mStyle;
+ @UnsupportedAppUsage
private ArrayList<Action> mActions = new ArrayList<Action>(MAX_ACTION_BUTTONS);
private ArrayList<Person> mPersonList = new ArrayList<>();
private ContrastColorUtil mColorUtil;
@@ -4793,6 +4805,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public String loadHeaderAppName() {
CharSequence name = null;
final PackageManager pm = mContext.getPackageManager();
@@ -5119,6 +5132,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public RemoteViews makePublicContentView() {
return makePublicView(false /* ambient */);
}
@@ -5663,6 +5677,7 @@
return clone;
}
+ @UnsupportedAppUsage
private int getBaseLayoutResource() {
return R.layout.notification_template_material_base;
}
@@ -7753,6 +7768,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public Notification buildStyled(Notification wip) {
super.buildStyled(wip);
if (wip.category == null) {
@@ -7860,8 +7876,8 @@
final int N = mActionsToShowInCompact == null
? 0
: Math.min(mActionsToShowInCompact.length, MAX_MEDIA_BUTTONS_IN_COMPACT);
+ view.removeAllViews(com.android.internal.R.id.media_actions);
if (N > 0) {
- view.removeAllViews(com.android.internal.R.id.media_actions);
for (int i = 0; i < N; i++) {
if (i >= numActions) {
throw new IllegalArgumentException(String.format(
diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java
index 03fd139..848def6 100644
--- a/core/java/android/app/NotificationChannel.java
+++ b/core/java/android/app/NotificationChannel.java
@@ -17,6 +17,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.NotificationManager.Importance;
import android.content.ContentResolver;
import android.content.Context;
@@ -133,6 +134,7 @@
private static final boolean DEFAULT_DELETED = false;
private static final boolean DEFAULT_SHOW_BADGE = true;
+ @UnsupportedAppUsage
private final String mId;
private String mName;
private String mDesc;
@@ -300,6 +302,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setBlockableSystem(boolean blockableSystem) {
mBlockableSystem = blockableSystem;
}
@@ -602,6 +605,13 @@
/**
* @hide
*/
+ public boolean isImportanceLocked() {
+ return (mUserLockedFields & USER_LOCKED_IMPORTANCE) != 0;
+ }
+
+ /**
+ * @hide
+ */
public void populateFromXmlForRestore(XmlPullParser parser, Context context) {
populateFromXml(parser, true, context);
}
diff --git a/core/java/android/app/NotificationChannelGroup.java b/core/java/android/app/NotificationChannelGroup.java
index 0fa3c7f..17c5cba 100644
--- a/core/java/android/app/NotificationChannelGroup.java
+++ b/core/java/android/app/NotificationChannelGroup.java
@@ -17,6 +17,7 @@
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
@@ -49,6 +50,7 @@
private static final String ATT_ID = "id";
private static final String ATT_BLOCKED = "blocked";
+ @UnsupportedAppUsage
private final String mId;
private CharSequence mName;
private String mDescription;
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index f6dc5d1..4b25b8b 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -21,6 +21,7 @@
import android.annotation.SdkConstant;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.Notification.Builder;
import android.content.ComponentName;
import android.content.Context;
@@ -308,9 +309,11 @@
*/
public static final int IMPORTANCE_MAX = 5;
+ @UnsupportedAppUsage
private static INotificationManager sService;
/** @hide */
+ @UnsupportedAppUsage
static public INotificationManager getService()
{
if (sService != null) {
@@ -321,12 +324,14 @@
return sService;
}
+ @UnsupportedAppUsage
/*package*/ NotificationManager(Context context, Handler handler)
{
mContext = context;
}
/** {@hide} */
+ @UnsupportedAppUsage
public static NotificationManager from(Context context) {
return (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
}
@@ -373,6 +378,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void notifyAsUser(String tag, int id, Notification notification, UserHandle user)
{
INotificationManager service = getService();
@@ -438,6 +444,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void cancelAsUser(String tag, int id, UserHandle user)
{
INotificationManager service = getService();
@@ -666,6 +673,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setZenMode(int mode, Uri conditionId, String reason) {
INotificationManager service = getService();
try {
@@ -690,6 +698,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public ZenModeConfig getZenModeConfig() {
INotificationManager service = getService();
try {
diff --git a/core/java/android/app/PackageDeleteObserver.java b/core/java/android/app/PackageDeleteObserver.java
index 9b83ec1..20ae84c 100644
--- a/core/java/android/app/PackageDeleteObserver.java
+++ b/core/java/android/app/PackageDeleteObserver.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.content.pm.IPackageDeleteObserver2;
diff --git a/core/java/android/app/PackageInstallObserver.java b/core/java/android/app/PackageInstallObserver.java
index ff28679..507ebe5 100644
--- a/core/java/android/app/PackageInstallObserver.java
+++ b/core/java/android/app/PackageInstallObserver.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.content.pm.IPackageInstallObserver2;
import android.os.Bundle;
@@ -59,6 +60,7 @@
* basic outcome
* @hide
*/
+ @UnsupportedAppUsage
public void onPackageInstalled(String basePackageName, int returnCode, String msg,
Bundle extras) {
}
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index bdaf80e..75d95b2 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.IIntentReceiver;
import android.content.IIntentSender;
@@ -274,6 +275,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void setOnMarshaledListener(OnMarshaledListener listener) {
sOnMarshaledListener.set(listener);
}
@@ -362,6 +364,7 @@
* Note that UserHandle.CURRENT will be interpreted at the time the
* activity is started, not when the pending intent is created.
*/
+ @UnsupportedAppUsage
public static PendingIntent getActivityAsUser(Context context, int requestCode,
@NonNull Intent intent, int flags, Bundle options, UserHandle user) {
String packageName = context.getPackageName();
@@ -557,6 +560,7 @@
* Note that UserHandle.CURRENT will be interpreted at the time the
* broadcast is sent, not when the pending intent is created.
*/
+ @UnsupportedAppUsage
public static PendingIntent getBroadcastAsUser(Context context, int requestCode,
Intent intent, int flags, UserHandle userHandle) {
String packageName = context.getPackageName();
@@ -1084,6 +1088,7 @@
* @hide
* Check whether this PendingIntent will launch an Activity.
*/
+ @UnsupportedAppUsage
public boolean isActivity() {
try {
return ActivityManager.getService()
@@ -1110,6 +1115,7 @@
* @hide
* Return the Intent of this PendingIntent.
*/
+ @UnsupportedAppUsage
public Intent getIntent() {
try {
return ActivityManager.getService()
@@ -1123,6 +1129,7 @@
* @hide
* Return descriptive tag for this PendingIntent.
*/
+ @UnsupportedAppUsage
public String getTag(String prefix) {
try {
return ActivityManager.getService()
diff --git a/core/java/android/app/PictureInPictureArgs.java b/core/java/android/app/PictureInPictureArgs.java
index cbe8bb9..adcc495 100644
--- a/core/java/android/app/PictureInPictureArgs.java
+++ b/core/java/android/app/PictureInPictureArgs.java
@@ -17,6 +17,7 @@
package android.app;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
@@ -137,6 +138,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public PictureInPictureArgs() {
}
@@ -173,6 +175,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setAspectRatio(float aspectRatio) {
// Temporary workaround
mAspectRatio = new Rational((int) (aspectRatio * 1000000000), 1000000000);
@@ -182,6 +185,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setActions(List<RemoteAction> actions) {
if (mUserActions != null) {
mUserActions = null;
diff --git a/core/java/android/app/Presentation.java b/core/java/android/app/Presentation.java
index af55788..cb72d4d 100644
--- a/core/java/android/app/Presentation.java
+++ b/core/java/android/app/Presentation.java
@@ -20,6 +20,7 @@
import static android.content.Context.WINDOW_SERVICE;
import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.hardware.display.DisplayManager;
@@ -300,6 +301,7 @@
return dm.equalsPhysical(getResources().getDisplayMetrics());
}
+ @UnsupportedAppUsage
private static Context createPresentationContext(
Context outerContext, Display display, int theme) {
if (outerContext == null) {
diff --git a/core/java/android/app/ProgressDialog.java b/core/java/android/app/ProgressDialog.java
index 8a083eb..1b10fd7 100644
--- a/core/java/android/app/ProgressDialog.java
+++ b/core/java/android/app/ProgressDialog.java
@@ -18,6 +18,7 @@
import com.android.internal.R;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
@@ -63,10 +64,13 @@
*/
public static final int STYLE_HORIZONTAL = 1;
+ @UnsupportedAppUsage
private ProgressBar mProgress;
+ @UnsupportedAppUsage
private TextView mMessageView;
private int mProgressStyle = STYLE_SPINNER;
+ @UnsupportedAppUsage
private TextView mProgressNumber;
private String mProgressNumberFormat;
private TextView mProgressPercent;
diff --git a/core/java/android/app/QueuedWork.java b/core/java/android/app/QueuedWork.java
index 56338f5..7626539 100644
--- a/core/java/android/app/QueuedWork.java
+++ b/core/java/android/app/QueuedWork.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
@@ -70,6 +71,7 @@
/** Finishers {@link #addFinisher added} and not yet {@link #removeFinisher removed} */
@GuardedBy("sLock")
+ @UnsupportedAppUsage
private static final LinkedList<Runnable> sFinishers = new LinkedList<>();
/** {@link #getHandler() Lazily} created handler */
@@ -96,6 +98,7 @@
*
* @return the handler
*/
+ @UnsupportedAppUsage
private static Handler getHandler() {
synchronized (sLock) {
if (sHandler == null) {
@@ -121,6 +124,7 @@
*
* @param finisher The runnable to add as finisher
*/
+ @UnsupportedAppUsage
public static void addFinisher(Runnable finisher) {
synchronized (sLock) {
sFinishers.add(finisher);
@@ -132,6 +136,7 @@
*
* @param finisher The runnable to remove.
*/
+ @UnsupportedAppUsage
public static void removeFinisher(Runnable finisher) {
synchronized (sLock) {
sFinishers.remove(finisher);
@@ -212,6 +217,7 @@
* @param work The new runnable to process
* @param shouldDelay If the message should be delayed
*/
+ @UnsupportedAppUsage
public static void queue(Runnable work, boolean shouldDelay) {
Handler handler = getHandler();
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index 30256b4..2d9fbf9 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo;
import android.content.res.ApkAssets;
import android.content.res.AssetManager;
@@ -76,18 +77,21 @@
* The global configuration upon which all Resources are based. Multi-window Resources
* apply their overrides to this configuration.
*/
+ @UnsupportedAppUsage
private final Configuration mResConfiguration = new Configuration();
/**
* A mapping of ResourceImpls and their configurations. These are heavy weight objects
* which should be reused as much as possible.
*/
+ @UnsupportedAppUsage
private final ArrayMap<ResourcesKey, WeakReference<ResourcesImpl>> mResourceImpls =
new ArrayMap<>();
/**
* A list of Resource references that can be reused.
*/
+ @UnsupportedAppUsage
private final ArrayList<WeakReference<Resources>> mResourceReferences = new ArrayList<>();
private static class ApkKey {
@@ -121,10 +125,13 @@
}
}
+ private static final boolean ENABLE_APK_ASSETS_CACHE = false;
+
/**
* The ApkAssets we are caching and intend to hold strong references to.
*/
- private final LruCache<ApkKey, ApkAssets> mLoadedApkAssets = new LruCache<>(3);
+ private final LruCache<ApkKey, ApkAssets> mLoadedApkAssets =
+ (ENABLE_APK_ASSETS_CACHE) ? new LruCache<>(3) : null;
/**
* The ApkAssets that are being referenced in the wild that we can reuse, even if they aren't
@@ -144,6 +151,7 @@
* Each Activity may has a base override configuration that is applied to each Resources object,
* which in turn may have their own override configuration specified.
*/
+ @UnsupportedAppUsage
private final WeakHashMap<IBinder, ActivityResources> mActivityResourceReferences =
new WeakHashMap<>();
@@ -153,6 +161,7 @@
private final ArrayMap<Pair<Integer, DisplayAdjustments>, WeakReference<Display>>
mAdjustedDisplays = new ArrayMap<>();
+ @UnsupportedAppUsage
public static ResourcesManager getInstance() {
synchronized (ResourcesManager.class) {
if (sResourcesManager == null) {
@@ -310,9 +319,12 @@
private @NonNull ApkAssets loadApkAssets(String path, boolean sharedLib, boolean overlay)
throws IOException {
final ApkKey newKey = new ApkKey(path, sharedLib, overlay);
- ApkAssets apkAssets = mLoadedApkAssets.get(newKey);
- if (apkAssets != null) {
- return apkAssets;
+ ApkAssets apkAssets = null;
+ if (mLoadedApkAssets != null) {
+ apkAssets = mLoadedApkAssets.get(newKey);
+ if (apkAssets != null) {
+ return apkAssets;
+ }
}
// Optimistically check if this ApkAssets exists somewhere else.
@@ -320,7 +332,10 @@
if (apkAssetsRef != null) {
apkAssets = apkAssetsRef.get();
if (apkAssets != null) {
- mLoadedApkAssets.put(newKey, apkAssets);
+ if (mLoadedApkAssets != null) {
+ mLoadedApkAssets.put(newKey, apkAssets);
+ }
+
return apkAssets;
} else {
// Clean up the reference.
@@ -335,7 +350,11 @@
} else {
apkAssets = ApkAssets.loadFromPath(path, false /*system*/, sharedLib);
}
- mLoadedApkAssets.put(newKey, apkAssets);
+
+ if (mLoadedApkAssets != null) {
+ mLoadedApkAssets.put(newKey, apkAssets);
+ }
+
mCachedApkAssets.put(newKey, new WeakReference<>(apkAssets));
return apkAssets;
}
@@ -349,6 +368,7 @@
* @return a new AssetManager.
*/
@VisibleForTesting
+ @UnsupportedAppUsage
protected @Nullable AssetManager createAssetManager(@NonNull final ResourcesKey key) {
final AssetManager.Builder builder = new AssetManager.Builder();
@@ -434,18 +454,22 @@
pw.println("ResourcesManager:");
pw.increaseIndent();
- pw.print("cached apks: total=");
- pw.print(mLoadedApkAssets.size());
- pw.print(" created=");
- pw.print(mLoadedApkAssets.createCount());
- pw.print(" evicted=");
- pw.print(mLoadedApkAssets.evictionCount());
- pw.print(" hit=");
- pw.print(mLoadedApkAssets.hitCount());
- pw.print(" miss=");
- pw.print(mLoadedApkAssets.missCount());
- pw.print(" max=");
- pw.print(mLoadedApkAssets.maxSize());
+ if (mLoadedApkAssets != null) {
+ pw.print("cached apks: total=");
+ pw.print(mLoadedApkAssets.size());
+ pw.print(" created=");
+ pw.print(mLoadedApkAssets.createCount());
+ pw.print(" evicted=");
+ pw.print(mLoadedApkAssets.evictionCount());
+ pw.print(" hit=");
+ pw.print(mLoadedApkAssets.hitCount());
+ pw.print(" miss=");
+ pw.print(mLoadedApkAssets.missCount());
+ pw.print(" max=");
+ pw.print(mLoadedApkAssets.maxSize());
+ } else {
+ pw.print("cached apks: 0 [cache disabled]");
+ }
pw.println();
pw.print("total apks: ");
@@ -1065,6 +1089,7 @@
* @param assetPath The main asset path for which to add the library asset path.
* @param libAsset The library asset path to add.
*/
+ @UnsupportedAppUsage
public void appendLibAssetForMainAssetPath(String assetPath, String libAsset) {
synchronized (this) {
// Record which ResourcesImpl need updating
diff --git a/core/java/android/app/ResultInfo.java b/core/java/android/app/ResultInfo.java
index d5af08a..4335488 100644
--- a/core/java/android/app/ResultInfo.java
+++ b/core/java/android/app/ResultInfo.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,11 +27,15 @@
* {@hide}
*/
public class ResultInfo implements Parcelable {
+ @UnsupportedAppUsage
public final String mResultWho;
+ @UnsupportedAppUsage
public final int mRequestCode;
public final int mResultCode;
+ @UnsupportedAppUsage
public final Intent mData;
+ @UnsupportedAppUsage
public ResultInfo(String resultWho, int requestCode, int resultCode,
Intent data) {
mResultWho = resultWho;
@@ -60,6 +65,7 @@
}
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<ResultInfo> CREATOR
= new Parcelable.Creator<ResultInfo>() {
public ResultInfo createFromParcel(Parcel in) {
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index 4abca9a..4a45150 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -17,6 +17,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -312,6 +313,7 @@
*
* @param working true to show spinner, false to hide spinner
*/
+ @UnsupportedAppUsage
public void setWorking(boolean working) {
mWorkingSpinner.setAlpha(working ? 255 : 0);
mWorkingSpinner.setVisible(working, false);
@@ -373,6 +375,7 @@
}
}
+ @UnsupportedAppUsage
static boolean isLandscapeMode(Context context) {
return context.getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE;
@@ -517,6 +520,7 @@
/**
* Launch a search for the text in the query text field.
*/
+ @UnsupportedAppUsage
public void launchQuerySearch() {
launchQuerySearch(KeyEvent.KEYCODE_UNKNOWN, null);
}
@@ -529,6 +533,7 @@
* @param actionMsg The message for the action key that was pressed,
* or <code>null</code> if none.
*/
+ @UnsupportedAppUsage
protected void launchQuerySearch(int actionKey, String actionMsg) {
String query = mSearchAutoComplete.getText().toString();
String action = Intent.ACTION_SEARCH;
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index ed6d2f5..9539f34 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -17,6 +17,7 @@
package android.app;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -530,6 +531,7 @@
* current search engine does not support voice search.
* @hide
*/
+ @UnsupportedAppUsage
public final static String DISABLE_VOICE_SEARCH
= "android.search.DISABLE_VOICE_SEARCH";
@@ -545,8 +547,10 @@
/* package */ OnDismissListener mDismissListener = null;
/* package */ OnCancelListener mCancelListener = null;
+ @UnsupportedAppUsage
private SearchDialog mSearchDialog;
+ @UnsupportedAppUsage
/*package*/ SearchManager(Context context, Handler handler) throws ServiceNotFoundException {
mContext = context;
mHandler = handler;
@@ -609,6 +613,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void startSearch(String initialQuery,
boolean selectInitialQuery,
ComponentName launchActivity,
@@ -710,6 +715,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public ComponentName getWebSearchActivity() {
try {
return mService.getWebSearchActivity();
@@ -770,6 +776,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isVisible() {
return mSearchDialog == null? false : mSearchDialog.isShowing();
}
@@ -866,6 +873,7 @@
*
* @hide because SearchableInfo is not part of the API.
*/
+ @UnsupportedAppUsage
public Cursor getSuggestions(SearchableInfo searchable, String query) {
return getSuggestions(searchable, query, -1);
}
@@ -881,6 +889,7 @@
*
* @hide because SearchableInfo is not part of the API.
*/
+ @UnsupportedAppUsage
public Cursor getSuggestions(SearchableInfo searchable, String query, int limit) {
if (searchable == null) {
return null;
@@ -970,6 +979,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void launchAssist(Bundle args) {
try {
if (mService == null) {
diff --git a/core/java/android/app/SearchableInfo.java b/core/java/android/app/SearchableInfo.java
index a952915..ae6d32a 100644
--- a/core/java/android/app/SearchableInfo.java
+++ b/core/java/android/app/SearchableInfo.java
@@ -20,6 +20,7 @@
import org.xmlpull.v1.XmlPullParserException;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
@@ -249,6 +250,7 @@
* @return Returns a context related to the searchable activity
* @hide
*/
+ @UnsupportedAppUsage
public Context getActivityContext(Context context) {
return createActivityContext(context, mSearchActivity);
}
@@ -278,6 +280,7 @@
* @return Returns a context related to the suggestion provider
* @hide
*/
+ @UnsupportedAppUsage
public Context getProviderContext(Context context, Context activityContext) {
Context theirContext = null;
if (mSearchActivity.getPackageName().equals(mSuggestProviderPackage)) {
@@ -307,6 +310,7 @@
* @param cName The component name of the searchable activity
* @throws IllegalArgumentException if the searchability info is invalid or insufficient
*/
+ @UnsupportedAppUsage
private SearchableInfo(Context activityContext, AttributeSet attr, final ComponentName cName) {
mSearchActivity = cName;
@@ -450,6 +454,7 @@
* Gets the action message to use for queries.
* @see android.R.styleable#SearchableActionKey_queryActionMsg
*/
+ @UnsupportedAppUsage
public String getQueryActionMsg() {
return mQueryActionMsg;
}
@@ -458,6 +463,7 @@
* Gets the action message to use for suggestions.
* @see android.R.styleable#SearchableActionKey_suggestActionMsg
*/
+ @UnsupportedAppUsage
public String getSuggestActionMsg() {
return mSuggestActionMsg;
}
@@ -466,6 +472,7 @@
* Gets the name of the column to get the suggestion action message from.
* @see android.R.styleable#SearchableActionKey_suggestActionMsgColumn
*/
+ @UnsupportedAppUsage
public String getSuggestActionMsgColumn() {
return mSuggestActionMsgColumn;
}
@@ -490,6 +497,7 @@
*
* @hide ActionKeyInfo is hidden
*/
+ @UnsupportedAppUsage
public ActionKeyInfo findActionKey(int keyCode) {
if (mActionKeys == null) {
return null;
@@ -623,6 +631,7 @@
*
* @hide deprecated functionality
*/
+ @UnsupportedAppUsage
public int getLabelId() {
return mLabelId;
}
@@ -647,6 +656,7 @@
*
* @hide deprecated functionality
*/
+ @UnsupportedAppUsage
public int getIconId() {
return mIconId;
}
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java
index ea0fd75..67acfe9 100644
--- a/core/java/android/app/Service.java
+++ b/core/java/android/app/Service.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentCallbacks2;
import android.content.ComponentName;
import android.content.Intent;
@@ -658,6 +659,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public final void setForeground(boolean isForeground) {
Log.w(TAG, "setForeground: ignoring old API call on " + getClass().getName());
}
@@ -750,6 +752,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final void attach(
Context context,
ActivityThread thread, String className, IBinder token,
@@ -777,10 +780,16 @@
}
// set by the thread after the constructor and before onCreate(Bundle icicle) is called.
+ @UnsupportedAppUsage
private ActivityThread mThread = null;
+ @UnsupportedAppUsage
private String mClassName = null;
+ @UnsupportedAppUsage
private IBinder mToken = null;
+ @UnsupportedAppUsage
private Application mApplication = null;
+ @UnsupportedAppUsage
private IActivityManager mActivityManager = null;
+ @UnsupportedAppUsage
private boolean mStartCompatibility = false;
}
diff --git a/core/java/android/app/SharedPreferencesImpl.java b/core/java/android/app/SharedPreferencesImpl.java
index 6ac15a5..0f8976f 100644
--- a/core/java/android/app/SharedPreferencesImpl.java
+++ b/core/java/android/app/SharedPreferencesImpl.java
@@ -17,6 +17,7 @@
package android.app;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.SharedPreferences;
import android.os.FileUtils;
import android.os.Looper;
@@ -63,6 +64,7 @@
// - acquire SharedPreferencesImpl.mLock before EditorImpl.mLock
// - acquire mWritingToDiskLock before EditorImpl.mLock
+ @UnsupportedAppUsage
private final File mFile;
private final File mBackupFile;
private final int mMode;
@@ -103,6 +105,7 @@
private final ExponentiallyBucketedHistogram mSyncTimes = new ExponentiallyBucketedHistogram(16);
private int mNumSync = 0;
+ @UnsupportedAppUsage
SharedPreferencesImpl(File file, int mode) {
mFile = file;
mBackupFile = makeBackupFile(file);
@@ -113,6 +116,7 @@
startLoadFromDisk();
}
+ @UnsupportedAppUsage
private void startLoadFromDisk() {
synchronized (mLock) {
mLoaded = false;
@@ -195,6 +199,7 @@
return new File(prefsFile.getPath() + ".bak");
}
+ @UnsupportedAppUsage
void startReloadIfChangedUnexpectedly() {
synchronized (mLock) {
// TODO: wait for any pending writes to disk?
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java
index c8a8313..2718bfa 100644
--- a/core/java/android/app/StatusBarManager.java
+++ b/core/java/android/app/StatusBarManager.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Binder;
import android.os.IBinder;
@@ -39,11 +40,13 @@
@SystemService(Context.STATUS_BAR_SERVICE)
public class StatusBarManager {
+ @UnsupportedAppUsage
public static final int DISABLE_EXPAND = View.STATUS_BAR_DISABLE_EXPAND;
public static final int DISABLE_NOTIFICATION_ICONS = View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS;
public static final int DISABLE_NOTIFICATION_ALERTS
= View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS;
@Deprecated
+ @UnsupportedAppUsage
public static final int DISABLE_NOTIFICATION_TICKER
= View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER;
public static final int DISABLE_SYSTEM_INFO = View.STATUS_BAR_DISABLE_SYSTEM_INFO;
@@ -57,6 +60,7 @@
public static final int DISABLE_NAVIGATION =
View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_RECENT;
+ @UnsupportedAppUsage
public static final int DISABLE_NONE = 0x00000000;
public static final int DISABLE_MASK = DISABLE_EXPAND | DISABLE_NOTIFICATION_ICONS
@@ -107,14 +111,18 @@
public static final int CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP = 1;
public static final int CAMERA_LAUNCH_SOURCE_LIFT_TRIGGER = 2;
+ @UnsupportedAppUsage
private Context mContext;
private IStatusBarService mService;
+ @UnsupportedAppUsage
private IBinder mToken = new Binder();
+ @UnsupportedAppUsage
StatusBarManager(Context context) {
mContext = context;
}
+ @UnsupportedAppUsage
private synchronized IStatusBarService getService() {
if (mService == null) {
mService = IStatusBarService.Stub.asInterface(
@@ -130,6 +138,7 @@
* Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags.
* To re-enable everything, pass {@link #DISABLE_NONE}.
*/
+ @UnsupportedAppUsage
public void disable(int what) {
try {
final int userId = Binder.getCallingUserHandle().getIdentifier();
@@ -163,6 +172,7 @@
/**
* Expand the notifications panel.
*/
+ @UnsupportedAppUsage
public void expandNotificationsPanel() {
try {
final IStatusBarService svc = getService();
@@ -177,6 +187,7 @@
/**
* Collapse the notifications and settings panels.
*/
+ @UnsupportedAppUsage
public void collapsePanels() {
try {
final IStatusBarService svc = getService();
@@ -191,6 +202,7 @@
/**
* Expand the settings panel.
*/
+ @UnsupportedAppUsage
public void expandSettingsPanel() {
expandSettingsPanel(null);
}
@@ -198,6 +210,7 @@
/**
* Expand the settings panel and open a subPanel, pass null to just open the settings panel.
*/
+ @UnsupportedAppUsage
public void expandSettingsPanel(String subPanel) {
try {
final IStatusBarService svc = getService();
@@ -209,6 +222,7 @@
}
}
+ @UnsupportedAppUsage
public void setIcon(String slot, int iconId, int iconLevel, String contentDescription) {
try {
final IStatusBarService svc = getService();
@@ -221,6 +235,7 @@
}
}
+ @UnsupportedAppUsage
public void removeIcon(String slot) {
try {
final IStatusBarService svc = getService();
@@ -232,6 +247,7 @@
}
}
+ @UnsupportedAppUsage
public void setIconVisibility(String slot, boolean visible) {
try {
final IStatusBarService svc = getService();
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java
index 970a088..077b177 100644
--- a/core/java/android/app/TaskInfo.java
+++ b/core/java/android/app/TaskInfo.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Intent;
import android.content.res.Configuration;
@@ -33,12 +34,14 @@
* The id of the user the task was running as.
* @hide
*/
+ @UnsupportedAppUsage
public int userId;
/**
* The id of the ActivityStack that currently contains this task.
* @hide
*/
+ @UnsupportedAppUsage
public int stackId;
/**
@@ -90,6 +93,7 @@
* The last time this task was active since boot (including time spent in sleep).
* @hide
*/
+ @UnsupportedAppUsage
public long lastActiveTime;
/**
@@ -102,18 +106,21 @@
* True if the task can go in the split-screen primary stack.
* @hide
*/
+ @UnsupportedAppUsage
public boolean supportsSplitScreenMultiWindow;
/**
* The resize mode of the task. See {@link ActivityInfo#resizeMode}.
* @hide
*/
+ @UnsupportedAppUsage
public int resizeMode;
/**
* The current configuration of the task.
* @hide
*/
+ @UnsupportedAppUsage
public final Configuration configuration = new Configuration();
TaskInfo() {
diff --git a/core/java/android/app/TaskStackListener.java b/core/java/android/app/TaskStackListener.java
index 895d12a..e23352a 100644
--- a/core/java/android/app/TaskStackListener.java
+++ b/core/java/android/app/TaskStackListener.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager.TaskSnapshot;
import android.content.ComponentName;
import android.os.RemoteException;
@@ -27,40 +28,49 @@
*/
public abstract class TaskStackListener extends ITaskStackListener.Stub {
@Override
+ @UnsupportedAppUsage
public void onTaskStackChanged() throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onActivityPinned(String packageName, int userId, int taskId, int stackId)
throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onActivityUnpinned() throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onPinnedActivityRestartAttempt(boolean clearedTask) throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onPinnedStackAnimationStarted() throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onPinnedStackAnimationEnded() throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onActivityForcedResizable(String packageName, int taskId, int reason)
throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onActivityDismissingDockedStack() throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onActivityLaunchOnSecondaryDisplayFailed() throws RemoteException {
}
@@ -69,10 +79,12 @@
}
@Override
+ @UnsupportedAppUsage
public void onTaskRemoved(int taskId) throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onTaskMovedToFront(int taskId) throws RemoteException {
}
@@ -86,15 +98,18 @@
}
@Override
+ @UnsupportedAppUsage
public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onTaskProfileLocked(int taskId, int userId) throws RemoteException {
}
@Override
+ @UnsupportedAppUsage
public void onTaskSnapshotChanged(int taskId, TaskSnapshot snapshot) throws RemoteException {
}
}
diff --git a/core/java/android/app/TimePickerDialog.java b/core/java/android/app/TimePickerDialog.java
index 8686944..1b281d5 100644
--- a/core/java/android/app/TimePickerDialog.java
+++ b/core/java/android/app/TimePickerDialog.java
@@ -17,6 +17,7 @@
package android.app;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
@@ -43,6 +44,7 @@
private static final String MINUTE = "minute";
private static final String IS_24_HOUR = "is24hour";
+ @UnsupportedAppUsage
private final TimePicker mTimePicker;
private final OnTimeSetListener mTimeSetListener;
diff --git a/core/java/android/app/UiAutomation.java b/core/java/android/app/UiAutomation.java
index 44f28796..dbb6c3d 100644
--- a/core/java/android/app/UiAutomation.java
+++ b/core/java/android/app/UiAutomation.java
@@ -23,6 +23,7 @@
import android.accessibilityservice.IAccessibilityServiceConnection;
import android.annotation.NonNull;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.graphics.Rect;
@@ -192,6 +193,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public UiAutomation(Looper looper, IUiAutomationConnection connection) {
if (looper == null) {
throw new IllegalArgumentException("Looper cannot be null!");
@@ -208,6 +210,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void connect() {
connect(0);
}
@@ -279,6 +282,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void disconnect() {
synchronized (mLock) {
if (mIsConnecting) {
diff --git a/core/java/android/app/UiAutomationConnection.java b/core/java/android/app/UiAutomationConnection.java
index ac3f2e7..b406d9e 100644
--- a/core/java/android/app/UiAutomationConnection.java
+++ b/core/java/android/app/UiAutomationConnection.java
@@ -18,6 +18,7 @@
import android.accessibilityservice.AccessibilityServiceInfo;
import android.accessibilityservice.IAccessibilityServiceClient;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.IPackageManager;
import android.graphics.Bitmap;
diff --git a/core/java/android/app/UiModeManager.java b/core/java/android/app/UiModeManager.java
index 0da5e24..4f172a4 100644
--- a/core/java/android/app/UiModeManager.java
+++ b/core/java/android/app/UiModeManager.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.os.RemoteException;
@@ -126,6 +127,7 @@
private IUiModeManager mService;
+ @UnsupportedAppUsage
/*package*/ UiModeManager() throws ServiceNotFoundException {
mService = IUiModeManager.Stub.asInterface(
ServiceManager.getServiceOrThrow(Context.UI_MODE_SERVICE));
diff --git a/core/java/android/app/UserSwitchObserver.java b/core/java/android/app/UserSwitchObserver.java
index c0f7a4c..25b243d 100644
--- a/core/java/android/app/UserSwitchObserver.java
+++ b/core/java/android/app/UserSwitchObserver.java
@@ -16,6 +16,7 @@
package android.app;
+import android.annotation.UnsupportedAppUsage;
import android.os.IRemoteCallback;
import android.os.RemoteException;
diff --git a/core/java/android/app/VrManager.java b/core/java/android/app/VrManager.java
index e118edd..6248e7c 100644
--- a/core/java/android/app/VrManager.java
+++ b/core/java/android/app/VrManager.java
@@ -6,6 +6,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.os.RemoteException;
@@ -50,6 +51,7 @@
}
}
+ @UnsupportedAppUsage
private final IVrManager mService;
private Map<VrStateCallback, CallbackEntry> mCallbackMap = new ArrayMap<>();
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index 626b3be..ace814a 100644
--- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -233,6 +234,7 @@
* @see WallpaperColors#fromDrawable(Drawable)
* @hide
*/
+ @UnsupportedAppUsage
public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor,
@Nullable Color tertiaryColor, int colorHints) {
@@ -347,6 +349,7 @@
* @return True if dark text is supported.
* @hide
*/
+ @UnsupportedAppUsage
public int getColorHints() {
return mColorHints;
}
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index 6ad6c25..2a263d6 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -25,6 +25,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -493,6 +494,7 @@
}
private static final Object sSync = new Object[0];
+ @UnsupportedAppUsage
private static Globals sGlobals;
static void initGlobals(IWallpaperManager service, Looper looper) {
@@ -517,6 +519,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public IWallpaperManager getIWallpaperManager() {
return sGlobals.mService;
}
@@ -820,6 +823,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Bitmap getBitmap() {
return getBitmap(false);
}
@@ -831,6 +835,7 @@
* @see Bitmap.Config#HARDWARE
* @hide
*/
+ @UnsupportedAppUsage
public Bitmap getBitmap(boolean hardware) {
return getBitmapAsUser(mContext.getUserId(), hardware);
}
@@ -886,6 +891,7 @@
* @param userId Owner of the wallpaper or UserHandle.USER_ALL.
* @hide
*/
+ @UnsupportedAppUsage
public void addOnColorsChangedListener(@NonNull OnColorsChangedListener listener,
@NonNull Handler handler, int userId) {
sGlobals.addOnColorsChangedListener(listener, handler, userId);
@@ -939,6 +945,7 @@
* @return {@link WallpaperColors} or null if colors are unknown.
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable WallpaperColors getWallpaperColors(int which, int userId) {
return sGlobals.getWallpaperColors(which, userId);
}
@@ -958,6 +965,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public ParcelFileDescriptor getWallpaperFile(@SetWallpaperFlags int which, int userId) {
if (which != FLAG_SYSTEM && which != FLAG_LOCK) {
throw new IllegalArgumentException("Must request exactly one kind of wallpaper");
@@ -1280,6 +1288,7 @@
* requires permission {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL}.
* @hide
*/
+ @UnsupportedAppUsage
public int setBitmap(Bitmap fullImage, Rect visibleCropHint,
boolean allowBackup, @SetWallpaperFlags int which, int userId)
throws IOException {
@@ -1670,6 +1679,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.SET_WALLPAPER_COMPONENT)
+ @UnsupportedAppUsage
public boolean setWallpaperComponent(ComponentName name, int userId) {
if (sGlobals.mService == null) {
Log.w(TAG, "WallpaperService not running");
@@ -1847,6 +1857,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static InputStream openDefaultWallpaper(Context context, @SetWallpaperFlags int which) {
final String whichProp;
final int defaultResId;
diff --git a/core/java/android/app/admin/DeviceAdminInfo.java b/core/java/android/app/admin/DeviceAdminInfo.java
index 5fbe5b3..5fe1af0 100644
--- a/core/java/android/app/admin/DeviceAdminInfo.java
+++ b/core/java/android/app/admin/DeviceAdminInfo.java
@@ -17,6 +17,7 @@
package android.app.admin;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
@@ -180,6 +181,7 @@
/** @hide */
public static class PolicyInfo {
public final int ident;
+ @UnsupportedAppUsage
public final String tag;
public final int label;
public final int description;
@@ -479,6 +481,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public ArrayList<PolicyInfo> getUsedPolicies() {
ArrayList<PolicyInfo> res = new ArrayList<PolicyInfo>();
for (int i=0; i<sPoliciesDisplayOrder.size(); i++) {
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index cbd8741..aa021a2 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -30,6 +30,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.annotation.WorkerThread;
import android.app.Activity;
@@ -1137,6 +1138,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED
= "android.app.action.DEVICE_POLICY_MANAGER_STATE_CHANGED";
@@ -1867,6 +1869,7 @@
* @see #getActiveAdmins()
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable List<ComponentName> getActiveAdminsAsUser(int userId) {
if (mService != null) {
try {
@@ -1894,6 +1897,7 @@
* or uninstalled.
* @hide
*/
+ @UnsupportedAppUsage
public boolean packageHasActiveAdmins(String packageName, int userId) {
if (mService != null) {
try {
@@ -2129,6 +2133,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordQuality(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2194,6 +2199,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumLength(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2263,6 +2269,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumUpperCase(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2332,6 +2339,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumLowerCase(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2400,6 +2408,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumLetters(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2468,6 +2477,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumNumeric(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2535,6 +2545,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumSymbols(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2603,6 +2614,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordMinimumNonLetter(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2754,6 +2766,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getPasswordHistoryLength(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -2880,6 +2893,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getCurrentFailedPasswordAttempts(int userHandle) {
if (mService != null) {
try {
@@ -2960,6 +2974,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getMaximumFailedPasswordsForWipe(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -3232,6 +3247,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public long getMaximumTimeToLock(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -3305,6 +3321,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public long getRequiredStrongAuthTimeout(@Nullable ComponentName admin, @UserIdInt int userId) {
if (mService != null) {
try {
@@ -3493,6 +3510,7 @@
* of the device admin that sets the proxy.
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable ComponentName setGlobalProxy(@NonNull ComponentName admin, Proxy proxySpec,
List<String> exclusionList ) {
throwIfParentInstance("setGlobalProxy");
@@ -3827,6 +3845,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getStorageEncryptionStatus(int userHandle) {
if (mService != null) {
try {
@@ -4564,6 +4583,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public boolean getCameraDisabled(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -4819,6 +4839,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public int getKeyguardDisabledFeatures(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
@@ -4833,6 +4854,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setActiveAdmin(@NonNull ComponentName policyReceiver, boolean refreshing,
int userHandle) {
if (mService != null) {
@@ -4847,6 +4869,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setActiveAdmin(@NonNull ComponentName policyReceiver, boolean refreshing) {
setActiveAdmin(policyReceiver, refreshing, myUserId());
}
@@ -4867,6 +4890,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setActivePasswordState(PasswordMetrics metrics, int userHandle) {
if (mService != null) {
try {
@@ -4893,6 +4917,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void reportFailedPasswordAttempt(int userHandle) {
if (mService != null) {
try {
@@ -4906,6 +4931,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void reportSuccessfulPasswordAttempt(int userHandle) {
if (mService != null) {
try {
@@ -5534,6 +5560,7 @@
* @see #getProfileOwner()
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable ComponentName getProfileOwnerAsUser(final int userId)
throws IllegalArgumentException {
if (mService != null) {
@@ -5652,6 +5679,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setDefaultSmsApplication(@NonNull ComponentName admin, String packageName) {
throwIfParentInstance("setDefaultSmsApplication");
if (mService != null) {
@@ -5867,6 +5895,7 @@
}
/** @hide per-user version */
+ @UnsupportedAppUsage
public @Nullable List<PersistableBundle> getTrustAgentConfiguration(
@Nullable ComponentName admin, @NonNull ComponentName agent, int userHandle) {
if (mService != null) {
@@ -7722,6 +7751,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.
@@ -8833,6 +8865,7 @@
}
}
+ @UnsupportedAppUsage
private void throwIfParentInstance(String functionName) {
if (mParentInstance) {
throw new SecurityException(functionName + " cannot be called on the parent instance");
@@ -8915,6 +8948,7 @@
* mandatory or {@code null} if backups are not mandatory.
* @hide
*/
+ @UnsupportedAppUsage
public ComponentName getMandatoryBackupTransport() {
throwIfParentInstance("getMandatoryBackupTransport");
try {
diff --git a/core/java/android/app/admin/SecurityLog.java b/core/java/android/app/admin/SecurityLog.java
index 38b4f8f..170c802 100644
--- a/core/java/android/app/admin/SecurityLog.java
+++ b/core/java/android/app/admin/SecurityLog.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;
@@ -476,6 +477,7 @@
* Constructor used by native classes to generate SecurityEvent instances.
* @hide
*/
+ @UnsupportedAppUsage
/* package */ SecurityEvent(byte[] data) {
this(0, data);
}
diff --git a/core/java/android/app/admin/SystemUpdatePolicy.java b/core/java/android/app/admin/SystemUpdatePolicy.java
index 2a451ff..bcd5f6c 100644
--- a/core/java/android/app/admin/SystemUpdatePolicy.java
+++ b/core/java/android/app/admin/SystemUpdatePolicy.java
@@ -76,9 +76,7 @@
* </code></pre>
*
* <h3>Developer guide</h3>
- * To learn more about managing system updates, read
- * <a href="{@docRoot}/work/dpc/security.html#control_remote_software_updates">Control remote
- * software updates</a>.
+ * To learn more, read <a href="{@docRoot}work/dpc/system-updates">Manage system updates</a>.
*
* @see DevicePolicyManager#setSystemUpdatePolicy
* @see DevicePolicyManager#getSystemUpdatePolicy
diff --git a/core/java/android/app/assist/AssistContent.java b/core/java/android/app/assist/AssistContent.java
index 1c9f573..bdbce52 100644
--- a/core/java/android/app/assist/AssistContent.java
+++ b/core/java/android/app/assist/AssistContent.java
@@ -1,5 +1,6 @@
package android.app.assist;
+import android.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.Intent;
import android.net.Uri;
@@ -13,12 +14,18 @@
* {@link android.app.Activity#onProvideAssistContent Activity.onProvideAssistContent}.
*/
public class AssistContent implements Parcelable {
+ @UnsupportedAppUsage
private boolean mIsAppProvidedIntent = false;
private boolean mIsAppProvidedWebUri = false;
+ @UnsupportedAppUsage
private Intent mIntent;
+ @UnsupportedAppUsage
private String mStructuredData;
+ @UnsupportedAppUsage
private ClipData mClipData;
+ @UnsupportedAppUsage
private Uri mUri;
+ @UnsupportedAppUsage
private final Bundle mExtras;
public AssistContent() {
@@ -148,6 +155,7 @@
return mExtras;
}
+ @UnsupportedAppUsage
AssistContent(Parcel in) {
if (in.readInt() != 0) {
mIntent = Intent.CREATOR.createFromParcel(in);
@@ -166,6 +174,7 @@
mIsAppProvidedWebUri = in.readInt() == 1;
}
+ @UnsupportedAppUsage
void writeToParcelInternal(Parcel dest, int flags) {
if (mIntent != null) {
dest.writeInt(1);
diff --git a/core/java/android/app/assist/AssistStructure.java b/core/java/android/app/assist/AssistStructure.java
index 15bcbe3..173b766 100644
--- a/core/java/android/app/assist/AssistStructure.java
+++ b/core/java/android/app/assist/AssistStructure.java
@@ -41,18 +41,23 @@
import java.util.List;
/**
- * Assist data automatically created by the platform's implementation of assist and autofill.
+ * <p>This API automatically creates assist data from the platform's
+ * implementation of assist and autofill.
*
* <p>The structure is used for assist purposes when created by
* {@link android.app.Activity#onProvideAssistData}, {@link View#onProvideStructure(ViewStructure)},
* or {@link View#onProvideVirtualStructure(ViewStructure)}.
*
- * <p>The structure is used for autofill purposes when created by
+ * <p>The structure is also used for autofill purposes when created by
* {@link View#onProvideAutofillStructure(ViewStructure, int)},
* or {@link View#onProvideAutofillVirtualStructure(ViewStructure, int)}.
*
- * <p>For performance reasons, some properties of the assist data might be available just for assist
- * or autofill purposes; in those case, the property availability will be document in its javadoc.
+ * <p>For performance reasons, some properties of the assist data might only be available for
+ * assist or autofill purposes. In those cases, a property's availability will be documented
+ * in its javadoc.
+ *
+ * <p>To learn about using Autofill in your app, read the
+ * <a href="/guide/topics/text/autofill">Autofill Framework</a> guides.
*/
public class AssistStructure implements Parcelable {
static final String TAG = "AssistStructure";
diff --git a/core/java/android/app/backup/BackupDataInput.java b/core/java/android/app/backup/BackupDataInput.java
index 26f9e3e..2a98ca7 100644
--- a/core/java/android/app/backup/BackupDataInput.java
+++ b/core/java/android/app/backup/BackupDataInput.java
@@ -17,6 +17,7 @@
package android.app.backup;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
import java.io.IOException;
@@ -67,7 +68,9 @@
private boolean mHeaderReady;
private static class EntityHeader {
+ @UnsupportedAppUsage
String key;
+ @UnsupportedAppUsage
int dataSize;
}
diff --git a/core/java/android/app/backup/BackupDataInputStream.java b/core/java/android/app/backup/BackupDataInputStream.java
index 94c7845..0888066 100644
--- a/core/java/android/app/backup/BackupDataInputStream.java
+++ b/core/java/android/app/backup/BackupDataInputStream.java
@@ -16,6 +16,7 @@
package android.app.backup;
+import android.annotation.UnsupportedAppUsage;
import java.io.InputStream;
import java.io.IOException;
@@ -37,7 +38,9 @@
*/
public class BackupDataInputStream extends InputStream {
+ @UnsupportedAppUsage
String key;
+ @UnsupportedAppUsage
int dataSize;
BackupDataInput mData;
diff --git a/core/java/android/app/backup/BackupDataOutput.java b/core/java/android/app/backup/BackupDataOutput.java
index 5a66f34..01961e7 100644
--- a/core/java/android/app/backup/BackupDataOutput.java
+++ b/core/java/android/app/backup/BackupDataOutput.java
@@ -17,6 +17,7 @@
package android.app.backup;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.ParcelFileDescriptor;
import java.io.FileDescriptor;
@@ -67,6 +68,7 @@
private final long mQuota;
private final int mTransportFlags;
+ @UnsupportedAppUsage
long mBackupWriter;
/**
diff --git a/core/java/android/app/backup/BackupHelperDispatcher.java b/core/java/android/app/backup/BackupHelperDispatcher.java
index 6811532..e9acdbf 100644
--- a/core/java/android/app/backup/BackupHelperDispatcher.java
+++ b/core/java/android/app/backup/BackupHelperDispatcher.java
@@ -16,6 +16,7 @@
package android.app.backup;
+import android.annotation.UnsupportedAppUsage;
import android.os.ParcelFileDescriptor;
import android.util.Log;
@@ -29,7 +30,9 @@
private static final String TAG = "BackupHelperDispatcher";
private static class Header {
+ @UnsupportedAppUsage
int chunkSize; // not including the header
+ @UnsupportedAppUsage
String keyPrefix;
}
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index 912baf9..c6086f1 100644
--- a/core/java/android/app/backup/BackupManager.java
+++ b/core/java/android/app/backup/BackupManager.java
@@ -20,6 +20,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -192,8 +193,10 @@
public static final int ERROR_TRANSPORT_INVALID = -2;
private Context mContext;
+ @UnsupportedAppUsage
private static IBackupManager sService;
+ @UnsupportedAppUsage
private static void checkServiceBinder() {
if (sService == null) {
sService = IBackupManager.Stub.asInterface(
diff --git a/core/java/android/app/backup/FileBackupHelperBase.java b/core/java/android/app/backup/FileBackupHelperBase.java
index 4ed5197..0caab98 100644
--- a/core/java/android/app/backup/FileBackupHelperBase.java
+++ b/core/java/android/app/backup/FileBackupHelperBase.java
@@ -16,6 +16,7 @@
package android.app.backup;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.ParcelFileDescriptor;
import android.util.Log;
@@ -101,6 +102,7 @@
return (result == 0);
}
+ @UnsupportedAppUsage
public void writeNewStateDescription(ParcelFileDescriptor fd) {
int result = writeSnapshot_native(mPtr, fd.getFileDescriptor());
// TODO: Do something with the error.
diff --git a/core/java/android/app/backup/FullBackup.java b/core/java/android/app/backup/FullBackup.java
index b7a8da5..9a595b2 100644
--- a/core/java/android/app/backup/FullBackup.java
+++ b/core/java/android/app/backup/FullBackup.java
@@ -16,6 +16,7 @@
package android.app.backup;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.XmlResourceParser;
@@ -90,6 +91,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
static public native int backupToTar(String packageName, String domain,
String linkdomain, String rootpath, String path, FullBackupDataOutput output);
diff --git a/core/java/android/app/backup/FullBackupDataOutput.java b/core/java/android/app/backup/FullBackupDataOutput.java
index 18f4283..0ce8653 100644
--- a/core/java/android/app/backup/FullBackupDataOutput.java
+++ b/core/java/android/app/backup/FullBackupDataOutput.java
@@ -1,5 +1,6 @@
package android.app.backup;
+import android.annotation.UnsupportedAppUsage;
import android.os.ParcelFileDescriptor;
/**
@@ -9,6 +10,7 @@
*/
public class FullBackupDataOutput {
// Currently a name-scoping shim around BackupDataOutput
+ @UnsupportedAppUsage
private final BackupDataOutput mData;
private final long mQuota;
private final int mTransportFlags;
@@ -65,14 +67,17 @@
}
/** @hide - used only internally to the backup manager service's stream construction */
+ @UnsupportedAppUsage
public FullBackupDataOutput(ParcelFileDescriptor fd) {
this(fd, /*quota=*/ -1, /*transportFlags=*/ 0);
}
/** @hide */
+ @UnsupportedAppUsage
public BackupDataOutput getData() { return mData; }
/** @hide - used for measurement pass */
+ @UnsupportedAppUsage
public void addSize(long size) {
if (size > 0) {
mSize += size;
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/JobInfo.java b/core/java/android/app/job/JobInfo.java
index 02afcc7..9baa16f 100644
--- a/core/java/android/app/job/JobInfo.java
+++ b/core/java/android/app/job/JobInfo.java
@@ -29,6 +29,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
+import android.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.ComponentName;
import android.net.NetworkRequest;
@@ -202,6 +203,7 @@
* JobInfo priority if it is smaller).
* @hide
*/
+ @UnsupportedAppUsage
public static final int PRIORITY_FOREGROUND_APP = 30;
/**
@@ -240,6 +242,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_WILL_BE_FOREGROUND = 1 << 0;
/**
@@ -282,11 +285,13 @@
*/
public static final int CONSTRAINT_FLAG_STORAGE_NOT_LOW = 1 << 3;
+ @UnsupportedAppUsage
private final int jobId;
private final PersistableBundle extras;
private final Bundle transientExtras;
private final ClipData clipData;
private final int clipGrantFlags;
+ @UnsupportedAppUsage
private final ComponentName service;
private final int constraintFlags;
private final TriggerContentUri[] triggerContentUris;
@@ -306,6 +311,7 @@
private final long initialBackoffMillis;
private final int backoffPolicy;
private final int priority;
+ @UnsupportedAppUsage
private final int flags;
/**
@@ -1009,12 +1015,14 @@
}
/** @hide */
+ @UnsupportedAppUsage
public Builder setPriority(int priority) {
mPriority = priority;
return this;
}
/** @hide */
+ @UnsupportedAppUsage
public Builder setFlags(int flags) {
mFlags = flags;
return this;
diff --git a/core/java/android/app/job/JobParameters.java b/core/java/android/app/job/JobParameters.java
index d67f11b..578a9ae 100644
--- a/core/java/android/app/job/JobParameters.java
+++ b/core/java/android/app/job/JobParameters.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.job.IJobCallback;
import android.content.ClipData;
import android.net.Network;
@@ -59,11 +60,13 @@
}
}
+ @UnsupportedAppUsage
private final int jobId;
private final PersistableBundle extras;
private final Bundle transientExtras;
private final ClipData clipData;
private final int clipGrantFlags;
+ @UnsupportedAppUsage
private final IBinder callback;
private final boolean overrideDeadlineExpired;
private final Uri[] mTriggeredContentUris;
@@ -273,6 +276,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public IJobCallback getCallback() {
return IJobCallback.Stub.asInterface(callback);
}
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..ceeaab7
--- /dev/null
+++ b/core/java/android/app/job/JobSnapshot.java
@@ -0,0 +1,119 @@
+/*
+ * 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;
+ }
+
+ /**
+ * Returning JobInfo bound to this snapshot
+ * @return JobInfo of this snapshot
+ */
+ public JobInfo getJobInfo() {
+ return mJob;
+ }
+
+ /**
+ * 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_DEVICE_IDLE);
+ }
+
+ 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/app/job/JobWorkItem.java b/core/java/android/app/job/JobWorkItem.java
index 995f522..bfc6df2 100644
--- a/core/java/android/app/job/JobWorkItem.java
+++ b/core/java/android/app/job/JobWorkItem.java
@@ -19,6 +19,7 @@
import static android.app.job.JobInfo.NETWORK_BYTES_UNKNOWN;
import android.annotation.BytesLong;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
@@ -29,11 +30,15 @@
* {@link JobParameters#dequeueWork() JobParameters.dequeueWork} for more details.
*/
final public class JobWorkItem implements Parcelable {
+ @UnsupportedAppUsage
final Intent mIntent;
final long mNetworkDownloadBytes;
final long mNetworkUploadBytes;
+ @UnsupportedAppUsage
int mDeliveryCount;
+ @UnsupportedAppUsage
int mWorkId;
+ @UnsupportedAppUsage
Object mGrants;
/**
@@ -219,6 +224,7 @@
}
};
+ @UnsupportedAppUsage
JobWorkItem(Parcel in) {
if (in.readInt() != 0) {
mIntent = Intent.CREATOR.createFromParcel(in);
diff --git a/core/java/android/app/trust/TrustManager.java b/core/java/android/app/trust/TrustManager.java
index fb27bed..27abdcf 100644
--- a/core/java/android/app/trust/TrustManager.java
+++ b/core/java/android/app/trust/TrustManager.java
@@ -19,6 +19,7 @@
import android.Manifest;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.hardware.biometrics.BiometricSourceType;
import android.os.Handler;
@@ -74,6 +75,7 @@
*
* Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission.
*/
+ @UnsupportedAppUsage
public void reportUnlockAttempt(boolean successful, int userId) {
try {
mService.reportUnlockAttempt(successful, userId);
diff --git a/core/java/android/app/usage/ConfigurationStats.java b/core/java/android/app/usage/ConfigurationStats.java
index 080216c..dff9b61 100644
--- a/core/java/android/app/usage/ConfigurationStats.java
+++ b/core/java/android/app/usage/ConfigurationStats.java
@@ -15,6 +15,7 @@
*/
package android.app.usage;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.Configuration;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,31 +29,37 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public Configuration mConfiguration;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mBeginTimeStamp;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mEndTimeStamp;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mLastTimeActive;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mTotalTimeActive;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public int mActivationCount;
/**
diff --git a/core/java/android/app/usage/NetworkStatsManager.java b/core/java/android/app/usage/NetworkStatsManager.java
index 9f46f20..59ae334 100644
--- a/core/java/android/app/usage/NetworkStatsManager.java
+++ b/core/java/android/app/usage/NetworkStatsManager.java
@@ -21,6 +21,7 @@
import android.annotation.Nullable;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.usage.NetworkStats.Bucket;
import android.content.Context;
import android.net.ConnectivityManager;
@@ -121,6 +122,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public NetworkStatsManager(Context context) throws ServiceNotFoundException {
this(context, INetworkStatsService.Stub.asInterface(
ServiceManager.getServiceOrThrow(Context.NETWORK_STATS_SERVICE)));
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index 3e90af3..9f22ad1 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -17,6 +17,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.Configuration;
import android.os.Parcel;
import android.os.Parcelable;
@@ -177,27 +178,32 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public String mPackage;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public String mClass;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mTimeStamp;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public int mEventType;
/**
* Only present for {@link #CONFIGURATION_CHANGE} event types.
* {@hide}
*/
+ @UnsupportedAppUsage
public Configuration mConfiguration;
/**
@@ -380,24 +386,30 @@
}
// Only used when creating the resulting events. Not used for reading/unparceling.
+ @UnsupportedAppUsage
private List<Event> mEventsToWrite = null;
// Only used for reading/unparceling events.
+ @UnsupportedAppUsage
private Parcel mParcel = null;
+ @UnsupportedAppUsage
private final int mEventCount;
+ @UnsupportedAppUsage
private int mIndex = 0;
/*
* In order to save space, since ComponentNames will be duplicated everywhere,
* we use a map and index into it.
*/
+ @UnsupportedAppUsage
private String[] mStringPool;
/**
* Construct the iterator from a parcel.
* {@hide}
*/
+ @UnsupportedAppUsage
public UsageEvents(Parcel in) {
byte[] bytes = in.readBlob();
Parcel data = Parcel.obtain();
@@ -482,6 +494,7 @@
}
}
+ @UnsupportedAppUsage
private int findStringIndex(String str) {
final int index = Arrays.binarySearch(mStringPool, str);
if (index < 0) {
@@ -493,6 +506,7 @@
/**
* Writes a single event to the parcel. Modify this when updating {@link Event}.
*/
+ @UnsupportedAppUsage
private void writeEventToParcel(Event event, Parcel p, int flags) {
final int packageIndex;
if (event.mPackage != null) {
@@ -536,6 +550,7 @@
/**
* Reads a single event from the parcel. Modify this when updating {@link Event}.
*/
+ @UnsupportedAppUsage
private void readEventFromParcel(Parcel p, Event eventOut) {
final int packageIndex = p.readInt();
if (packageIndex >= 0) {
diff --git a/core/java/android/app/usage/UsageStats.java b/core/java/android/app/usage/UsageStats.java
index 2b14841..0659a23 100644
--- a/core/java/android/app/usage/UsageStats.java
+++ b/core/java/android/app/usage/UsageStats.java
@@ -17,6 +17,7 @@
package android.app.usage;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -31,32 +32,38 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public String mPackageName;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mBeginTimeStamp;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mEndTimeStamp;
/**
* Last time used by the user with an explicit action (notification, activity launch).
* {@hide}
*/
+ @UnsupportedAppUsage
public long mLastTimeUsed;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long mTotalTimeInForeground;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public int mLaunchCount;
/**
@@ -67,6 +74,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public int mLastEvent;
/**
diff --git a/core/java/android/app/usage/UsageStatsManager.java b/core/java/android/app/usage/UsageStatsManager.java
index 72d209a..0994332 100644
--- a/core/java/android/app/usage/UsageStatsManager.java
+++ b/core/java/android/app/usage/UsageStatsManager.java
@@ -21,6 +21,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.Context;
import android.content.pm.ParceledListSlice;
@@ -231,9 +232,12 @@
@SystemApi
public static final String EXTRA_TIME_USED = "android.app.usage.extra.TIME_USED";
+ @UnsupportedAppUsage
private static final UsageEvents sEmptyResults = new UsageEvents();
+ @UnsupportedAppUsage
private final Context mContext;
+ @UnsupportedAppUsage
private final IUsageStatsManager mService;
/**
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index 49cc498..f003d4b 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
@@ -53,14 +54,17 @@
static final int HANDLE_UPDATE = 1;
static final int HANDLE_PROVIDER_CHANGED = 2;
static final int HANDLE_PROVIDERS_CHANGED = 3;
+ @UnsupportedAppUsage
static final int HANDLE_VIEW_DATA_CHANGED = 4;
final static Object sServiceLock = new Object();
+ @UnsupportedAppUsage
static IAppWidgetService sService;
static boolean sServiceInitialized = false;
private DisplayMetrics mDisplayMetrics;
private String mContextOpPackageName;
+ @UnsupportedAppUsage
private final Handler mHandler;
private final int mHostId;
private final Callbacks mCallbacks;
@@ -156,6 +160,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public AppWidgetHost(Context context, int hostId, OnClickHandler handler, Looper looper) {
mContextOpPackageName = context.getOpPackageName();
mHostId = hostId;
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index ab0eb92..a9187b6 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -16,6 +16,7 @@
package android.appwidget;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -70,7 +71,9 @@
Context mContext;
Context mRemoteContext;
+ @UnsupportedAppUsage
int mAppWidgetId;
+ @UnsupportedAppUsage
AppWidgetProviderInfo mInfo;
View mView;
int mViewMode = VIEW_MODE_NOINIT;
@@ -174,6 +177,7 @@
return getDefaultPaddingForWidget(context, appInfo, padding);
}
+ @UnsupportedAppUsage
private static Rect getDefaultPaddingForWidget(Context context, ApplicationInfo appInfo,
Rect padding) {
if (padding == null) {
@@ -284,6 +288,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void updateAppWidgetSize(Bundle newOptions, int minWidth, int minHeight, int maxWidth,
int maxHeight, boolean ignorePadding) {
if (newOptions == null) {
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 20248b9..dbc1c19 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -23,6 +23,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.IServiceConnection;
import android.app.PendingIntent;
import android.content.ComponentName;
@@ -463,6 +464,7 @@
private final Context mContext;
private final String mPackageName;
+ @UnsupportedAppUsage
private final IAppWidgetService mService;
private final DisplayMetrics mDisplayMetrics;
@@ -816,6 +818,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
if (mService == null) {
return Collections.emptyList();
@@ -842,6 +845,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public List<AppWidgetProviderInfo> getInstalledProvidersForProfile(int categoryFilter,
@Nullable UserHandle profile, @Nullable String packageName) {
if (mService == null) {
@@ -902,6 +906,7 @@
* provider for this AppWidget.
* @hide
*/
+ @UnsupportedAppUsage
public void bindAppWidgetId(int appWidgetId, ComponentName provider) {
if (mService == null) {
return;
@@ -924,6 +929,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void bindAppWidgetId(int appWidgetId, ComponentName provider, Bundle options) {
if (mService == null) {
return;
@@ -1094,6 +1100,7 @@
* @see Context#getServiceDispatcher(ServiceConnection, Handler, int)
* @hide
*/
+ @UnsupportedAppUsage
public boolean bindRemoteViewsService(Context context, int appWidgetId, Intent intent,
IServiceConnection connection, @Context.BindServiceFlags int flags) {
if (mService == null) {
@@ -1139,6 +1146,7 @@
}
}
+ @UnsupportedAppUsage
private boolean bindAppWidgetIdIfAllowed(int appWidgetId, int profileId,
ComponentName provider, Bundle options) {
if (mService == null) {
diff --git a/core/java/android/appwidget/AppWidgetManagerInternal.java b/core/java/android/appwidget/AppWidgetManagerInternal.java
index 7ab3d8b..5694ca8 100644
--- a/core/java/android/appwidget/AppWidgetManagerInternal.java
+++ b/core/java/android/appwidget/AppWidgetManagerInternal.java
@@ -16,12 +16,9 @@
package android.appwidget;
-import android.annotation.NonNull;
import android.annotation.Nullable;
import android.util.ArraySet;
-import java.util.Set;
-
/**
* App widget manager local system service interface.
*
@@ -36,4 +33,13 @@
* @return Whether the UID hosts widgets from the package.
*/
public abstract @Nullable ArraySet<String> getHostedWidgetPackages(int uid);
+
+ /**
+ * Execute the widget-related work of unlocking a user. This is intentionally
+ * invoked just <em>before</em> the boot-completed broadcast is issued, after
+ * the data-related work of unlock has completed.
+ *
+ * @param userId The user that is being unlocked.
+ */
+ public abstract void unlockUser(int userId);
}
diff --git a/core/java/android/appwidget/AppWidgetProviderInfo.java b/core/java/android/appwidget/AppWidgetProviderInfo.java
index 6dd85ca..53315cc 100644
--- a/core/java/android/appwidget/AppWidgetProviderInfo.java
+++ b/core/java/android/appwidget/AppWidgetProviderInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@@ -270,6 +271,7 @@
public int widgetFeatures;
/** @hide */
+ @UnsupportedAppUsage
public ActivityInfo providerInfo;
public AppWidgetProviderInfo() {
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 966f902..d21f76d 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -30,6 +30,7 @@
import android.os.IBinder;
import android.os.ParcelUuid;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.util.Log;
import com.android.internal.annotations.GuardedBy;
@@ -270,7 +271,7 @@
ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
intent.setComponent(comp);
if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
- mContext.getUser())) {
+ UserHandle.CURRENT_OR_SELF)) {
Log.e(TAG, "Could not bind to Bluetooth A2DP Service with " + intent);
return false;
}
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 3c22905..4c655b5 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -446,6 +446,12 @@
*/
public static final int IO_CAPABILITY_UNKNOWN = 255;
+ /** @hide */
+ @IntDef({IO_CAPABILITY_OUT, IO_CAPABILITY_IO, IO_CAPABILITY_IN, IO_CAPABILITY_NONE,
+ IO_CAPABILITY_KBDISP})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface IoCapability {}
+
/**
* Broadcast Action: The local Bluetooth adapter has started the remote
* device discovery process.
@@ -1292,6 +1298,7 @@
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+ @IoCapability
public int getIoCapability() {
if (getState() != STATE_ON) return BluetoothAdapter.IO_CAPABILITY_UNKNOWN;
try {
@@ -1319,7 +1326,7 @@
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
- public boolean setIoCapability(int capability) {
+ public boolean setIoCapability(@IoCapability int capability) {
if (getState() != STATE_ON) return false;
try {
mServiceLock.readLock().lock();
@@ -1342,6 +1349,7 @@
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+ @IoCapability
public int getLeIoCapability() {
if (getState() != STATE_ON) return BluetoothAdapter.IO_CAPABILITY_UNKNOWN;
try {
@@ -1369,7 +1377,7 @@
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
- public boolean setLeIoCapability(int capability) {
+ public boolean setLeIoCapability(@IoCapability int capability) {
if (getState() != STATE_ON) return false;
try {
mServiceLock.readLock().lock();
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/bluetooth/le/BluetoothLeScanner.java b/core/java/android/bluetooth/le/BluetoothLeScanner.java
index f5e2a09..ac126ae 100644
--- a/core/java/android/bluetooth/le/BluetoothLeScanner.java
+++ b/core/java/android/bluetooth/le/BluetoothLeScanner.java
@@ -275,7 +275,9 @@
}
/**
- * Stops an ongoing Bluetooth LE scan started using a PendingIntent.
+ * Stops an ongoing Bluetooth LE scan started using a PendingIntent. When creating the
+ * PendingIntent parameter, please do not use the FLAG_CANCEL_CURRENT flag. Otherwise, the stop
+ * scan may have no effect.
*
* @param callbackIntent The PendingIntent that was used to start the scan.
* @see #startScan(List, ScanSettings, PendingIntent)
diff --git a/core/java/android/companion/AssociationRequest.java b/core/java/android/companion/AssociationRequest.java
index 922224a..db54f08 100644
--- a/core/java/android/companion/AssociationRequest.java
+++ b/core/java/android/companion/AssociationRequest.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 android.provider.OneTimeUseBuilder;
@@ -59,12 +60,14 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isSingleDevice() {
return mSingleDevice;
}
/** @hide */
@NonNull
+ @UnsupportedAppUsage
public List<DeviceFilter<?>> getDeviceFilters() {
return mDeviceFilters;
}
diff --git a/core/java/android/companion/BluetoothDeviceFilter.java b/core/java/android/companion/BluetoothDeviceFilter.java
index 84e1536..7507e17 100644
--- a/core/java/android/companion/BluetoothDeviceFilter.java
+++ b/core/java/android/companion/BluetoothDeviceFilter.java
@@ -25,6 +25,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.bluetooth.BluetoothDevice;
import android.os.Parcel;
import android.os.ParcelUuid;
@@ -99,6 +100,7 @@
/** @hide */
@Nullable
+ @UnsupportedAppUsage
public String getAddress() {
return mAddress;
}
diff --git a/core/java/android/companion/BluetoothDeviceFilterUtils.java b/core/java/android/companion/BluetoothDeviceFilterUtils.java
index 4ee38fe..bd507a6 100644
--- a/core/java/android/companion/BluetoothDeviceFilterUtils.java
+++ b/core/java/android/companion/BluetoothDeviceFilterUtils.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.le.ScanFilter;
import android.net.wifi.ScanResult;
@@ -124,14 +125,17 @@
Log.i(LOG_TAG, getDeviceDisplayNameInternal(device) + (result ? " ~ " : " !~ ") + criteria);
}
+ @UnsupportedAppUsage
public static String getDeviceDisplayNameInternal(@NonNull BluetoothDevice device) {
return firstNotEmpty(device.getAliasName(), device.getAddress());
}
+ @UnsupportedAppUsage
public static String getDeviceDisplayNameInternal(@NonNull ScanResult device) {
return firstNotEmpty(device.SSID, device.BSSID);
}
+ @UnsupportedAppUsage
public static String getDeviceMacAddress(@NonNull Parcelable device) {
if (device instanceof BluetoothDevice) {
return ((BluetoothDevice) device).getAddress();
diff --git a/core/java/android/companion/BluetoothLeDeviceFilter.java b/core/java/android/companion/BluetoothLeDeviceFilter.java
index 7fb768c..1de931e 100644
--- a/core/java/android/companion/BluetoothLeDeviceFilter.java
+++ b/core/java/android/companion/BluetoothLeDeviceFilter.java
@@ -25,6 +25,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.le.ScanFilter;
import android.bluetooth.le.ScanRecord;
@@ -92,6 +93,7 @@
/** @hide */
@NonNull
+ @UnsupportedAppUsage
public ScanFilter getScanFilter() {
return mScanFilter;
}
diff --git a/core/java/android/companion/DeviceFilter.java b/core/java/android/companion/DeviceFilter.java
index 10135a4..dc7cf82 100644
--- a/core/java/android/companion/DeviceFilter.java
+++ b/core/java/android/companion/DeviceFilter.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import java.lang.annotation.Retention;
@@ -44,9 +45,11 @@
*
* @hide
*/
+ @UnsupportedAppUsage
boolean matches(D device);
/** @hide */
+ @UnsupportedAppUsage
String getDeviceDisplayName(D device);
/** @hide */
diff --git a/core/java/android/content/AsyncTaskLoader.java b/core/java/android/content/AsyncTaskLoader.java
index c44e356..bb7d5e4 100644
--- a/core/java/android/content/AsyncTaskLoader.java
+++ b/core/java/android/content/AsyncTaskLoader.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.os.AsyncTask;
import android.os.Handler;
import android.os.OperationCanceledException;
@@ -128,6 +129,7 @@
}
}
+ @UnsupportedAppUsage
private final Executor mExecutor;
volatile LoadTask mTask;
@@ -354,6 +356,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void waitForLoader() {
LoadTask task = mTask;
if (task != null) {
diff --git a/core/java/android/content/BroadcastReceiver.java b/core/java/android/content/BroadcastReceiver.java
index 58a9183..b55fe76 100644
--- a/core/java/android/content/BroadcastReceiver.java
+++ b/core/java/android/content/BroadcastReceiver.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.IActivityManager;
@@ -43,6 +44,7 @@
*
*/
public abstract class BroadcastReceiver {
+ @UnsupportedAppUsage
private PendingResult mPendingResult;
private boolean mDebugUnregister;
@@ -69,20 +71,32 @@
/** @hide */
public static final int TYPE_UNREGISTERED = 2;
+ @UnsupportedAppUsage
final int mType;
+ @UnsupportedAppUsage
final boolean mOrderedHint;
+ @UnsupportedAppUsage
final boolean mInitialStickyHint;
+ @UnsupportedAppUsage
final IBinder mToken;
+ @UnsupportedAppUsage
final int mSendingUser;
+ @UnsupportedAppUsage
final int mFlags;
+ @UnsupportedAppUsage
int mResultCode;
+ @UnsupportedAppUsage
String mResultData;
+ @UnsupportedAppUsage
Bundle mResultExtras;
+ @UnsupportedAppUsage
boolean mAbortBroadcast;
+ @UnsupportedAppUsage
boolean mFinished;
/** @hide */
+ @UnsupportedAppUsage
public PendingResult(int resultCode, String resultData, Bundle resultExtras, int type,
boolean ordered, boolean sticky, IBinder token, int userId, int flags) {
mResultCode = resultCode;
@@ -595,6 +609,7 @@
/**
* For internal use to set the result data that is active. @hide
*/
+ @UnsupportedAppUsage
public final void setPendingResult(PendingResult result) {
mPendingResult = result;
}
@@ -602,6 +617,7 @@
/**
* For internal use to set the result data that is active. @hide
*/
+ @UnsupportedAppUsage
public final PendingResult getPendingResult() {
return mPendingResult;
}
diff --git a/core/java/android/content/ClipData.java b/core/java/android/content/ClipData.java
index 94e1e2d..2b7ea66 100644
--- a/core/java/android/content/ClipData.java
+++ b/core/java/android/content/ClipData.java
@@ -21,6 +21,7 @@
import static android.content.ContentResolver.SCHEME_CONTENT;
import static android.content.ContentResolver.SCHEME_FILE;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetFileDescriptor;
import android.graphics.Bitmap;
import android.net.Uri;
@@ -197,6 +198,7 @@
final CharSequence mText;
final String mHtmlText;
final Intent mIntent;
+ @UnsupportedAppUsage
Uri mUri;
/** @hide */
@@ -912,6 +914,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public Bitmap getIcon() {
return mIcon;
}
diff --git a/core/java/android/content/ClipboardManager.java b/core/java/android/content/ClipboardManager.java
index 73b6eb2..3fe17840 100644
--- a/core/java/android/content/ClipboardManager.java
+++ b/core/java/android/content/ClipboardManager.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -82,6 +83,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public ClipboardManager(Context context, Handler handler) throws ServiceNotFoundException {
mContext = context;
mHandler = handler;
@@ -93,6 +95,9 @@
* Sets the current primary clip on the clipboard. This is the clip that
* is involved in normal cut and paste operations.
*
+ * <em>If the application is not the default IME or does not have input focus this will have
+ * no effect.</em>
+ *
* @param clip The clipped data item to set.
* @see #getPrimaryClip()
* @see #clearPrimaryClip()
@@ -110,6 +115,9 @@
/**
* Clears any current primary clip on the clipboard.
*
+ * <em>If the application is not the default IME or does not have input focus this will have
+ * no effect.</em>
+ *
* @see #setPrimaryClip(ClipData)
*/
public void clearPrimaryClip() {
@@ -123,6 +131,9 @@
/**
* Returns the current primary clip on the clipboard.
*
+ * <em>If the application is not the default IME or does not have input focus this return
+ * {@code null}.</em>
+ *
* @see #setPrimaryClip(ClipData)
*/
public @Nullable ClipData getPrimaryClip() {
@@ -137,6 +148,9 @@
* Returns a description of the current primary clip on the clipboard
* but not a copy of its data.
*
+ * <em>If the application is not the default IME or does not have input focus this return
+ * {@code null}.</em>
+ *
* @see #setPrimaryClip(ClipData)
*/
public @Nullable ClipDescription getPrimaryClipDescription() {
@@ -149,6 +163,9 @@
/**
* Returns true if there is currently a primary clip on the clipboard.
+ *
+ * <em>If the application is not the default IME or the does not have input focus this will
+ * return {@code false}.</em>
*/
public boolean hasPrimaryClip() {
try {
@@ -221,6 +238,7 @@
}
}
+ @UnsupportedAppUsage
void reportPrimaryClipChanged() {
Object[] listeners;
diff --git a/core/java/android/content/ComponentName.java b/core/java/android/content/ComponentName.java
index fc58533..54e6342 100644
--- a/core/java/android/content/ComponentName.java
+++ b/core/java/android/content/ComponentName.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 android.text.TextUtils;
@@ -229,12 +230,14 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void appendShortString(StringBuilder sb, String packageName, String className) {
sb.append(packageName).append('/');
appendShortClassName(sb, packageName, className);
}
/** @hide */
+ @UnsupportedAppUsage
public static void printShortString(PrintWriter pw, String packageName, String className) {
pw.print(packageName);
pw.print('/');
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index cdeaea3..085d77d 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -21,9 +21,11 @@
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;
+import android.annotation.UnsupportedAppUsage;
import android.app.AppOpsManager;
import android.content.pm.PathPermission;
import android.content.pm.ProviderInfo;
@@ -42,6 +44,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;
@@ -105,15 +108,21 @@
* MockContentProvider.
*/
+ @UnsupportedAppUsage
private Context mContext = null;
private int mMyUid;
// Since most Providers have only one authority, we keep both a String and a String[] to improve
// performance.
+ @UnsupportedAppUsage
private String mAuthority;
+ @UnsupportedAppUsage
private String[] mAuthorities;
+ @UnsupportedAppUsage
private String mReadPermission;
+ @UnsupportedAppUsage
private String mWritePermission;
+ @UnsupportedAppUsage
private PathPermission[] mPathPermissions;
private boolean mExported;
private boolean mNoPerms;
@@ -154,6 +163,7 @@
* in the test, which is available via {@link #getPathPermissions()}.
* @hide
*/
+ @UnsupportedAppUsage
public ContentProvider(
Context context,
String readPermission,
@@ -178,6 +188,7 @@
* ContentProvider instance. Otherwise returns {@code null}.
* @hide
*/
+ @UnsupportedAppUsage
public static ContentProvider coerceToLocalContentProvider(
IContentProvider abstractInterface) {
if (abstractInterface instanceof Transport) {
@@ -235,6 +246,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 +254,7 @@
CancellationSignal.fromTransport(cancellationSignal));
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -249,7 +262,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 +278,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 +295,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 +334,7 @@
}
}
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "applyBatch");
final String original = setCallingPackage(callingPkg);
try {
ContentProviderResult[] results = ContentProvider.this.applyBatch(operations);
@@ -326,6 +349,7 @@
return results;
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -336,11 +360,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 +378,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 +395,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 +413,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 +428,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 +442,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 +457,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 +481,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 +499,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 +517,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);
}
}
@@ -849,6 +896,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final void setAppOps(int readOp, int writeOp) {
if (!mNoPerms) {
mTransport.mReadOp = readOp;
@@ -1868,6 +1916,7 @@
* @return the Binder object for this provider
* @hide
*/
+ @UnsupportedAppUsage
public IContentProvider getIContentProvider() {
return mTransport;
}
@@ -1877,6 +1926,7 @@
* when directly instantiating the provider for testing.
* @hide
*/
+ @UnsupportedAppUsage
public void attachInfoForTesting(Context context, ProviderInfo info) {
attachInfo(context, info, true);
}
@@ -2096,6 +2146,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static Uri maybeAddUserId(Uri uri, int userId) {
if (uri == null) return null;
if (userId != UserHandle.USER_CURRENT
diff --git a/core/java/android/content/ContentProviderClient.java b/core/java/android/content/ContentProviderClient.java
index 9d8c318..04be572 100644
--- a/core/java/android/content/ContentProviderClient.java
+++ b/core/java/android/content/ContentProviderClient.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetFileDescriptor;
import android.database.CrossProcessCursorWrapper;
import android.database.Cursor;
@@ -70,7 +71,9 @@
private static Handler sAnrHandler;
private final ContentResolver mContentResolver;
+ @UnsupportedAppUsage
private final IContentProvider mContentProvider;
+ @UnsupportedAppUsage
private final String mPackageName;
private final boolean mStable;
diff --git a/core/java/android/content/ContentProviderNative.java b/core/java/android/content/ContentProviderNative.java
index d428a3a..6bede13 100644
--- a/core/java/android/content/ContentProviderNative.java
+++ b/core/java/android/content/ContentProviderNative.java
@@ -17,6 +17,7 @@
package android.content;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetFileDescriptor;
import android.database.BulkCursorDescriptor;
import android.database.BulkCursorToCursorAdaptor;
@@ -50,6 +51,7 @@
* Cast a Binder object into a content resolver interface, generating
* a proxy if needed.
*/
+ @UnsupportedAppUsage
static public IContentProvider asInterface(IBinder obj)
{
if (obj == null) {
diff --git a/core/java/android/content/ContentProviderOperation.java b/core/java/android/content/ContentProviderOperation.java
index 8f3a317..e3d9b19 100644
--- a/core/java/android/content/ContentProviderOperation.java
+++ b/core/java/android/content/ContentProviderOperation.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProvider;
import android.database.Cursor;
import android.net.Uri;
@@ -35,16 +36,22 @@
*/
public class ContentProviderOperation implements Parcelable {
/** @hide exposed for unit tests */
+ @UnsupportedAppUsage
public final static int TYPE_INSERT = 1;
/** @hide exposed for unit tests */
+ @UnsupportedAppUsage
public final static int TYPE_UPDATE = 2;
/** @hide exposed for unit tests */
+ @UnsupportedAppUsage
public final static int TYPE_DELETE = 3;
/** @hide exposed for unit tests */
public final static int TYPE_ASSERT = 4;
+ @UnsupportedAppUsage
private final int mType;
+ @UnsupportedAppUsage
private final Uri mUri;
+ @UnsupportedAppUsage
private final String mSelection;
private final String[] mSelectionArgs;
private final ContentValues mValues;
@@ -218,6 +225,7 @@
}
/** @hide exposed for unit tests */
+ @UnsupportedAppUsage
public int getType() {
return mType;
}
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 0ca7dae..5867a9c 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -22,6 +22,7 @@
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.app.ActivityThread;
@@ -437,6 +438,7 @@
public static final String ANY_CURSOR_ITEM_TYPE = "vnd.android.cursor.item/*";
/** @hide */
+ @UnsupportedAppUsage
public static final int SYNC_ERROR_SYNC_ALREADY_IN_PROGRESS = 1;
/** @hide */
public static final int SYNC_ERROR_AUTHENTICATION = 2;
@@ -493,6 +495,7 @@
public static final int SYNC_OBSERVER_TYPE_PENDING = 1<<1;
public static final int SYNC_OBSERVER_TYPE_ACTIVE = 1<<2;
/** @hide */
+ @UnsupportedAppUsage
public static final int SYNC_OBSERVER_TYPE_STATUS = 1<<3;
/** @hide */
public static final int SYNC_OBSERVER_TYPE_ALL = 0x7fffffff;
@@ -575,6 +578,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
protected abstract IContentProvider acquireProvider(Context c, String name);
/**
@@ -584,17 +588,22 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected IContentProvider acquireExistingProvider(Context c, String name) {
return acquireProvider(c, name);
}
/** @hide */
+ @UnsupportedAppUsage
public abstract boolean releaseProvider(IContentProvider icp);
/** @hide */
+ @UnsupportedAppUsage
protected abstract IContentProvider acquireUnstableProvider(Context c, String name);
/** @hide */
+ @UnsupportedAppUsage
public abstract boolean releaseUnstableProvider(IContentProvider icp);
/** @hide */
+ @UnsupportedAppUsage
public abstract void unstableProviderDied(IContentProvider icp);
/** @hide */
@@ -1528,7 +1537,9 @@
* @hide
*/
public class OpenResourceIdResult {
+ @UnsupportedAppUsage
public Resources r;
+ @UnsupportedAppUsage
public int id;
}
@@ -1537,6 +1548,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public OpenResourceIdResult getResourceId(Uri uri) throws FileNotFoundException {
String authority = uri.getAuthority();
Resources r;
@@ -1782,6 +1794,7 @@
* @return The ContentProvider for the given URI, or null if no content provider is found.
* @hide
*/
+ @UnsupportedAppUsage
public final IContentProvider acquireProvider(Uri uri) {
if (!SCHEME_CONTENT.equals(uri.getScheme())) {
return null;
@@ -1801,6 +1814,7 @@
* @return The ContentProvider for the given URI, or null if no content provider is found.
* @hide
*/
+ @UnsupportedAppUsage
public final IContentProvider acquireExistingProvider(Uri uri) {
if (!SCHEME_CONTENT.equals(uri.getScheme())) {
return null;
@@ -1815,6 +1829,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final IContentProvider acquireProvider(String name) {
if (name == null) {
return null;
@@ -1843,6 +1858,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final IContentProvider acquireUnstableProvider(String name) {
if (name == null) {
return null;
@@ -1976,6 +1992,7 @@
}
/** @hide - designated user version */
+ @UnsupportedAppUsage
public final void registerContentObserver(Uri uri, boolean notifyForDescendents,
ContentObserver observer, @UserIdInt int userHandle) {
try {
@@ -2155,6 +2172,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void takePersistableUriPermission(@NonNull String toPackage, @NonNull Uri uri,
@Intent.AccessUriMode int modeFlags) {
Preconditions.checkNotNull(toPackage, "toPackage");
@@ -2789,6 +2807,7 @@
* @return the SyncStatusInfo for the authority, or null if none exists
* @hide
*/
+ @UnsupportedAppUsage
public static SyncStatusInfo getSyncStatus(Account account, String authority) {
try {
return getContentService().getSyncStatus(account, authority, null);
@@ -2801,6 +2820,7 @@
* @see #getSyncStatus(Account, String)
* @hide
*/
+ @UnsupportedAppUsage
public static SyncStatusInfo getSyncStatusAsUser(Account account, String authority,
@UserIdInt int userId) {
try {
@@ -3043,6 +3063,7 @@
public static final String CONTENT_SERVICE_NAME = "content";
/** @hide */
+ @UnsupportedAppUsage
public static IContentService getContentService() {
if (sContentService != null) {
return sContentService;
@@ -3053,13 +3074,17 @@
}
/** @hide */
+ @UnsupportedAppUsage
public String getPackageName() {
return mPackageName;
}
+ @UnsupportedAppUsage
private static volatile IContentService sContentService;
+ @UnsupportedAppUsage
private final Context mContext;
+ @UnsupportedAppUsage
final String mPackageName;
final int mTargetSdkVersion;
diff --git a/core/java/android/content/ContentValues.java b/core/java/android/content/ContentValues.java
index 93fa403..06d0f66 100644
--- a/core/java/android/content/ContentValues.java
+++ b/core/java/android/content/ContentValues.java
@@ -16,14 +16,18 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.ArrayMap;
import android.util.Log;
+import com.android.internal.util.Preconditions;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
/**
@@ -38,6 +42,7 @@
* @deprecated kept around for lame people doing reflection
*/
@Deprecated
+ @UnsupportedAppUsage
private HashMap<String, Object> mValues;
private final ArrayMap<String, Object> mMap;
@@ -55,6 +60,7 @@
* @param size the initial size of the set of values
*/
public ContentValues(int size) {
+ Preconditions.checkArgumentNonnegative(size);
mMap = new ArrayMap<>(size);
}
@@ -64,6 +70,7 @@
* @param from the values to copy
*/
public ContentValues(ContentValues from) {
+ Objects.requireNonNull(from);
mMap = new ArrayMap<>(from.mMap);
}
@@ -72,6 +79,7 @@
* @deprecated kept around for lame people doing reflection
*/
@Deprecated
+ @UnsupportedAppUsage
private ContentValues(HashMap<String, Object> from) {
mMap = new ArrayMap<>();
mMap.putAll(from);
@@ -518,6 +526,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public void putStringArrayList(String key, ArrayList<String> value) {
mMap.put(key, value);
}
@@ -528,6 +537,7 @@
*/
@SuppressWarnings("unchecked")
@Deprecated
+ @UnsupportedAppUsage
public ArrayList<String> getStringArrayList(String key) {
return (ArrayList<String>) mMap.get(key);
}
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 6abe777..a352e84 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -31,6 +31,7 @@
import android.annotation.StyleableRes;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.app.IApplicationThread;
@@ -654,6 +655,7 @@
/** @hide Needed for some internal implementation... not public because
* you can't assume this actually means anything. */
+ @UnsupportedAppUsage
public int getThemeResId() {
return 0;
}
@@ -722,6 +724,7 @@
public abstract String getPackageName();
/** @hide Return the name of the base context this context is derived from. */
+ @UnsupportedAppUsage
public abstract String getBasePackageName();
/** @hide Return the package name that should be used for app ops calls from
@@ -764,6 +767,7 @@
* @deprecated use {@link #getSharedPreferencesPath(String)}
*/
@Deprecated
+ @UnsupportedAppUsage
public File getSharedPrefsFile(String name) {
return getSharedPreferencesPath(name);
}
@@ -1697,6 +1701,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
+ @UnsupportedAppUsage
public void startActivityAsUser(@RequiresPermission Intent intent, UserHandle user) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
}
@@ -1743,6 +1748,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
+ @UnsupportedAppUsage
public void startActivityAsUser(@RequiresPermission Intent intent, @Nullable Bundle options,
UserHandle userId) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
@@ -1761,6 +1767,7 @@
* for building it manually.
* @hide
*/
+ @UnsupportedAppUsage
public void startActivityForResult(
@NonNull String who, Intent intent, int requestCode, @Nullable Bundle options) {
throw new RuntimeException("This method is only implemented for Activity-based Contexts. "
@@ -1772,6 +1779,7 @@
* {@link #startActivityForResult(String, Intent, int, Bundle)}.
* @hide
*/
+ @UnsupportedAppUsage
public boolean canStartActivityForResult() {
return false;
}
@@ -2039,6 +2047,7 @@
* of an associated app op as per {@link android.app.AppOpsManager}.
* @hide
*/
+ @UnsupportedAppUsage
public abstract void sendBroadcast(Intent intent,
String receiverPermission, int appOp);
@@ -2165,6 +2174,7 @@
* of an associated app op as per {@link android.app.AppOpsManager}.
* @hide
*/
+ @UnsupportedAppUsage
public abstract void sendOrderedBroadcast(Intent intent,
String receiverPermission, int appOp, BroadcastReceiver resultReceiver,
Handler scheduler, int initialCode, String initialData,
@@ -2240,6 +2250,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)
+ @UnsupportedAppUsage
public abstract void sendBroadcastAsUser(@RequiresPermission Intent intent,
UserHandle user, @Nullable String receiverPermission, int appOp);
@@ -2285,6 +2296,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)
+ @UnsupportedAppUsage
public abstract void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
@Nullable String receiverPermission, int appOp, BroadcastReceiver resultReceiver,
@Nullable Handler scheduler, int initialCode, @Nullable String initialData,
@@ -2297,6 +2309,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)
+ @UnsupportedAppUsage
public abstract void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
@Nullable String receiverPermission, int appOp, @Nullable Bundle options,
BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode,
@@ -2689,6 +2702,7 @@
*/
@Nullable
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
+ @UnsupportedAppUsage
public abstract Intent registerReceiverAsUser(BroadcastReceiver receiver,
UserHandle user, IntentFilter filter, @Nullable String broadcastPermission,
@Nullable Handler scheduler);
@@ -2836,6 +2850,7 @@
*/
@Nullable
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)
+ @UnsupportedAppUsage
public abstract ComponentName startServiceAsUser(Intent service, UserHandle user);
/**
@@ -2923,6 +2938,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)
+ @UnsupportedAppUsage
public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
Handler handler, UserHandle user) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
@@ -3415,6 +3431,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String COUNTRY_DETECTOR = "country_detector";
/**
@@ -3484,6 +3501,7 @@
* @see android.app.StatusBarManager
* @hide
*/
+ @UnsupportedAppUsage
public static final String STATUS_BAR_SERVICE = "statusbar";
/**
@@ -3630,6 +3648,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ETHERNET_SERVICE = "ethernet";
/**
@@ -4285,6 +4304,7 @@
/** @hide */
@PackageManager.PermissionResult
+ @UnsupportedAppUsage
public abstract int checkPermission(@NonNull String permission, int pid, int uid,
IBinder callerToken);
@@ -4777,6 +4797,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public abstract Context createApplicationContext(ApplicationInfo application,
@CreatePackageOptions int flags) throws PackageManager.NameNotFoundException;
@@ -4922,6 +4943,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public abstract Display getDisplay();
/**
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index bae99b8..1cc398e 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.IApplicationThread;
import android.app.IServiceConnection;
import android.content.pm.ApplicationInfo;
@@ -54,6 +55,7 @@
* the original Context.
*/
public class ContextWrapper extends Context {
+ @UnsupportedAppUsage
Context mBase;
public ContextWrapper(Context base) {
@@ -123,6 +125,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public int getThemeResId() {
return mBase.getThemeResId();
}
@@ -144,6 +147,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public String getBasePackageName() {
return mBase.getBasePackageName();
}
@@ -381,6 +385,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public void startActivityAsUser(Intent intent, UserHandle user) {
mBase.startActivityAsUser(intent, user);
}
@@ -647,6 +652,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public Intent registerReceiverAsUser(
BroadcastReceiver receiver, UserHandle user, IntentFilter filter,
String broadcastPermission, Handler scheduler) {
@@ -676,12 +682,14 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public ComponentName startServiceAsUser(Intent service, UserHandle user) {
return mBase.startServiceAsUser(service, user);
}
/** @hide */
@Override
+ @UnsupportedAppUsage
public ComponentName startForegroundServiceAsUser(Intent service, UserHandle user) {
return mBase.startForegroundServiceAsUser(service, user);
}
@@ -861,6 +869,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public Context createApplicationContext(ApplicationInfo application,
int flags) throws PackageManager.NameNotFoundException {
return mBase.createApplicationContext(application, flags);
@@ -904,6 +913,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public Display getDisplay() {
return mBase.getDisplay();
}
diff --git a/core/java/android/content/CursorEntityIterator.java b/core/java/android/content/CursorEntityIterator.java
index 18437e5..2c630d2 100644
--- a/core/java/android/content/CursorEntityIterator.java
+++ b/core/java/android/content/CursorEntityIterator.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.database.Cursor;
import android.os.RemoteException;
@@ -33,6 +34,7 @@
* first Entity, if there are any.
* @param cursor the cursor that contains the rows that make up the entities
*/
+ @UnsupportedAppUsage
public CursorEntityIterator(Cursor cursor) {
mIsClosed = false;
mCursor = cursor;
diff --git a/core/java/android/content/CursorLoader.java b/core/java/android/content/CursorLoader.java
index 5a08636..4e46d571 100644
--- a/core/java/android/content/CursorLoader.java
+++ b/core/java/android/content/CursorLoader.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.database.Cursor;
import android.net.Uri;
import android.os.CancellationSignal;
@@ -44,6 +45,7 @@
*/
@Deprecated
public class CursorLoader extends AsyncTaskLoader<Cursor> {
+ @UnsupportedAppUsage
final ForceLoadContentObserver mObserver;
Uri mUri;
@@ -53,6 +55,7 @@
String mSortOrder;
Cursor mCursor;
+ @UnsupportedAppUsage
CancellationSignal mCancellationSignal;
/* Runs on a worker thread */
diff --git a/core/java/android/content/Entity.java b/core/java/android/content/Entity.java
index 607cb3f..b9473e0 100644
--- a/core/java/android/content/Entity.java
+++ b/core/java/android/content/Entity.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import java.util.ArrayList;
@@ -28,7 +29,9 @@
* corresponds to that RawContact. The uri refers to the Data table uri for each row.
*/
public final class Entity {
+ @UnsupportedAppUsage
final private ContentValues mValues;
+ @UnsupportedAppUsage
final private ArrayList<NamedContentValues> mSubValues;
public Entity(ContentValues values) {
diff --git a/core/java/android/content/IContentProvider.java b/core/java/android/content/IContentProvider.java
index 66087fb..d814e67 100644
--- a/core/java/android/content/IContentProvider.java
+++ b/core/java/android/content/IContentProvider.java
@@ -17,6 +17,7 @@
package android.content;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.net.Uri;
@@ -39,12 +40,16 @@
@Nullable Bundle queryArgs, @Nullable ICancellationSignal cancellationSignal)
throws RemoteException;
public String getType(Uri url) throws RemoteException;
+ @UnsupportedAppUsage
public Uri insert(String callingPkg, Uri url, ContentValues initialValues)
throws RemoteException;
+ @UnsupportedAppUsage
public int bulkInsert(String callingPkg, Uri url, ContentValues[] initialValues)
throws RemoteException;
+ @UnsupportedAppUsage
public int delete(String callingPkg, Uri url, String selection, String[] selectionArgs)
throws RemoteException;
+ @UnsupportedAppUsage
public int update(String callingPkg, Uri url, ContentValues values, String selection,
String[] selectionArgs) throws RemoteException;
public ParcelFileDescriptor openFile(
@@ -57,6 +62,7 @@
public ContentProviderResult[] applyBatch(String callingPkg,
ArrayList<ContentProviderOperation> operations)
throws RemoteException, OperationApplicationException;
+ @UnsupportedAppUsage
public Bundle call(
String callingPkg, String method, @Nullable String arg, @Nullable Bundle extras)
throws RemoteException;
@@ -74,8 +80,10 @@
Bundle opts, ICancellationSignal signal) throws RemoteException, FileNotFoundException;
/* IPC constants */
+ @UnsupportedAppUsage
static final String descriptor = "android.content.IContentProvider";
+ @UnsupportedAppUsage
static final int QUERY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION;
static final int GET_TYPE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 1;
static final int INSERT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 2;
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 78738e9..8c2b76f 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -26,6 +26,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ComponentInfo;
@@ -2027,6 +2028,7 @@
* @hide
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @UnsupportedAppUsage
public static final String ACTION_ALARM_CHANGED = "android.intent.action.ALARM_CHANGED";
/**
@@ -2248,6 +2250,7 @@
* <p>Includes the following extras:
* <ul>
* <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages which have been suspended
+ * <li> {@link #EXTRA_CHANGED_UID_LIST} is the set of uids which have been suspended
* </ul>
*
* <p class="note">This is a protected intent that can only be sent
@@ -2260,6 +2263,7 @@
* <p>Includes the following extras:
* <ul>
* <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages which have been unsuspended
+ * <li> {@link #EXTRA_CHANGED_UID_LIST} is the set of uids which have been unsuspended
* </ul>
*
* <p class="note">This is a protected intent that can only be sent
@@ -3254,6 +3258,7 @@
* {@link android.Manifest.permission#MANAGE_USERS} to receive this broadcast.
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACTION_USER_SWITCHED =
"android.intent.action.USER_SWITCHED";
@@ -5740,6 +5745,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT = 0x04000000;
/**
* Set when this broadcast is for a boot upgrade, a special mode that
@@ -5906,6 +5912,7 @@
private ComponentName mComponent;
private int mFlags;
private ArraySet<String> mCategories;
+ @UnsupportedAppUsage
private Bundle mExtras;
private Rect mSourceBounds;
private Intent mSelector;
@@ -6573,6 +6580,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static Intent parseCommandArgs(ShellCommand cmd, CommandOptionHandler optionHandler)
throws URISyntaxException {
Intent intent = new Intent();
@@ -6957,6 +6965,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void printIntentArgsHelp(PrintWriter pw, String prefix) {
final String[] lines = new String[] {
"<INTENT> specifications include these flags and arguments:",
@@ -7234,6 +7243,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void setAllowFds(boolean allowFds) {
if (mExtras != null) {
mExtras.setAllowFds(allowFds);
@@ -7259,6 +7269,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public Object getExtra(String name) {
return getExtra(name, null);
}
@@ -7697,6 +7708,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public IBinder getIBinderExtra(String name) {
return mExtras == null ? null : mExtras.getIBinder(name);
}
@@ -7717,6 +7729,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public Object getExtra(String name, Object defaultValue) {
Object result = defaultValue;
if (mExtras != null) {
@@ -7789,6 +7802,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isExcludingStopped() {
return (mFlags&(FLAG_EXCLUDE_STOPPED_PACKAGES|FLAG_INCLUDE_STOPPED_PACKAGES))
== FLAG_EXCLUDE_STOPPED_PACKAGES;
@@ -7938,6 +7952,7 @@
* there are no matches.
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable ComponentName resolveSystemService(@NonNull PackageManager pm,
@PackageManager.ComponentInfoFlags int flags) {
if (mComponent != null) {
@@ -8947,6 +8962,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public @NonNull Intent putExtra(String name, IBinder value) {
if (mExtras == null) {
mExtras = new Bundle();
@@ -9514,6 +9530,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public String toInsecureString() {
StringBuilder b = new StringBuilder(128);
@@ -10163,6 +10180,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void prepareToLeaveProcess(Context context) {
final boolean leavingPackage = (mComponent == null)
|| !Objects.equals(mComponent.getPackageName(), context.getPackageName());
diff --git a/core/java/android/content/IntentFilter.java b/core/java/android/content/IntentFilter.java
index cec3bad..212e132 100644
--- a/core/java/android/content/IntentFilter.java
+++ b/core/java/android/content/IntentFilter.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -271,7 +272,9 @@
public static final String SCHEME_HTTPS = "https";
private int mPriority;
+ @UnsupportedAppUsage
private int mOrder;
+ @UnsupportedAppUsage
private final ArrayList<String> mActions;
private ArrayList<String> mCategories = null;
private ArrayList<String> mDataSchemes = null;
@@ -536,6 +539,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final void setAutoVerify(boolean autoVerify) {
mVerifyState &= ~STATE_VERIFY_AUTO;
if (autoVerify) mVerifyState |= STATE_VERIFY_AUTO;
@@ -651,6 +655,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final boolean isVerified() {
if ((mVerifyState & STATE_NEED_VERIFY_CHECKED) == STATE_NEED_VERIFY_CHECKED) {
return ((mVerifyState & STATE_NEED_VERIFY) == STATE_NEED_VERIFY);
@@ -806,6 +811,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final boolean hasExactDataType(String type) {
return mDataTypes != null && mDataTypes.contains(type);
}
@@ -1071,6 +1077,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final boolean hasDataSchemeSpecificPart(PatternMatcher ssp) {
if (mDataSchemeSpecificParts == null) {
return false;
@@ -1154,6 +1161,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final boolean hasDataAuthority(AuthorityEntry auth) {
if (mDataAuthorities == null) {
return false;
@@ -1250,6 +1258,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final boolean hasDataPath(PatternMatcher path) {
if (mDataPaths == null) {
return false;
diff --git a/core/java/android/content/IntentSender.java b/core/java/android/content/IntentSender.java
index ff127df..bfd1a43 100644
--- a/core/java/android/content/IntentSender.java
+++ b/core/java/android/content/IntentSender.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.os.Bundle;
import android.os.RemoteException;
@@ -55,6 +56,7 @@
* {@link android.app.PendingIntent#getIntentSender() PendingIntent.getIntentSender()}.
*/
public class IntentSender implements Parcelable {
+ @UnsupportedAppUsage
private final IIntentSender mTarget;
IBinder mWhitelistToken;
@@ -356,6 +358,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public IIntentSender getTarget() {
return mTarget;
}
@@ -366,6 +369,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public IntentSender(IIntentSender target) {
mTarget = target;
}
diff --git a/core/java/android/content/RestrictionsManager.java b/core/java/android/content/RestrictionsManager.java
index b463ec6..33395ec 100644
--- a/core/java/android/content/RestrictionsManager.java
+++ b/core/java/android/content/RestrictionsManager.java
@@ -17,6 +17,7 @@
package android.content;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.app.admin.DevicePolicyManager;
import android.content.pm.ApplicationInfo;
@@ -402,6 +403,7 @@
private static final String TAG_RESTRICTION = "restriction";
private final Context mContext;
+ @UnsupportedAppUsage
private final IRestrictionsManager mService;
/**
diff --git a/core/java/android/content/SearchRecentSuggestionsProvider.java b/core/java/android/content/SearchRecentSuggestionsProvider.java
index d6f7d97..8ee7b9e 100644
--- a/core/java/android/content/SearchRecentSuggestionsProvider.java
+++ b/core/java/android/content/SearchRecentSuggestionsProvider.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.app.SearchManager;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
@@ -115,6 +116,7 @@
private UriMatcher mUriMatcher;
private String mSuggestSuggestionClause;
+ @UnsupportedAppUsage
private String[] mSuggestionProjection;
/**
diff --git a/core/java/android/content/SyncAdapterType.java b/core/java/android/content/SyncAdapterType.java
index 6ef7fd2..ff77676 100644
--- a/core/java/android/content/SyncAdapterType.java
+++ b/core/java/android/content/SyncAdapterType.java
@@ -17,6 +17,7 @@
package android.content;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.text.TextUtils;
import android.os.Parcelable;
import android.os.Parcel;
@@ -29,10 +30,15 @@
public final String authority;
public final String accountType;
public final boolean isKey;
+ @UnsupportedAppUsage
private final boolean userVisible;
+ @UnsupportedAppUsage
private final boolean supportsUploading;
+ @UnsupportedAppUsage
private final boolean isAlwaysSyncable;
+ @UnsupportedAppUsage
private final boolean allowParallelSyncs;
+ @UnsupportedAppUsage
private final String settingsActivity;
private final String packageName;
@@ -79,6 +85,7 @@
this.packageName = packageName;
}
+ @UnsupportedAppUsage
private SyncAdapterType(String authority, String accountType) {
if (TextUtils.isEmpty(authority)) {
throw new IllegalArgumentException("the authority must not be empty: " + authority);
diff --git a/core/java/android/content/SyncAdaptersCache.java b/core/java/android/content/SyncAdaptersCache.java
index ccd7994..d4e5217 100644
--- a/core/java/android/content/SyncAdaptersCache.java
+++ b/core/java/android/content/SyncAdaptersCache.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.RegisteredServicesCache;
import android.content.pm.XmlSerializerAndParser;
import android.content.res.Resources;
@@ -51,6 +52,7 @@
private SparseArray<ArrayMap<String,String[]>> mAuthorityToSyncAdapters
= new SparseArray<>();
+ @UnsupportedAppUsage
public SyncAdaptersCache(Context context) {
super(context, SERVICE_INTERFACE, SERVICE_META_DATA, ATTRIBUTES_NAME, sSerializer);
}
diff --git a/core/java/android/content/SyncContext.java b/core/java/android/content/SyncContext.java
index cc914c0..50d1dc9 100644
--- a/core/java/android/content/SyncContext.java
+++ b/core/java/android/content/SyncContext.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.IBinder;
@@ -29,6 +30,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public SyncContext(ISyncContext syncContextInterface) {
mSyncContext = syncContextInterface;
mLastHeartbeatSendTime = 0;
@@ -42,6 +44,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setStatusText(String message) {
updateHeartbeat();
}
diff --git a/core/java/android/content/SyncInfo.java b/core/java/android/content/SyncInfo.java
index ab3c30b..7ebf922 100644
--- a/core/java/android/content/SyncInfo.java
+++ b/core/java/android/content/SyncInfo.java
@@ -17,6 +17,7 @@
package android.content;
import android.accounts.Account;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,6 +33,7 @@
private static final Account REDACTED_ACCOUNT = new Account("*****", "*****");
/** @hide */
+ @UnsupportedAppUsage
public final int authorityId;
/**
@@ -63,6 +65,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public SyncInfo(int authorityId, Account account, String authority, long startTime) {
this.authorityId = authorityId;
this.account = account;
@@ -92,6 +95,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
SyncInfo(Parcel parcel) {
authorityId = parcel.readInt();
account = parcel.readParcelable(Account.class.getClassLoader());
@@ -100,6 +104,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static final Creator<SyncInfo> CREATOR = new Creator<SyncInfo>() {
public SyncInfo createFromParcel(Parcel in) {
return new SyncInfo(in);
diff --git a/core/java/android/content/SyncRequest.java b/core/java/android/content/SyncRequest.java
index 74d2f11..fd12d7a 100644
--- a/core/java/android/content/SyncRequest.java
+++ b/core/java/android/content/SyncRequest.java
@@ -17,6 +17,7 @@
package android.content;
import android.accounts.Account;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -29,10 +30,13 @@
public class SyncRequest implements Parcelable {
private static final String TAG = "SyncRequest";
/** Account to pass to the sync adapter. Can be null. */
+ @UnsupportedAppUsage
private final Account mAccountToSync;
/** Authority string that corresponds to a ContentProvider. */
+ @UnsupportedAppUsage
private final String mAuthority;
/** Bundle containing user info as well as sync settings. */
+ @UnsupportedAppUsage
private final Bundle mExtras;
/** Don't allow this sync request on metered networks. */
private final boolean mDisallowMetered;
@@ -44,8 +48,10 @@
/**
* Specifies a point in the future at which the sync must have been scheduled to run.
*/
+ @UnsupportedAppUsage
private final long mSyncRunTimeSecs;
/** Periodic versus one-off. */
+ @UnsupportedAppUsage
private final boolean mIsPeriodic;
/** Service versus provider. */
private final boolean mIsAuthority;
diff --git a/core/java/android/content/SyncStatusInfo.java b/core/java/android/content/SyncStatusInfo.java
index 2d521e9..a9065ca 100644
--- a/core/java/android/content/SyncStatusInfo.java
+++ b/core/java/android/content/SyncStatusInfo.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
@@ -37,6 +38,7 @@
*/
private static final int SOURCE_COUNT = 6;
+ @UnsupportedAppUsage
public final int authorityId;
/**
@@ -117,13 +119,21 @@
public final Stats todayStats = new Stats();
public final Stats yesterdayStats = new Stats();
+ @UnsupportedAppUsage
public long lastSuccessTime;
+ @UnsupportedAppUsage
public int lastSuccessSource;
+ @UnsupportedAppUsage
public long lastFailureTime;
+ @UnsupportedAppUsage
public int lastFailureSource;
+ @UnsupportedAppUsage
public String lastFailureMesg;
+ @UnsupportedAppUsage
public long initialFailureTime;
+ @UnsupportedAppUsage
public boolean pending;
+ @UnsupportedAppUsage
public boolean initialize;
public final long[] perSourceLastSuccessTimes = new long[SOURCE_COUNT];
@@ -131,15 +141,18 @@
// Warning: It is up to the external caller to ensure there are
// no race conditions when accessing this list
+ @UnsupportedAppUsage
private ArrayList<Long> periodicSyncTimes;
private final ArrayList<Long> mLastEventTimes = new ArrayList<>();
private final ArrayList<String> mLastEvents = new ArrayList<>();
+ @UnsupportedAppUsage
public SyncStatusInfo(int authorityId) {
this.authorityId = authorityId;
}
+ @UnsupportedAppUsage
public int getLastFailureMesgAsInt(int def) {
final int i = ContentResolver.syncErrorStringToInt(lastFailureMesg);
if (i > 0) {
@@ -205,6 +218,7 @@
parcel.writeLongArray(perSourceLastFailureTimes);
}
+ @UnsupportedAppUsage
public SyncStatusInfo(Parcel parcel) {
int version = parcel.readInt();
if (version != VERSION && version != 1) {
@@ -309,6 +323,7 @@
System.arraycopy(from, 0, to, 0, to.length);
}
+ @UnsupportedAppUsage
public void setPeriodicSyncTime(int index, long when) {
// The list is initialized lazily when scheduling occurs so we need to make sure
// we initialize elements < index to zero (zero is ignore for scheduling purposes)
@@ -316,6 +331,7 @@
periodicSyncTimes.set(index, when);
}
+ @UnsupportedAppUsage
public long getPeriodicSyncTime(int index) {
if (periodicSyncTimes != null && index < periodicSyncTimes.size()) {
return periodicSyncTimes.get(index);
@@ -324,6 +340,7 @@
}
}
+ @UnsupportedAppUsage
public void removePeriodicSyncTime(int index) {
if (periodicSyncTimes != null && index < periodicSyncTimes.size()) {
periodicSyncTimes.remove(index);
@@ -383,6 +400,7 @@
}
}
+ @UnsupportedAppUsage
public static final Creator<SyncStatusInfo> CREATOR = new Creator<SyncStatusInfo>() {
public SyncStatusInfo createFromParcel(Parcel in) {
return new SyncStatusInfo(in);
@@ -393,6 +411,7 @@
}
};
+ @UnsupportedAppUsage
private void ensurePeriodicSyncTimeSize(int index) {
if (periodicSyncTimes == null) {
periodicSyncTimes = new ArrayList<Long>(0);
diff --git a/core/java/android/content/UndoManager.java b/core/java/android/content/UndoManager.java
index fb21641..f6a0d77 100644
--- a/core/java/android/content/UndoManager.java
+++ b/core/java/android/content/UndoManager.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.ParcelableParcel;
@@ -86,6 +87,7 @@
*/
public static final int MERGE_MODE_ANY = 2;
+ @UnsupportedAppUsage
public UndoOwner getOwner(String tag, Object data) {
if (tag == null) {
throw new NullPointerException("tag can't be null");
@@ -122,6 +124,7 @@
* Flatten the current undo state into a Parcel object, which can later be restored
* with {@link #restoreInstanceState(android.os.Parcel, java.lang.ClassLoader)}.
*/
+ @UnsupportedAppUsage
public void saveInstanceState(Parcel p) {
if (mUpdateCount > 0) {
throw new IllegalStateException("Can't save state while updating");
@@ -170,6 +173,7 @@
* associated with each {@link UndoOwner}, which requires separate calls to
* {@link #getOwner(String, Object)} to re-associate the owner with its data.
*/
+ @UnsupportedAppUsage
public void restoreInstanceState(Parcel p, ClassLoader loader) {
if (mUpdateCount > 0) {
throw new IllegalStateException("Can't save state while updating");
@@ -230,6 +234,7 @@
* @param count Number of undo states to pop.
* @return Returns the number of undo states that were actually popped.
*/
+ @UnsupportedAppUsage
public int undo(UndoOwner[] owners, int count) {
if (mWorking != null) {
throw new IllegalStateException("Can't be called during an update");
@@ -267,6 +272,7 @@
* @param count Number of undo states to pop.
* @return Returns the number of undo states that were actually redone.
*/
+ @UnsupportedAppUsage
public int redo(UndoOwner[] owners, int count) {
if (mWorking != null) {
throw new IllegalStateException("Can't be called during an update");
@@ -295,10 +301,12 @@
* useful for editors to know whether they should be generating new undo state
* when they see edit operations happening.
*/
+ @UnsupportedAppUsage
public boolean isInUndo() {
return mInUndo;
}
+ @UnsupportedAppUsage
public int forgetUndos(UndoOwner[] owners, int count) {
if (count < 0) {
count = mUndos.size();
@@ -320,6 +328,7 @@
return removed;
}
+ @UnsupportedAppUsage
public int forgetRedos(UndoOwner[] owners, int count) {
if (count < 0) {
count = mRedos.size();
@@ -346,6 +355,7 @@
* @param owners If non-null, only those states containing an operation with one of
* the owners supplied here will be counted.
*/
+ @UnsupportedAppUsage
public int countUndos(UndoOwner[] owners) {
if (owners == null) {
return mUndos.size();
@@ -365,6 +375,7 @@
* @param owners If non-null, only those states containing an operation with one of
* the owners supplied here will be counted.
*/
+ @UnsupportedAppUsage
public int countRedos(UndoOwner[] owners) {
if (owners == null) {
return mRedos.size();
@@ -404,6 +415,7 @@
* they are all matched by a later call to {@link #endUpdate}.
* @param label Optional user-visible label for this new undo state.
*/
+ @UnsupportedAppUsage
public void beginUpdate(CharSequence label) {
if (mInUndo) {
throw new IllegalStateException("Can't being update while performing undo/redo");
@@ -436,6 +448,7 @@
* Forcibly set a new for the new undo state being built within a {@link #beginUpdate}.
* Any existing label will be replaced with this one.
*/
+ @UnsupportedAppUsage
public void setUndoLabel(CharSequence label) {
if (mWorking == null) {
throw new IllegalStateException("Must be called during an update");
@@ -510,6 +523,7 @@
* @param mergeMode May be either {@link #MERGE_MODE_NONE}, {@link #MERGE_MODE_UNIQUE},
* or {@link #MERGE_MODE_ANY}.
*/
+ @UnsupportedAppUsage
public <T extends UndoOperation> T getLastOperation(Class<T> clazz, UndoOwner owner,
int mergeMode) {
if (mWorking == null) {
@@ -539,6 +553,7 @@
* @param mergeMode May be either {@link #MERGE_MODE_NONE}, {@link #MERGE_MODE_UNIQUE},
* or {@link #MERGE_MODE_ANY}.
*/
+ @UnsupportedAppUsage
public void addOperation(UndoOperation<?> op, int mergeMode) {
if (mWorking == null) {
throw new IllegalStateException("Must be called during an update");
@@ -565,6 +580,7 @@
* Finish the creation of an undo state, matching a previous call to
* {@link #beginUpdate}.
*/
+ @UnsupportedAppUsage
public void endUpdate() {
if (mWorking == null) {
throw new IllegalStateException("Must be called during an update");
@@ -613,6 +629,7 @@
* @return Returns an integer identifier for the committed undo state, which
* can later be used to try to uncommit the state to perform further edits on it.
*/
+ @UnsupportedAppUsage
public int commitState(UndoOwner owner) {
if (mWorking != null && mWorking.hasData()) {
if (owner == null || mWorking.hasOperation(owner)) {
diff --git a/core/java/android/content/UndoOperation.java b/core/java/android/content/UndoOperation.java
index 1ff32d4..a425486 100644
--- a/core/java/android/content/UndoOperation.java
+++ b/core/java/android/content/UndoOperation.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -34,6 +35,7 @@
* @param owner Who owns the data being modified by this undo state; must be
* returned by {@link UndoManager#getOwner(String, Object) UndoManager.getOwner}.
*/
+ @UnsupportedAppUsage
public UndoOperation(UndoOwner owner) {
mOwner = owner;
}
@@ -41,6 +43,7 @@
/**
* Construct from a Parcel.
*/
+ @UnsupportedAppUsage
protected UndoOperation(Parcel src, ClassLoader loader) {
}
diff --git a/core/java/android/content/UriMatcher.java b/core/java/android/content/UriMatcher.java
index 8db82a8..208bc01 100644
--- a/core/java/android/content/UriMatcher.java
+++ b/core/java/android/content/UriMatcher.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import java.util.ArrayList;
@@ -277,6 +278,8 @@
private int mCode;
private final int mWhich;
+ @UnsupportedAppUsage
private final String mText;
+ @UnsupportedAppUsage
private ArrayList<UriMatcher> mChildren;
}
diff --git a/core/java/android/content/om/OverlayInfo.java b/core/java/android/content/om/OverlayInfo.java
index edacbb0..07b23d1 100644
--- a/core/java/android/content/om/OverlayInfo.java
+++ b/core/java/android/content/om/OverlayInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -107,11 +108,13 @@
/**
* Package name of the overlay package
*/
+ @UnsupportedAppUsage
public final String packageName;
/**
* Package name of the target package
*/
+ @UnsupportedAppUsage
public final String targetPackageName;
/**
@@ -127,6 +130,7 @@
/**
* The state of this OverlayInfo as defined by the STATE_* constants in this class.
*/
+ @UnsupportedAppUsage
public final @State int state;
/**
@@ -251,6 +255,7 @@
*
* @return true if the overlay is enabled, else false.
*/
+ @UnsupportedAppUsage
public boolean isEnabled() {
switch (state) {
case STATE_ENABLED:
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index dcf8c77..5926af6 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Intent;
import android.content.res.Configuration;
@@ -222,6 +223,7 @@
* See {@link android.R.attr#resizeableActivity}.
* @hide
*/
+ @UnsupportedAppUsage
public int resizeMode = RESIZE_MODE_RESIZEABLE;
/**
@@ -355,6 +357,7 @@
* {@link android.R.attr#showForAllUsers} attribute.
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_SHOW_FOR_ALL_USERS = 0x0400;
/**
* Bit in {@link #flags} corresponding to an immersive activity
@@ -476,6 +479,7 @@
* this activity is launched into such a container a SecurityException will be
* thrown. Set from the {@link android.R.attr#allowEmbedded} attribute.
*/
+ @UnsupportedAppUsage
public static final int FLAG_ALLOW_EMBEDDED = 0x80000000;
/**
@@ -816,6 +820,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static @NativeConfig int activityInfoConfigJavaToNative(@Config int input) {
int output = 0;
for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) {
@@ -1047,11 +1052,13 @@
* Returns true if the activity supports picture-in-picture.
* @hide
*/
+ @UnsupportedAppUsage
public boolean supportsPictureInPicture() {
return (flags & FLAG_SUPPORTS_PICTURE_IN_PICTURE) != 0;
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean isResizeableMode(int mode) {
return mode == RESIZE_MODE_RESIZEABLE
|| mode == RESIZE_MODE_FORCE_RESIZEABLE
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 13b67fd..b7a5352 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -22,6 +22,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
@@ -127,6 +128,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int fullBackupContent = 0;
/**
@@ -613,6 +615,13 @@
public static final int PRIVATE_FLAG_PRODUCT = 1 << 19;
/**
+ * Value for {@link #privateFlags}: whether this app is pre-installed on the
+ * google partition of the system image.
+ * @hide
+ */
+ public static final int PRIVATE_FLAG_PRODUCT_SERVICES = 1 << 21;
+
+ /**
* Value for {@link #privateFlags}: whether this app is signed with the
* platform key.
* @hide
@@ -637,6 +646,7 @@
PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE,
PRIVATE_FLAG_PRIVILEGED,
PRIVATE_FLAG_PRODUCT,
+ PRIVATE_FLAG_PRODUCT_SERVICES,
PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER,
PRIVATE_FLAG_SIGNED_WITH_PLATFORM_KEY,
PRIVATE_FLAG_STATIC_SHARED_LIBRARY,
@@ -704,8 +714,10 @@
public UUID storageUuid;
/** {@hide} */
+ @UnsupportedAppUsage
public String scanSourceDir;
/** {@hide} */
+ @UnsupportedAppUsage
public String scanPublicSourceDir;
/**
@@ -771,6 +783,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public String[] resourceDirs;
/**
@@ -847,6 +860,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String secondaryNativeLibraryDir;
/**
@@ -858,6 +872,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String nativeLibraryRootDir;
/**
@@ -877,6 +892,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public String primaryCpuAbi;
/**
@@ -886,6 +902,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public String secondaryCpuAbi;
/**
@@ -925,6 +942,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public int versionCode;
/**
@@ -960,12 +978,14 @@
* For convenient access to the current enabled setting of this app.
* @hide
*/
+ @UnsupportedAppUsage
public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
/**
* For convenient access to package's install location.
* @hide
*/
+ @UnsupportedAppUsage
public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
/**
@@ -1374,6 +1394,7 @@
* @return true if "supportsRtl" has been set to true in the AndroidManifest
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasRtlSupport() {
return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL;
}
@@ -1402,7 +1423,9 @@
return sCollator.compare(sa.toString(), sb.toString());
}
+ @UnsupportedAppUsage
private final Collator sCollator = Collator.getInstance();
+ @UnsupportedAppUsage
private PackageManager mPM;
}
@@ -1641,6 +1664,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void disableCompatibilityMode() {
flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS |
@@ -1765,6 +1789,7 @@
return pm.getDefaultActivityIcon();
}
+ @UnsupportedAppUsage
private boolean isPackageUnavailable(PackageManager pm) {
try {
return pm.getPackageInfo(packageName, 0) == null;
@@ -1800,6 +1825,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isForwardLocked() {
return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0;
}
@@ -1870,6 +1896,11 @@
return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
}
+ /** @hide */
+ public boolean isProductServices() {
+ return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES) != 0;
+ }
+
/**
* Returns whether or not this application was installed as a virtual preload.
*/
@@ -1900,10 +1931,14 @@
/** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; }
/** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; }
- /** {@hide} */ public String getCodePath() { return scanSourceDir; }
+ /** {@hide} */
+ @UnsupportedAppUsage
+ public String getCodePath() { return scanSourceDir; }
/** {@hide} */ public String getBaseCodePath() { return sourceDir; }
/** {@hide} */ public String[] getSplitCodePaths() { return splitSourceDirs; }
/** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; }
- /** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; }
+ /** {@hide} */
+ @UnsupportedAppUsage
+ public String getBaseResourcePath() { return publicSourceDir; }
/** {@hide} */ public String[] getSplitResourcePaths() { return splitPublicSourceDirs; }
}
diff --git a/core/java/android/content/pm/BaseParceledListSlice.java b/core/java/android/content/pm/BaseParceledListSlice.java
index 5877a09..a3e5d6d 100644
--- a/core/java/android/content/pm/BaseParceledListSlice.java
+++ b/core/java/android/content/pm/BaseParceledListSlice.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
@@ -132,6 +133,7 @@
}
}
+ @UnsupportedAppUsage
public List<T> getList() {
return mList;
}
@@ -205,6 +207,7 @@
protected abstract void writeElement(T parcelable, Parcel reply, int callFlags);
+ @UnsupportedAppUsage
protected abstract void writeParcelableCreator(T parcelable, Parcel dest);
protected abstract Parcelable.Creator<?> readParcelableCreator(Parcel from, ClassLoader loader);
diff --git a/core/java/android/content/pm/ComponentInfo.java b/core/java/android/content/pm/ComponentInfo.java
index 0269b6c..29612c2 100644
--- a/core/java/android/content/pm/ComponentInfo.java
+++ b/core/java/android/content/pm/ComponentInfo.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
@@ -162,6 +163,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public ComponentName getComponentName() {
return new ComponentName(packageName, name);
}
diff --git a/core/java/android/content/pm/LauncherActivityInfo.java b/core/java/android/content/pm/LauncherActivityInfo.java
index e9c9588..1451431 100644
--- a/core/java/android/content/pm/LauncherActivityInfo.java
+++ b/core/java/android/content/pm/LauncherActivityInfo.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -35,6 +36,7 @@
private final PackageManager mPm;
+ @UnsupportedAppUsage
private ActivityInfo mActivityInfo;
private ComponentName mComponentName;
private UserHandle mUser;
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index fa423e2..46877ca 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -23,6 +23,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProviderInfo;
@@ -135,7 +136,9 @@
"android.content.pm.extra.PIN_ITEM_REQUEST";
private final Context mContext;
+ @UnsupportedAppUsage
private final ILauncherApps mService;
+ @UnsupportedAppUsage
private final PackageManager mPm;
private final UserManager mUserManager;
@@ -1055,6 +1058,7 @@
shortcut.getUserId());
}
+ @UnsupportedAppUsage
private void startShortcut(@NonNull String packageName, @NonNull String shortcutId,
@Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions,
int userId) {
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java
index 5d8122f..d9d1777 100644
--- a/core/java/android/content/pm/PackageInfo.java
+++ b/core/java/android/content/pm/PackageInfo.java
@@ -17,6 +17,7 @@
package android.content.pm;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -297,6 +298,7 @@
* the {@link android.R.attr#installLocation} attribute.
* @hide
*/
+ @UnsupportedAppUsage
public static final int INSTALL_LOCATION_UNSPECIFIED = -1;
/**
@@ -329,6 +331,7 @@
public boolean isStub;
/** @hide */
+ @UnsupportedAppUsage
public boolean coreApp;
/** @hide */
@@ -346,6 +349,7 @@
* Package name of target package, or null.
* @hide
*/
+ @UnsupportedAppUsage
public String overlayTarget;
/**
@@ -483,6 +487,7 @@
}
};
+ @UnsupportedAppUsage
private PackageInfo(Parcel source) {
packageName = source.readString();
splitNames = source.createStringArray();
diff --git a/core/java/android/content/pm/PackageInfoLite.java b/core/java/android/content/pm/PackageInfoLite.java
index bbf020d..e0e67b9 100644
--- a/core/java/android/content/pm/PackageInfoLite.java
+++ b/core/java/android/content/pm/PackageInfoLite.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -115,6 +116,7 @@
}
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<PackageInfoLite> CREATOR
= new Parcelable.Creator<PackageInfoLite>() {
public PackageInfoLite createFromParcel(Parcel source) {
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index f99c52f..316ace1 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -23,6 +23,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.AppGlobals;
import android.content.Intent;
@@ -787,6 +788,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void addProgress(float progress) {
try {
mSession.addClientProgress(progress);
@@ -1089,26 +1091,33 @@
public static final int UID_UNKNOWN = -1;
/** {@hide} */
+ @UnsupportedAppUsage
public int mode = MODE_INVALID;
/** {@hide} */
+ @UnsupportedAppUsage
public int installFlags;
/** {@hide} */
public int installLocation = PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY;
/** {@hide} */
public @InstallReason int installReason = PackageManager.INSTALL_REASON_UNKNOWN;
/** {@hide} */
+ @UnsupportedAppUsage
public long sizeBytes = -1;
/** {@hide} */
+ @UnsupportedAppUsage
public String appPackageName;
/** {@hide} */
+ @UnsupportedAppUsage
public Bitmap appIcon;
/** {@hide} */
+ @UnsupportedAppUsage
public String appLabel;
/** {@hide} */
public long appIconLastModified = -1;
/** {@hide} */
public Uri originatingUri;
/** {@hide} */
+ @UnsupportedAppUsage
public int originatingUid = UID_UNKNOWN;
/** {@hide} */
public Uri referrerUri;
@@ -1426,29 +1435,40 @@
public static class SessionInfo implements Parcelable {
/** {@hide} */
+ @UnsupportedAppUsage
public int sessionId;
/** {@hide} */
+ @UnsupportedAppUsage
public String installerPackageName;
/** {@hide} */
+ @UnsupportedAppUsage
public String resolvedBaseCodePath;
/** {@hide} */
+ @UnsupportedAppUsage
public float progress;
/** {@hide} */
+ @UnsupportedAppUsage
public boolean sealed;
/** {@hide} */
+ @UnsupportedAppUsage
public boolean active;
/** {@hide} */
+ @UnsupportedAppUsage
public int mode;
/** {@hide} */
public @InstallReason int installReason;
/** {@hide} */
+ @UnsupportedAppUsage
public long sizeBytes;
/** {@hide} */
+ @UnsupportedAppUsage
public String appPackageName;
/** {@hide} */
+ @UnsupportedAppUsage
public Bitmap appIcon;
/** {@hide} */
+ @UnsupportedAppUsage
public CharSequence appLabel;
/** {@hide} */
@@ -1465,6 +1485,7 @@
public int installFlags;
/** {@hide} */
+ @UnsupportedAppUsage
public SessionInfo() {
}
diff --git a/core/java/android/content/pm/PackageItemInfo.java b/core/java/android/content/pm/PackageItemInfo.java
index 14d3f91..0c70a3d 100644
--- a/core/java/android/content/pm/PackageItemInfo.java
+++ b/core/java/android/content/pm/PackageItemInfo.java
@@ -22,6 +22,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@@ -103,6 +104,7 @@
private static volatile boolean sForceSafeLabels = false;
/** {@hide} */
+ @UnsupportedAppUsage
public static void setForceSafeLabels(boolean forceSafeLabels) {
sForceSafeLabels = forceSafeLabels;
}
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index c0b3400..4f39ec0 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -29,6 +29,7 @@
import android.annotation.StringRes;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.annotation.XmlRes;
import android.app.ActivityManager;
@@ -724,6 +725,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int INSTALL_REPLACE_EXISTING = 0x00000002;
/**
@@ -1317,6 +1319,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int NO_NATIVE_LIBRARIES = -114;
/** {@hide} */
@@ -1541,6 +1544,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int MOVE_INTERNAL = 0x00000001;
/**
@@ -1549,6 +1553,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int MOVE_EXTERNAL_MEDIA = 0x00000002;
/** {@hide} */
@@ -3090,6 +3095,7 @@
* @hide
*/
@RequiresPermission(Manifest.permission.INTERACT_ACROSS_USERS)
+ @UnsupportedAppUsage
public abstract PackageInfo getPackageInfoAsUser(String packageName,
@PackageInfoFlags int flags, @UserIdInt int userId) throws NameNotFoundException;
@@ -3219,6 +3225,7 @@
* found on the system.
* @hide
*/
+ @UnsupportedAppUsage
public abstract int getPackageUidAsUser(String packageName, @UserIdInt int userId)
throws NameNotFoundException;
@@ -3236,6 +3243,7 @@
* found on the system.
* @hide
*/
+ @UnsupportedAppUsage
public abstract int getPackageUidAsUser(String packageName, @PackageInfoFlags int flags,
@UserIdInt int userId) throws NameNotFoundException;
@@ -3330,6 +3338,7 @@
@ApplicationInfoFlags int flags) throws NameNotFoundException;
/** {@hide} */
+ @UnsupportedAppUsage
public abstract ApplicationInfo getApplicationInfoAsUser(String packageName,
@ApplicationInfoFlags int flags, @UserIdInt int userId) throws NameNotFoundException;
@@ -3672,6 +3681,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean shouldShowRequestPermissionRationale(String permission);
/**
@@ -3683,6 +3693,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Intent buildRequestPermissionsIntent(@NonNull String[] permissions) {
if (ArrayUtils.isEmpty(permissions)) {
throw new IllegalArgumentException("permission cannot be null or empty");
@@ -3783,6 +3794,7 @@
* found on the system.
* @hide
*/
+ @UnsupportedAppUsage
public abstract int getUidForSharedUser(String sharedUserName)
throws NameNotFoundException;
@@ -4110,6 +4122,7 @@
* containing something else, such as the activity resolver.
* @hide
*/
+ @UnsupportedAppUsage
public abstract ResolveInfo resolveActivityAsUser(Intent intent, @ResolveInfoFlags int flags,
@UserIdInt int userId);
@@ -4148,6 +4161,7 @@
* empty list is returned.
* @hide
*/
+ @UnsupportedAppUsage
public abstract List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent,
@ResolveInfoFlags int flags, @UserIdInt int userId);
@@ -4213,12 +4227,14 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public abstract List<ResolveInfo> queryBroadcastReceiversAsUser(Intent intent,
@ResolveInfoFlags int flags, @UserIdInt int userId);
/** {@hide} */
@Deprecated
+ @UnsupportedAppUsage
public List<ResolveInfo> queryBroadcastReceivers(Intent intent,
@ResolveInfoFlags int flags, @UserIdInt int userId) {
final String msg = "Shame on you for calling the hidden API "
@@ -4276,6 +4292,7 @@
* empty list or null is returned.
* @hide
*/
+ @UnsupportedAppUsage
public abstract List<ResolveInfo> queryIntentServicesAsUser(Intent intent,
@ResolveInfoFlags int flags, @UserIdInt int userId);
@@ -4291,6 +4308,7 @@
* no matching services, an empty list or null is returned.
* @hide
*/
+ @UnsupportedAppUsage
public abstract List<ResolveInfo> queryIntentContentProvidersAsUser(
Intent intent, @ResolveInfoFlags int flags, @UserIdInt int userId);
@@ -4334,6 +4352,7 @@
* provider. If a provider was not found, returns null.
* @hide
*/
+ @UnsupportedAppUsage
public abstract ProviderInfo resolveContentProviderAsUser(String name,
@ComponentInfoFlags int flags, @UserIdInt int userId);
@@ -4695,6 +4714,7 @@
* @return the drawable or null if no drawable is required.
* @hide
*/
+ @UnsupportedAppUsage
public abstract Drawable getUserBadgeForDensity(UserHandle user, int density);
/**
@@ -4711,6 +4731,7 @@
* @return the drawable or null if no drawable is required.
* @hide
*/
+ @UnsupportedAppUsage
public abstract Drawable getUserBadgeForDensityNoBackground(UserHandle user, int density);
/**
@@ -4824,6 +4845,7 @@
throws NameNotFoundException;
/** @hide */
+ @UnsupportedAppUsage
public abstract Resources getResourcesForApplicationAsUser(String appPackageName,
@UserIdInt int userId) throws NameNotFoundException;
@@ -4887,6 +4909,7 @@
Manifest.permission.INSTALL_EXISTING_PACKAGES,
Manifest.permission.INSTALL_PACKAGES,
Manifest.permission.INTERACT_ACROSS_USERS_FULL})
+ @UnsupportedAppUsage
public abstract int installExistingPackageAsUser(String packageName, @UserIdInt int userId)
throws NameNotFoundException;
@@ -5119,6 +5142,7 @@
* @hide
*/
@RequiresPermission(Manifest.permission.DELETE_PACKAGES)
+ @UnsupportedAppUsage
public abstract void deletePackage(String packageName, IPackageDeleteObserver observer,
@DeleteFlags int flags);
@@ -5140,6 +5164,7 @@
@RequiresPermission(anyOf = {
Manifest.permission.DELETE_PACKAGES,
Manifest.permission.INTERACT_ACROSS_USERS_FULL})
+ @UnsupportedAppUsage
public abstract void deletePackageAsUser(@NonNull String packageName,
IPackageDeleteObserver observer, @DeleteFlags int flags, @UserIdInt int userId);
@@ -5166,6 +5191,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public abstract void clearApplicationUserData(String packageName,
IPackageDataObserver observer);
/**
@@ -5184,6 +5210,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public abstract void deleteApplicationCacheFiles(String packageName,
IPackageDataObserver observer);
@@ -5205,6 +5232,7 @@
* callback is desired.
* @hide
*/
+ @UnsupportedAppUsage
public abstract void deleteApplicationCacheFilesAsUser(String packageName, int userId,
IPackageDataObserver observer);
@@ -5230,11 +5258,13 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void freeStorageAndNotify(long freeStorageSize, IPackageDataObserver observer) {
freeStorageAndNotify(null, freeStorageSize, observer);
}
/** {@hide} */
+ @UnsupportedAppUsage
public abstract void freeStorageAndNotify(String volumeUuid, long freeStorageSize,
IPackageDataObserver observer);
@@ -5261,11 +5291,13 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void freeStorage(long freeStorageSize, IntentSender pi) {
freeStorage(null, freeStorageSize, pi);
}
/** {@hide} */
+ @UnsupportedAppUsage
public abstract void freeStorage(String volumeUuid, long freeStorageSize, IntentSender pi);
/**
@@ -5288,6 +5320,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public abstract void getPackageSizeInfoAsUser(String packageName, @UserIdInt int userId,
IPackageStatsObserver observer);
@@ -5299,6 +5332,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void getPackageSizeInfo(String packageName, IPackageStatsObserver observer) {
getPackageSizeInfoAsUser(packageName, getUserId(), observer);
}
@@ -5359,6 +5393,7 @@
to.
* @hide
*/
+ @UnsupportedAppUsage
public void addPreferredActivityAsUser(IntentFilter filter, int match,
ComponentName[] set, ComponentName activity, @UserIdInt int userId) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
@@ -5386,6 +5421,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public abstract void replacePreferredActivity(IntentFilter filter, int match,
ComponentName[] set, ComponentName activity);
@@ -5393,6 +5429,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void replacePreferredActivityAsUser(IntentFilter filter, int match,
ComponentName[] set, ComponentName activity, @UserIdInt int userId) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
@@ -5434,6 +5471,7 @@
* default, if any.
* @hide
*/
+ @UnsupportedAppUsage
public abstract ComponentName getHomeActivities(List<ResolveInfo> outActivities);
/**
@@ -5500,6 +5538,7 @@
* @param userId Ther userId of the user whose restrictions are to be flushed.
* @hide
*/
+ @UnsupportedAppUsage
public abstract void flushPackageRestrictionsAsUser(int userId);
/**
@@ -5509,6 +5548,7 @@
* or by installing it, such as with {@link #installExistingPackage(String)}
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden,
UserHandle userHandle);
@@ -5517,6 +5557,7 @@
* @see #setApplicationHiddenSettingAsUser(String, boolean, UserHandle)
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean getApplicationHiddenSettingAsUser(String packageName,
UserHandle userHandle);
@@ -5555,11 +5596,13 @@
* application's AndroidManifest.xml.
* @hide
*/
+ @UnsupportedAppUsage
public abstract KeySet getKeySetByAlias(String packageName, String alias);
/** Return the signing {@link KeySet} for this application.
* @hide
*/
+ @UnsupportedAppUsage
public abstract KeySet getSigningKeySet(String packageName);
/**
@@ -5569,6 +5612,7 @@
* Compare to {@link #isSignedByExactly(String packageName, KeySet ks)}.
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean isSignedBy(String packageName, KeySet ks);
/**
@@ -5577,6 +5621,7 @@
* {@link #isSignedBy(String packageName, KeySet ks)}.
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean isSignedByExactly(String packageName, KeySet ks);
/**
@@ -5639,6 +5684,7 @@
* @throws IllegalArgumentException if the package was not found.
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean isPackageSuspendedForUser(String packageName, int userId);
/**
@@ -5647,10 +5693,8 @@
* @return {@code true} if the given package is suspended, {@code false} otherwise
* @throws NameNotFoundException if the package could not be found.
*
- * @see #setPackagesSuspended(String[], boolean, PersistableBundle, PersistableBundle, String)
- * @hide
+ * @see #isPackageSuspended()
*/
- @SystemApi
public boolean isPackageSuspended(String packageName) throws NameNotFoundException {
throw new UnsupportedOperationException("isPackageSuspended not implemented");
}
@@ -5730,18 +5774,24 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public abstract int getMoveStatus(int moveId);
/** {@hide} */
+ @UnsupportedAppUsage
public abstract void registerMoveCallback(MoveCallback callback, Handler handler);
/** {@hide} */
+ @UnsupportedAppUsage
public abstract void unregisterMoveCallback(MoveCallback callback);
/** {@hide} */
+ @UnsupportedAppUsage
public abstract int movePackage(String packageName, VolumeInfo vol);
/** {@hide} */
+ @UnsupportedAppUsage
public abstract @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app);
/** {@hide} */
+ @UnsupportedAppUsage
public abstract @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app);
/** {@hide} */
@@ -5765,6 +5815,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean isUpgrade();
/**
@@ -5786,6 +5837,7 @@
* {@link #ONLY_IF_NO_MATCH_FOUND}.
* @hide
*/
+ @UnsupportedAppUsage
public abstract void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId,
int targetUserId, int flags);
@@ -5796,22 +5848,27 @@
* @param sourceUserId The source user id.
* @hide
*/
+ @UnsupportedAppUsage
public abstract void clearCrossProfileIntentFilters(int sourceUserId);
/**
* @hide
*/
+ @UnsupportedAppUsage
public abstract Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo);
/**
* @hide
*/
+ @UnsupportedAppUsage
public abstract Drawable loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo);
/** {@hide} */
+ @UnsupportedAppUsage
public abstract boolean isPackageAvailable(String packageName);
/** {@hide} */
+ @UnsupportedAppUsage
public static String installStatusToString(int status, String msg) {
final String str = installStatusToString(status);
if (msg != null) {
@@ -5822,6 +5879,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static String installStatusToString(int status) {
switch (status) {
case INSTALL_SUCCEEDED: return "INSTALL_SUCCEEDED";
@@ -5932,6 +5990,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static String deleteStatusToString(int status) {
switch (status) {
case DELETE_SUCCEEDED: return "DELETE_SUCCEEDED";
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index a2a48328..823d995 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -31,6 +31,7 @@
import com.android.internal.util.function.TriFunction;
+import java.io.IOException;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
@@ -680,4 +681,20 @@
* @return a SparseArray mapping from appId to it's sharedUserId.
*/
public abstract SparseArray<String> getAppsWithSharedUserIds();
+
+ /**
+ * Return if device is currently in a "core" boot environment, typically
+ * used to support full-disk encryption. Only apps marked with
+ * {@code coreApp} attribute are available.
+ */
+ public abstract boolean isOnlyCoreApps();
+
+ /**
+ * Make a best-effort attempt to provide the requested free disk space by
+ * deleting cached files.
+ *
+ * @throws IOException if the request was unable to be fulfilled.
+ */
+ public abstract void freeStorage(String volumeUuid, long bytes, int storageFlags)
+ throws IOException;
}
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 54d383a..83757c4 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -46,6 +46,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityTaskManager;
import android.content.ComponentName;
import android.content.Intent;
@@ -244,7 +245,9 @@
/** @hide */
public static class NewPermissionInfo {
+ @UnsupportedAppUsage
public final String name;
+ @UnsupportedAppUsage
public final int sdkVersion;
public final int fileVersion;
@@ -277,6 +280,7 @@
* granted during a platform update.
* @hide
*/
+ @UnsupportedAppUsage
public static final PackageParser.NewPermissionInfo NEW_PERMISSIONS[] =
new PackageParser.NewPermissionInfo[] {
new PackageParser.NewPermissionInfo(android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
@@ -322,6 +326,7 @@
private String[] mSeparateProcesses;
private boolean mOnlyCoreApps;
private DisplayMetrics mMetrics;
+ @UnsupportedAppUsage
private Callback mCallback;
private File mCacheDir;
@@ -389,9 +394,11 @@
* Lightweight parsed details about a single package.
*/
public static class PackageLite {
+ @UnsupportedAppUsage
public final String packageName;
public final int versionCode;
public final int versionCodeMajor;
+ @UnsupportedAppUsage
public final int installLocation;
public final VerifierInfo[] verifiers;
@@ -547,11 +554,13 @@
private static final String TAG = "PackageParser";
+ @UnsupportedAppUsage
public PackageParser() {
mMetrics = new DisplayMetrics();
mMetrics.setToDefaults();
}
+ @UnsupportedAppUsage
public void setSeparateProcesses(String[] procs) {
mSeparateProcesses = procs;
}
@@ -631,6 +640,7 @@
* @param p the parsed package.
* @param flags indicating which optional information is included.
*/
+ @UnsupportedAppUsage
public static PackageInfo generatePackageInfo(PackageParser.Package p,
int gids[], int flags, long firstInstallTime, long lastUpdateTime,
Set<String> grantedPermissions, PackageUserState state) {
@@ -665,6 +675,7 @@
return checkUseInstalledOrHidden(0, state, null);
}
+ @UnsupportedAppUsage
public static PackageInfo generatePackageInfo(PackageParser.Package p,
int gids[], int flags, long firstInstallTime, long lastUpdateTime,
Set<String> grantedPermissions, PackageUserState state, int userId) {
@@ -891,6 +902,7 @@
*
* @see PackageParser#parsePackage(File, int)
*/
+ @UnsupportedAppUsage
public static PackageLite parsePackageLite(File packageFile, int flags)
throws PackageParserException {
if (packageFile.isDirectory()) {
@@ -1015,6 +1027,7 @@
*
* @see #parsePackageLite(File, int)
*/
+ @UnsupportedAppUsage
public Package parsePackage(File packageFile, int flags, boolean useCaches)
throws PackageParserException {
Package parsed = useCaches ? getCachedResult(packageFile, flags) : null;
@@ -1045,6 +1058,7 @@
/**
* Equivalent to {@link #parsePackage(File, int, boolean)} with {@code useCaches == false}.
*/
+ @UnsupportedAppUsage
public Package parsePackage(File packageFile, int flags) throws PackageParserException {
return parsePackage(packageFile, flags, false /* useCaches */);
}
@@ -1292,6 +1306,7 @@
* be marked private.
*/
@Deprecated
+ @UnsupportedAppUsage
public Package parseMonolithicPackage(File apkFile, int flags) throws PackageParserException {
final PackageLite lite = parseMonolithicPackageLite(apkFile, flags);
if (mOnlyCoreApps) {
@@ -1488,6 +1503,7 @@
* populating {@link Package#mSigningDetails}. Also asserts that all APK
* contents are signed correctly and consistently.
*/
+ @UnsupportedAppUsage
public static void collectCertificates(Package pkg, boolean skipVerify)
throws PackageParserException {
collectCertificatesInternal(pkg, skipVerify);
@@ -1516,6 +1532,7 @@
}
}
+ @UnsupportedAppUsage
private static void collectCertificates(Package pkg, File apkFile, boolean skipVerify)
throws PackageParserException {
final String apkPath = apkFile.getAbsolutePath();
@@ -1885,6 +1902,7 @@
* @throws XmlPullParserException
* @throws IOException
*/
+ @UnsupportedAppUsage
private Package parseBaseApk(String apkPath, Resources res, XmlResourceParser parser, int flags,
String[] outError) throws XmlPullParserException, IOException {
final String splitName;
@@ -1982,7 +2000,7 @@
String str = sa.getNonConfigurationString(
com.android.internal.R.styleable.AndroidManifest_sharedUserId, 0);
if (str != null && str.length() > 0) {
- String nameError = validateName(str, true, false);
+ String nameError = validateName(str, true, true);
if (nameError != null && !"android".equals(pkg.packageName)) {
outError[0] = "<manifest> specifies bad sharedUserId name \""
+ str + "\": " + nameError;
@@ -2507,6 +2525,49 @@
if (pkg.applicationInfo.usesCompatibilityMode()) {
adjustPackageToBeUnresizeableAndUnpipable(pkg);
}
+
+ // If the storage model feature flag is disabled, we need to fiddle
+ // around with permission definitions to return us to pre-Q behavior.
+ // STOPSHIP(b/112545973): remove once feature enabled by default
+ if (!SystemProperties.getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false)) {
+ if ("android".equals(pkg.packageName)) {
+ final ArraySet<String> newGroups = new ArraySet<>();
+ newGroups.add(android.Manifest.permission_group.MEDIA_AURAL);
+ newGroups.add(android.Manifest.permission_group.MEDIA_VISUAL);
+
+ for (int i = pkg.permissionGroups.size() - 1; i >= 0; i--) {
+ final PermissionGroup pg = pkg.permissionGroups.get(i);
+ if (newGroups.contains(pg.info.name)) {
+ pkg.permissionGroups.remove(i);
+ }
+ }
+
+ final ArraySet<String> newPermissions = new ArraySet<>();
+ newPermissions.add(android.Manifest.permission.READ_MEDIA_AUDIO);
+ newPermissions.add(android.Manifest.permission.WRITE_MEDIA_AUDIO);
+ newPermissions.add(android.Manifest.permission.READ_MEDIA_VIDEO);
+ newPermissions.add(android.Manifest.permission.WRITE_MEDIA_VIDEO);
+ newPermissions.add(android.Manifest.permission.READ_MEDIA_IMAGES);
+ newPermissions.add(android.Manifest.permission.WRITE_MEDIA_IMAGES);
+ newPermissions.add(android.Manifest.permission.ACCESS_MEDIA_LOCATION);
+ newPermissions.add(android.Manifest.permission.WRITE_OBB);
+
+ final ArraySet<String> dangerousPermissions = new ArraySet<>();
+ dangerousPermissions.add(android.Manifest.permission.READ_EXTERNAL_STORAGE);
+ dangerousPermissions.add(android.Manifest.permission.WRITE_EXTERNAL_STORAGE);
+
+ for (int i = pkg.permissions.size() - 1; i >= 0; i--) {
+ final Permission p = pkg.permissions.get(i);
+ if (newPermissions.contains(p.info.name)) {
+ pkg.permissions.remove(i);
+ } else if (dangerousPermissions.contains(p.info.name)) {
+ p.info.protectionLevel &= ~PermissionInfo.PROTECTION_MASK_BASE;
+ p.info.protectionLevel |= PermissionInfo.PROTECTION_DANGEROUS;
+ }
+ }
+ }
+ }
+
return pkg;
}
@@ -3344,6 +3405,7 @@
* When adding new features, carefully consider if they should also be
* supported by split APKs.
*/
+ @UnsupportedAppUsage
private boolean parseBaseApplication(Package owner, Resources res,
XmlResourceParser parser, int flags, String[] outError)
throws XmlPullParserException, IOException {
@@ -5701,6 +5763,7 @@
}
@Nullable
+ @UnsupportedAppUsage
public final Signature[] signatures;
@SignatureSchemeVersion
public final int signatureSchemeVersion;
@@ -6166,28 +6229,33 @@
private Signature[] mPastSigningCertificates;
private int[] mPastSigningCertificatesFlags;
+ @UnsupportedAppUsage
public Builder() {
}
/** get signing certificates used to sign the current APK */
+ @UnsupportedAppUsage
public Builder setSignatures(Signature[] signatures) {
mSignatures = signatures;
return this;
}
/** set the signature scheme version used to sign the APK */
+ @UnsupportedAppUsage
public Builder setSignatureSchemeVersion(int signatureSchemeVersion) {
mSignatureSchemeVersion = signatureSchemeVersion;
return this;
}
/** set the signing certificates by which the APK proved it can be authenticated */
+ @UnsupportedAppUsage
public Builder setPastSigningCertificates(Signature[] pastSigningCertificates) {
mPastSigningCertificates = pastSigningCertificates;
return this;
}
/** set the flags for the {@code pastSigningCertificates} */
+ @UnsupportedAppUsage
public Builder setPastSigningCertificatesFlags(int[] pastSigningCertificatesFlags) {
mPastSigningCertificatesFlags = pastSigningCertificatesFlags;
return this;
@@ -6216,6 +6284,7 @@
}
}
/** build a {@code SigningDetails} object */
+ @UnsupportedAppUsage
public SigningDetails build()
throws CertificateException {
checkInvariants();
@@ -6231,6 +6300,7 @@
*/
public final static class Package implements Parcelable {
+ @UnsupportedAppUsage
public String packageName;
// The package name declared in the manifest as the package can be
@@ -6274,18 +6344,28 @@
public boolean baseHardwareAccelerated;
// For now we only support one application per package.
+ @UnsupportedAppUsage
public ApplicationInfo applicationInfo = new ApplicationInfo();
+ @UnsupportedAppUsage
public final ArrayList<Permission> permissions = new ArrayList<Permission>(0);
+ @UnsupportedAppUsage
public final ArrayList<PermissionGroup> permissionGroups = new ArrayList<PermissionGroup>(0);
+ @UnsupportedAppUsage
public final ArrayList<Activity> activities = new ArrayList<Activity>(0);
+ @UnsupportedAppUsage
public final ArrayList<Activity> receivers = new ArrayList<Activity>(0);
+ @UnsupportedAppUsage
public final ArrayList<Provider> providers = new ArrayList<Provider>(0);
+ @UnsupportedAppUsage
public final ArrayList<Service> services = new ArrayList<Service>(0);
+ @UnsupportedAppUsage
public final ArrayList<Instrumentation> instrumentation = new ArrayList<Instrumentation>(0);
+ @UnsupportedAppUsage
public final ArrayList<String> requestedPermissions = new ArrayList<String>();
+ @UnsupportedAppUsage
public ArrayList<String> protectedBroadcasts;
public Package parentPackage;
@@ -6294,11 +6374,14 @@
public String staticSharedLibName = null;
public long staticSharedLibVersion = 0;
public ArrayList<String> libraryNames = null;
+ @UnsupportedAppUsage
public ArrayList<String> usesLibraries = null;
public ArrayList<String> usesStaticLibraries = null;
public long[] usesStaticLibrariesVersions = null;
public String[][] usesStaticLibrariesCertDigests = null;
+ @UnsupportedAppUsage
public ArrayList<String> usesOptionalLibraries = null;
+ @UnsupportedAppUsage
public String[] usesLibraryFiles = null;
public ArrayList<ActivityIntentInfo> preferredActivityFilters = null;
@@ -6308,9 +6391,11 @@
public ArrayList<String> mAdoptPermissions = null;
// We store the application meta-data independently to avoid multiple unwanted references
+ @UnsupportedAppUsage
public Bundle mAppMetaData = null;
// The version code declared for this package.
+ @UnsupportedAppUsage
public int mVersionCode;
// The major version code declared for this package.
@@ -6322,19 +6407,24 @@
}
// The version name declared for this package.
+ @UnsupportedAppUsage
public String mVersionName;
// The shared user id that this package wants to use.
+ @UnsupportedAppUsage
public String mSharedUserId;
// The shared user label that this package wants to use.
+ @UnsupportedAppUsage
public int mSharedUserLabel;
// Signatures that were read from the package.
+ @UnsupportedAppUsage
@NonNull public SigningDetails mSigningDetails = SigningDetails.UNKNOWN;
// For use by package manager service for quick lookup of
// preferred up order.
+ @UnsupportedAppUsage
public int mPreferredOrder = 0;
// For use by package manager to keep track of when a package was last used.
@@ -6348,17 +6438,21 @@
// public boolean mSetStopped = false;
// Additional data supplied by callers.
+ @UnsupportedAppUsage
public Object mExtras;
// Applications hardware preferences
+ @UnsupportedAppUsage
public ArrayList<ConfigurationInfo> configPreferences = null;
// Applications requested features
+ @UnsupportedAppUsage
public ArrayList<FeatureInfo> reqFeatures = null;
// Applications requested feature groups
public ArrayList<FeatureGroupInfo> featureGroups = null;
+ @UnsupportedAppUsage
public int installLocation;
public boolean coreApp;
@@ -6383,7 +6477,9 @@
/**
* Data used to feed the KeySetManagerService
*/
+ @UnsupportedAppUsage
public ArraySet<String> mUpgradeKeySets;
+ @UnsupportedAppUsage
public ArrayMap<String, ArraySet<PublicKey>> mKeySetMapping;
/**
@@ -6409,6 +6505,7 @@
/** Whether or not the package is a stub and must be replaced by the full version. */
public boolean isStub;
+ @UnsupportedAppUsage
public Package(String packageName) {
this.packageName = packageName;
this.manifestPackageName = packageName;
@@ -6606,6 +6703,7 @@
return paths;
}
+ @UnsupportedAppUsage
public void setPackageName(String newName) {
packageName = newName;
applicationInfo.packageName = newName;
@@ -6687,6 +6785,11 @@
}
/** @hide */
+ public boolean isProductServices() {
+ return applicationInfo.isProductServices();
+ }
+
+ /** @hide */
public boolean isPrivileged() {
return applicationInfo.isPrivilegedApp();
}
@@ -7094,10 +7197,14 @@
}
public static abstract class Component<II extends IntentInfo> {
+ @UnsupportedAppUsage
public final ArrayList<II> intents;
+ @UnsupportedAppUsage
public final String className;
+ @UnsupportedAppUsage
public Bundle metaData;
+ @UnsupportedAppUsage
public Package owner;
/** The order of this component in relation to its peers */
public int order;
@@ -7160,6 +7267,7 @@
componentShortName = clone.componentShortName;
}
+ @UnsupportedAppUsage
public ComponentName getComponentName() {
if (componentName != null) {
return componentName;
@@ -7263,8 +7371,11 @@
}
public final static class Permission extends Component<IntentInfo> implements Parcelable {
+ @UnsupportedAppUsage
public final PermissionInfo info;
+ @UnsupportedAppUsage
public boolean tree;
+ @UnsupportedAppUsage
public PermissionGroup group;
public Permission(Package _owner) {
@@ -7272,6 +7383,7 @@
info = new PermissionInfo();
}
+ @UnsupportedAppUsage
public Permission(Package _owner, PermissionInfo _info) {
super(_owner);
info = _info;
@@ -7330,6 +7442,7 @@
}
public final static class PermissionGroup extends Component<IntentInfo> implements Parcelable {
+ @UnsupportedAppUsage
public final PermissionGroupInfo info;
public PermissionGroup(Package _owner) {
@@ -7420,6 +7533,7 @@
return false;
}
+ @UnsupportedAppUsage
public static ApplicationInfo generateApplicationInfo(Package p, int flags,
PackageUserState state) {
return generateApplicationInfo(p, flags, state, UserHandle.getCallingUserId());
@@ -7475,6 +7589,7 @@
ai.resourceDirs = state.overlayPaths;
}
+ @UnsupportedAppUsage
public static ApplicationInfo generateApplicationInfo(Package p, int flags,
PackageUserState state, int userId) {
if (p == null) return null;
@@ -7532,6 +7647,7 @@
return ai;
}
+ @UnsupportedAppUsage
public static final PermissionInfo generatePermissionInfo(
Permission p, int flags) {
if (p == null) return null;
@@ -7543,6 +7659,7 @@
return pi;
}
+ @UnsupportedAppUsage
public static final PermissionGroupInfo generatePermissionGroupInfo(
PermissionGroup pg, int flags) {
if (pg == null) return null;
@@ -7555,6 +7672,7 @@
}
public final static class Activity extends Component<ActivityIntentInfo> implements Parcelable {
+ @UnsupportedAppUsage
public final ActivityInfo info;
private boolean mHasMaxAspectRatio;
@@ -7638,6 +7756,7 @@
};
}
+ @UnsupportedAppUsage
public static final ActivityInfo generateActivityInfo(Activity a, int flags,
PackageUserState state, int userId) {
if (a == null) return null;
@@ -7669,6 +7788,7 @@
}
public final static class Service extends Component<ServiceIntentInfo> implements Parcelable {
+ @UnsupportedAppUsage
public final ServiceInfo info;
public Service(final ParseComponentArgs args, final ServiceInfo _info) {
@@ -7728,6 +7848,7 @@
};
}
+ @UnsupportedAppUsage
public static final ServiceInfo generateServiceInfo(Service s, int flags,
PackageUserState state, int userId) {
if (s == null) return null;
@@ -7746,7 +7867,9 @@
}
public final static class Provider extends Component<ProviderIntentInfo> implements Parcelable {
+ @UnsupportedAppUsage
public final ProviderInfo info;
+ @UnsupportedAppUsage
public boolean syncable;
public Provider(final ParseComponentArgs args, final ProviderInfo _info) {
@@ -7756,6 +7879,7 @@
syncable = false;
}
+ @UnsupportedAppUsage
public Provider(Provider existingProvider) {
super(existingProvider);
this.info = existingProvider.info;
@@ -7822,6 +7946,7 @@
};
}
+ @UnsupportedAppUsage
public static final ProviderInfo generateProviderInfo(Provider p, int flags,
PackageUserState state, int userId) {
if (p == null) return null;
@@ -7846,6 +7971,7 @@
public final static class Instrumentation extends Component<IntentInfo> implements
Parcelable {
+ @UnsupportedAppUsage
public final InstrumentationInfo info;
public Instrumentation(final ParsePackageItemArgs args, final InstrumentationInfo _info) {
@@ -7903,6 +8029,7 @@
};
}
+ @UnsupportedAppUsage
public static final InstrumentationInfo generateInstrumentationInfo(
Instrumentation i, int flags) {
if (i == null) return null;
@@ -7915,14 +8042,21 @@
}
public static abstract class IntentInfo extends IntentFilter {
+ @UnsupportedAppUsage
public boolean hasDefault;
+ @UnsupportedAppUsage
public int labelRes;
+ @UnsupportedAppUsage
public CharSequence nonLocalizedLabel;
+ @UnsupportedAppUsage
public int icon;
+ @UnsupportedAppUsage
public int logo;
+ @UnsupportedAppUsage
public int banner;
public int preferred;
+ @UnsupportedAppUsage
protected IntentInfo() {
}
@@ -7951,6 +8085,7 @@
}
public final static class ActivityIntentInfo extends IntentInfo {
+ @UnsupportedAppUsage
public Activity activity;
public ActivityIntentInfo(Activity _activity) {
@@ -7973,6 +8108,7 @@
}
public final static class ServiceIntentInfo extends IntentInfo {
+ @UnsupportedAppUsage
public Service service;
public ServiceIntentInfo(Service _service) {
@@ -7995,6 +8131,7 @@
}
public static final class ProviderIntentInfo extends IntentInfo {
+ @UnsupportedAppUsage
public Provider provider;
public ProviderIntentInfo(Provider provider) {
@@ -8019,6 +8156,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static void setCompatibilityModeEnabled(boolean compatibilityModeEnabled) {
sCompatibilityModeEnabled = compatibilityModeEnabled;
}
diff --git a/core/java/android/content/pm/PackageStats.java b/core/java/android/content/pm/PackageStats.java
index 27b3506..f70ec39 100644
--- a/core/java/android/content/pm/PackageStats.java
+++ b/core/java/android/content/pm/PackageStats.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.app.usage.StorageStatsManager;
import android.os.Parcel;
import android.os.Parcelable;
@@ -37,6 +38,7 @@
public String packageName;
/** @hide */
+ @UnsupportedAppUsage
public int userHandle;
/** Size of the code (e.g., APK) */
diff --git a/core/java/android/content/pm/PackageUserState.java b/core/java/android/content/pm/PackageUserState.java
index de173c4..248d523 100644
--- a/core/java/android/content/pm/PackageUserState.java
+++ b/core/java/android/content/pm/PackageUserState.java
@@ -28,6 +28,7 @@
import static android.content.pm.PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS;
import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
+import android.annotation.UnsupportedAppUsage;
import android.os.BaseBundle;
import android.os.PersistableBundle;
import android.util.ArraySet;
@@ -67,6 +68,7 @@
public String[] overlayPaths;
+ @UnsupportedAppUsage
public PackageUserState() {
installed = true;
hidden = false;
diff --git a/core/java/android/content/pm/ParceledListSlice.java b/core/java/android/content/pm/ParceledListSlice.java
index d12e884..2eef165 100644
--- a/core/java/android/content/pm/ParceledListSlice.java
+++ b/core/java/android/content/pm/ParceledListSlice.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -31,6 +32,7 @@
* @hide
*/
public class ParceledListSlice<T extends Parcelable> extends BaseParceledListSlice<T> {
+ @UnsupportedAppUsage
public ParceledListSlice(List<T> list) {
super(list);
}
@@ -59,6 +61,7 @@
}
@Override
+ @UnsupportedAppUsage
protected void writeParcelableCreator(T parcelable, Parcel dest) {
dest.writeParcelableCreator((Parcelable) parcelable);
}
@@ -69,6 +72,7 @@
}
@SuppressWarnings("unchecked")
+ @UnsupportedAppUsage
public static final Parcelable.ClassLoaderCreator<ParceledListSlice> CREATOR =
new Parcelable.ClassLoaderCreator<ParceledListSlice>() {
public ParceledListSlice createFromParcel(Parcel in) {
diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java
index 535ef00..60c06a1 100644
--- a/core/java/android/content/pm/PermissionInfo.java
+++ b/core/java/android/content/pm/PermissionInfo.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -322,6 +323,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static String protectionToString(int level) {
String protLevel = "????";
switch (level & PROTECTION_MASK_BASE) {
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index 020e8c2..a8c3b88 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -17,6 +17,7 @@
package android.content.pm;
import android.Manifest;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -145,6 +146,7 @@
private RegisteredServicesCacheListener<V> mListener;
private Handler mHandler;
+ @UnsupportedAppUsage
public RegisteredServicesCache(Context context, String interfaceName, String metaDataName,
String attributeName, XmlSerializerAndParser<V> serializerAndParser) {
mContext = context;
@@ -299,9 +301,12 @@
* to bind to the service.
*/
public static class ServiceInfo<V> {
+ @UnsupportedAppUsage
public final V type;
public final ComponentInfo componentInfo;
+ @UnsupportedAppUsage
public final ComponentName componentName;
+ @UnsupportedAppUsage
public final int uid;
/** @hide */
diff --git a/core/java/android/content/pm/ResolveInfo.java b/core/java/android/content/pm/ResolveInfo.java
index fc2eba2..701c5db 100644
--- a/core/java/android/content/pm/ResolveInfo.java
+++ b/core/java/android/content/pm/ResolveInfo.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
@@ -149,6 +150,7 @@
* If not equal to UserHandle.USER_CURRENT, then the intent will be forwarded to this user.
* @hide
*/
+ @UnsupportedAppUsage
public int targetUserId;
/**
@@ -169,14 +171,17 @@
/**
* @hide Target comes from system process?
*/
+ @UnsupportedAppUsage
public boolean system;
/**
* @hide Does the associated IntentFilter comes from a Browser ?
*/
+ @UnsupportedAppUsage
public boolean handleAllWebDataURI;
/** {@hide} */
+ @UnsupportedAppUsage
public ComponentInfo getComponentInfo() {
if (activityInfo != null) return activityInfo;
if (serviceInfo != null) return serviceInfo;
diff --git a/core/java/android/content/pm/ShortcutInfo.java b/core/java/android/content/pm/ShortcutInfo.java
index ea476b0..546c213 100644
--- a/core/java/android/content/pm/ShortcutInfo.java
+++ b/core/java/android/content/pm/ShortcutInfo.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.app.TaskStackBuilder;
import android.content.ComponentName;
@@ -1242,6 +1243,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public Icon getIcon() {
return mIcon;
}
diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java
index 25e0ccd..60ac1f0 100644
--- a/core/java/android/content/pm/ShortcutManager.java
+++ b/core/java/android/content/pm/ShortcutManager.java
@@ -19,8 +19,8 @@
import android.annotation.Nullable;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
-import android.app.Activity;
import android.app.usage.UsageStatsManager;
import android.content.Context;
import android.content.Intent;
@@ -29,256 +29,23 @@
import android.os.Build.VERSION_CODES;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.UserHandle;
import com.android.internal.annotations.VisibleForTesting;
import java.util.List;
/**
- * The ShortcutManager performs operations on an app's set of <em>shortcuts</em>. The
- * {@link ShortcutInfo} class contains information about each of the shortcuts themselves.
+ * <p><code>ShortcutManager</code> executes operations on an app's set of <i>shortcuts</i>, which
+ * represent specific tasks and actions that users can perform within your app. This page lists
+ * components of the <code>ShortcutManager</code> class that you can use to create and manage
+ * sets of shortcuts.
*
- * <p>An app's shortcuts represent specific tasks and actions that users can perform within your
- * app. When a user selects a shortcut in the currently-active launcher, your app opens an activity
- * other than the app's starting activity, provided that the currently-active launcher supports app
- * shortcuts.</p>
+ * <p>To learn about methods that retrieve information about a single shortcut—including
+ * identifiers, type, and status—read the <code>
+ * <a href="/reference/android/content/pm/ShortcutInfo.html">ShortcutInfo</a></code> reference.
*
- * <p>The types of shortcuts that you create for your app depend on the app's key use cases. For
- * example, an email app may publish the "compose new email" shortcut, which allows the app to
- * directly open the compose activity.</p>
- *
- * <p class="note"><b>Note:</b> Only main activities—activities that handle the
- * {@link Intent#ACTION_MAIN} action and the {@link Intent#CATEGORY_LAUNCHER} category—can
- * have shortcuts. If an app has multiple main activities, you need to define the set of shortcuts
- * for <em>each</em> activity.
- *
- * <p>This page discusses the implementation details of the <code>ShortcutManager</code> class. For
- * definitions of key terms and guidance on performing operations on shortcuts within your app, see
- * the <a href="/guide/topics/ui/shortcuts.html">App Shortcuts</a> feature guide.
- *
- * <h3>Shortcut characteristics</h3>
- *
- * This section describes in-depth details about each shortcut type's usage and availability.
- *
- * <p class="note"><b>Important security note:</b> All shortcut information is stored in
- * <a href="/training/articles/direct-boot.html">credential encrypted storage</a>, so your app
- * cannot access a user's shortcuts until after they've unlocked the device.
- *
- * <h4>Static and dynamic shortcuts</h4>
- *
- * <p>Static shortcuts and dynamic shortcuts are shown in a supported launcher when the user
- * performs a specific gesture. On currently-supported launchers, the gesture is a long-press on the
- * app's launcher icon, but the actual gesture may be different on other launcher apps.
- *
- * <p>The {@link LauncherApps} class provides APIs for launcher apps to access shortcuts.
- *
- * <h4>Pinned shortcuts</h4>
- *
- * <p>Because pinned shortcuts appear in the launcher itself, they're always visible. A pinned
- * shortcut is removed from the launcher only in the following situations:
- * <ul>
- * <li>The user removes it.
- * <li>The publisher app associated with the shortcut is uninstalled.
- * <li>The user selects <b>Clear data</b> from the publisher app's <i>Storage</i> screen, within
- * the system's <b>Settings</b> app.
- * </ul>
- *
- * <p>Because the system performs
- * <a href="/guide/topics/ui/shortcuts.html#backup-and-restore">backup and restore</a> on pinned
- * shortcuts automatically, these shortcuts' IDs should contain either stable, constant strings or
- * server-side identifiers, rather than identifiers generated locally that might not make sense on
- * other devices.
- *
- * <h3>Shortcut display order</h3>
- *
- * <p>When the launcher displays an app's shortcuts, they should appear in the following order:
- *
- * <ol>
- * <li><b>Static shortcuts:</b> Shortcuts whose {@link ShortcutInfo#isDeclaredInManifest()} method
- * returns {@code true}.</li>
- * <li><b>Dynamic shortcuts:</b> Shortcuts whose {@link ShortcutInfo#isDynamic()} method returns
- * {@code true}.</li>
- * </ol>
- *
- * <p>Within each shortcut type (static and dynamic), shortcuts are sorted in order of increasing
- * rank according to {@link ShortcutInfo#getRank()}.</p>
- *
- * <h4>Shortcut ranks</h4>
- *
- * <p>Shortcut ranks are non-negative, sequential integers that determine the order in which
- * shortcuts appear, assuming that the shortcuts are all in the same category. You can update ranks
- * of existing shortcuts when you call {@link #updateShortcuts(List)},
- * {@link #addDynamicShortcuts(List)}, or {@link #setDynamicShortcuts(List)}.
- *
- * <p class="note"><b>Note:</b> Ranks are auto-adjusted so that they're unique for each type of
- * shortcut (static or dynamic). For example, if there are 3 dynamic shortcuts with ranks 0, 1 and
- * 2, adding another dynamic shortcut with a rank of 1 represents a request to place this shortcut
- * at the second position. In response, the third and fourth shortcuts move closer to the bottom of
- * the shortcut list, with their ranks changing to 2 and 3, respectively.
- *
- * <h3>Options for static shortcuts</h3>
- *
- * The following list includes descriptions for the different attributes within a static shortcut.
- * You must provide a value for {@code android:shortcutId} and {@code android:shortcutShortLabel};
- * all other values are optional.
- *
- * <dl>
- * <dt>{@code android:shortcutId}</dt>
- * <dd><p>A string literal, which represents the shortcut when a {@code ShortcutManager} object
- * performs operations on it.</p>
- * <p class="note"><b>Note: </b>You cannot set this attribute's value to a resource string, such
- * as <code>@string/foo</code>.</p>
- * </dd>
- *
- * <dt>{@code android:enabled}</dt>
- * <dd><p>Whether the user can interact with the shortcut from a supported launcher.</p>
- * <p>The default value is {@code true}. If you set it to {@code false}, you should also set
- * {@code android:shortcutDisabledMessage} to a message that explains why you've disabled the
- * shortcut. If you don't think you need to provide such a message, it's easiest to just remove
- * the shortcut from the XML file entirely, rather than changing the values of the shortcut's
- * {@code android:enabled} and {@code android:shortcutDisabledMessage} attributes.
- * </dd>
- *
- * <dt>{@code android:icon}</dt>
- * <dd><p>The <a href="/topic/performance/graphics/index.html">bitmap</a> or
- * <a href="/guide/practices/ui_guidelines/icon_design_adaptive.html">adaptive icon</a> that the
- * launcher uses when displaying the shortcut to the user. This value can be either the path to an
- * image or the resource file that contains the image. Use adaptive icons whenever possible to
- * improve performance and consistency.</p>
- * <p class="note"><b>Note: </b>Shortcut icons cannot include
- * <a href="/training/material/drawables.html#DrawableTint">tints</a>.
- * </dd>
- *
- * <dt>{@code android:shortcutShortLabel}</dt>
- * <dd><p>A concise phrase that describes the shortcut's purpose. For more information, see
- * {@link ShortcutInfo.Builder#setShortLabel(CharSequence)}.</p>
- * <p class="note"><b>Note: </b>This attribute's value must be a resource string, such as
- * <code>@string/shortcut_short_label</code>.</p>
- * </dd>
- *
- * <dt>{@code android:shortcutLongLabel}</dt>
- * <dd><p>An extended phrase that describes the shortcut's purpose. If there's enough space, the
- * launcher displays this value instead of {@code android:shortcutShortLabel}. For more
- * information, see {@link ShortcutInfo.Builder#setLongLabel(CharSequence)}.</p>
- * <p class="note"><b>Note: </b>This attribute's value must be a resource string, such as
- * <code>@string/shortcut_long_label</code>.</p>
- * </dd>
- *
- * <dt>{@code android:shortcutDisabledMessage}</dt>
- * <dd><p>The message that appears in a supported launcher when the user attempts to launch a
- * disabled shortcut. The message should explain to the user why the shortcut is now disabled.
- * This attribute's value has no effect if {@code android:enabled} is {@code true}.</p>
- * <p class="note"><b>Note: </b>This attribute's value must be a resource string, such as
- * <code>@string/shortcut_disabled_message</code>.</p>
- * </dd>
- * </dl>
- *
- * <h3>Inner elements that define static shortcuts</h3>
- *
- * <p>The XML file that lists an app's static shortcuts supports the following elements inside each
- * {@code <shortcut>} element. You must include an {@code intent} inner element for each
- * static shortcut that you define.</p>
- *
- * <dl>
- * <dt>{@code intent}</dt>
- * <dd><p>The action that the system launches when the user selects the shortcut. This intent must
- * provide a value for the {@code android:action} attribute.</p>
- * <p>You can provide multiple intents for a single shortcut. If you do so, the last defined
- * activity is launched, and the other activities are placed in the
- * <a href="/guide/components/tasks-and-back-stack.html">back stack</a>. See
- * <a href="/guide/topics/ui/shortcuts.html#static">Using Static Shortcuts</a> and the
- * {@link android.app.TaskStackBuilder} class reference for details.</p>
- * <p class="note"><b>Note:</b> This {@code intent} element cannot include string resources.</p>
- * <p>To learn more about how to configure intents, see
- * <a href="{@docRoot}guide/topics/ui/settings.html#Intents">Using intents</a>.</p>
- * </dd>
- *
- * <dt>{@code categories}</dt>
- * <dd><p>Provides a grouping for the types of actions that your app's shortcuts perform, such as
- * creating new chat messages.</p>
- * <p>For a list of supported shortcut categories, see the {@link ShortcutInfo} class reference
- * for a list of supported shortcut categories.
- * </dd>
- * </dl>
- *
- * <h3>Updating shortcuts</h3>
- *
- * <p>Each app's launcher icon can contain at most {@link #getMaxShortcutCountPerActivity()} number
- * of static and dynamic shortcuts combined. There is no limit to the number of pinned shortcuts
- * that an app can create, though.
- *
- * <p>When a dynamic shortcut is pinned, even when the publisher removes it as a dynamic shortcut,
- * the pinned shortcut is still visible and launchable. This allows an app to have more than
- * {@link #getMaxShortcutCountPerActivity()} number of shortcuts.
- *
- * <p>As an example, suppose {@link #getMaxShortcutCountPerActivity()} is 5:
- * <ol>
- * <li>A chat app publishes 5 dynamic shortcuts for the 5 most recent
- * conversations (c1, c2, ..., c5).
- *
- * <li>The user pins all 5 of the shortcuts.
- *
- * <li>Later, the user has started 3 additional conversations (c6, c7, and c8), so the publisher
- * app re-publishes its dynamic shortcuts. The new dynamic shortcut list is: c4, c5, ..., c8.
- * <p>The publisher app has to remove c1, c2, and c3 because it can't have more than 5 dynamic
- * shortcuts. However, c1, c2, and c3 are still pinned shortcuts that the user can access and
- * launch.
- * <p>At this point, the user can access a total of 8 shortcuts that link to activities in the
- * publisher app, including the 3 pinned shortcuts, even though an app can have at most 5
- * dynamic shortcuts.
- *
- * <li>The app can use {@link #updateShortcuts(List)} to update <em>any</em> of the existing
- * 8 shortcuts, when, for example, the chat peers' icons have changed.
- * <p>The {@link #addDynamicShortcuts(List)} and {@link #setDynamicShortcuts(List)} methods
- * can also be used to update existing shortcuts with the same IDs, but they <b>cannot</b> be
- * used for updating non-dynamic, pinned shortcuts because these 2 methods try to convert the
- * given lists of shortcuts to dynamic shortcuts.
- * </ol>
- *
- * <h3>Shortcut intents</h3>
- *
- * <p>
- * Dynamic shortcuts can be published with any set of {@link Intent#addFlags Intent} flags.
- * Typically, {@link Intent#FLAG_ACTIVITY_CLEAR_TASK} is specified, possibly along with other
- * flags; otherwise, if the app is already running, the app is simply brought to
- * the foreground, and the target activity might not appear.
- *
- * <p>Static shortcuts <b>cannot</b> have custom intent flags.
- * The first intent of a static shortcut will always have {@link Intent#FLAG_ACTIVITY_NEW_TASK}
- * and {@link Intent#FLAG_ACTIVITY_CLEAR_TASK} set. This means, when the app is already running, all
- * the existing activities in your app are destroyed when a static shortcut is launched.
- * If this behavior is not desirable, you can use a <em>trampoline activity</em>, or an invisible
- * activity that starts another activity in {@link Activity#onCreate}, then calls
- * {@link Activity#finish()}:
- * <ol>
- * <li>In the <code>AndroidManifest.xml</code> file, the trampoline activity should include the
- * attribute assignment {@code android:taskAffinity=""}.
- * <li>In the shortcuts resource file, the intent within the static shortcut should reference
- * the trampoline activity.
- * </ol>
- *
- * <h3>Rate limiting</h3>
- *
- * <p>When <a href="/guide/topics/ui/shortcuts.html#rate-limit">rate limiting</a> is active,
- * {@link #isRateLimitingActive()} returns {@code true}.
- *
- * <p>Rate limiting is reset upon certain events, so even background apps can call these APIs until
- * the rate limit is reached again. These events include the following:
- * <ul>
- * <li>An app comes to the foreground.
- * <li>The system locale changes.
- * <li>The user performs the <a href="/guide/topics/ui/notifiers/notifications.html#direct">inline
- * reply</a> action on a notification.
- * </ul>
- *
- * <h3>Handling system locale changes</h3>
- *
- * <p>Apps should update dynamic and pinned shortcuts when they receive the
- * {@link Intent#ACTION_LOCALE_CHANGED} broadcast, indicating that the system locale has changed.
- * <p>When the system locale changes, <a href="/guide/topics/ui/shortcuts.html#rate-limit">rate
- * limiting</a> is reset, so even background apps can add and update dynamic shortcuts until the
- * rate limit is reached again.
+ * <p>For guidance about using shortcuts, see
+ * <a href="/guide/topics/ui/shortcuts/index.html">App shortcuts</a>.
*
* <h3>Retrieving class instances</h3>
* <!-- Provides a heading for the content filled in by the @SystemService annotation below -->
@@ -288,6 +55,7 @@
private static final String TAG = "ShortcutManager";
private final Context mContext;
+ @UnsupportedAppUsage
private final IShortcutService mService;
/**
@@ -458,8 +226,9 @@
}
/**
- * Disable pinned shortcuts. For more details, see the Javadoc for the {@link ShortcutManager}
- * class.
+ * Disable pinned shortcuts. For more details, read
+ * <a href="/guide/topics/ui/shortcuts/managing-shortcuts.html#disable-shortcuts">
+ * Disable shortcuts</a>.
*
* @throws IllegalArgumentException If trying to disable immutable shortcuts.
*
@@ -498,7 +267,9 @@
/**
* Disable pinned shortcuts, showing the user a custom error message when they try to select
* the disabled shortcuts.
- * For more details, see the Javadoc for the {@link ShortcutManager} class.
+ * For more details, read
+ * <a href="/guide/topics/ui/shortcuts/managing-shortcuts.html#disable-shortcuts">
+ * Disable shortcuts</a>.
*
* @throws IllegalArgumentException If trying to disable immutable shortcuts.
*
@@ -586,7 +357,8 @@
/**
* Return {@code true} when rate-limiting is active for the caller app.
*
- * <p>See the class level javadoc for details.
+ * <p>For details, see <a href="/guide/topics/ui/shortcuts/managing-shortcuts#rate-limiting">
+ * Rate limiting</a>.
*
* @throws IllegalStateException when the user is locked.
*/
@@ -632,7 +404,9 @@
* Apps that publish shortcuts should call this method whenever the user
* selects the shortcut containing the given ID or when the user completes
* an action in the app that is equivalent to selecting the shortcut.
- * For more details, see the Javadoc for the {@link ShortcutManager} class
+ * For more details, read about
+ * <a href="/guide/topics/ui/shortcuts/managing-shortcuts.html#track-usage">
+ * tracking shortcut usage</a>.
*
* <p>The information is accessible via {@link UsageStatsManager#queryEvents}
* Typically, launcher apps use this information to build a prediction model
@@ -700,7 +474,9 @@
* @param resultIntent If not null, this intent will be sent when the shortcut is pinned.
* Use {@link android.app.PendingIntent#getIntentSender()} to create an {@link IntentSender}.
* To avoid background execution limits, use an unexported, manifest-declared receiver.
- * For more details, see the overview documentation for the {@link ShortcutManager} class.
+ * For more details, see
+ * <a href="/guide/topics/ui/shortcuts/creating-shortcuts.html#pinned">
+ * Creating pinned shortcuts</a>.
*
* @return {@code TRUE} if the launcher supports this feature. Note the API will return without
* waiting for the user to respond, so getting {@code TRUE} from this API does *not* mean
diff --git a/core/java/android/content/pm/Signature.java b/core/java/android/content/pm/Signature.java
index a2a14ed..e58ca60 100644
--- a/core/java/android/content/pm/Signature.java
+++ b/core/java/android/content/pm/Signature.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -170,6 +171,7 @@
* certificate; shouldn't happen.
* @hide
*/
+ @UnsupportedAppUsage
public PublicKey getPublicKey() throws CertificateException {
final CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
final ByteArrayInputStream bais = new ByteArrayInputStream(mSignature);
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java
index f34b590..b75ed35 100644
--- a/core/java/android/content/pm/UserInfo.java
+++ b/core/java/android/content/pm/UserInfo.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemProperties;
@@ -41,6 +42,7 @@
* Primary user. Only one user can have this flag set. It identifies the first human user
* on a device.
*/
+ @UnsupportedAppUsage
public static final int FLAG_PRIMARY = 0x00000001;
/**
@@ -94,12 +96,19 @@
public static final int NO_PROFILE_GROUP_ID = UserHandle.USER_NULL;
+ @UnsupportedAppUsage
public int id;
+ @UnsupportedAppUsage
public int serialNumber;
+ @UnsupportedAppUsage
public String name;
+ @UnsupportedAppUsage
public String iconPath;
+ @UnsupportedAppUsage
public int flags;
+ @UnsupportedAppUsage
public long creationTime;
+ @UnsupportedAppUsage
public long lastLoggedInTime;
public String lastLoggedInFingerprint;
/**
@@ -107,19 +116,24 @@
* If this user is a child user, it would be its parent user id.
* Otherwise, it would be {@link #NO_PROFILE_GROUP_ID}.
*/
+ @UnsupportedAppUsage
public int profileGroupId;
public int restrictedProfileParentId;
/** Which profile badge color/label to use. */
public int profileBadge;
/** User is only partially created. */
+ @UnsupportedAppUsage
public boolean partial;
+ @UnsupportedAppUsage
public boolean guestToRemove;
+ @UnsupportedAppUsage
public UserInfo(int id, String name, int flags) {
this(id, name, null, flags);
}
+ @UnsupportedAppUsage
public UserInfo(int id, String name, String iconPath, int flags) {
this.id = id;
this.name = name;
@@ -129,26 +143,32 @@
this.restrictedProfileParentId = NO_PROFILE_GROUP_ID;
}
+ @UnsupportedAppUsage
public boolean isPrimary() {
return (flags & FLAG_PRIMARY) == FLAG_PRIMARY;
}
+ @UnsupportedAppUsage
public boolean isAdmin() {
return (flags & FLAG_ADMIN) == FLAG_ADMIN;
}
+ @UnsupportedAppUsage
public boolean isGuest() {
return (flags & FLAG_GUEST) == FLAG_GUEST;
}
+ @UnsupportedAppUsage
public boolean isRestricted() {
return (flags & FLAG_RESTRICTED) == FLAG_RESTRICTED;
}
+ @UnsupportedAppUsage
public boolean isManagedProfile() {
return (flags & FLAG_MANAGED_PROFILE) == FLAG_MANAGED_PROFILE;
}
+ @UnsupportedAppUsage
public boolean isEnabled() {
return (flags & FLAG_DISABLED) != FLAG_DISABLED;
}
@@ -238,6 +258,7 @@
profileBadge = orig.profileBadge;
}
+ @UnsupportedAppUsage
public UserHandle getUserHandle() {
return new UserHandle(id);
}
@@ -267,6 +288,7 @@
dest.writeInt(profileBadge);
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<UserInfo> CREATOR
= new Parcelable.Creator<UserInfo>() {
public UserInfo createFromParcel(Parcel source) {
diff --git a/core/java/android/content/pm/VerifierInfo.java b/core/java/android/content/pm/VerifierInfo.java
index 0a2b283..b4e72e6 100644
--- a/core/java/android/content/pm/VerifierInfo.java
+++ b/core/java/android/content/pm/VerifierInfo.java
@@ -16,6 +16,7 @@
package android.content.pm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -43,6 +44,7 @@
* not be {@code null} or empty.
* @throws IllegalArgumentException if either argument is null or empty.
*/
+ @UnsupportedAppUsage
public VerifierInfo(String packageName, PublicKey publicKey) {
if (packageName == null || packageName.length() == 0) {
throw new IllegalArgumentException("packageName must not be null or empty");
diff --git a/core/java/android/content/pm/XmlSerializerAndParser.java b/core/java/android/content/pm/XmlSerializerAndParser.java
index 20cb61c..6d24800 100644
--- a/core/java/android/content/pm/XmlSerializerAndParser.java
+++ b/core/java/android/content/pm/XmlSerializerAndParser.java
@@ -20,10 +20,13 @@
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.UnsupportedAppUsage;
import java.io.IOException;
/** @hide */
public interface XmlSerializerAndParser<T> {
+ @UnsupportedAppUsage
void writeAsXml(T item, XmlSerializer out) throws IOException;
+ @UnsupportedAppUsage
T createFromXml(XmlPullParser parser) throws IOException, XmlPullParserException;
}
diff --git a/core/java/android/content/res/ApkAssets.java b/core/java/android/content/res/ApkAssets.java
index 9de8be3..dc1d052 100644
--- a/core/java/android/content/res/ApkAssets.java
+++ b/core/java/android/content/res/ApkAssets.java
@@ -16,6 +16,7 @@
package android.content.res;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.Preconditions;
@@ -125,6 +126,7 @@
mStringBlock = new StringBlock(nativeGetStringBlock(mNativePtr), true /*useSparse*/);
}
+ @UnsupportedAppUsage
public @NonNull String getAssetPath() {
synchronized (this) {
return nativeGetAssetPath(mNativePtr);
diff --git a/core/java/android/content/res/AssetFileDescriptor.java b/core/java/android/content/res/AssetFileDescriptor.java
index be41036..b6cbf08 100644
--- a/core/java/android/content/res/AssetFileDescriptor.java
+++ b/core/java/android/content/res/AssetFileDescriptor.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
@@ -40,8 +41,11 @@
*/
public static final long UNKNOWN_LENGTH = -1;
+ @UnsupportedAppUsage
private final ParcelFileDescriptor mFd;
+ @UnsupportedAppUsage
private final long mStartOffset;
+ @UnsupportedAppUsage
private final long mLength;
private final Bundle mExtras;
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index 2895342..0350eff 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -23,6 +23,7 @@
import android.annotation.Nullable;
import android.annotation.StringRes;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration.NativeConfig;
import android.os.ParcelFileDescriptor;
@@ -65,6 +66,7 @@
private static final ApkAssets[] sEmptyApkAssets = new ApkAssets[0];
// Not private for LayoutLib's BridgeAssetManager.
+ @UnsupportedAppUsage
@GuardedBy("sSync") static AssetManager sSystem = null;
@GuardedBy("sSync") private static ApkAssets[] sSystemApkAssets = new ApkAssets[0];
@@ -95,6 +97,7 @@
@GuardedBy("this") private final long[] mOffsets = new long[2];
// Pointer to native implementation, stuffed inside a long.
+ @UnsupportedAppUsage
@GuardedBy("this") private long mObject;
// The loaded asset paths.
@@ -152,6 +155,7 @@
* use by applications.
* @hide
*/
+ @UnsupportedAppUsage
public AssetManager() {
final ApkAssets[] assets;
synchronized (sSync) {
@@ -249,6 +253,7 @@
* system assets (no application assets).
* @hide
*/
+ @UnsupportedAppUsage
public static AssetManager getSystem() {
synchronized (sSync) {
createSystemAssetsInZygoteLocked();
@@ -328,6 +333,7 @@
* returns a 0-length array.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull ApkAssets[] getApkAssets() {
synchronized (this) {
if (mOpen) {
@@ -362,6 +368,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public int addAssetPath(String path) {
return addAssetPathInternal(path, false /*overlay*/, false /*appAsLib*/);
}
@@ -371,6 +378,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public int addAssetPathAsSharedLibrary(String path) {
return addAssetPathInternal(path, false /*overlay*/, true /*appAsLib*/);
}
@@ -380,6 +388,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public int addOverlayPath(String path) {
return addAssetPathInternal(path, true /*overlay*/, false /*appAsLib*/);
}
@@ -457,6 +466,7 @@
* @return {@code true} if the data was loaded into {@code outValue},
* {@code false} otherwise
*/
+ @UnsupportedAppUsage
boolean getResourceValue(@AnyRes int resId, int densityDpi, @NonNull TypedValue outValue,
boolean resolveRefs) {
Preconditions.checkNotNull(outValue, "outValue");
@@ -486,6 +496,7 @@
* @param resId the resource identifier to load
* @return the string value, or {@code null}
*/
+ @UnsupportedAppUsage
@Nullable CharSequence getResourceText(@StringRes int resId) {
synchronized (this) {
final TypedValue outValue = mValue;
@@ -504,6 +515,7 @@
* @param bagEntryId the index into the bag to load
* @return the string value, or {@code null}
*/
+ @UnsupportedAppUsage
@Nullable CharSequence getResourceBagText(@StringRes int resId, int bagEntryId) {
synchronized (this) {
ensureValidLocked();
@@ -665,6 +677,7 @@
}
}
+ @UnsupportedAppUsage
@Nullable String getResourceName(@AnyRes int resId) {
synchronized (this) {
ensureValidLocked();
@@ -672,6 +685,7 @@
}
}
+ @UnsupportedAppUsage
@Nullable String getResourcePackageName(@AnyRes int resId) {
synchronized (this) {
ensureValidLocked();
@@ -679,6 +693,7 @@
}
}
+ @UnsupportedAppUsage
@Nullable String getResourceTypeName(@AnyRes int resId) {
synchronized (this) {
ensureValidLocked();
@@ -686,6 +701,7 @@
}
}
+ @UnsupportedAppUsage
@Nullable String getResourceEntryName(@AnyRes int resId) {
synchronized (this) {
ensureValidLocked();
@@ -693,6 +709,7 @@
}
}
+ @UnsupportedAppUsage
@AnyRes int getResourceIdentifier(@NonNull String name, @Nullable String defType,
@Nullable String defPackage) {
synchronized (this) {
@@ -804,6 +821,7 @@
* @see #open(String)
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull InputStream openNonAsset(@NonNull String fileName) throws IOException {
return openNonAsset(0, fileName, ACCESS_STREAMING);
}
@@ -824,6 +842,7 @@
* @see #open(String, int)
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull InputStream openNonAsset(@NonNull String fileName, int accessMode)
throws IOException {
return openNonAsset(0, fileName, accessMode);
@@ -836,6 +855,7 @@
* @param fileName Name of the asset to retrieve.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull InputStream openNonAsset(int cookie, @NonNull String fileName)
throws IOException {
return openNonAsset(cookie, fileName, ACCESS_STREAMING);
@@ -849,6 +869,7 @@
* @param accessMode Desired access mode for retrieving the data.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull InputStream openNonAsset(int cookie, @NonNull String fileName, int accessMode)
throws IOException {
Preconditions.checkNotNull(fileName, "fileName");
@@ -970,6 +991,7 @@
}
}
+ @UnsupportedAppUsage
void applyStyle(long themePtr, @AttrRes int defStyleAttr, @StyleRes int defStyleRes,
@Nullable XmlBlock.Parser parser, @NonNull int[] inAttrs, long outValuesAddress,
long outIndicesAddress) {
@@ -984,6 +1006,7 @@
}
}
+ @UnsupportedAppUsage
boolean resolveAttrs(long themePtr, @AttrRes int defStyleAttr, @StyleRes int defStyleRes,
@Nullable int[] inValues, @NonNull int[] inAttrs, @NonNull int[] outValues,
@NonNull int[] outIndices) {
@@ -999,6 +1022,7 @@
}
}
+ @UnsupportedAppUsage
boolean retrieveAttributes(@NonNull XmlBlock.Parser parser, @NonNull int[] inAttrs,
@NonNull int[] outValues, @NonNull int[] outIndices) {
Preconditions.checkNotNull(parser, "parser");
@@ -1014,6 +1038,7 @@
}
}
+ @UnsupportedAppUsage
long createTheme() {
synchronized (this) {
ensureValidLocked();
@@ -1066,6 +1091,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final int getAssetInt() {
throw new UnsupportedOperationException();
}
@@ -1073,6 +1099,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final long getNativeAsset() {
return mAssetNativePtr;
}
@@ -1169,6 +1196,7 @@
* instantiate a new AssetManager class to see the new data.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isUpToDate() {
for (ApkAssets apkAssets : getApkAssets()) {
if (!apkAssets.isUpToDate()) {
@@ -1228,6 +1256,7 @@
* applications.
* @hide
*/
+ @UnsupportedAppUsage
public void setConfiguration(int mcc, int mnc, @Nullable String locale, int orientation,
int touchscreen, int density, int keyboard, int keyboardHidden, int navigation,
int screenWidth, int screenHeight, int smallestScreenWidthDp, int screenWidthDp,
@@ -1244,6 +1273,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public SparseArray<String> getAssignedPackageIdentifiers() {
synchronized (this) {
ensureValidLocked();
@@ -1367,6 +1397,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static native int getGlobalAssetCount();
/**
@@ -1377,5 +1408,6 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static native int getGlobalAssetManagerCount();
}
diff --git a/core/java/android/content/res/ColorStateList.java b/core/java/android/content/res/ColorStateList.java
index faf2381..16b9726 100644
--- a/core/java/android/content/res/ColorStateList.java
+++ b/core/java/android/content/res/ColorStateList.java
@@ -30,6 +30,7 @@
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.UnsupportedAppUsage;
import android.util.AttributeSet;
import android.util.Log;
import android.util.MathUtils;
@@ -132,16 +133,21 @@
private static final SparseArray<WeakReference<ColorStateList>> sCache = new SparseArray<>();
/** Lazily-created factory for this color state list. */
+ @UnsupportedAppUsage
private ColorStateListFactory mFactory;
private int[][] mThemeAttrs;
private @Config int mChangingConfigurations;
+ @UnsupportedAppUsage
private int[][] mStateSpecs;
+ @UnsupportedAppUsage
private int[] mColors;
+ @UnsupportedAppUsage
private int mDefaultColor;
private boolean mIsOpaque;
+ @UnsupportedAppUsage
private ColorStateList() {
// Not publicly instantiable.
}
@@ -394,6 +400,7 @@
* @hide only for resource preloading
*/
@Override
+ @UnsupportedAppUsage
public boolean canApplyTheme() {
return mThemeAttrs != null;
}
@@ -474,6 +481,7 @@
* @hide only for resource preloading
*/
@Override
+ @UnsupportedAppUsage
public ColorStateList obtainForTheme(Theme t) {
if (t == null || !canApplyTheme()) {
return this;
@@ -579,6 +587,7 @@
* @return the states in this {@link ColorStateList}
* @hide
*/
+ @UnsupportedAppUsage
public int[][] getStates() {
return mStateSpecs;
}
@@ -590,6 +599,7 @@
* @return the colors in this {@link ColorStateList}
* @hide
*/
+ @UnsupportedAppUsage
public int[] getColors() {
return mColors;
}
@@ -634,6 +644,7 @@
/**
* Updates the default color and opacity.
*/
+ @UnsupportedAppUsage
private void onColorsChanged() {
int defaultColor = DEFAULT_COLOR;
boolean isOpaque = true;
@@ -677,6 +688,7 @@
private static class ColorStateListFactory extends ConstantState<ComplexColor> {
private final ColorStateList mSrc;
+ @UnsupportedAppUsage
public ColorStateListFactory(ColorStateList src) {
mSrc = src;
}
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index 781e235..1ca7b13 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ApplicationInfo;
import android.graphics.Canvas;
import android.graphics.PointF;
@@ -38,6 +39,7 @@
*/
public class CompatibilityInfo implements Parcelable {
/** default compatibility info object for compatible applications */
+ @UnsupportedAppUsage
public static final CompatibilityInfo DEFAULT_COMPATIBILITY_INFO = new CompatibilityInfo() {
};
@@ -92,6 +94,7 @@
/**
* Application's scale.
*/
+ @UnsupportedAppUsage
public final float applicationScale;
/**
@@ -99,6 +102,7 @@
*/
public final float applicationInvertedScale;
+ @UnsupportedAppUsage
public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw,
boolean forceCompat) {
int compatFlags = 0;
@@ -259,6 +263,7 @@
applicationInvertedScale = invertedScale;
}
+ @UnsupportedAppUsage
private CompatibilityInfo() {
this(NEVER_NEEDS_COMPAT, DisplayMetrics.DENSITY_DEVICE,
1.0f,
@@ -268,10 +273,12 @@
/**
* @return true if the scaling is required
*/
+ @UnsupportedAppUsage
public boolean isScalingRequired() {
return (mCompatibilityFlags&SCALING_REQUIRED) != 0;
}
+ @UnsupportedAppUsage
public boolean supportsScreen() {
return (mCompatibilityFlags&NEEDS_SCREEN_COMPAT) == 0;
}
@@ -292,6 +299,7 @@
* Returns the translator which translates the coordinates in compatibility mode.
* @param params the window's parameter
*/
+ @UnsupportedAppUsage
public Translator getTranslator() {
return isScalingRequired() ? new Translator() : null;
}
@@ -301,7 +309,9 @@
* @hide
*/
public class Translator {
+ @UnsupportedAppUsage
final public float applicationScale;
+ @UnsupportedAppUsage
final public float applicationInvertedScale;
private Rect mContentInsetsBuffer = null;
@@ -321,6 +331,7 @@
/**
* Translate the screen rect to the application frame.
*/
+ @UnsupportedAppUsage
public void translateRectInScreenToAppWinFrame(Rect rect) {
rect.scale(applicationInvertedScale);
}
@@ -328,6 +339,7 @@
/**
* Translate the region in window to screen.
*/
+ @UnsupportedAppUsage
public void translateRegionInWindowToScreen(Region transparentRegion) {
transparentRegion.scale(applicationScale);
}
@@ -335,6 +347,7 @@
/**
* Apply translation to the canvas that is necessary to draw the content.
*/
+ @UnsupportedAppUsage
public void translateCanvas(Canvas canvas) {
if (applicationScale == 1.5f) {
/* When we scale for compatibility, we can put our stretched
@@ -361,6 +374,7 @@
/**
* Translate the motion event captured on screen to the application's window.
*/
+ @UnsupportedAppUsage
public void translateEventInScreenToAppWindow(MotionEvent event) {
event.scale(applicationInvertedScale);
}
@@ -369,6 +383,7 @@
* Translate the window's layout parameter, from application's view to
* Screen's view.
*/
+ @UnsupportedAppUsage
public void translateWindowLayout(WindowManager.LayoutParams params) {
params.scale(applicationScale);
}
@@ -376,6 +391,7 @@
/**
* Translate a Rect in application's window to screen.
*/
+ @UnsupportedAppUsage
public void translateRectInAppWindowToScreen(Rect rect) {
rect.scale(applicationScale);
}
@@ -383,6 +399,7 @@
/**
* Translate a Rect in screen coordinates into the app window's coordinates.
*/
+ @UnsupportedAppUsage
public void translateRectInScreenToAppWindow(Rect rect) {
rect.scale(applicationInvertedScale);
}
@@ -410,6 +427,7 @@
* Translate the content insets in application window to Screen. This uses
* the internal buffer for content insets to avoid extra object allocation.
*/
+ @UnsupportedAppUsage
public Rect getTranslatedContentInsets(Rect contentInsets) {
if (mContentInsetsBuffer == null) mContentInsetsBuffer = new Rect();
mContentInsetsBuffer.set(contentInsets);
@@ -488,6 +506,7 @@
* @param outDm If non-null the width and height will be set to their scaled values.
* @return Returns the scaling factor for the window.
*/
+ @UnsupportedAppUsage
public static float computeCompatibleScaling(DisplayMetrics dm, DisplayMetrics outDm) {
final int width = dm.noncompatWidthPixels;
final int height = dm.noncompatHeightPixels;
@@ -593,6 +612,7 @@
dest.writeFloat(applicationInvertedScale);
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<CompatibilityInfo> CREATOR
= new Parcelable.Creator<CompatibilityInfo>() {
@Override
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index 193e56e..f7aea97 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -44,6 +44,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.WindowConfiguration;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo.Config;
@@ -127,6 +128,7 @@
* questionable whether this is the right way to expose the functionality.
* @hide
*/
+ @UnsupportedAppUsage
public boolean userSetLocale;
@@ -793,6 +795,7 @@
/**
* @hide Internal book-keeping.
*/
+ @UnsupportedAppUsage
public int seq;
/** @hide */
@@ -1207,6 +1210,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
@Deprecated public void makeDefault() {
setToDefaults();
}
@@ -1978,6 +1982,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String resourceQualifierString(Configuration config) {
return resourceQualifierString(config, null);
}
@@ -2264,6 +2269,7 @@
* This is fine for device configurations as no member is ever undefined.
* {@hide}
*/
+ @UnsupportedAppUsage
public static Configuration generateDelta(Configuration base, Configuration change) {
final Configuration delta = new Configuration();
if (base.fontScale != change.fontScale) {
diff --git a/core/java/android/content/res/ConfigurationBoundResourceCache.java b/core/java/android/content/res/ConfigurationBoundResourceCache.java
index 70290c4..3af395a 100644
--- a/core/java/android/content/res/ConfigurationBoundResourceCache.java
+++ b/core/java/android/content/res/ConfigurationBoundResourceCache.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo.Config;
/**
diff --git a/core/java/android/content/res/DrawableCache.java b/core/java/android/content/res/DrawableCache.java
index 7b27fac..d4f0ca5 100644
--- a/core/java/android/content/res/DrawableCache.java
+++ b/core/java/android/content/res/DrawableCache.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.drawable.Drawable;
/**
@@ -31,6 +32,7 @@
* @return a new instance of the resource, or {@code null} if not in
* the cache
*/
+ @UnsupportedAppUsage
public Drawable getInstance(long key, Resources resources, Resources.Theme theme) {
final Drawable.ConstantState entry = get(key, theme);
if (entry != null) {
diff --git a/core/java/android/content/res/ObbInfo.java b/core/java/android/content/res/ObbInfo.java
index b653f9f..452fdce 100644
--- a/core/java/android/content/res/ObbInfo.java
+++ b/core/java/android/content/res/ObbInfo.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -53,6 +54,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public byte[] salt;
// Only allow things in this package to instantiate.
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index ef0dce3..cd250b8 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -39,6 +39,7 @@
import android.annotation.StringRes;
import android.annotation.StyleRes;
import android.annotation.StyleableRes;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo.Config;
@@ -102,22 +103,28 @@
private static final Object sSync = new Object();
// Used by BridgeResources in layoutlib
+ @UnsupportedAppUsage
static Resources mSystem = null;
+ @UnsupportedAppUsage
private ResourcesImpl mResourcesImpl;
// Pool of TypedArrays targeted to this Resources object.
+ @UnsupportedAppUsage
final SynchronizedPool<TypedArray> mTypedArrayPool = new SynchronizedPool<>(5);
/** Used to inflate drawable objects from XML. */
+ @UnsupportedAppUsage
private DrawableInflater mDrawableInflater;
/** Lock object used to protect access to {@link #mTmpValue}. */
private final Object mTmpValueLock = new Object();
/** Single-item pool used to minimize TypedValue allocations. */
+ @UnsupportedAppUsage
private TypedValue mTmpValue = new TypedValue();
+ @UnsupportedAppUsage
final ClassLoader mClassLoader;
/**
@@ -149,6 +156,7 @@
* @return A theme resource identifier
* @hide
*/
+ @UnsupportedAppUsage
public static int selectDefaultTheme(int curTheme, int targetSdkVersion) {
return selectSystemTheme(curTheme, targetSdkVersion,
com.android.internal.R.style.Theme,
@@ -236,6 +244,7 @@
* class loader
* @hide
*/
+ @UnsupportedAppUsage
public Resources(@Nullable ClassLoader classLoader) {
mClassLoader = classLoader == null ? ClassLoader.getSystemClassLoader() : classLoader;
}
@@ -243,6 +252,7 @@
/**
* Only for creating the System resources.
*/
+ @UnsupportedAppUsage
private Resources() {
this(null);
@@ -261,6 +271,7 @@
* and updates all Theme references to new implementations as well.
* @hide
*/
+ @UnsupportedAppUsage
public void setImpl(ResourcesImpl impl) {
if (impl == mResourcesImpl) {
return;
@@ -284,6 +295,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public ResourcesImpl getImpl() {
return mResourcesImpl;
}
@@ -299,6 +311,7 @@
* @return the inflater used to create drawable objects
* @hide Pending API finalization.
*/
+ @UnsupportedAppUsage
public final DrawableInflater getDrawableInflater() {
if (mDrawableInflater == null) {
mDrawableInflater = new DrawableInflater(this, mClassLoader);
@@ -891,6 +904,7 @@
}
@NonNull
+ @UnsupportedAppUsage
Drawable loadDrawable(@NonNull TypedValue value, int id, int density, @Nullable Theme theme)
throws NotFoundException {
return mResourcesImpl.loadDrawable(this, value, id, density, theme);
@@ -1115,6 +1129,7 @@
* not exist or is not a floating-point value.
* @hide Pending API council approval.
*/
+ @UnsupportedAppUsage
public float getFloat(int id) {
final TypedValue value = obtainTempTypedValue();
try {
@@ -1389,6 +1404,7 @@
* retrieve XML attributes with style and theme information applied.
*/
public final class Theme {
+ @UnsupportedAppUsage
private ResourcesImpl.ThemeImpl mThemeImpl;
private Theme() {
@@ -1552,6 +1568,7 @@
* @hide
*/
@NonNull
+ @UnsupportedAppUsage
public TypedArray resolveAttributes(@NonNull int[] values, @NonNull int[] attrs) {
return mThemeImpl.resolveAttributes(this, values, attrs);
}
@@ -1841,6 +1858,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void updateSystemConfiguration(Configuration config, DisplayMetrics metrics,
CompatibilityInfo compat) {
if (mSystem != null) {
@@ -1861,6 +1879,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public DisplayAdjustments getDisplayAdjustments() {
return mResourcesImpl.getDisplayAdjustments();
}
@@ -1887,6 +1906,7 @@
* @return compatibility info.
* @hide
*/
+ @UnsupportedAppUsage
public CompatibilityInfo getCompatibilityInfo() {
return mResourcesImpl.getCompatibilityInfo();
}
@@ -1896,6 +1916,7 @@
* @hide
*/
@VisibleForTesting
+ @UnsupportedAppUsage
public void setCompatibilityInfo(CompatibilityInfo ci) {
if (ci != null) {
mResourcesImpl.updateConfiguration(null, null, ci);
@@ -2133,6 +2154,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public LongSparseArray<ConstantState> getPreloadedDrawables() {
return mResourcesImpl.getPreloadedDrawables();
}
@@ -2146,6 +2168,7 @@
* @throws NotFoundException if the file could not be loaded
*/
@NonNull
+ @UnsupportedAppUsage
XmlResourceParser loadXmlResourceParser(@AnyRes int id, @NonNull String type)
throws NotFoundException {
final TypedValue value = obtainTempTypedValue();
@@ -2174,6 +2197,7 @@
* @throws NotFoundException if the file could not be loaded
*/
@NonNull
+ @UnsupportedAppUsage
XmlResourceParser loadXmlResourceParser(String file, int id, int assetCookie,
String type) throws NotFoundException {
return mResourcesImpl.loadXmlResourceParser(file, id, assetCookie, type);
diff --git a/core/java/android/content/res/ResourcesImpl.java b/core/java/android/content/res/ResourcesImpl.java
index 8c98067..19e399a 100644
--- a/core/java/android/content/res/ResourcesImpl.java
+++ b/core/java/android/content/res/ResourcesImpl.java
@@ -25,6 +25,7 @@
import android.annotation.RawRes;
import android.annotation.StyleRes;
import android.annotation.StyleableRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo.Config;
import android.content.res.AssetManager.AssetInputStream;
@@ -79,7 +80,9 @@
static final String TAG_PRELOAD = TAG + ".preload";
+ @UnsupportedAppUsage
private static final boolean TRACE_FOR_PRELOAD = false; // Do we still need it?
+ @UnsupportedAppUsage
private static final boolean TRACE_FOR_MISS_PRELOAD = false; // Do we still need it?
public static final boolean TRACE_FOR_DETAILED_PRELOAD =
@@ -96,28 +99,37 @@
private static final Object sSync = new Object();
private static boolean sPreloaded;
+ @UnsupportedAppUsage
private boolean mPreloading;
// Information about preloaded resources. Note that they are not
// protected by a lock, because while preloading in zygote we are all
// single-threaded, and after that these are immutable.
+ @UnsupportedAppUsage
private static final LongSparseArray<Drawable.ConstantState>[] sPreloadedDrawables;
+ @UnsupportedAppUsage
private static final LongSparseArray<Drawable.ConstantState> sPreloadedColorDrawables
= new LongSparseArray<>();
+ @UnsupportedAppUsage
private static final LongSparseArray<android.content.res.ConstantState<ComplexColor>>
sPreloadedComplexColors = new LongSparseArray<>();
/** Lock object used to protect access to caches and configuration. */
+ @UnsupportedAppUsage
private final Object mAccessLock = new Object();
// These are protected by mAccessLock.
private final Configuration mTmpConfig = new Configuration();
+ @UnsupportedAppUsage
private final DrawableCache mDrawableCache = new DrawableCache();
+ @UnsupportedAppUsage
private final DrawableCache mColorDrawableCache = new DrawableCache();
private final ConfigurationBoundResourceCache<ComplexColor> mComplexColorCache =
new ConfigurationBoundResourceCache<>();
+ @UnsupportedAppUsage
private final ConfigurationBoundResourceCache<Animator> mAnimatorCache =
new ConfigurationBoundResourceCache<>();
+ @UnsupportedAppUsage
private final ConfigurationBoundResourceCache<StateListAnimator> mStateListAnimatorCache =
new ConfigurationBoundResourceCache<>();
@@ -138,12 +150,14 @@
private final XmlBlock[] mCachedXmlBlocks = new XmlBlock[XML_BLOCK_CACHE_SIZE];
+ @UnsupportedAppUsage
final AssetManager mAssets;
private final DisplayMetrics mMetrics = new DisplayMetrics();
private final DisplayAdjustments mDisplayAdjustments;
private PluralRules mPluralRule;
+ @UnsupportedAppUsage
private final Configuration mConfiguration = new Configuration();
static {
@@ -163,6 +177,7 @@
* @param displayAdjustments this resource's Display override and compatibility info.
* Must not be null.
*/
+ @UnsupportedAppUsage
public ResourcesImpl(@NonNull AssetManager assets, @Nullable DisplayMetrics metrics,
@Nullable Configuration config, @NonNull DisplayAdjustments displayAdjustments) {
mAssets = assets;
@@ -176,10 +191,12 @@
return mDisplayAdjustments;
}
+ @UnsupportedAppUsage
public AssetManager getAssets() {
return mAssets;
}
+ @UnsupportedAppUsage
DisplayMetrics getDisplayMetrics() {
if (DEBUG_CONFIG) Slog.v(TAG, "Returning DisplayMetrics: " + mMetrics.widthPixels
+ "x" + mMetrics.heightPixels + " " + mMetrics.density);
@@ -207,6 +224,7 @@
}
}
+ @UnsupportedAppUsage
void getValue(@AnyRes int id, TypedValue outValue, boolean resolveRefs)
throws NotFoundException {
boolean found = mAssets.getResourceValue(id, 0, outValue, resolveRefs);
diff --git a/core/java/android/content/res/ResourcesKey.java b/core/java/android/content/res/ResourcesKey.java
index b03ed1e..1db2dd8 100644
--- a/core/java/android/content/res/ResourcesKey.java
+++ b/core/java/android/content/res/ResourcesKey.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.text.TextUtils;
import java.util.Arrays;
@@ -26,9 +27,11 @@
/** @hide */
public final class ResourcesKey {
@Nullable
+ @UnsupportedAppUsage
public final String mResDir;
@Nullable
+ @UnsupportedAppUsage
public final String[] mSplitResDirs;
@Nullable
@@ -47,6 +50,7 @@
private final int mHash;
+ @UnsupportedAppUsage
public ResourcesKey(@Nullable String resDir,
@Nullable String[] splitResDirs,
@Nullable String[] overlayDirs,
diff --git a/core/java/android/content/res/StringBlock.java b/core/java/android/content/res/StringBlock.java
index 5cfc41f..b5ec0f9 100644
--- a/core/java/android/content/res/StringBlock.java
+++ b/core/java/android/content/res/StringBlock.java
@@ -16,6 +16,7 @@
package android.content.res;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Color;
import android.text.*;
import android.text.style.*;
@@ -59,6 +60,7 @@
+ ": " + nativeGetSize(mNative));
}
+ @UnsupportedAppUsage
public CharSequence get(int idx) {
synchronized (this) {
if (mStrings != null) {
@@ -478,6 +480,7 @@
* are doing! The given native object must exist for the entire lifetime
* of this newly creating StringBlock.
*/
+ @UnsupportedAppUsage
StringBlock(long obj, boolean useSparse) {
mNative = obj;
mUseSparse = useSparse;
diff --git a/core/java/android/content/res/ThemedResourceCache.java b/core/java/android/content/res/ThemedResourceCache.java
index f1b1e74..06cafdb 100644
--- a/core/java/android/content/res/ThemedResourceCache.java
+++ b/core/java/android/content/res/ThemedResourceCache.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo.Config;
import android.content.res.Resources.Theme;
import android.content.res.Resources.ThemeKey;
@@ -32,6 +33,7 @@
* @param <T> type of data to cache
*/
abstract class ThemedResourceCache<T> {
+ @UnsupportedAppUsage
private ArrayMap<ThemeKey, LongSparseArray<WeakReference<T>>> mThemedEntries;
private LongSparseArray<WeakReference<T>> mUnthemedEntries;
private LongSparseArray<WeakReference<T>> mNullThemedEntries;
@@ -116,6 +118,7 @@
*
* @param configChanges a bitmask of configuration changes
*/
+ @UnsupportedAppUsage
public void onConfigurationChange(@Config int configChanges) {
prune(configChanges);
}
diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java
index cbb3c6d..30d2d5f 100644
--- a/core/java/android/content/res/TypedArray.java
+++ b/core/java/android/content/res/TypedArray.java
@@ -20,6 +20,7 @@
import android.annotation.ColorInt;
import android.annotation.Nullable;
import android.annotation.StyleableRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo.Config;
import android.graphics.Typeface;
@@ -70,19 +71,29 @@
static final int STYLE_CHANGING_CONFIGURATIONS = 4;
static final int STYLE_DENSITY = 5;
+ @UnsupportedAppUsage
private final Resources mResources;
+ @UnsupportedAppUsage
private DisplayMetrics mMetrics;
+ @UnsupportedAppUsage
private AssetManager mAssets;
+ @UnsupportedAppUsage
private boolean mRecycled;
+ @UnsupportedAppUsage
/*package*/ XmlBlock.Parser mXml;
+ @UnsupportedAppUsage
/*package*/ Resources.Theme mTheme;
+ @UnsupportedAppUsage
/*package*/ int[] mData;
/*package*/ long mDataAddress;
+ @UnsupportedAppUsage
/*package*/ int[] mIndices;
/*package*/ long mIndicesAddress;
+ @UnsupportedAppUsage
/*package*/ int mLength;
+ @UnsupportedAppUsage
/*package*/ TypedValue mValue = new TypedValue();
private void resize(int len) {
@@ -276,6 +287,7 @@
* @throws RuntimeException if the TypedArray has already been recycled.
* @hide
*/
+ @UnsupportedAppUsage
public String getNonConfigurationString(@StyleableRes int index,
@Config int allowedChangingConfigs) {
if (mRecycled) {
@@ -1165,6 +1177,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public int[] extractThemeAttrs() {
return extractThemeAttrs(null);
}
@@ -1173,6 +1186,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public int[] extractThemeAttrs(@Nullable int[] scrap) {
if (mRecycled) {
throw new RuntimeException("Cannot make calls to a recycled instance!");
@@ -1244,6 +1258,7 @@
return changingConfig;
}
+ @UnsupportedAppUsage
private boolean getValueAt(int index, TypedValue outValue) {
final int[] data = mData;
final int type = data[index + STYLE_TYPE];
diff --git a/core/java/android/content/res/XmlBlock.java b/core/java/android/content/res/XmlBlock.java
index d4ccffb..4e1159a 100644
--- a/core/java/android/content/res/XmlBlock.java
+++ b/core/java/android/content/res/XmlBlock.java
@@ -17,6 +17,7 @@
package android.content.res;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.TypedValue;
import com.android.internal.util.XmlUtils;
@@ -37,6 +38,7 @@
final class XmlBlock implements AutoCloseable {
private static final boolean DEBUG=false;
+ @UnsupportedAppUsage
public XmlBlock(byte[] data) {
mAssets = null;
mNative = nativeCreate(data, 0, data.length);
@@ -69,6 +71,7 @@
}
}
+ @UnsupportedAppUsage
public XmlResourceParser newParser() {
synchronized (this) {
if (mNative != 0) {
@@ -462,7 +465,9 @@
return mStrings.get(id);
}
+ @UnsupportedAppUsage
/*package*/ long mParseState;
+ @UnsupportedAppUsage
private final XmlBlock mBlock;
private boolean mStarted = false;
private boolean mDecNextDepth = false;
diff --git a/core/java/android/database/AbstractCursor.java b/core/java/android/database/AbstractCursor.java
index 76fa008..c6c2aa5 100644
--- a/core/java/android/database/AbstractCursor.java
+++ b/core/java/android/database/AbstractCursor.java
@@ -16,6 +16,7 @@
package android.database;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.net.Uri;
import android.os.Bundle;
@@ -68,6 +69,7 @@
@Deprecated
protected ContentResolver mContentResolver;
+ @UnsupportedAppUsage
private Uri mNotifyUri;
private final Object mSelfObserverLock = new Object();
@@ -77,6 +79,7 @@
private final DataSetObservable mDataSetObservable = new DataSetObservable();
private final ContentObservable mContentObservable = new ContentObservable();
+ @UnsupportedAppUsage
private Bundle mExtras = Bundle.EMPTY;
/* -------------------------------------------------------- */
diff --git a/core/java/android/database/AbstractWindowedCursor.java b/core/java/android/database/AbstractWindowedCursor.java
index 083485f..a988f068 100644
--- a/core/java/android/database/AbstractWindowedCursor.java
+++ b/core/java/android/database/AbstractWindowedCursor.java
@@ -16,6 +16,8 @@
package android.database;
+import android.annotation.UnsupportedAppUsage;
+
/**
* A base class for Cursors that store their data in {@link CursorWindow}s.
* <p>
@@ -179,6 +181,7 @@
* Closes the cursor window and sets {@link #mWindow} to null.
* @hide
*/
+ @UnsupportedAppUsage
protected void closeWindow() {
if (mWindow != null) {
mWindow.close();
@@ -193,6 +196,7 @@
* @param name The window name.
* @hide
*/
+ @UnsupportedAppUsage
protected void clearOrCreateWindow(String name) {
if (mWindow == null) {
mWindow = new CursorWindow(name);
@@ -203,6 +207,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected void onDeactivateOrClose() {
super.onDeactivateOrClose();
closeWindow();
diff --git a/core/java/android/database/ContentObserver.java b/core/java/android/database/ContentObserver.java
index 5f01e30..798b783 100644
--- a/core/java/android/database/ContentObserver.java
+++ b/core/java/android/database/ContentObserver.java
@@ -16,6 +16,7 @@
package android.database;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Handler;
import android.os.UserHandle;
@@ -59,6 +60,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public IContentObserver releaseContentObserver() {
synchronized (mLock) {
final Transport oldTransport = mTransport;
diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java
index a748f4d..d9443d9 100644
--- a/core/java/android/database/CursorWindow.java
+++ b/core/java/android/database/CursorWindow.java
@@ -17,6 +17,7 @@
package android.database;
import android.annotation.BytesLong;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.Resources;
import android.database.sqlite.SQLiteClosable;
import android.database.sqlite.SQLiteException;
@@ -45,12 +46,14 @@
private static final String STATS_TAG = "CursorWindowStats";
// This static member will be evaluated when first used.
+ @UnsupportedAppUsage
private static int sCursorWindowSize = -1;
/**
* The native CursorWindow object pointer. (FOR INTERNAL USE ONLY)
* @hide
*/
+ @UnsupportedAppUsage
public long mWindowPtr;
private int mStartPos;
@@ -744,6 +747,7 @@
dispose();
}
+ @UnsupportedAppUsage
private static final LongSparseArray<Integer> sWindowToPidMap = new LongSparseArray<Integer>();
private void recordNewWindow(int pid, long window) {
@@ -765,6 +769,7 @@
}
}
+ @UnsupportedAppUsage
private String printStats() {
StringBuilder buff = new StringBuilder();
int myPid = Process.myPid();
diff --git a/core/java/android/database/CursorWrapper.java b/core/java/android/database/CursorWrapper.java
index 63a2792..0d27dfb 100644
--- a/core/java/android/database/CursorWrapper.java
+++ b/core/java/android/database/CursorWrapper.java
@@ -16,6 +16,7 @@
package android.database;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.net.Uri;
import android.os.Bundle;
@@ -26,6 +27,7 @@
*/
public class CursorWrapper implements Cursor {
/** @hide */
+ @UnsupportedAppUsage
protected final Cursor mCursor;
/**
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java
index 7a8ab60..f78b484 100644
--- a/core/java/android/database/DatabaseUtils.java
+++ b/core/java/android/database/DatabaseUtils.java
@@ -17,6 +17,7 @@
package android.database;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentValues;
import android.content.Context;
import android.content.OperationApplicationException;
@@ -321,6 +322,7 @@
* @return object value type
* @hide
*/
+ @UnsupportedAppUsage
public static int getTypeOfObject(Object obj) {
if (obj == null) {
return Cursor.FIELD_TYPE_NULL;
@@ -849,6 +851,7 @@
* the requested row.
* @hide
*/
+ @UnsupportedAppUsage
public static int cursorPickFillWindowStartPosition(
int cursorPosition, int cursorWindowCapacity) {
return Math.max(cursorPosition - cursorWindowCapacity / 3, 0);
diff --git a/core/java/android/database/MatrixCursor.java b/core/java/android/database/MatrixCursor.java
index 5e107f2..5033296 100644
--- a/core/java/android/database/MatrixCursor.java
+++ b/core/java/android/database/MatrixCursor.java
@@ -16,6 +16,7 @@
package android.database;
+import android.annotation.UnsupportedAppUsage;
import java.util.ArrayList;
/**
@@ -26,7 +27,9 @@
public class MatrixCursor extends AbstractCursor {
private final String[] columnNames;
+ @UnsupportedAppUsage
private Object[] data;
+ @UnsupportedAppUsage
private int rowCount = 0;
private final int columnCount;
@@ -61,6 +64,7 @@
/**
* Gets value at the given column for the current row.
*/
+ @UnsupportedAppUsage
private Object get(int column) {
if (column < 0 || column >= columnCount) {
throw new CursorIndexOutOfBoundsException("Requested column: "
diff --git a/core/java/android/database/RedactingCursor.java b/core/java/android/database/RedactingCursor.java
new file mode 100644
index 0000000..6322d56
--- /dev/null
+++ b/core/java/android/database/RedactingCursor.java
@@ -0,0 +1,181 @@
+/*
+ * 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.database;
+
+import android.annotation.NonNull;
+import android.util.SparseArray;
+
+import java.util.Map;
+
+/**
+ * Cursor that offers to redact values of requested columns.
+ *
+ * @hide
+ */
+public class RedactingCursor extends CrossProcessCursorWrapper {
+ private final SparseArray<Object> mRedactions;
+
+ private RedactingCursor(@NonNull Cursor cursor, SparseArray<Object> redactions) {
+ super(cursor);
+ mRedactions = redactions;
+ }
+
+ /**
+ * Create a wrapped instance of the given {@link Cursor} which redacts the
+ * requested columns so they always return specific values when accessed.
+ * <p>
+ * If a redacted column appears multiple times in the underlying cursor, all
+ * instances will be redacted. If none of the redacted columns appear in the
+ * given cursor, the given cursor will be returned untouched to improve
+ * performance.
+ */
+ public static Cursor create(@NonNull Cursor cursor, @NonNull Map<String, Object> redactions) {
+ final SparseArray<Object> internalRedactions = new SparseArray<>();
+
+ final String[] columns = cursor.getColumnNames();
+ for (int i = 0; i < columns.length; i++) {
+ if (redactions.containsKey(columns[i])) {
+ internalRedactions.put(i, redactions.get(columns[i]));
+ }
+ }
+
+ if (internalRedactions.size() == 0) {
+ return cursor;
+ } else {
+ return new RedactingCursor(cursor, internalRedactions);
+ }
+ }
+
+ @Override
+ public void fillWindow(int position, CursorWindow window) {
+ // Fill window directly to ensure data is redacted
+ DatabaseUtils.cursorFillWindow(this, position, window);
+ }
+
+ @Override
+ public CursorWindow getWindow() {
+ // Returning underlying window risks leaking redacted data
+ return null;
+ }
+
+ @Override
+ public Cursor getWrappedCursor() {
+ throw new UnsupportedOperationException(
+ "Returning underlying cursor risks leaking redacted data");
+ }
+
+ @Override
+ public double getDouble(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (double) mRedactions.valueAt(i);
+ } else {
+ return super.getDouble(columnIndex);
+ }
+ }
+
+ @Override
+ public float getFloat(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (float) mRedactions.valueAt(i);
+ } else {
+ return super.getFloat(columnIndex);
+ }
+ }
+
+ @Override
+ public int getInt(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (int) mRedactions.valueAt(i);
+ } else {
+ return super.getInt(columnIndex);
+ }
+ }
+
+ @Override
+ public long getLong(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (long) mRedactions.valueAt(i);
+ } else {
+ return super.getLong(columnIndex);
+ }
+ }
+
+ @Override
+ public short getShort(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (short) mRedactions.valueAt(i);
+ } else {
+ return super.getShort(columnIndex);
+ }
+ }
+
+ @Override
+ public String getString(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (String) mRedactions.valueAt(i);
+ } else {
+ return super.getString(columnIndex);
+ }
+ }
+
+ @Override
+ public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ buffer.data = ((String) mRedactions.valueAt(i)).toCharArray();
+ buffer.sizeCopied = buffer.data.length;
+ } else {
+ super.copyStringToBuffer(columnIndex, buffer);
+ }
+ }
+
+ @Override
+ public byte[] getBlob(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return (byte[]) mRedactions.valueAt(i);
+ } else {
+ return super.getBlob(columnIndex);
+ }
+ }
+
+ @Override
+ public int getType(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return DatabaseUtils.getTypeOfObject(mRedactions.valueAt(i));
+ } else {
+ return super.getType(columnIndex);
+ }
+ }
+
+ @Override
+ public boolean isNull(int columnIndex) {
+ final int i = mRedactions.indexOfKey(columnIndex);
+ if (i >= 0) {
+ return mRedactions.valueAt(i) == null;
+ } else {
+ return super.isNull(columnIndex);
+ }
+ }
+}
diff --git a/core/java/android/database/sqlite/DatabaseObjectNotClosedException.java b/core/java/android/database/sqlite/DatabaseObjectNotClosedException.java
index f28c70f..2af06e1 100644
--- a/core/java/android/database/sqlite/DatabaseObjectNotClosedException.java
+++ b/core/java/android/database/sqlite/DatabaseObjectNotClosedException.java
@@ -16,6 +16,8 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An exception that indicates that garbage-collector is finalizing a database object
* that is not explicitly closed
@@ -25,6 +27,7 @@
private static final String s = "Application did not close the cursor or database object " +
"that was opened here";
+ @UnsupportedAppUsage
public DatabaseObjectNotClosedException() {
super(s);
}
diff --git a/core/java/android/database/sqlite/SQLiteClosable.java b/core/java/android/database/sqlite/SQLiteClosable.java
index adfbc6e..d6a71da 100644
--- a/core/java/android/database/sqlite/SQLiteClosable.java
+++ b/core/java/android/database/sqlite/SQLiteClosable.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import java.io.Closeable;
/**
@@ -24,6 +25,7 @@
* This class implements a primitive reference counting scheme for database objects.
*/
public abstract class SQLiteClosable implements Closeable {
+ @UnsupportedAppUsage
private int mReferenceCount = 1;
/**
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index 3597260..3ca852a 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -208,10 +208,15 @@
}
private void open() {
- mConnectionPtr = nativeOpen(mConfiguration.path, mConfiguration.openFlags,
- mConfiguration.label,
- SQLiteDebug.Consts.DEBUG_SQL_STATEMENTS, SQLiteDebug.Consts.DEBUG_SQL_TIME,
- mConfiguration.lookasideSlotSize, mConfiguration.lookasideSlotCount);
+ final int cookie = mRecentOperations.beginOperation("open", null, null);
+ try {
+ mConnectionPtr = nativeOpen(mConfiguration.path, mConfiguration.openFlags,
+ mConfiguration.label,
+ SQLiteDebug.Consts.DEBUG_SQL_STATEMENTS, SQLiteDebug.Consts.DEBUG_SQL_TIME,
+ mConfiguration.lookasideSlotSize, mConfiguration.lookasideSlotCount);
+ } finally {
+ mRecentOperations.endOperation(cookie);
+ }
setPageSize();
setForeignKeyModeFromConfiguration();
setWalModeFromConfiguration();
@@ -609,7 +614,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 +659,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 +1321,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 +1349,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 +1407,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 +1434,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 +1518,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 +1534,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 +1556,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/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index 13e6f71..e3c4098 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import android.database.AbstractWindowedCursor;
import android.database.CursorWindow;
import android.database.DatabaseUtils;
@@ -39,12 +40,14 @@
static final int NO_COUNT = -1;
/** The name of the table to edit */
+ @UnsupportedAppUsage
private final String mEditTable;
/** The names of the columns in the rows */
private final String[] mColumns;
/** The query object for the cursor */
+ @UnsupportedAppUsage
private final SQLiteQuery mQuery;
/** The compiled query this cursor came from */
@@ -139,6 +142,7 @@
return mCount;
}
+ @UnsupportedAppUsage
private void fillWindow(int requiredPos) {
clearOrCreateWindow(getDatabase().getPath());
try {
diff --git a/core/java/android/database/sqlite/SQLiteCustomFunction.java b/core/java/android/database/sqlite/SQLiteCustomFunction.java
index 02f3284..ec20458 100644
--- a/core/java/android/database/sqlite/SQLiteCustomFunction.java
+++ b/core/java/android/database/sqlite/SQLiteCustomFunction.java
@@ -16,13 +16,17 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Describes a custom SQL function.
*
* @hide
*/
public final class SQLiteCustomFunction {
+ @UnsupportedAppUsage
public final String name;
+ @UnsupportedAppUsage
public final int numArgs;
public final SQLiteDatabase.CustomFunction callback;
@@ -47,6 +51,7 @@
// Called from native.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void dispatchCallback(String[] args) {
callback.callback(args);
}
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index a4b989a..01557c5 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -20,6 +20,7 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.ContentValues;
import android.database.Cursor;
@@ -91,6 +92,7 @@
// Thread-local for database sessions that belong to this database.
// Each thread has its own database session.
// INVARIANT: Immutable.
+ @UnsupportedAppUsage
private final ThreadLocal<SQLiteSession> mThreadSession = ThreadLocal
.withInitial(this::createSession);
@@ -124,12 +126,14 @@
// The database configuration.
// INVARIANT: Guarded by mLock.
+ @UnsupportedAppUsage
private final SQLiteDatabaseConfiguration mConfigurationLocked;
// The connection pool for the database, null when closed.
// The pool itself is thread-safe, but the reference to it can only be acquired
// when the lock is held.
// INVARIANT: Guarded by mLock.
+ @UnsupportedAppUsage
private SQLiteConnectionPool mConnectionPoolLocked;
// True if the database has attached databases.
@@ -190,6 +194,7 @@
public static final int CONFLICT_NONE = 0;
/** {@hide} */
+ @UnsupportedAppUsage
public static final String[] CONFLICT_VALUES = new String[]
{"", " OR ROLLBACK ", " OR ABORT ", " OR FAIL ", " OR IGNORE ", " OR REPLACE "};
@@ -400,6 +405,7 @@
* @throws IllegalStateException if the thread does not yet have a session and
* the database is not open.
*/
+ @UnsupportedAppUsage
SQLiteSession getThreadSession() {
return mThreadSession.get(); // initialValue() throws if database closed
}
@@ -543,6 +549,7 @@
beginTransaction(transactionListener, false);
}
+ @UnsupportedAppUsage
private void beginTransaction(SQLiteTransactionListener transactionListener,
boolean exclusive) {
acquireReference();
@@ -730,6 +737,7 @@
return openDatabase(path.getPath(), openParams);
}
+ @UnsupportedAppUsage
private static SQLiteDatabase openDatabase(@NonNull String path,
@NonNull OpenParams openParams) {
Preconditions.checkArgument(openParams != null, "OpenParams cannot be null");
@@ -839,6 +847,7 @@
* @see #isReadOnly()
* @hide
*/
+ @UnsupportedAppUsage
public void reopenReadWrite() {
synchronized (mLock) {
throwIfNotOpenLocked();
@@ -2139,6 +2148,7 @@
return dbStatsList;
}
+ @UnsupportedAppUsage
private void collectDbStats(ArrayList<DbStats> dbStatsList) {
synchronized (mLock) {
if (mConnectionPoolLocked != null) {
@@ -2147,6 +2157,7 @@
}
}
+ @UnsupportedAppUsage
private static ArrayList<SQLiteDatabase> getActiveDatabases() {
ArrayList<SQLiteDatabase> databases = new ArrayList<SQLiteDatabase>();
synchronized (sActiveDatabases) {
diff --git a/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java b/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java
index bb62268..48f1021 100644
--- a/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java
+++ b/core/java/android/database/sqlite/SQLiteDatabaseConfiguration.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import java.util.ArrayList;
import java.util.Locale;
import java.util.regex.Pattern;
@@ -67,6 +68,7 @@
*
* Default is 25.
*/
+ @UnsupportedAppUsage
public int maxSqlCacheSize;
/**
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/database/sqlite/SQLiteGlobal.java b/core/java/android/database/sqlite/SQLiteGlobal.java
index d6d9764..e6b6acf 100644
--- a/core/java/android/database/sqlite/SQLiteGlobal.java
+++ b/core/java/android/database/sqlite/SQLiteGlobal.java
@@ -39,11 +39,18 @@
public final class SQLiteGlobal {
private static final String TAG = "SQLiteGlobal";
+ /** @hide */
+ public static final String SYNC_MODE_FULL = "FULL";
+
private static final Object sLock = new Object();
+
private static int sDefaultPageSize;
private static native int nativeReleaseMemory();
+ /** @hide */
+ public static volatile String sDefaultSyncMode;
+
private SQLiteGlobal() {
}
@@ -103,6 +110,11 @@
* Gets the default database synchronization mode when WAL is not in use.
*/
public static String getDefaultSyncMode() {
+ // Use the FULL synchronous mode for system processes by default.
+ String defaultMode = sDefaultSyncMode;
+ if (defaultMode != null) {
+ return defaultMode;
+ }
return SystemProperties.get("debug.sqlite.syncmode",
Resources.getSystem().getString(
com.android.internal.R.string.db_default_sync_mode));
@@ -112,6 +124,11 @@
* Gets the database synchronization mode when in WAL mode.
*/
public static String getWALSyncMode() {
+ // Use the FULL synchronous mode for system processes by default.
+ String defaultMode = sDefaultSyncMode;
+ if (defaultMode != null) {
+ return defaultMode;
+ }
return SystemProperties.get("debug.sqlite.wal.syncmode",
Resources.getSystem().getString(
com.android.internal.R.string.db_wal_sync_mode));
diff --git a/core/java/android/database/sqlite/SQLiteOpenHelper.java b/core/java/android/database/sqlite/SQLiteOpenHelper.java
index 7ff6635..1377806 100644
--- a/core/java/android/database/sqlite/SQLiteOpenHelper.java
+++ b/core/java/android/database/sqlite/SQLiteOpenHelper.java
@@ -19,6 +19,7 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.database.DatabaseErrorHandler;
import android.database.SQLException;
@@ -52,6 +53,7 @@
private static final String TAG = SQLiteOpenHelper.class.getSimpleName();
private final Context mContext;
+ @UnsupportedAppUsage
private final String mName;
private final int mNewVersion;
private final int mMinimumSupportedVersion;
diff --git a/core/java/android/database/sqlite/SQLiteProgram.java b/core/java/android/database/sqlite/SQLiteProgram.java
index 26e8c31..8304133 100644
--- a/core/java/android/database/sqlite/SQLiteProgram.java
+++ b/core/java/android/database/sqlite/SQLiteProgram.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import android.database.DatabaseUtils;
import android.os.CancellationSignal;
@@ -31,10 +32,12 @@
private static final String[] EMPTY_STRING_ARRAY = new String[0];
private final SQLiteDatabase mDatabase;
+ @UnsupportedAppUsage
private final String mSql;
private final boolean mReadOnly;
private final String[] mColumnNames;
private final int mNumParameters;
+ @UnsupportedAppUsage
private final Object[] mBindArgs;
SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs,
diff --git a/core/java/android/database/sqlite/SQLiteQueryBuilder.java b/core/java/android/database/sqlite/SQLiteQueryBuilder.java
index 06560f2..b705ebb 100644
--- a/core/java/android/database/sqlite/SQLiteQueryBuilder.java
+++ b/core/java/android/database/sqlite/SQLiteQueryBuilder.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.DatabaseUtils;
@@ -49,8 +50,11 @@
Pattern.compile("\\s*\\d+\\s*(,\\s*\\d+\\s*)?");
private Map<String, String> mProjectionMap = null;
+ @UnsupportedAppUsage
private String mTables = "";
+ @UnsupportedAppUsage
private StringBuilder mWhereClause = null; // lazily created
+ @UnsupportedAppUsage
private boolean mDistinct;
private SQLiteDatabase.CursorFactory mFactory;
private boolean mStrict;
@@ -782,6 +786,7 @@
return query.toString();
}
+ @UnsupportedAppUsage
private String[] computeProjection(String[] projectionIn) {
if (projectionIn != null && projectionIn.length > 0) {
if (mProjectionMap != null) {
diff --git a/core/java/android/database/sqlite/SQLiteSession.java b/core/java/android/database/sqlite/SQLiteSession.java
index d80ab1f..a9ac9e7 100644
--- a/core/java/android/database/sqlite/SQLiteSession.java
+++ b/core/java/android/database/sqlite/SQLiteSession.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import android.database.CursorWindow;
import android.database.DatabaseUtils;
import android.os.CancellationSignal;
@@ -291,6 +292,7 @@
* @see #yieldTransaction
* @see #endTransaction
*/
+ @UnsupportedAppUsage
public void beginTransaction(int transactionMode,
SQLiteTransactionListener transactionListener, int connectionFlags,
CancellationSignal cancellationSignal) {
diff --git a/core/java/android/database/sqlite/SQLiteStatement.java b/core/java/android/database/sqlite/SQLiteStatement.java
index b1092d76..8f8f676 100644
--- a/core/java/android/database/sqlite/SQLiteStatement.java
+++ b/core/java/android/database/sqlite/SQLiteStatement.java
@@ -16,6 +16,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import android.os.ParcelFileDescriptor;
/**
@@ -27,6 +28,7 @@
* </p>
*/
public final class SQLiteStatement extends SQLiteProgram {
+ @UnsupportedAppUsage
SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) {
super(db, sql, bindArgs, null);
}
diff --git a/core/java/android/database/sqlite/SqliteWrapper.java b/core/java/android/database/sqlite/SqliteWrapper.java
index b019618..e317164 100644
--- a/core/java/android/database/sqlite/SqliteWrapper.java
+++ b/core/java/android/database/sqlite/SqliteWrapper.java
@@ -17,6 +17,7 @@
package android.database.sqlite;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
@@ -44,6 +45,7 @@
return e.getMessage().equals(SQLITE_EXCEPTION_DETAIL_MESSAGE);
}
+ @UnsupportedAppUsage
public static void checkSQLiteException(Context context, SQLiteException e) {
if (isLowMemory(e)) {
Toast.makeText(context, com.android.internal.R.string.low_memory,
@@ -53,6 +55,7 @@
}
}
+ @UnsupportedAppUsage
public static Cursor query(Context context, ContentResolver resolver, Uri uri,
String[] projection, String selection, String[] selectionArgs, String sortOrder) {
try {
@@ -73,6 +76,7 @@
return false;
}
}
+ @UnsupportedAppUsage
public static int update(Context context, ContentResolver resolver, Uri uri,
ContentValues values, String where, String[] selectionArgs) {
try {
@@ -84,6 +88,7 @@
}
}
+ @UnsupportedAppUsage
public static int delete(Context context, ContentResolver resolver, Uri uri,
String where, String[] selectionArgs) {
try {
@@ -95,6 +100,7 @@
}
}
+ @UnsupportedAppUsage
public static Uri insert(Context context, ContentResolver resolver,
Uri uri, ContentValues values) {
try {
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/biometrics/BiometricPrompt.java b/core/java/android/hardware/biometrics/BiometricPrompt.java
index bad418a..02bcff5 100644
--- a/core/java/android/hardware/biometrics/BiometricPrompt.java
+++ b/core/java/android/hardware/biometrics/BiometricPrompt.java
@@ -69,6 +69,7 @@
* @hide
*/
public static final int HIDE_DIALOG_DELAY = 2000; // ms
+
/**
* @hide
*/
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 60e4ce2..35584ae 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;
@@ -1249,7 +1255,9 @@
* <p>If this device is the largest or only camera device with a given facing, then this
* position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
* from the main sensor along the +X axis (to the right from the user's perspective) will
- * report <code>(0.03, 0, 0)</code>.</p>
+ * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision
+ * applications, the position needs to be negated to convert it to a translation from the
+ * camera to the origin.</p>
* <p>To transform a pixel coordinates between two cameras facing the same direction, first
* the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
* camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
@@ -1261,7 +1269,8 @@
* <p>To compare this against a real image from the destination camera, the destination camera
* image then needs to be corrected for radial distortion before comparison or sampling.</p>
* <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to
- * the center of the primary gyroscope on the device.</p>
+ * the center of the primary gyroscope on the device. The axis definitions are the same as
+ * with PRIMARY_CAMERA.</p>
* <p><b>Units</b>: Meters</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
*
@@ -1293,13 +1302,15 @@
* </code></pre>
* <p>which can then be combined with the camera pose rotation
* <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
- * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the
+ * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
* complete transform from world coordinates to pixel
* coordinates:</p>
- * <pre><code>P = [ K 0 * [ R t
- * 0 1 ] 0 1 ]
+ * <pre><code>P = [ K 0 * [ R -Rt
+ * 0 1 ] 0 1 ]
* </code></pre>
- * <p>and with <code>p_w</code> being a point in the world coordinate system
+ * <p>(Note the negation of poseTranslation when mapping from camera
+ * to world coordinates, and multiplication by the rotation).</p>
+ * <p>With <code>p_w</code> being a point in the world coordinate system
* and <code>p_s</code> being a point in the camera active pixel array
* coordinate system, and with the mapping including the
* homogeneous division by z:</p>
@@ -1321,6 +1332,13 @@
* activeArraySize rectangle), to determine the final pixel
* coordinate of the world point for processed (non-RAW)
* output buffers.</p>
+ * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
+ * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a
+ * precorrection active array of size <code>(10,10)</code>, the valid pixel
+ * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
+ * have an optical center at the exact center of the pixel grid, at
+ * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
+ * <code>(5,5)</code>.</p>
* <p><b>Units</b>:
* Pixels in the
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 1275a85..caa99d5 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -819,11 +819,11 @@
* camera in the list of supported camera devices.</p>
* <p>This capability requires the camera device to support the following:</p>
* <ul>
- * <li>This camera device must list the following static metadata entries in {@link android.hardware.camera2.CameraCharacteristics }:<ul>
- * <li>android.logicalMultiCamera.physicalIds</li>
- * <li>{@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType}</li>
- * </ul>
- * </li>
+ * <li>The IDs of underlying physical cameras are returned via
+ * {@link android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds }.</li>
+ * <li>This camera device must list static metadata
+ * {@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType} in
+ * {@link android.hardware.camera2.CameraCharacteristics }.</li>
* <li>The underlying physical cameras' static metadata must list the following entries,
* so that the application can correlate pixels from the physical streams:<ul>
* <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index aca77a5..4a20468 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;
}
@@ -2522,7 +2530,7 @@
* outputs will crop horizontally (pillarbox), and 16:9
* streams will match exactly. These additional crops will
* be centered within the crop region.</p>
- * <p>If the coordinate system is android.sensor.info.activeArraysSize, the width and height
+ * <p>If the coordinate system is {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, the width and height
* of the crop region cannot be set to be smaller than
* <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
* <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p>
@@ -2863,8 +2871,14 @@
new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
/**
- * <p>A control for selecting whether OIS position information is included in output
- * result metadata.</p>
+ * <p>A control for selecting whether optical stabilization (OIS) position
+ * information is included in output result metadata.</p>
+ * <p>Since optical image stabilization generally involves motion much faster than the duration
+ * of individualq image exposure, multiple OIS samples can be included for a single capture
+ * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
+ * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
+ * with the rolling shutter skew to account for lens motion during image exposure in
+ * post-processing algorithms.</p>
* <p><b>Possible values:</b>
* <ul>
* <li>{@link #STATISTICS_OIS_DATA_MODE_OFF OFF}</li>
@@ -3264,14 +3278,28 @@
* any correction at all would slow down capture rate. Every output stream will have a
* similar amount of enhancement applied.</p>
* <p>The correction only applies to processed outputs such as YUV, JPEG, or DEPTH16; it is not
- * applied to any RAW output. Metadata coordinates such as face rectangles or metering
- * regions are also not affected by correction.</p>
+ * applied to any RAW output.</p>
* <p>This control will be on by default on devices that support this control. Applications
* disabling distortion correction need to pay extra attention with the coordinate system of
* metering regions, crop region, and face rectangles. When distortion correction is OFF,
* metadata coordinates follow the coordinate system of
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. When distortion is not OFF, metadata
- * coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
+ * coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. The
+ * camera device will map these metadata fields to match the corrected image produced by the
+ * camera device, for both capture requests and results. However, this mapping is not very
+ * precise, since rectangles do not generally map to rectangles when corrected. Only linear
+ * scaling between the active array and precorrection active array coordinates is
+ * performed. Applications that require precise correction of metadata need to undo that
+ * linear scaling, and apply a more complete correction that takes into the account the app's
+ * own requirements.</p>
+ * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
+ * <ul>
+ * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
+ * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
+ * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
+ * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
+ * <li>{@link CaptureResult#STATISTICS_FACES android.statistics.faces}</li>
+ * </ul>
* <p><b>Possible values:</b>
* <ul>
* <li>{@link #DISTORTION_CORRECTION_MODE_OFF OFF}</li>
@@ -3282,10 +3310,15 @@
* {@link CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES android.distortionCorrection.availableModes}</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
*
+ * @see CaptureRequest#CONTROL_AE_REGIONS
+ * @see CaptureRequest#CONTROL_AF_REGIONS
+ * @see CaptureRequest#CONTROL_AWB_REGIONS
* @see CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES
* @see CameraCharacteristics#LENS_DISTORTION
+ * @see CaptureRequest#SCALER_CROP_REGION
* @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
* @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
+ * @see CaptureResult#STATISTICS_FACES
* @see #DISTORTION_CORRECTION_MODE_OFF
* @see #DISTORTION_CORRECTION_MODE_FAST
* @see #DISTORTION_CORRECTION_MODE_HIGH_QUALITY
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index d003f9a..3c6c11d 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;
@@ -2852,7 +2858,9 @@
* <p>If this device is the largest or only camera device with a given facing, then this
* position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
* from the main sensor along the +X axis (to the right from the user's perspective) will
- * report <code>(0.03, 0, 0)</code>.</p>
+ * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision
+ * applications, the position needs to be negated to convert it to a translation from the
+ * camera to the origin.</p>
* <p>To transform a pixel coordinates between two cameras facing the same direction, first
* the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
* camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
@@ -2864,7 +2872,8 @@
* <p>To compare this against a real image from the destination camera, the destination camera
* image then needs to be corrected for radial distortion before comparison or sampling.</p>
* <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to
- * the center of the primary gyroscope on the device.</p>
+ * the center of the primary gyroscope on the device. The axis definitions are the same as
+ * with PRIMARY_CAMERA.</p>
* <p><b>Units</b>: Meters</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
*
@@ -2896,13 +2905,15 @@
* </code></pre>
* <p>which can then be combined with the camera pose rotation
* <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
- * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the
+ * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
* complete transform from world coordinates to pixel
* coordinates:</p>
- * <pre><code>P = [ K 0 * [ R t
- * 0 1 ] 0 1 ]
+ * <pre><code>P = [ K 0 * [ R -Rt
+ * 0 1 ] 0 1 ]
* </code></pre>
- * <p>and with <code>p_w</code> being a point in the world coordinate system
+ * <p>(Note the negation of poseTranslation when mapping from camera
+ * to world coordinates, and multiplication by the rotation).</p>
+ * <p>With <code>p_w</code> being a point in the world coordinate system
* and <code>p_s</code> being a point in the camera active pixel array
* coordinate system, and with the mapping including the
* homogeneous division by z:</p>
@@ -2924,6 +2935,13 @@
* activeArraySize rectangle), to determine the final pixel
* coordinate of the world point for processed (non-RAW)
* output buffers.</p>
+ * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
+ * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a
+ * precorrection active array of size <code>(10,10)</code>, the valid pixel
+ * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
+ * have an optical center at the exact center of the pixel grid, at
+ * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
+ * <code>(5,5)</code>.</p>
* <p><b>Units</b>:
* Pixels in the
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
@@ -3188,7 +3206,7 @@
* outputs will crop horizontally (pillarbox), and 16:9
* streams will match exactly. These additional crops will
* be centered within the crop region.</p>
- * <p>If the coordinate system is android.sensor.info.activeArraysSize, the width and height
+ * <p>If the coordinate system is {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, the width and height
* of the crop region cannot be set to be smaller than
* <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
* <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p>
@@ -4077,8 +4095,14 @@
new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
/**
- * <p>A control for selecting whether OIS position information is included in output
- * result metadata.</p>
+ * <p>A control for selecting whether optical stabilization (OIS) position
+ * information is included in output result metadata.</p>
+ * <p>Since optical image stabilization generally involves motion much faster than the duration
+ * of individualq image exposure, multiple OIS samples can be included for a single capture
+ * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
+ * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
+ * with the rolling shutter skew to account for lens motion during image exposure in
+ * post-processing algorithms.</p>
* <p><b>Possible values:</b>
* <ul>
* <li>{@link #STATISTICS_OIS_DATA_MODE_OFF OFF}</li>
@@ -4112,11 +4136,15 @@
/**
* <p>An array of shifts of OIS samples, in x direction.</p>
* <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
- * A positive value is a shift from left to right in active array coordinate system. For
- * example, if the optical center is (1000, 500) in active array coordinates, a shift of
- * (3, 0) puts the new optical center at (1003, 500).</p>
+ * A positive value is a shift from left to right in the pre-correction active array
+ * coordinate system. For example, if the optical center is (1000, 500) in pre-correction
+ * active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
* <p>The number of shifts must match the number of timestamps in
* android.statistics.oisTimestamps.</p>
+ * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
+ * supporting devices). They are always reported in pre-correction active array coordinates,
+ * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
+ * is needed.</p>
* <p><b>Units</b>: Pixels in active array.</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
@@ -4127,11 +4155,15 @@
/**
* <p>An array of shifts of OIS samples, in y direction.</p>
* <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
- * A positive value is a shift from top to bottom in active array coordinate system. For
- * example, if the optical center is (1000, 500) in active array coordinates, a shift of
- * (0, 5) puts the new optical center at (1000, 505).</p>
+ * A positive value is a shift from top to bottom in pre-correction active array coordinate
+ * system. For example, if the optical center is (1000, 500) in active array coordinates, a
+ * shift of (0, 5) puts the new optical center at (1000, 505).</p>
* <p>The number of shifts must match the number of timestamps in
* android.statistics.oisTimestamps.</p>
+ * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
+ * supporting devices). They are always reported in pre-correction active array coordinates,
+ * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
+ * is needed.</p>
* <p><b>Units</b>: Pixels in active array.</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
@@ -4140,15 +4172,21 @@
new Key<float[]>("android.statistics.oisYShifts", float[].class);
/**
- * <p>An array of OIS samples.</p>
+ * <p>An array of optical stabilization (OIS) position samples.</p>
* <p>Each OIS sample contains the timestamp and the amount of shifts in x and y direction,
* in pixels, of the OIS sample.</p>
- * <p>A positive value for a shift in x direction is a shift from left to right in active array
- * coordinate system. For example, if the optical center is (1000, 500) in active array
- * coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
- * <p>A positive value for a shift in y direction is a shift from top to bottom in active array
- * coordinate system. For example, if the optical center is (1000, 500) in active array
- * coordinates, a shift of (0, 5) puts the new optical center at (1000, 505).</p>
+ * <p>A positive value for a shift in x direction is a shift from left to right in the
+ * pre-correction active array coordinate system. For example, if the optical center is
+ * (1000, 500) in pre-correction active array coordinates, a shift of (3, 0) puts the new
+ * optical center at (1003, 500).</p>
+ * <p>A positive value for a shift in y direction is a shift from top to bottom in
+ * pre-correction active array coordinate system. For example, if the optical center is
+ * (1000, 500) in active array coordinates, a shift of (0, 5) puts the new optical center at
+ * (1000, 505).</p>
+ * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
+ * supporting devices). They are always reported in pre-correction active array coordinates,
+ * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
+ * is needed.</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
*/
@PublicKey
@@ -4578,14 +4616,28 @@
* any correction at all would slow down capture rate. Every output stream will have a
* similar amount of enhancement applied.</p>
* <p>The correction only applies to processed outputs such as YUV, JPEG, or DEPTH16; it is not
- * applied to any RAW output. Metadata coordinates such as face rectangles or metering
- * regions are also not affected by correction.</p>
+ * applied to any RAW output.</p>
* <p>This control will be on by default on devices that support this control. Applications
* disabling distortion correction need to pay extra attention with the coordinate system of
* metering regions, crop region, and face rectangles. When distortion correction is OFF,
* metadata coordinates follow the coordinate system of
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. When distortion is not OFF, metadata
- * coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
+ * coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. The
+ * camera device will map these metadata fields to match the corrected image produced by the
+ * camera device, for both capture requests and results. However, this mapping is not very
+ * precise, since rectangles do not generally map to rectangles when corrected. Only linear
+ * scaling between the active array and precorrection active array coordinates is
+ * performed. Applications that require precise correction of metadata need to undo that
+ * linear scaling, and apply a more complete correction that takes into the account the app's
+ * own requirements.</p>
+ * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
+ * <ul>
+ * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
+ * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
+ * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
+ * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
+ * <li>{@link CaptureResult#STATISTICS_FACES android.statistics.faces}</li>
+ * </ul>
* <p><b>Possible values:</b>
* <ul>
* <li>{@link #DISTORTION_CORRECTION_MODE_OFF OFF}</li>
@@ -4596,10 +4648,15 @@
* {@link CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES android.distortionCorrection.availableModes}</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
*
+ * @see CaptureRequest#CONTROL_AE_REGIONS
+ * @see CaptureRequest#CONTROL_AF_REGIONS
+ * @see CaptureRequest#CONTROL_AWB_REGIONS
* @see CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES
* @see CameraCharacteristics#LENS_DISTORTION
+ * @see CaptureRequest#SCALER_CROP_REGION
* @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
* @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
+ * @see CaptureResult#STATISTICS_FACES
* @see #DISTORTION_CORRECTION_MODE_OFF
* @see #DISTORTION_CORRECTION_MODE_FAST
* @see #DISTORTION_CORRECTION_MODE_HIGH_QUALITY
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..d51e896 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();
}
@@ -785,7 +797,8 @@
void onDisplayRemoved(int displayId);
/**
- * Called whenever the properties of a logical display have changed.
+ * Called whenever the properties of a logical {@link android.view.Display},
+ * such as size and density, have changed.
*
* @param displayId The id of the logical display that changed.
*/
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..15868f1 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 {
@@ -1157,24 +1162,9 @@
@Override // binder call
public void onError(long deviceId, int error, int vendorCode) {
if (mExecutor != null) {
- // BiometricPrompt case
- if (error == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED
- || error == FingerprintManager.FINGERPRINT_ERROR_CANCELED) {
- // User tapped somewhere to cancel, or authentication was cancelled by the app
- // or got kicked out. The prompt is already gone, so send the error immediately.
- mExecutor.execute(() -> {
- sendErrorResult(deviceId, error, vendorCode);
- });
- } else {
- // User got an error that needs to be displayed on the dialog, post a delayed
- // runnable on the FingerprintManager handler that sends the error message after
- // FingerprintDialog.HIDE_DIALOG_DELAY to send the error to the application.
- mHandler.postDelayed(() -> {
- mExecutor.execute(() -> {
- sendErrorResult(deviceId, error, vendorCode);
- });
- }, BiometricPrompt.HIDE_DIALOG_DELAY);
- }
+ mExecutor.execute(() -> {
+ sendErrorResult(deviceId, error, vendorCode);
+ });
} else {
mHandler.obtainMessage(MSG_ERROR, error, vendorCode, deviceId).sendToTarget();
}
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/ContextHubManager.java b/core/java/android/hardware/location/ContextHubManager.java
index de13c81..12d0531 100644
--- a/core/java/android/hardware/location/ContextHubManager.java
+++ b/core/java/android/hardware/location/ContextHubManager.java
@@ -549,7 +549,7 @@
* Set a callback to receive messages from the context hub
*
* @param callback Callback object
- * @param handler Handler object
+ * @param handler Handler object, if null uses the Handler of the main Looper
*
* @see Callback
*
@@ -568,7 +568,7 @@
return -1;
}
mCallback = callback;
- mCallbackHandler = handler;
+ mCallbackHandler = (handler == null) ? new Handler(mMainLooper) : handler;
}
return 0;
}
@@ -722,26 +722,31 @@
return 0;
}
+ /**
+ * Invokes the ContextHubManager.Callback callback registered with the ContextHubManager.
+ *
+ * @param hubId The ID of the Context Hub the message came from
+ * @param nanoAppId The instance ID of the nanoapp the message came from
+ * @param message The message to provide the callback
+ */
+ private synchronized void invokeOnMessageReceiptCallback(
+ int hubId, int nanoAppId, ContextHubMessage message) {
+ if (mCallback != null) {
+ mCallback.onMessageReceipt(hubId, nanoAppId, message);
+ }
+ }
+
private final IContextHubCallback.Stub mClientCallback = new IContextHubCallback.Stub() {
@Override
- public void onMessageReceipt(final int hubId, final int nanoAppId,
- final ContextHubMessage message) {
- if (mCallback != null) {
- synchronized(this) {
- final Callback callback = mCallback;
- Handler handler = mCallbackHandler == null ?
- new Handler(mMainLooper) : mCallbackHandler;
- handler.post(new Runnable() {
- @Override
- public void run() {
- callback.onMessageReceipt(hubId, nanoAppId, message);
- }
- });
- }
- } else if (mLocalCallback != null) {
- // we always ensure that mCallback takes precedence, because mLocalCallback is only
- // for internal compatibility
- synchronized (this) {
+ public void onMessageReceipt(
+ final int hubId, final int nanoAppId, final ContextHubMessage message) {
+ synchronized (ContextHubManager.this) {
+ if (mCallback != null) {
+ mCallbackHandler.post(
+ () -> invokeOnMessageReceiptCallback(hubId, nanoAppId, message));
+ } else if (mLocalCallback != null) {
+ // We always ensure that mCallback takes precedence, because mLocalCallback is
+ // only for internal compatibility
mLocalCallback.onMessageReceipt(hubId, nanoAppId, message);
}
}
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/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 104134a..fb916d3 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -22,6 +22,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.Context;
import android.content.Intent;
@@ -311,6 +312,7 @@
* @hide
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @UnsupportedAppUsage
public static final String INET_CONDITION_ACTION =
"android.net.conn.INET_CONDITION_ACTION";
@@ -325,6 +327,7 @@
* @hide
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @UnsupportedAppUsage
public static final String ACTION_TETHER_STATE_CHANGED =
"android.net.conn.TETHER_STATE_CHANGED";
@@ -333,6 +336,7 @@
* gives a String[] listing all the interfaces configured for
* tethering and currently available for tethering.
*/
+ @UnsupportedAppUsage
public static final String EXTRA_AVAILABLE_TETHER = "availableArray";
/**
@@ -347,6 +351,7 @@
* gives a String[] listing all the interfaces currently tethered
* (ie, has DHCPv4 support and packets potentially forwarded/NATed)
*/
+ @UnsupportedAppUsage
public static final String EXTRA_ACTIVE_TETHER = "tetherArray";
/**
@@ -355,6 +360,7 @@
* failed. Use {@link #getLastTetherError} to find the error code
* for any interfaces listed here.
*/
+ @UnsupportedAppUsage
public static final String EXTRA_ERRORED_TETHER = "erroredArray";
/**
@@ -459,6 +465,7 @@
* The absence of a connection type.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_NONE = -1;
/**
@@ -575,6 +582,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_MOBILE_FOTA = 10;
/**
@@ -583,6 +591,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_MOBILE_IMS = 11;
/**
@@ -591,6 +600,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_MOBILE_CBS = 12;
/**
@@ -600,6 +610,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_WIFI_P2P = 13;
/**
@@ -608,6 +619,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_MOBILE_IA = 14;
/**
@@ -617,6 +629,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_MOBILE_EMERGENCY = 15;
/**
@@ -625,6 +638,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final int TYPE_PROXY = 16;
/**
@@ -707,6 +721,7 @@
*/
public static final String PRIVATE_DNS_DEFAULT_MODE_FALLBACK = PRIVATE_DNS_MODE_OPPORTUNISTIC;
+ @UnsupportedAppUsage
private final IConnectivityManager mService;
/**
* A kludge to facilitate static access where a Context pointer isn't available, like in the
@@ -743,6 +758,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static String getNetworkTypeName(int type) {
switch (type) {
case TYPE_NONE:
@@ -797,6 +813,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static boolean isNetworkTypeMobile(int networkType) {
switch (networkType) {
case TYPE_MOBILE:
@@ -1010,6 +1027,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL)
+ @UnsupportedAppUsage
public NetworkInfo getActiveNetworkInfoForUid(int uid) {
return getActiveNetworkInfoForUid(uid, false);
}
@@ -1107,6 +1125,7 @@
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public Network getNetworkForType(int networkType) {
try {
return mService.getNetworkForType(networkType);
@@ -1135,6 +1154,7 @@
* the Networks that applications run by the given user will use by default.
* @hide
*/
+ @UnsupportedAppUsage
public NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId) {
try {
return mService.getDefaultNetworkCapabilitiesForUser(userId);
@@ -1153,6 +1173,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public LinkProperties getActiveLinkProperties() {
try {
return mService.getActiveLinkProperties();
@@ -1177,6 +1198,7 @@
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public LinkProperties getLinkProperties(int networkType) {
try {
return mService.getLinkPropertiesForType(networkType);
@@ -1332,6 +1354,7 @@
return 1;
}
+ @UnsupportedAppUsage
private NetworkCapabilities networkCapabilitiesForFeature(int networkType, String feature) {
if (networkType == TYPE_MOBILE) {
switch (feature) {
@@ -1495,6 +1518,7 @@
};
}
+ @UnsupportedAppUsage
private static final HashMap<NetworkCapabilities, LegacyRequest> sLegacyRequests =
new HashMap<>();
@@ -1523,6 +1547,7 @@
Log.d(TAG, "expireRequest with " + ourSeqNum + ", " + sequenceNum);
}
+ @UnsupportedAppUsage
private NetworkRequest requestNetworkForFeatureLocked(NetworkCapabilities netCap) {
int delay = -1;
int type = legacyTypeForNetworkCapabilities(netCap);
@@ -1552,6 +1577,7 @@
}
}
+ @UnsupportedAppUsage
private boolean removeRequestForFeature(NetworkCapabilities netCap) {
final LegacyRequest l;
synchronized (sLegacyRequests) {
@@ -1619,10 +1645,13 @@
/** @hide */
public static class PacketKeepaliveCallback {
/** The requested keepalive was successfully started. */
+ @UnsupportedAppUsage
public void onStarted() {}
/** The keepalive was successfully stopped. */
+ @UnsupportedAppUsage
public void onStopped() {}
/** An error occurred. */
+ @UnsupportedAppUsage
public void onError(int error) {}
}
@@ -1689,6 +1718,7 @@
mLooper.quit();
}
+ @UnsupportedAppUsage
public void stop() {
try {
mService.stopKeepalive(mNetwork, mSlot);
@@ -1744,6 +1774,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public PacketKeepalive startNattKeepalive(
Network network, int intervalSeconds, PacketKeepaliveCallback callback,
InetAddress srcAddr, int srcPort, InetAddress dstAddr) {
@@ -1805,6 +1836,7 @@
* {@link #bindProcessToNetwork} API.
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
checkLegacyRoutingApiAccess();
try {
@@ -1848,12 +1880,14 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setBackgroundDataSetting(boolean allowBackgroundData) {
// ignored
}
/** {@hide} */
@Deprecated
+ @UnsupportedAppUsage
public NetworkQuotaInfo getActiveNetworkQuotaInfo() {
try {
return mService.getActiveNetworkQuotaInfo();
@@ -1867,6 +1901,7 @@
* @deprecated Talk to TelephonyManager directly
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean getMobileDataEnabled() {
IBinder b = ServiceManager.getService(Context.TELEPHONY_SERVICE);
if (b != null) {
@@ -1986,6 +2021,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static ConnectivityManager from(Context context) {
return (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
}
@@ -2036,6 +2072,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
private static ConnectivityManager getInstance() {
if (getInstanceOrNull() == null) {
throw new IllegalStateException("No ConnectivityManager yet constructed");
@@ -2052,6 +2089,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public String[] getTetherableIfaces() {
try {
return mService.getTetherableIfaces();
@@ -2068,6 +2106,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public String[] getTetheredIfaces() {
try {
return mService.getTetheredIfaces();
@@ -2090,6 +2129,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public String[] getTetheringErroredIfaces() {
try {
return mService.getTetheringErroredIfaces();
@@ -2136,6 +2176,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public int tether(String iface) {
try {
String pkgName = mContext.getOpPackageName();
@@ -2164,6 +2205,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public int untether(String iface) {
try {
String pkgName = mContext.getOpPackageName();
@@ -2317,6 +2359,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public String[] getTetherableUsbRegexs() {
try {
return mService.getTetherableUsbRegexs();
@@ -2336,6 +2379,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public String[] getTetherableWifiRegexs() {
try {
return mService.getTetherableWifiRegexs();
@@ -2355,6 +2399,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public String[] getTetherableBluetoothRegexs() {
try {
return mService.getTetherableBluetoothRegexs();
@@ -2380,6 +2425,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public int setUsbTethering(boolean enable) {
try {
String pkgName = mContext.getOpPackageName();
@@ -2426,6 +2472,7 @@
* {@hide}
*/
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public int getLastTetherError(String iface) {
try {
return mService.getLastTetherError(iface);
@@ -2579,6 +2626,7 @@
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
+ @UnsupportedAppUsage
public boolean isNetworkSupported(int networkType) {
try {
return mService.isNetworkSupported(networkType);
@@ -2680,6 +2728,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL)
+ @UnsupportedAppUsage
public void setAirplaneMode(boolean enable) {
try {
mService.setAirplaneMode(enable);
@@ -2689,6 +2738,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void registerNetworkFactory(Messenger messenger, String name) {
try {
mService.registerNetworkFactory(messenger, name);
@@ -2698,6 +2748,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void unregisterNetworkFactory(Messenger messenger) {
try {
mService.unregisterNetworkFactory(messenger);
@@ -3786,6 +3837,7 @@
* @deprecated This is strictly for legacy usage to support {@link #startUsingNetworkFeature}.
*/
@Deprecated
+ @UnsupportedAppUsage
public static boolean setProcessDefaultNetworkForHostResolution(Network network) {
return NetworkUtils.bindProcessToNetworkForHostResolution(
network == null ? NETID_UNSET : network.netId);
diff --git a/core/java/android/net/DhcpResults.java b/core/java/android/net/DhcpResults.java
index 8c5f603..b5d8226 100644
--- a/core/java/android/net/DhcpResults.java
+++ b/core/java/android/net/DhcpResults.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.net.NetworkUtils;
import android.os.Parcel;
import android.text.TextUtils;
@@ -33,25 +34,32 @@
public class DhcpResults extends StaticIpConfiguration {
private static final String TAG = "DhcpResults";
+ @UnsupportedAppUsage
public Inet4Address serverAddress;
/** Vendor specific information (from RFC 2132). */
+ @UnsupportedAppUsage
public String vendorInfo;
+ @UnsupportedAppUsage
public int leaseDuration;
/** Link MTU option. 0 means unset. */
+ @UnsupportedAppUsage
public int mtu;
+ @UnsupportedAppUsage
public DhcpResults() {
super();
}
+ @UnsupportedAppUsage
public DhcpResults(StaticIpConfiguration source) {
super(source);
}
/** copy constructor */
+ @UnsupportedAppUsage
public DhcpResults(DhcpResults source) {
super(source);
diff --git a/core/java/android/net/EthernetManager.java b/core/java/android/net/EthernetManager.java
index ecccda5..7256502 100644
--- a/core/java/android/net/EthernetManager.java
+++ b/core/java/android/net/EthernetManager.java
@@ -17,6 +17,7 @@
package android.net;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
@@ -66,6 +67,7 @@
* @param iface Ethernet interface name
* @param isAvailable {@code true} if Ethernet port exists.
*/
+ @UnsupportedAppUsage
void onAvailabilityChanged(String iface, boolean isAvailable);
}
@@ -84,6 +86,7 @@
* Get Ethernet configuration.
* @return the Ethernet Configuration, contained in {@link IpConfiguration}.
*/
+ @UnsupportedAppUsage
public IpConfiguration getConfiguration(String iface) {
try {
return mService.getConfiguration(iface);
@@ -95,6 +98,7 @@
/**
* Set Ethernet configuration.
*/
+ @UnsupportedAppUsage
public void setConfiguration(String iface, IpConfiguration config) {
try {
mService.setConfiguration(iface, config);
@@ -106,6 +110,7 @@
/**
* Indicates whether the system currently has one or more Ethernet interfaces.
*/
+ @UnsupportedAppUsage
public boolean isAvailable() {
return getAvailableInterfaces().length > 0;
}
@@ -115,6 +120,7 @@
*
* @param iface Ethernet interface name
*/
+ @UnsupportedAppUsage
public boolean isAvailable(String iface) {
try {
return mService.isAvailable(iface);
@@ -128,6 +134,7 @@
* @param listener A {@link Listener} to add.
* @throws IllegalArgumentException If the listener is null.
*/
+ @UnsupportedAppUsage
public void addListener(Listener listener) {
if (listener == null) {
throw new IllegalArgumentException("listener must not be null");
@@ -145,6 +152,7 @@
/**
* Returns an array of available Ethernet interface names.
*/
+ @UnsupportedAppUsage
public String[] getAvailableInterfaces() {
try {
return mService.getAvailableInterfaces();
@@ -158,6 +166,7 @@
* @param listener A {@link Listener} to remove.
* @throws IllegalArgumentException If the listener is null.
*/
+ @UnsupportedAppUsage
public void removeListener(Listener listener) {
if (listener == null) {
throw new IllegalArgumentException("listener must not be null");
diff --git a/core/java/android/net/InterfaceConfiguration.java b/core/java/android/net/InterfaceConfiguration.java
index 34cde08..b274155 100644
--- a/core/java/android/net/InterfaceConfiguration.java
+++ b/core/java/android/net/InterfaceConfiguration.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -45,6 +46,7 @@
return builder.toString();
}
+ @UnsupportedAppUsage
public Iterable<String> getFlags() {
return mFlags;
}
@@ -54,11 +56,13 @@
return mFlags.contains(flag);
}
+ @UnsupportedAppUsage
public void clearFlag(String flag) {
validateFlag(flag);
mFlags.remove(flag);
}
+ @UnsupportedAppUsage
public void setFlag(String flag) {
validateFlag(flag);
mFlags.add(flag);
@@ -67,6 +71,7 @@
/**
* Set flags to mark interface as up.
*/
+ @UnsupportedAppUsage
public void setInterfaceUp() {
mFlags.remove(FLAG_DOWN);
mFlags.add(FLAG_UP);
@@ -75,6 +80,7 @@
/**
* Set flags to mark interface as down.
*/
+ @UnsupportedAppUsage
public void setInterfaceDown() {
mFlags.remove(FLAG_UP);
mFlags.add(FLAG_DOWN);
@@ -92,6 +98,7 @@
return mAddr;
}
+ @UnsupportedAppUsage
public void setLinkAddress(LinkAddress addr) {
mAddr = addr;
}
diff --git a/core/java/android/net/IpConfiguration.java b/core/java/android/net/IpConfiguration.java
index fe69f296..7543920 100644
--- a/core/java/android/net/IpConfiguration.java
+++ b/core/java/android/net/IpConfiguration.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.net.StaticIpConfiguration;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,6 +33,7 @@
public enum IpAssignment {
/* Use statically configured IP settings. Configuration can be accessed
* with staticIpConfiguration */
+ @UnsupportedAppUsage
STATIC,
/* Use dynamically configured IP settigns */
DHCP,
@@ -47,6 +49,7 @@
public enum ProxySettings {
/* No proxy is to be used. Any existing proxy settings
* should be cleared. */
+ @UnsupportedAppUsage
NONE,
/* Use statically configured proxy. Configuration can be accessed
* with httpProxy. */
@@ -61,6 +64,7 @@
public ProxySettings proxySettings;
+ @UnsupportedAppUsage
public ProxyInfo httpProxy;
private void init(IpAssignment ipAssignment,
@@ -79,6 +83,7 @@
init(IpAssignment.UNASSIGNED, ProxySettings.UNASSIGNED, null, null);
}
+ @UnsupportedAppUsage
public IpConfiguration(IpAssignment ipAssignment,
ProxySettings proxySettings,
StaticIpConfiguration staticIpConfiguration,
diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java
index bcfe938..1bc0d32 100644
--- a/core/java/android/net/LinkAddress.java
+++ b/core/java/android/net/LinkAddress.java
@@ -25,6 +25,7 @@
import static android.system.OsConstants.RT_SCOPE_SITE;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Pair;
@@ -54,11 +55,13 @@
/**
* IPv4 or IPv6 address.
*/
+ @UnsupportedAppUsage
private InetAddress address;
/**
* Prefix length.
*/
+ @UnsupportedAppUsage
private int prefixLength;
/**
@@ -112,6 +115,7 @@
* @return true if the address is IPv6.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIPv6() {
return address instanceof Inet6Address;
}
@@ -163,6 +167,7 @@
* @param prefixLength The prefix length.
* @hide
*/
+ @UnsupportedAppUsage
public LinkAddress(InetAddress address, int prefixLength) {
this(address, prefixLength, 0, 0);
this.scope = scopeForUnicastAddress(address);
@@ -185,6 +190,7 @@
* @param string The string to parse.
* @hide
*/
+ @UnsupportedAppUsage
public LinkAddress(String address) {
this(address, 0, 0);
this.scope = scopeForUnicastAddress(this.address);
@@ -255,6 +261,7 @@
* otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isSameAddressAs(LinkAddress other) {
return address.equals(other.address) && prefixLength == other.prefixLength;
}
@@ -278,6 +285,7 @@
* TODO: Delete all callers and remove in favour of getPrefixLength().
* @hide
*/
+ @UnsupportedAppUsage
public int getNetworkPrefixLength() {
return getPrefixLength();
}
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java
index bd2db92..1b9a66c 100644
--- a/core/java/android/net/LinkProperties.java
+++ b/core/java/android/net/LinkProperties.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 android.text.TextUtils;
@@ -48,6 +49,7 @@
*/
public final class LinkProperties implements Parcelable {
// The interface described by the network link.
+ @UnsupportedAppUsage
private String mIfaceName;
private ArrayList<LinkAddress> mLinkAddresses = new ArrayList<>();
private ArrayList<InetAddress> mDnses = new ArrayList<>();
@@ -103,9 +105,13 @@
* @hide
*/
public enum ProvisioningChange {
+ @UnsupportedAppUsage
STILL_NOT_PROVISIONED,
+ @UnsupportedAppUsage
LOST_PROVISIONING,
+ @UnsupportedAppUsage
GAINED_PROVISIONING,
+ @UnsupportedAppUsage
STILL_PROVISIONED,
}
@@ -114,6 +120,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static ProvisioningChange compareProvisioning(
LinkProperties before, LinkProperties after) {
if (before.isProvisioned() && after.isProvisioned()) {
@@ -154,12 +161,14 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public LinkProperties() {
}
/**
* @hide
*/
+ @UnsupportedAppUsage
public LinkProperties(LinkProperties source) {
if (source != null) {
mIfaceName = source.mIfaceName;
@@ -186,6 +195,7 @@
* @param iface The name of the network interface used for this link.
* @hide
*/
+ @UnsupportedAppUsage
public void setInterfaceName(String iface) {
mIfaceName = iface;
ArrayList<RouteInfo> newRoutes = new ArrayList<>(mRoutes.size());
@@ -207,6 +217,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public List<String> getAllInterfaceNames() {
List<String> interfaceNames = new ArrayList<>(mStackedLinks.size() + 1);
if (mIfaceName != null) interfaceNames.add(mIfaceName);
@@ -226,6 +237,7 @@
* @return An unmodifiable {@link List} of {@link InetAddress} for this link.
* @hide
*/
+ @UnsupportedAppUsage
public List<InetAddress> getAddresses() {
List<InetAddress> addresses = new ArrayList<>();
for (LinkAddress linkAddress : mLinkAddresses) {
@@ -238,6 +250,7 @@
* Returns all the addresses on this link and all the links stacked above it.
* @hide
*/
+ @UnsupportedAppUsage
public List<InetAddress> getAllAddresses() {
List<InetAddress> addresses = new ArrayList<>();
for (LinkAddress linkAddress : mLinkAddresses) {
@@ -265,6 +278,7 @@
* @return true if {@code address} was added or updated, false otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean addLinkAddress(LinkAddress address) {
if (address == null) {
return false;
@@ -315,6 +329,7 @@
* Returns all the addresses on this link and all the links stacked above it.
* @hide
*/
+ @UnsupportedAppUsage
public List<LinkAddress> getAllLinkAddresses() {
List<LinkAddress> addresses = new ArrayList<>(mLinkAddresses);
for (LinkProperties stacked: mStackedLinks.values()) {
@@ -331,6 +346,7 @@
* object.
* @hide
*/
+ @UnsupportedAppUsage
public void setLinkAddresses(Collection<LinkAddress> addresses) {
mLinkAddresses.clear();
for (LinkAddress address: addresses) {
@@ -345,6 +361,7 @@
* @return true if the DNS server was added, false if it was already present.
* @hide
*/
+ @UnsupportedAppUsage
public boolean addDnsServer(InetAddress dnsServer) {
if (dnsServer != null && !mDnses.contains(dnsServer)) {
mDnses.add(dnsServer);
@@ -360,6 +377,7 @@
* @return true if the DNS server was removed, false if it did not exist.
* @hide
*/
+ @UnsupportedAppUsage
public boolean removeDnsServer(InetAddress dnsServer) {
if (dnsServer != null) {
return mDnses.remove(dnsServer);
@@ -374,6 +392,7 @@
* @param dnsServers The {@link Collection} of DNS servers to set in this object.
* @hide
*/
+ @UnsupportedAppUsage
public void setDnsServers(Collection<InetAddress> dnsServers) {
mDnses.clear();
for (InetAddress dnsServer: dnsServers) {
@@ -510,6 +529,7 @@
* domains to search when resolving host names on this link.
* @hide
*/
+ @UnsupportedAppUsage
public void setDomains(String domains) {
mDomains = domains;
}
@@ -532,6 +552,7 @@
* @param mtu The MTU to use for this link.
* @hide
*/
+ @UnsupportedAppUsage
public void setMtu(int mtu) {
mMtu = mtu;
}
@@ -543,6 +564,7 @@
* @return The mtu value set for this link.
* @hide
*/
+ @UnsupportedAppUsage
public int getMtu() {
return mMtu;
}
@@ -555,6 +577,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setTcpBufferSizes(String tcpBufferSizes) {
mTcpBufferSizes = tcpBufferSizes;
}
@@ -566,6 +589,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getTcpBufferSizes() {
return mTcpBufferSizes;
}
@@ -589,6 +613,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean addRoute(RouteInfo route) {
if (route != null) {
String routeIface = route.getInterface();
@@ -615,6 +640,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean removeRoute(RouteInfo route) {
return route != null &&
Objects.equals(mIfaceName, route.getInterface()) &&
@@ -645,6 +671,7 @@
* Returns all the routes on this link and all the links stacked above it.
* @hide
*/
+ @UnsupportedAppUsage
public List<RouteInfo> getAllRoutes() {
List<RouteInfo> routes = new ArrayList<>(mRoutes);
for (LinkProperties stacked: mStackedLinks.values()) {
@@ -661,6 +688,7 @@
* @param proxy A {@link ProxyInfo} defining the HTTP Proxy to use on this link.
* @hide
*/
+ @UnsupportedAppUsage
public void setHttpProxy(ProxyInfo proxy) {
mHttpProxy = proxy;
}
@@ -685,6 +713,7 @@
* @return true if the link was stacked, false otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean addStackedLink(LinkProperties link) {
if (link != null && link.getInterfaceName() != null) {
mStackedLinks.put(link.getInterfaceName(), link);
@@ -715,6 +744,7 @@
* Returns all the links stacked on top of this link.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull List<LinkProperties> getStackedLinks() {
if (mStackedLinks.isEmpty()) {
return Collections.emptyList();
@@ -730,6 +760,7 @@
* Clears this object to its initial state.
* @hide
*/
+ @UnsupportedAppUsage
public void clear() {
mIfaceName = null;
mLinkAddresses.clear();
@@ -831,6 +862,7 @@
* @return {@code true} if there is an IPv4 address, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasIPv4Address() {
for (LinkAddress address : mLinkAddresses) {
if (address.getAddress() instanceof Inet4Address) {
@@ -858,6 +890,7 @@
* @return {@code true} if there is a global preferred IPv6 address, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasGlobalIPv6Address() {
for (LinkAddress address : mLinkAddresses) {
if (address.getAddress() instanceof Inet6Address && address.isGlobalPreferred()) {
@@ -873,6 +906,7 @@
* @return {@code true} if there is an IPv4 default route, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasIPv4DefaultRoute() {
for (RouteInfo r : mRoutes) {
if (r.isIPv4Default()) {
@@ -888,6 +922,7 @@
* @return {@code true} if there is an IPv6 default route, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasIPv6DefaultRoute() {
for (RouteInfo r : mRoutes) {
if (r.isIPv6Default()) {
@@ -903,6 +938,7 @@
* @return {@code true} if there is an IPv4 DNS server, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasIPv4DnsServer() {
for (InetAddress ia : mDnses) {
if (ia instanceof Inet4Address) {
@@ -918,6 +954,7 @@
* @return {@code true} if there is an IPv6 DNS server, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasIPv6DnsServer() {
for (InetAddress ia : mDnses) {
if (ia instanceof Inet6Address) {
@@ -947,6 +984,7 @@
* @return {@code true} if the link is provisioned, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIPv6Provisioned() {
return (hasGlobalIPv6Address() &&
hasIPv6DefaultRoute() &&
@@ -960,6 +998,7 @@
* @return {@code true} if the link is provisioned, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isProvisioned() {
return (isIPv4Provisioned() || isIPv6Provisioned());
}
@@ -971,6 +1010,7 @@
* {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isReachable(InetAddress ip) {
final List<RouteInfo> allRoutes = getAllRoutes();
// If we don't have a route to this IP address, it's not reachable.
@@ -1008,6 +1048,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIdenticalInterfaceName(LinkProperties target) {
return TextUtils.equals(getInterfaceName(), target.getInterfaceName());
}
@@ -1019,6 +1060,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIdenticalAddresses(LinkProperties target) {
Collection<InetAddress> targetAddresses = target.getAddresses();
Collection<InetAddress> sourceAddresses = getAddresses();
@@ -1033,6 +1075,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIdenticalDnses(LinkProperties target) {
Collection<InetAddress> targetDnses = target.getDnsServers();
String targetDomains = target.getDomains();
@@ -1080,6 +1123,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIdenticalRoutes(LinkProperties target) {
Collection<RouteInfo> targetRoutes = target.getRoutes();
return (mRoutes.size() == targetRoutes.size()) ?
@@ -1093,6 +1137,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIdenticalHttpProxy(LinkProperties target) {
return getHttpProxy() == null ? target.getHttpProxy() == null :
getHttpProxy().equals(target.getHttpProxy());
@@ -1105,6 +1150,7 @@
* @return {@code true} if both are identical, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isIdenticalStackedLinks(LinkProperties target) {
if (!mStackedLinks.keySet().equals(target.mStackedLinks.keySet())) {
return false;
diff --git a/core/java/android/net/LinkQualityInfo.java b/core/java/android/net/LinkQualityInfo.java
index 9c8e61d..b6f8825 100644
--- a/core/java/android/net/LinkQualityInfo.java
+++ b/core/java/android/net/LinkQualityInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -189,6 +190,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setPacketCount(long packetCount) {
mPacketCount = packetCount;
}
@@ -204,6 +206,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setPacketErrorCount(long packetErrorCount) {
mPacketErrorCount = packetErrorCount;
}
@@ -265,6 +268,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setLastDataSampleTime(long lastDataSampleTime) {
mLastDataSampleTime = lastDataSampleTime;
}
@@ -280,6 +284,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setDataSampleDuration(int dataSampleDuration) {
mDataSampleDuration = dataSampleDuration;
}
diff --git a/core/java/android/net/LocalSocket.java b/core/java/android/net/LocalSocket.java
index 8afa1ed..6a2031b 100644
--- a/core/java/android/net/LocalSocket.java
+++ b/core/java/android/net/LocalSocket.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import java.io.Closeable;
import java.io.FileDescriptor;
import java.io.IOException;
@@ -30,6 +31,7 @@
*/
public class LocalSocket implements Closeable {
+ @UnsupportedAppUsage
private final LocalSocketImpl impl;
/** false if impl.create() needs to be called */
private volatile boolean implCreated;
diff --git a/core/java/android/net/LocalSocketImpl.java b/core/java/android/net/LocalSocketImpl.java
index 6e4a231..fe7632c 100644
--- a/core/java/android/net/LocalSocketImpl.java
+++ b/core/java/android/net/LocalSocketImpl.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
import android.system.Int32Ref;
import android.system.Os;
@@ -47,8 +48,10 @@
// These fields are accessed by native code;
/** file descriptor array received during a previous read */
+ @UnsupportedAppUsage
FileDescriptor[] inboundFileDescriptors;
/** file descriptor array that should be written during next write */
+ @UnsupportedAppUsage
FileDescriptor[] outboundFileDescriptors;
/**
@@ -207,6 +210,7 @@
/**
* Create a new instance.
*/
+ @UnsupportedAppUsage
/*package*/ LocalSocketImpl()
{
}
diff --git a/core/java/android/net/MacAddress.java b/core/java/android/net/MacAddress.java
index 74d6470..98f3567 100644
--- a/core/java/android/net/MacAddress.java
+++ b/core/java/android/net/MacAddress.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -50,6 +51,7 @@
* The MacAddress zero MAC address.
* @hide
*/
+ @UnsupportedAppUsage
public static final MacAddress ALL_ZEROS_ADDRESS = new MacAddress(0);
/** @hide */
diff --git a/core/java/android/net/MobileLinkQualityInfo.java b/core/java/android/net/MobileLinkQualityInfo.java
index a01fc80..06c739d 100644
--- a/core/java/android/net/MobileLinkQualityInfo.java
+++ b/core/java/android/net/MobileLinkQualityInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
/**
@@ -93,6 +94,7 @@
* returns mobile network type as defined by {@link android.telephony.TelephonyManager}
* @return network type or {@link android.net.LinkQualityInfo#UNKNOWN_INT}
*/
+ @UnsupportedAppUsage
public int getMobileNetworkType() {
return mMobileNetworkType;
}
@@ -100,6 +102,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setMobileNetworkType(int mobileNetworkType) {
mMobileNetworkType = mobileNetworkType;
}
@@ -115,6 +118,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setRssi(int Rssi) {
mRssi = Rssi;
}
@@ -130,6 +134,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setGsmErrorRate(int gsmErrorRate) {
mGsmErrorRate = gsmErrorRate;
}
@@ -145,6 +150,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setCdmaDbm(int cdmaDbm) {
mCdmaDbm = cdmaDbm;
}
@@ -160,6 +166,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setCdmaEcio(int cdmaEcio) {
mCdmaEcio = cdmaEcio;
}
@@ -175,6 +182,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setEvdoDbm(int evdoDbm) {
mEvdoDbm = evdoDbm;
}
@@ -190,6 +198,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setEvdoEcio(int evdoEcio) {
mEvdoEcio = evdoEcio;
}
@@ -205,6 +214,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setEvdoSnr(int evdoSnr) {
mEvdoSnr = evdoSnr;
}
@@ -220,6 +230,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setLteSignalStrength(int lteSignalStrength) {
mLteSignalStrength = lteSignalStrength;
}
@@ -235,6 +246,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setLteRsrp(int lteRsrp) {
mLteRsrp = lteRsrp;
}
@@ -250,6 +262,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setLteRsrq(int lteRsrq) {
mLteRsrq = lteRsrq;
}
@@ -265,6 +278,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setLteRssnr(int lteRssnr) {
mLteRssnr = lteRssnr;
}
@@ -280,6 +294,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setLteCqi(int lteCqi) {
mLteCqi = lteCqi;
}
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index 512e35e..142023d 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.system.ErrnoException;
@@ -59,6 +60,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public final int netId;
// Objects used to perform per-network operations such as getSocketFactory
@@ -103,6 +105,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Network(int netId) {
this.netId = netId;
}
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 52a2354..114b423 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.net.ConnectivityManager.PacketKeepalive;
import android.os.Bundle;
@@ -351,6 +352,7 @@
/**
* Called by the bearer code when it has new NetworkInfo data.
*/
+ @UnsupportedAppUsage
public void sendNetworkInfo(NetworkInfo networkInfo) {
queueOrSendMessage(EVENT_NETWORK_INFO_CHANGED, new NetworkInfo(networkInfo));
}
@@ -372,7 +374,7 @@
if (score < 0) {
throw new IllegalArgumentException("Score must be >= 0");
}
- queueOrSendMessage(EVENT_NETWORK_SCORE_CHANGED, new Integer(score));
+ queueOrSendMessage(EVENT_NETWORK_SCORE_CHANGED, score, 0);
}
/**
@@ -387,7 +389,7 @@
* {@link #saveAcceptUnvalidated} to respect the user's choice.
*/
public void explicitlySelected(boolean acceptUnvalidated) {
- queueOrSendMessage(EVENT_SET_EXPLICITLY_SELECTED, acceptUnvalidated);
+ queueOrSendMessage(EVENT_SET_EXPLICITLY_SELECTED, acceptUnvalidated ? 1 : 0, 0);
}
/**
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index 72b4bfd..fd1e5f2 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.net.ConnectivityManager.NetworkCallback;
import android.os.Parcel;
import android.os.Parcelable;
@@ -56,6 +57,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public NetworkCapabilities() {
clearAll();
mNetworkCapabilities = DEFAULT_CAPABILITIES;
@@ -103,6 +105,7 @@
* Represents the network's capabilities. If any are specified they will be satisfied
* by any Network that matches all of them.
*/
+ @UnsupportedAppUsage
private long mNetworkCapabilities;
/**
@@ -371,6 +374,7 @@
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
+ @UnsupportedAppUsage
public NetworkCapabilities addCapability(@NetCapability int capability) {
checkValidCapability(capability);
mNetworkCapabilities |= 1 << capability;
@@ -407,6 +411,7 @@
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
+ @UnsupportedAppUsage
public NetworkCapabilities removeCapability(@NetCapability int capability) {
checkValidCapability(capability);
final long mask = ~(1 << capability);
@@ -659,6 +664,7 @@
* @return This NetworkCapabilities instance, to facilitate chaining.
* @hide
*/
+ @UnsupportedAppUsage
public NetworkCapabilities addTransportType(@Transport int transportType) {
checkValidTransportType(transportType);
mTransportTypes |= 1 << transportType;
@@ -898,6 +904,7 @@
* specifier. See {@link #setNetworkSpecifier}.
* @hide
*/
+ @UnsupportedAppUsage
public NetworkSpecifier getNetworkSpecifier() {
return mNetworkSpecifier;
}
@@ -930,6 +937,7 @@
* Signal strength. This is a signed integer, and higher values indicate better signal.
* The exact units are bearer-dependent. For example, Wi-Fi uses RSSI.
*/
+ @UnsupportedAppUsage
private int mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;
/**
@@ -945,6 +953,7 @@
* @param signalStrength the bearer-specific signal strength.
* @hide
*/
+ @UnsupportedAppUsage
public NetworkCapabilities setSignalStrength(int signalStrength) {
mSignalStrength = signalStrength;
return this;
@@ -955,6 +964,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasSignalStrength() {
return mSignalStrength > SIGNAL_STRENGTH_UNSPECIFIED;
}
@@ -965,6 +975,7 @@
* @return The bearer-specific signal strength.
* @hide
*/
+ @UnsupportedAppUsage
public int getSignalStrength() {
return mSignalStrength;
}
@@ -1544,6 +1555,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static String transportNamesOf(@Transport int[] types) {
StringJoiner joiner = new StringJoiner("|");
if (types != null) {
diff --git a/core/java/android/net/NetworkFactory.java b/core/java/android/net/NetworkFactory.java
index e2f8d1a..010d72f 100644
--- a/core/java/android/net/NetworkFactory.java
+++ b/core/java/android/net/NetworkFactory.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
@@ -106,6 +107,7 @@
private int mRefCount = 0;
private Messenger mMessenger = null;
+ @UnsupportedAppUsage
public NetworkFactory(Looper looper, Context context, String logTag,
NetworkCapabilities filter) {
super(looper);
@@ -287,6 +289,7 @@
sendMessage(obtainMessage(CMD_CANCEL_REQUEST, networkRequest));
}
+ @UnsupportedAppUsage
public void setScoreFilter(int score) {
sendMessage(obtainMessage(CMD_SET_SCORE, score, 0));
}
@@ -304,6 +307,7 @@
Log.d(LOG_TAG, s);
}
+ @UnsupportedAppUsage
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
final IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
pw.println(toString());
diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java
index 999771a..d912dd10 100644
--- a/core/java/android/net/NetworkInfo.java
+++ b/core/java/android/net/NetworkInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -129,6 +130,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public NetworkInfo(int type, int subtype, String typeName, String subtypeName) {
if (!ConnectivityManager.isNetworkTypeValid(type)
&& type != ConnectivityManager.TYPE_NONE) {
@@ -143,6 +145,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public NetworkInfo(NetworkInfo source) {
if (source != null) {
synchronized (source) {
@@ -209,6 +212,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setSubtype(int subtype, String subtypeName) {
synchronized (this) {
mSubtype = subtype;
@@ -317,6 +321,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setIsAvailable(boolean isAvailable) {
synchronized (this) {
mIsAvailable = isAvailable;
@@ -347,6 +352,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setFailover(boolean isFailover) {
synchronized (this) {
mIsFailover = isFailover;
@@ -377,6 +383,7 @@
*/
@VisibleForTesting
@Deprecated
+ @UnsupportedAppUsage
public void setRoaming(boolean isRoaming) {
synchronized (this) {
mIsRoaming = isRoaming;
@@ -422,6 +429,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void setDetailedState(DetailedState detailedState, String reason, String extraInfo) {
synchronized (this) {
this.mDetailedState = detailedState;
diff --git a/core/java/android/net/NetworkPolicy.java b/core/java/android/net/NetworkPolicy.java
index e84c85e..f8973eb 100644
--- a/core/java/android/net/NetworkPolicy.java
+++ b/core/java/android/net/NetworkPolicy.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.BackupUtils;
@@ -49,14 +50,19 @@
public static final long LIMIT_DISABLED = -1;
public static final long SNOOZE_NEVER = -1;
+ @UnsupportedAppUsage
public NetworkTemplate template;
public RecurrenceRule cycleRule;
+ @UnsupportedAppUsage
public long warningBytes = WARNING_DISABLED;
+ @UnsupportedAppUsage
public long limitBytes = LIMIT_DISABLED;
public long lastWarningSnooze = SNOOZE_NEVER;
public long lastLimitSnooze = SNOOZE_NEVER;
public long lastRapidSnooze = SNOOZE_NEVER;
+ @UnsupportedAppUsage
@Deprecated public boolean metered = true;
+ @UnsupportedAppUsage
public boolean inferred = false;
private static final long DEFAULT_MTU = 1500;
@@ -77,6 +83,7 @@
}
@Deprecated
+ @UnsupportedAppUsage
public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone,
long warningBytes, long limitBytes, long lastWarningSnooze, long lastLimitSnooze,
boolean metered, boolean inferred) {
@@ -143,6 +150,7 @@
/**
* Test if given measurement is over {@link #warningBytes}.
*/
+ @UnsupportedAppUsage
public boolean isOverWarning(long totalBytes) {
return warningBytes != WARNING_DISABLED && totalBytes >= warningBytes;
}
@@ -151,6 +159,7 @@
* Test if given measurement is near enough to {@link #limitBytes} to be
* considered over-limit.
*/
+ @UnsupportedAppUsage
public boolean isOverLimit(long totalBytes) {
// over-estimate, since kernel will trigger limit once first packet
// trips over limit.
@@ -161,6 +170,7 @@
/**
* Clear any existing snooze values, setting to {@link #SNOOZE_NEVER}.
*/
+ @UnsupportedAppUsage
public void clearSnooze() {
lastWarningSnooze = SNOOZE_NEVER;
lastLimitSnooze = SNOOZE_NEVER;
@@ -175,6 +185,7 @@
}
@Override
+ @UnsupportedAppUsage
public int compareTo(NetworkPolicy another) {
if (another == null || another.limitBytes == LIMIT_DISABLED) {
// other value is missing or disabled; we win
@@ -225,6 +236,7 @@
.append("}").toString();
}
+ @UnsupportedAppUsage
public static final Creator<NetworkPolicy> CREATOR = new Creator<NetworkPolicy>() {
@Override
public NetworkPolicy createFromParcel(Parcel in) {
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index 75fd77e..d5fb2e7 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -19,6 +19,7 @@
import static android.content.pm.PackageManager.GET_SIGNATURES;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
@@ -121,6 +122,7 @@
public static final int OVERRIDE_CONGESTED = 1 << 1;
private final Context mContext;
+ @UnsupportedAppUsage
private INetworkPolicyManager mService;
public NetworkPolicyManager(Context context, INetworkPolicyManager service) {
@@ -131,6 +133,7 @@
mService = service;
}
+ @UnsupportedAppUsage
public static NetworkPolicyManager from(Context context) {
return (NetworkPolicyManager) context.getSystemService(Context.NETWORK_POLICY_SERVICE);
}
@@ -141,6 +144,7 @@
* @param policy should be {@link #POLICY_NONE} or any combination of {@code POLICY_} flags,
* although it is not validated.
*/
+ @UnsupportedAppUsage
public void setUidPolicy(int uid, int policy) {
try {
mService.setUidPolicy(uid, policy);
@@ -181,6 +185,7 @@
}
}
+ @UnsupportedAppUsage
public int getUidPolicy(int uid) {
try {
return mService.getUidPolicy(uid);
@@ -189,6 +194,7 @@
}
}
+ @UnsupportedAppUsage
public int[] getUidsWithPolicy(int policy) {
try {
return mService.getUidsWithPolicy(policy);
@@ -197,6 +203,7 @@
}
}
+ @UnsupportedAppUsage
public void registerListener(INetworkPolicyListener listener) {
try {
mService.registerListener(listener);
@@ -205,6 +212,7 @@
}
}
+ @UnsupportedAppUsage
public void unregisterListener(INetworkPolicyListener listener) {
try {
mService.unregisterListener(listener);
@@ -221,6 +229,7 @@
}
}
+ @UnsupportedAppUsage
public NetworkPolicy[] getNetworkPolicies() {
try {
return mService.getNetworkPolicies(mContext.getOpPackageName());
@@ -229,6 +238,7 @@
}
}
+ @UnsupportedAppUsage
public void setRestrictBackground(boolean restrictBackground) {
try {
mService.setRestrictBackground(restrictBackground);
@@ -237,6 +247,7 @@
}
}
+ @UnsupportedAppUsage
public boolean getRestrictBackground() {
try {
return mService.getRestrictBackground();
diff --git a/core/java/android/net/NetworkQuotaInfo.java b/core/java/android/net/NetworkQuotaInfo.java
index b95f1d9..e7182f7 100644
--- a/core/java/android/net/NetworkQuotaInfo.java
+++ b/core/java/android/net/NetworkQuotaInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -36,14 +37,17 @@
public NetworkQuotaInfo(Parcel in) {
}
+ @UnsupportedAppUsage
public long getEstimatedBytes() {
return 0;
}
+ @UnsupportedAppUsage
public long getSoftLimitBytes() {
return NO_LIMIT;
}
+ @UnsupportedAppUsage
public long getHardLimitBytes() {
return NO_LIMIT;
}
@@ -57,6 +61,7 @@
public void writeToParcel(Parcel out, int flags) {
}
+ @UnsupportedAppUsage
public static final Creator<NetworkQuotaInfo> CREATOR = new Creator<NetworkQuotaInfo>() {
@Override
public NetworkQuotaInfo createFromParcel(Parcel in) {
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index 16c2342..04b6b44 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -17,6 +17,7 @@
package android.net;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.net.NetworkCapabilities.NetCapability;
import android.net.NetworkCapabilities.Transport;
import android.os.Parcel;
@@ -38,6 +39,7 @@
* The {@link NetworkCapabilities} that define this request.
* @hide
*/
+ @UnsupportedAppUsage
public final @NonNull NetworkCapabilities networkCapabilities;
/**
@@ -46,6 +48,7 @@
* the request.
* @hide
*/
+ @UnsupportedAppUsage
public final int requestId;
/**
@@ -53,6 +56,7 @@
* Causes CONNECTIVITY_ACTION broadcasts to be sent.
* @hide
*/
+ @UnsupportedAppUsage
public final int legacyType;
/**
@@ -241,6 +245,7 @@
* @return The builder to facilitate chaining.
* @hide
*/
+ @UnsupportedAppUsage
public Builder clearCapabilities() {
mNetworkCapabilities.clearAll();
return this;
@@ -339,6 +344,7 @@
* @param signalStrength the bearer-specific signal strength.
* @hide
*/
+ @UnsupportedAppUsage
public Builder setSignalStrength(int signalStrength) {
mNetworkCapabilities.setSignalStrength(signalStrength);
return this;
diff --git a/core/java/android/net/NetworkState.java b/core/java/android/net/NetworkState.java
index 321f971..c545ee2 100644
--- a/core/java/android/net/NetworkState.java
+++ b/core/java/android/net/NetworkState.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Slog;
@@ -33,6 +34,7 @@
public final NetworkInfo networkInfo;
public final LinkProperties linkProperties;
public final NetworkCapabilities networkCapabilities;
+ @UnsupportedAppUsage
public final Network network;
public final String subscriberId;
public final String networkId;
@@ -58,6 +60,7 @@
}
}
+ @UnsupportedAppUsage
public NetworkState(Parcel in) {
networkInfo = in.readParcelable(null);
linkProperties = in.readParcelable(null);
@@ -82,6 +85,7 @@
out.writeString(networkId);
}
+ @UnsupportedAppUsage
public static final Creator<NetworkState> CREATOR = new Creator<NetworkState>() {
@Override
public NetworkState createFromParcel(Parcel in) {
diff --git a/core/java/android/net/NetworkStats.java b/core/java/android/net/NetworkStats.java
index edf9bc1..e270fc2 100644
--- a/core/java/android/net/NetworkStats.java
+++ b/core/java/android/net/NetworkStats.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
@@ -110,25 +111,43 @@
* generated.
*/
private long elapsedRealtime;
+ @UnsupportedAppUsage
private int size;
+ @UnsupportedAppUsage
private int capacity;
+ @UnsupportedAppUsage
private String[] iface;
+ @UnsupportedAppUsage
private int[] uid;
+ @UnsupportedAppUsage
private int[] set;
+ @UnsupportedAppUsage
private int[] tag;
+ @UnsupportedAppUsage
private int[] metered;
+ @UnsupportedAppUsage
private int[] roaming;
+ @UnsupportedAppUsage
private int[] defaultNetwork;
+ @UnsupportedAppUsage
private long[] rxBytes;
+ @UnsupportedAppUsage
private long[] rxPackets;
+ @UnsupportedAppUsage
private long[] txBytes;
+ @UnsupportedAppUsage
private long[] txPackets;
+ @UnsupportedAppUsage
private long[] operations;
public static class Entry {
+ @UnsupportedAppUsage
public String iface;
+ @UnsupportedAppUsage
public int uid;
+ @UnsupportedAppUsage
public int set;
+ @UnsupportedAppUsage
public int tag;
/**
* Note that this is only populated w/ the default value when read from /proc or written
@@ -148,12 +167,17 @@
* getSummary().
*/
public int defaultNetwork;
+ @UnsupportedAppUsage
public long rxBytes;
+ @UnsupportedAppUsage
public long rxPackets;
+ @UnsupportedAppUsage
public long txBytes;
+ @UnsupportedAppUsage
public long txPackets;
public long operations;
+ @UnsupportedAppUsage
public Entry() {
this(IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, 0L, 0L, 0L, 0L, 0L);
}
@@ -240,6 +264,7 @@
}
}
+ @UnsupportedAppUsage
public NetworkStats(long elapsedRealtime, int initialSize) {
this.elapsedRealtime = elapsedRealtime;
this.size = 0;
@@ -263,6 +288,7 @@
}
}
+ @UnsupportedAppUsage
public NetworkStats(Parcel parcel) {
elapsedRealtime = parcel.readLong();
size = parcel.readInt();
@@ -399,6 +425,7 @@
/**
* Return specific stats entry.
*/
+ @UnsupportedAppUsage
public Entry getValues(int i, Entry recycle) {
final Entry entry = recycle != null ? recycle : new Entry();
entry.iface = iface[i];
@@ -432,6 +459,7 @@
return SystemClock.elapsedRealtime() - elapsedRealtime;
}
+ @UnsupportedAppUsage
public int size() {
return size;
}
@@ -460,6 +488,7 @@
* {@link #findIndex(String, int, int, int, int)} is unable to find match. Can
* also be used to subtract values from existing rows.
*/
+ @UnsupportedAppUsage
public NetworkStats combineValues(Entry entry) {
final int i = findIndex(entry.iface, entry.uid, entry.set, entry.tag, entry.metered,
entry.roaming, entry.defaultNetwork);
@@ -479,6 +508,7 @@
/**
* Combine all values from another {@link NetworkStats} into this object.
*/
+ @UnsupportedAppUsage
public void combineAllValues(NetworkStats another) {
NetworkStats.Entry entry = null;
for (int i = 0; i < another.size; i++) {
@@ -564,6 +594,7 @@
/**
* Return list of unique UIDs known by this data structure.
*/
+ @UnsupportedAppUsage
public int[] getUniqueUids() {
final SparseBooleanArray uids = new SparseBooleanArray();
for (int uid : this.uid) {
@@ -582,6 +613,7 @@
* Return total bytes represented by this snapshot object, usually used when
* checking if a {@link #subtract(NetworkStats)} delta passes a threshold.
*/
+ @UnsupportedAppUsage
public long getTotalBytes() {
final Entry entry = getTotal(null);
return entry.rxBytes + entry.txBytes;
@@ -590,6 +622,7 @@
/**
* Return total of all fields represented by this snapshot object.
*/
+ @UnsupportedAppUsage
public Entry getTotal(Entry recycle) {
return getTotal(recycle, null, UID_ALL, false);
}
@@ -598,6 +631,7 @@
* Return total of all fields represented by this snapshot object matching
* the requested {@link #uid}.
*/
+ @UnsupportedAppUsage
public Entry getTotal(Entry recycle, int limitUid) {
return getTotal(recycle, null, limitUid, false);
}
@@ -610,6 +644,7 @@
return getTotal(recycle, limitIface, UID_ALL, false);
}
+ @UnsupportedAppUsage
public Entry getTotalIncludingTags(Entry recycle) {
return getTotal(recycle, null, UID_ALL, true);
}
@@ -1085,6 +1120,7 @@
return 0;
}
+ @UnsupportedAppUsage
public static final Creator<NetworkStats> CREATOR = new Creator<NetworkStats>() {
@Override
public NetworkStats createFromParcel(Parcel in) {
diff --git a/core/java/android/net/NetworkStatsHistory.java b/core/java/android/net/NetworkStatsHistory.java
index a13ad65..d53e032 100644
--- a/core/java/android/net/NetworkStatsHistory.java
+++ b/core/java/android/net/NetworkStatsHistory.java
@@ -30,6 +30,7 @@
import static com.android.internal.util.ArrayUtils.total;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.service.NetworkStatsHistoryBucketProto;
@@ -89,16 +90,23 @@
public static class Entry {
public static final long UNKNOWN = -1;
+ @UnsupportedAppUsage
public long bucketDuration;
+ @UnsupportedAppUsage
public long bucketStart;
public long activeTime;
+ @UnsupportedAppUsage
public long rxBytes;
+ @UnsupportedAppUsage
public long rxPackets;
+ @UnsupportedAppUsage
public long txBytes;
+ @UnsupportedAppUsage
public long txPackets;
public long operations;
}
+ @UnsupportedAppUsage
public NetworkStatsHistory(long bucketDuration) {
this(bucketDuration, 10, FIELD_ALL);
}
@@ -125,6 +133,7 @@
recordEntireHistory(existing);
}
+ @UnsupportedAppUsage
public NetworkStatsHistory(Parcel in) {
bucketDuration = in.readLong();
bucketStart = readLongArray(in);
@@ -210,6 +219,7 @@
return 0;
}
+ @UnsupportedAppUsage
public int size() {
return bucketCount;
}
@@ -218,6 +228,7 @@
return bucketDuration;
}
+ @UnsupportedAppUsage
public long getStart() {
if (bucketCount > 0) {
return bucketStart[0];
@@ -226,6 +237,7 @@
}
}
+ @UnsupportedAppUsage
public long getEnd() {
if (bucketCount > 0) {
return bucketStart[bucketCount - 1] + bucketDuration;
@@ -245,6 +257,7 @@
* Return index of bucket that contains or is immediately before the
* requested time.
*/
+ @UnsupportedAppUsage
public int getIndexBefore(long time) {
int index = Arrays.binarySearch(bucketStart, 0, bucketCount, time);
if (index < 0) {
@@ -272,6 +285,7 @@
/**
* Return specific stats entry.
*/
+ @UnsupportedAppUsage
public Entry getValues(int i, Entry recycle) {
final Entry entry = recycle != null ? recycle : new Entry();
entry.bucketStart = bucketStart[i];
@@ -373,6 +387,7 @@
* Record an entire {@link NetworkStatsHistory} into this history. Usually
* for combining together stats for external reporting.
*/
+ @UnsupportedAppUsage
public void recordEntireHistory(NetworkStatsHistory input) {
recordHistory(input, Long.MIN_VALUE, Long.MAX_VALUE);
}
@@ -509,6 +524,7 @@
* Return interpolated data usage across the requested range. Interpolates
* across buckets, so values may be rounded slightly.
*/
+ @UnsupportedAppUsage
public Entry getValues(long start, long end, Entry recycle) {
return getValues(start, end, Long.MAX_VALUE, recycle);
}
@@ -517,6 +533,7 @@
* Return interpolated data usage across the requested range. Interpolates
* across buckets, so values may be rounded slightly.
*/
+ @UnsupportedAppUsage
public Entry getValues(long start, long end, long now, Entry recycle) {
final Entry entry = recycle != null ? recycle : new Entry();
entry.bucketDuration = end - start;
@@ -701,6 +718,7 @@
return writer.toString();
}
+ @UnsupportedAppUsage
public static final Creator<NetworkStatsHistory> CREATOR = new Creator<NetworkStatsHistory>() {
@Override
public NetworkStatsHistory createFromParcel(Parcel in) {
diff --git a/core/java/android/net/NetworkTemplate.java b/core/java/android/net/NetworkTemplate.java
index 74233fd..bb75c63 100644
--- a/core/java/android/net/NetworkTemplate.java
+++ b/core/java/android/net/NetworkTemplate.java
@@ -34,6 +34,7 @@
import static android.net.NetworkStats.ROAMING_YES;
import static android.net.wifi.WifiInfo.removeDoubleQuotes;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.BackupUtils;
@@ -96,6 +97,7 @@
* Template to match {@link ConnectivityManager#TYPE_MOBILE} networks with
* the given IMSI.
*/
+ @UnsupportedAppUsage
public static NetworkTemplate buildTemplateMobileAll(String subscriberId) {
return new NetworkTemplate(MATCH_MOBILE, subscriberId, null);
}
@@ -104,6 +106,7 @@
* Template to match {@link ConnectivityManager#TYPE_MOBILE} networks,
* regardless of IMSI.
*/
+ @UnsupportedAppUsage
public static NetworkTemplate buildTemplateMobileWildcard() {
return new NetworkTemplate(MATCH_MOBILE_WILDCARD, null, null);
}
@@ -112,11 +115,13 @@
* Template to match all {@link ConnectivityManager#TYPE_WIFI} networks,
* regardless of SSID.
*/
+ @UnsupportedAppUsage
public static NetworkTemplate buildTemplateWifiWildcard() {
return new NetworkTemplate(MATCH_WIFI_WILDCARD, null, null);
}
@Deprecated
+ @UnsupportedAppUsage
public static NetworkTemplate buildTemplateWifi() {
return buildTemplateWifiWildcard();
}
@@ -133,6 +138,7 @@
* Template to combine all {@link ConnectivityManager#TYPE_ETHERNET} style
* networks together.
*/
+ @UnsupportedAppUsage
public static NetworkTemplate buildTemplateEthernet() {
return new NetworkTemplate(MATCH_ETHERNET, null, null);
}
@@ -173,6 +179,7 @@
private final int mRoaming;
private final int mDefaultNetwork;
+ @UnsupportedAppUsage
public NetworkTemplate(int matchRule, String subscriberId, String networkId) {
this(matchRule, subscriberId, new String[] { subscriberId }, networkId);
}
@@ -293,10 +300,12 @@
}
}
+ @UnsupportedAppUsage
public int getMatchRule() {
return mMatchRule;
}
+ @UnsupportedAppUsage
public String getSubscriberId() {
return mSubscriberId;
}
@@ -460,6 +469,7 @@
* active merge set [A,B], we'd return a new template that primarily matches
* A, but also matches B.
*/
+ @UnsupportedAppUsage
public static NetworkTemplate normalize(NetworkTemplate template, String[] merged) {
if (template.isMatchRuleMobile() && ArrayUtils.contains(merged, template.mSubscriberId)) {
// Requested template subscriber is part of the merge group; return
@@ -471,6 +481,7 @@
}
}
+ @UnsupportedAppUsage
public static final Creator<NetworkTemplate> CREATOR = new Creator<NetworkTemplate>() {
@Override
public NetworkTemplate createFromParcel(Parcel in) {
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index 9a5d502..599ccb2 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.util.Log;
import android.util.Pair;
@@ -43,6 +44,7 @@
/**
* Attaches a socket filter that accepts DHCP packets to the given socket.
*/
+ @UnsupportedAppUsage
public native static void attachDhcpFilter(FileDescriptor fd) throws SocketException;
/**
@@ -50,6 +52,7 @@
* @param fd the socket's {@link FileDescriptor}.
* @param packetType the hardware address type, one of ARPHRD_*.
*/
+ @UnsupportedAppUsage
public native static void attachRaFilter(FileDescriptor fd, int packetType) throws SocketException;
/**
@@ -60,6 +63,7 @@
* @param fd the socket's {@link FileDescriptor}.
* @param packetType the hardware address type, one of ARPHRD_*.
*/
+ @UnsupportedAppUsage
public native static void attachControlPacketFilter(FileDescriptor fd, int packetType)
throws SocketException;
@@ -108,6 +112,7 @@
* this socket will go directly to the underlying network, so its traffic will not be
* forwarded through the VPN.
*/
+ @UnsupportedAppUsage
public static boolean protectFromVpn(FileDescriptor fd) {
return protectFromVpn(fd.getInt$());
}
@@ -126,51 +131,124 @@
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
+ @UnsupportedAppUsage
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
+ @UnsupportedAppUsage
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) {
@@ -184,6 +262,7 @@
* @throws IllegalArgumentException the specified netmask was not contiguous.
* @hide
*/
+ @UnsupportedAppUsage
public static int netmaskToPrefixLength(Inet4Address netmask) {
// inetAddressToInt returns an int in *network* byte order.
int i = Integer.reverseBytes(inetAddressToInt(netmask));
@@ -204,6 +283,7 @@
* @return the InetAddress
* @hide
*/
+ @UnsupportedAppUsage
public static InetAddress numericToInetAddress(String addrString)
throws IllegalArgumentException {
return InetAddress.parseNumericAddress(addrString);
@@ -278,6 +358,7 @@
/**
* Returns the implicit netmask of an IPv4 address, as was the custom before 1993.
*/
+ @UnsupportedAppUsage
public static int getImplicitNetmask(Inet4Address address) {
int firstByte = address.getAddress()[0] & 0xff; // Convert to an unsigned value.
if (firstByte < 128) {
@@ -368,6 +449,7 @@
* @param addr a string representing an ip addr
* @return a string propertly trimmed
*/
+ @UnsupportedAppUsage
public static String trimV4AddrZeros(String addr) {
if (addr == null) return null;
String[] octets = addr.split("\\.");
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/Proxy.java b/core/java/android/net/Proxy.java
index e3551b0..4600942 100644
--- a/core/java/android/net/Proxy.java
+++ b/core/java/android/net/Proxy.java
@@ -18,6 +18,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
@@ -106,6 +107,7 @@
* A null value means that no host is to be used.
* {@hide}
*/
+ @UnsupportedAppUsage
public static final java.net.Proxy getProxy(Context ctx, String url) {
String host = "";
if ((url != null) && !isLocalHost(host)) {
@@ -239,6 +241,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static final void setHttpProxySystemProperty(ProxyInfo p) {
String host = null;
String port = null;
diff --git a/core/java/android/net/ProxyInfo.java b/core/java/android/net/ProxyInfo.java
index 5f5e623..e926fda 100644
--- a/core/java/android/net/ProxyInfo.java
+++ b/core/java/android/net/ProxyInfo.java
@@ -17,6 +17,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -91,6 +92,7 @@
* Create a ProxyProperties that points at a HTTP Proxy.
* @hide
*/
+ @UnsupportedAppUsage
public ProxyInfo(String host, int port, String exclList) {
mHost = host;
mPort = port;
diff --git a/core/java/android/net/RouteInfo.java b/core/java/android/net/RouteInfo.java
index 90a2460..3e73d3d 100644
--- a/core/java/android/net/RouteInfo.java
+++ b/core/java/android/net/RouteInfo.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -55,6 +56,7 @@
/**
* The gateway address for this route.
*/
+ @UnsupportedAppUsage
private final InetAddress mGateway;
/**
@@ -79,6 +81,7 @@
// Derived data members.
// TODO: remove these.
+ @UnsupportedAppUsage
private final boolean mIsHost;
private final boolean mHasGateway;
@@ -160,6 +163,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public RouteInfo(IpPrefix destination, InetAddress gateway, String iface) {
this(destination, gateway, iface, RTN_UNICAST);
}
@@ -167,6 +171,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public RouteInfo(LinkAddress destination, InetAddress gateway, String iface) {
this(destination == null ? null :
new IpPrefix(destination.getAddress(), destination.getPrefixLength()),
@@ -197,6 +202,7 @@
*
* TODO: Remove this.
*/
+ @UnsupportedAppUsage
public RouteInfo(LinkAddress destination, InetAddress gateway) {
this(destination, gateway, null);
}
@@ -208,6 +214,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public RouteInfo(InetAddress gateway) {
this((IpPrefix) null, gateway, null);
}
@@ -258,6 +265,7 @@
}
}
+ @UnsupportedAppUsage
private boolean isHost() {
return (mDestination.getAddress() instanceof Inet4Address &&
mDestination.getPrefixLength() == 32) ||
@@ -355,6 +363,7 @@
* @return {@code true} if a gateway is specified
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasGateway() {
return mHasGateway;
}
@@ -379,6 +388,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static RouteInfo selectBestRoute(Collection<RouteInfo> routes, InetAddress dest) {
if ((routes == null) || (dest == null)) return null;
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index 1f53587..31494d9 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.SystemProperties;
import android.util.Log;
@@ -73,17 +74,23 @@
* 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.
*/
public class SSLCertificateSocketFactory extends SSLSocketFactory {
+ @UnsupportedAppUsage
private static final String TAG = "SSLCertificateSocketFactory";
+ @UnsupportedAppUsage
private static final TrustManager[] INSECURE_TRUST_MANAGER = new TrustManager[] {
new X509TrustManager() {
public X509Certificate[] getAcceptedIssuers() { return null; }
@@ -92,16 +99,26 @@
}
};
+ @UnsupportedAppUsage
private SSLSocketFactory mInsecureFactory = null;
+ @UnsupportedAppUsage
private SSLSocketFactory mSecureFactory = null;
+ @UnsupportedAppUsage
private TrustManager[] mTrustManagers = null;
+ @UnsupportedAppUsage
private KeyManager[] mKeyManagers = null;
+ @UnsupportedAppUsage
private byte[] mNpnProtocols = null;
+ @UnsupportedAppUsage
private byte[] mAlpnProtocols = null;
+ @UnsupportedAppUsage
private PrivateKey mChannelIdPrivateKey = null;
+ @UnsupportedAppUsage
private final int mHandshakeTimeoutMillis;
+ @UnsupportedAppUsage
private final SSLClientSessionCache mSessionCache;
+ @UnsupportedAppUsage
private final boolean mSecure;
/** @deprecated Use {@link #getDefault(int)} instead. */
@@ -110,6 +127,7 @@
this(handshakeTimeoutMillis, null, true);
}
+ @UnsupportedAppUsage
private SSLCertificateSocketFactory(
int handshakeTimeoutMillis, SSLSessionCache cache, boolean secure) {
mHandshakeTimeoutMillis = handshakeTimeoutMillis;
@@ -197,6 +215,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void verifyHostname(Socket socket, String hostname) throws IOException {
if (!(socket instanceof SSLSocket)) {
throw new IllegalArgumentException("Attempt to verify non-SSL socket");
@@ -218,6 +237,7 @@
}
}
+ @UnsupportedAppUsage
private SSLSocketFactory makeSocketFactory(
KeyManager[] keyManagers, TrustManager[] trustManagers) {
try {
@@ -231,11 +251,13 @@
}
}
+ @UnsupportedAppUsage
private static boolean isSslCheckRelaxed() {
return RoSystemProperties.DEBUGGABLE &&
SystemProperties.getBoolean("socket.relaxsslcheck", false);
}
+ @UnsupportedAppUsage
private synchronized SSLSocketFactory getDelegate() {
// Relax the SSL check if instructed (for this factory, or systemwide)
if (!mSecure || isSslCheckRelaxed()) {
@@ -307,6 +329,7 @@
* must be non-empty and of length less than 256.
* @hide
*/
+ @UnsupportedAppUsage
public void setAlpnProtocols(byte[][] protocols) {
this.mAlpnProtocols = toLengthPrefixedList(protocols);
}
@@ -361,6 +384,7 @@
* @throws IllegalArgumentException if the socket was not created by this factory.
* @hide
*/
+ @UnsupportedAppUsage
public byte[] getAlpnSelectedProtocol(Socket socket) {
return castToOpenSSLSocket(socket).getAlpnSelectedProtocol();
}
@@ -386,6 +410,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setChannelIdPrivateKey(PrivateKey privateKey) {
mChannelIdPrivateKey = privateKey;
}
@@ -425,11 +450,13 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSoWriteTimeout(Socket socket, int writeTimeoutMilliseconds)
throws SocketException {
castToOpenSSLSocket(socket).setSoWriteTimeout(writeTimeoutMilliseconds);
}
+ @UnsupportedAppUsage
private static OpenSSLSocketImpl castToOpenSSLSocket(Socket socket) {
if (!(socket instanceof OpenSSLSocketImpl)) {
throw new IllegalArgumentException("Socket not created by this factory: "
@@ -442,8 +469,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 +488,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 +508,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 +529,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 +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, InetAddress localAddr, int localPort)
@@ -536,8 +571,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/SSLSessionCache.java b/core/java/android/net/SSLSessionCache.java
index 65db2c3..9667e82 100644
--- a/core/java/android/net/SSLSessionCache.java
+++ b/core/java/android/net/SSLSessionCache.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.Log;
@@ -39,6 +40,7 @@
*/
public final class SSLSessionCache {
private static final String TAG = "SSLSessionCache";
+ @UnsupportedAppUsage
/* package */ final SSLClientSessionCache mSessionCache;
/**
diff --git a/core/java/android/net/SntpClient.java b/core/java/android/net/SntpClient.java
index ddf63ca..10c0ce2 100644
--- a/core/java/android/net/SntpClient.java
+++ b/core/java/android/net/SntpClient.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.SystemClock;
import android.util.Log;
@@ -175,6 +176,7 @@
}
@Deprecated
+ @UnsupportedAppUsage
public boolean requestTime(String host, int timeout) {
Log.w(TAG, "Shame on you for calling the hidden API requestTime()!");
return false;
@@ -185,6 +187,7 @@
*
* @return time value computed from NTP server response.
*/
+ @UnsupportedAppUsage
public long getNtpTime() {
return mNtpTime;
}
@@ -195,6 +198,7 @@
*
* @return reference clock corresponding to the NTP time.
*/
+ @UnsupportedAppUsage
public long getNtpTimeReference() {
return mNtpTimeReference;
}
@@ -204,6 +208,7 @@
*
* @return round trip time in milliseconds.
*/
+ @UnsupportedAppUsage
public long getRoundTripTime() {
return mRoundTripTime;
}
diff --git a/core/java/android/net/StaticIpConfiguration.java b/core/java/android/net/StaticIpConfiguration.java
index 58b1b88..3aa56b9 100644
--- a/core/java/android/net/StaticIpConfiguration.java
+++ b/core/java/android/net/StaticIpConfiguration.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.net.LinkAddress;
import android.os.Parcelable;
import android.os.Parcel;
@@ -46,11 +47,16 @@
* @hide
*/
public class StaticIpConfiguration implements Parcelable {
+ @UnsupportedAppUsage
public LinkAddress ipAddress;
+ @UnsupportedAppUsage
public InetAddress gateway;
+ @UnsupportedAppUsage
public final ArrayList<InetAddress> dnsServers;
+ @UnsupportedAppUsage
public String domains;
+ @UnsupportedAppUsage
public StaticIpConfiguration() {
dnsServers = new ArrayList<InetAddress>();
}
@@ -80,6 +86,7 @@
* route to the gateway as well. This configuration is arguably invalid, but it used to work
* in K and earlier, and other OSes appear to accept it.
*/
+ @UnsupportedAppUsage
public List<RouteInfo> getRoutes(String iface) {
List<RouteInfo> routes = new ArrayList<RouteInfo>(3);
if (ipAddress != null) {
diff --git a/core/java/android/net/StringNetworkSpecifier.java b/core/java/android/net/StringNetworkSpecifier.java
index cb7f6bf..b5d12f9 100644
--- a/core/java/android/net/StringNetworkSpecifier.java
+++ b/core/java/android/net/StringNetworkSpecifier.java
@@ -16,6 +16,7 @@
package android.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -29,6 +30,7 @@
/**
* Arbitrary string used to pass (additional) information to the network factory.
*/
+ @UnsupportedAppUsage
public final String specifier;
public StringNetworkSpecifier(String specifier) {
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java
index f033268..a463afa 100644
--- a/core/java/android/net/TrafficStats.java
+++ b/core/java/android/net/TrafficStats.java
@@ -19,6 +19,7 @@
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.DownloadManager;
import android.app.backup.BackupManager;
import android.app.usage.NetworkStatsManager;
@@ -141,6 +142,7 @@
private static INetworkStatsService sStatsService;
+ @UnsupportedAppUsage
private synchronized static INetworkStatsService getStatsService() {
if (sStatsService == null) {
sStatsService = INetworkStatsService.Stub.asInterface(
@@ -536,6 +538,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static long getMobileTcpRxPackets() {
long total = 0;
for (String iface : getMobileIfaces()) {
@@ -551,6 +554,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static long getMobileTcpTxPackets() {
long total = 0;
for (String iface : getMobileIfaces()) {
@@ -584,6 +588,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static long getTxBytes(String iface) {
try {
return getStatsService().getIfaceStats(iface, TYPE_TX_BYTES);
@@ -593,6 +598,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static long getRxBytes(String iface) {
try {
return getStatsService().getIfaceStats(iface, TYPE_RX_BYTES);
@@ -948,6 +954,7 @@
* Interfaces are never removed from this list, so counters should always be
* monotonic.
*/
+ @UnsupportedAppUsage
private static String[] getMobileIfaces() {
try {
return getStatsService().getMobileIfaces();
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index b7f5cdf..9bcc600 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -17,6 +17,7 @@
package android.net;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Environment;
import android.os.Parcel;
@@ -133,6 +134,7 @@
/**
* Prevents external subclassing.
*/
+ @UnsupportedAppUsage
private Uri() {}
/**
@@ -376,6 +378,7 @@
* to logs and other places where PII should be avoided.
* @hide
*/
+ @UnsupportedAppUsage
public String toSafeString() {
String scheme = getScheme();
String ssp = getSchemeSpecificPart();
@@ -2331,6 +2334,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Uri getCanonicalUri() {
if ("file".equals(getScheme())) {
final String canonicalPath;
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 712576f..f0c0462 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -21,6 +21,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.Service;
@@ -440,7 +441,9 @@
public class Builder {
private final VpnConfig mConfig = new VpnConfig();
+ @UnsupportedAppUsage
private final List<LinkAddress> mAddresses = new ArrayList<LinkAddress>();
+ @UnsupportedAppUsage
private final List<RouteInfo> mRoutes = new ArrayList<RouteInfo>();
public Builder() {
diff --git a/core/java/android/net/WebAddress.java b/core/java/android/net/WebAddress.java
index 24d4eb8..8026d76 100644
--- a/core/java/android/net/WebAddress.java
+++ b/core/java/android/net/WebAddress.java
@@ -19,6 +19,7 @@
import static android.util.Patterns.GOOD_IRI_CHAR;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import java.util.Locale;
import java.util.regex.Matcher;
@@ -45,9 +46,13 @@
@SystemApi
public class WebAddress {
+ @UnsupportedAppUsage
private String mScheme;
+ @UnsupportedAppUsage
private String mHost;
+ @UnsupportedAppUsage
private int mPort;
+ @UnsupportedAppUsage
private String mPath;
private String mAuthInfo;
@@ -147,16 +152,19 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public String getScheme() {
return mScheme;
}
/** {@hide} */
+ @UnsupportedAppUsage
public void setHost(String host) {
mHost = host;
}
/** {@hide} */
+ @UnsupportedAppUsage
public String getHost() {
return mHost;
}
@@ -167,16 +175,19 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public int getPort() {
return mPort;
}
/** {@hide} */
+ @UnsupportedAppUsage
public void setPath(String path) {
mPath = path;
}
/** {@hide} */
+ @UnsupportedAppUsage
public String getPath() {
return mPath;
}
@@ -187,6 +198,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public String getAuthInfo() {
return mAuthInfo;
}
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..6fcd6eb 100644
--- a/core/java/android/net/http/SslCertificate.java
+++ b/core/java/android/net/http/SslCertificate.java
@@ -16,8 +16,7 @@
package android.net.http;
-import com.android.internal.util.HexDump;
-
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Bundle;
import android.text.format.DateFormat;
@@ -25,6 +24,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 +41,6 @@
import java.util.Date;
import java.util.Vector;
-import com.android.org.bouncycastle.asn1.x509.X509Name;
-
/**
* SSL certificate info (certificate details) class
*/
@@ -78,6 +78,7 @@
* be available, and saveState and restoreState can be simplified
* to be unconditional.
*/
+ @UnsupportedAppUsage
private final X509Certificate mX509Certificate;
/**
@@ -248,8 +249,17 @@
}
/**
+ * @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.
*/
+ @UnsupportedAppUsage
private static String getSerialNumber(X509Certificate x509Certificate) {
if (x509Certificate == null) {
return "";
@@ -264,6 +274,7 @@
/**
* Convenience for UI presentation, not intended as public API.
*/
+ @UnsupportedAppUsage
private static String getDigest(X509Certificate x509Certificate, String algorithm) {
if (x509Certificate == null) {
return "";
@@ -447,6 +458,7 @@
*
* @hide Used by Browser and Settings
*/
+ @UnsupportedAppUsage
public View inflateCertificateView(Context context) {
LayoutInflater factory = LayoutInflater.from(context);
diff --git a/core/java/android/net/http/SslError.java b/core/java/android/net/http/SslError.java
index 1cd73d2..fad6689 100644
--- a/core/java/android/net/http/SslError.java
+++ b/core/java/android/net/http/SslError.java
@@ -16,6 +16,7 @@
package android.net.http;
+import android.annotation.UnsupportedAppUsage;
import java.security.cert.X509Certificate;
/**
@@ -67,16 +68,19 @@
* The SSL error set bitfield (each individual error is a bit index;
* multiple individual errors can be OR-ed)
*/
+ @UnsupportedAppUsage
int mErrors;
/**
* The SSL certificate associated with the error set
*/
+ @UnsupportedAppUsage
final SslCertificate mCertificate;
/**
* The URL associated with the error set.
*/
+ @UnsupportedAppUsage
final String mUrl;
/**
diff --git a/core/java/android/net/metrics/ApfProgramEvent.java b/core/java/android/net/metrics/ApfProgramEvent.java
index ad4588f..5dabf35 100644
--- a/core/java/android/net/metrics/ApfProgramEvent.java
+++ b/core/java/android/net/metrics/ApfProgramEvent.java
@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -47,13 +48,20 @@
@Retention(RetentionPolicy.SOURCE)
public @interface Flags {}
+ @UnsupportedAppUsage
public long lifetime; // Maximum computed lifetime of the program in seconds
+ @UnsupportedAppUsage
public long actualLifetime; // Effective program lifetime in seconds
+ @UnsupportedAppUsage
public int filteredRas; // Number of RAs filtered by the APF program
+ @UnsupportedAppUsage
public int currentRas; // Total number of current RAs at generation time
+ @UnsupportedAppUsage
public int programLength; // Length of the APF program in bytes
+ @UnsupportedAppUsage
public int flags; // Bitfield compound of FLAG_* constants
+ @UnsupportedAppUsage
public ApfProgramEvent() {
}
@@ -99,6 +107,7 @@
}
};
+ @UnsupportedAppUsage
public static @Flags int flagsFor(boolean hasIPv4, boolean multicastFilterOn) {
int bitfield = 0;
if (hasIPv4) {
diff --git a/core/java/android/net/metrics/ApfStats.java b/core/java/android/net/metrics/ApfStats.java
index 76a781d..bb2a35c 100644
--- a/core/java/android/net/metrics/ApfStats.java
+++ b/core/java/android/net/metrics/ApfStats.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,26 +27,37 @@
public final class ApfStats implements Parcelable {
/** time interval in milliseconds these stastistics covers. */
+ @UnsupportedAppUsage
public long durationMs;
/** number of received RAs. */
+ @UnsupportedAppUsage
public int receivedRas;
/** number of received RAs matching a known RA. */
+ @UnsupportedAppUsage
public int matchingRas;
/** number of received RAs ignored due to the MAX_RAS limit. */
+ @UnsupportedAppUsage
public int droppedRas;
/** number of received RAs with a minimum lifetime of 0. */
+ @UnsupportedAppUsage
public int zeroLifetimeRas;
/** number of received RAs that could not be parsed. */
+ @UnsupportedAppUsage
public int parseErrors;
/** number of APF program updates from receiving RAs.. */
+ @UnsupportedAppUsage
public int programUpdates;
/** total number of APF program updates. */
+ @UnsupportedAppUsage
public int programUpdatesAll;
/** number of APF program updates from allowing multicast traffic. */
+ @UnsupportedAppUsage
public int programUpdatesAllowingMulticast;
/** maximum APF program size advertised by hardware. */
+ @UnsupportedAppUsage
public int maxProgramSize;
+ @UnsupportedAppUsage
public ApfStats() {
}
diff --git a/core/java/android/net/metrics/DhcpClientEvent.java b/core/java/android/net/metrics/DhcpClientEvent.java
index c5b78a5..98a7d7e 100644
--- a/core/java/android/net/metrics/DhcpClientEvent.java
+++ b/core/java/android/net/metrics/DhcpClientEvent.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -34,6 +35,7 @@
public final String msg;
public final int durationMs;
+ @UnsupportedAppUsage
public DhcpClientEvent(String msg, int durationMs) {
this.msg = msg;
this.durationMs = durationMs;
diff --git a/core/java/android/net/metrics/DhcpErrorEvent.java b/core/java/android/net/metrics/DhcpErrorEvent.java
index 8b77197..c6c06f0 100644
--- a/core/java/android/net/metrics/DhcpErrorEvent.java
+++ b/core/java/android/net/metrics/DhcpErrorEvent.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -33,25 +34,41 @@
public static final int DHCP_ERROR = 4;
public static final int MISC_ERROR = 5;
+ @UnsupportedAppUsage
public static final int L2_TOO_SHORT = makeErrorCode(L2_ERROR, 1);
+ @UnsupportedAppUsage
public static final int L2_WRONG_ETH_TYPE = makeErrorCode(L2_ERROR, 2);
+ @UnsupportedAppUsage
public static final int L3_TOO_SHORT = makeErrorCode(L3_ERROR, 1);
+ @UnsupportedAppUsage
public static final int L3_NOT_IPV4 = makeErrorCode(L3_ERROR, 2);
+ @UnsupportedAppUsage
public static final int L3_INVALID_IP = makeErrorCode(L3_ERROR, 3);
+ @UnsupportedAppUsage
public static final int L4_NOT_UDP = makeErrorCode(L4_ERROR, 1);
+ @UnsupportedAppUsage
public static final int L4_WRONG_PORT = makeErrorCode(L4_ERROR, 2);
+ @UnsupportedAppUsage
public static final int BOOTP_TOO_SHORT = makeErrorCode(DHCP_ERROR, 1);
+ @UnsupportedAppUsage
public static final int DHCP_BAD_MAGIC_COOKIE = makeErrorCode(DHCP_ERROR, 2);
+ @UnsupportedAppUsage
public static final int DHCP_INVALID_OPTION_LENGTH = makeErrorCode(DHCP_ERROR, 3);
+ @UnsupportedAppUsage
public static final int DHCP_NO_MSG_TYPE = makeErrorCode(DHCP_ERROR, 4);
+ @UnsupportedAppUsage
public static final int DHCP_UNKNOWN_MSG_TYPE = makeErrorCode(DHCP_ERROR, 5);
+ @UnsupportedAppUsage
public static final int DHCP_NO_COOKIE = makeErrorCode(DHCP_ERROR, 6);
+ @UnsupportedAppUsage
public static final int BUFFER_UNDERFLOW = makeErrorCode(MISC_ERROR, 1);
+ @UnsupportedAppUsage
public static final int RECEIVE_ERROR = makeErrorCode(MISC_ERROR, 2);
+ @UnsupportedAppUsage
public static final int PARSING_ERROR = makeErrorCode(MISC_ERROR, 3);
// error code byte format (MSB to LSB):
@@ -61,6 +78,7 @@
// byte 3: optional code
public final int errorCode;
+ @UnsupportedAppUsage
public DhcpErrorEvent(int errorCode) {
this.errorCode = errorCode;
}
@@ -90,6 +108,7 @@
}
};
+ @UnsupportedAppUsage
public static int errorCodeWithOption(int errorCode, int option) {
return (0xFFFF0000 & errorCode) | (0xFF & option);
}
diff --git a/core/java/android/net/metrics/IpConnectivityLog.java b/core/java/android/net/metrics/IpConnectivityLog.java
index 4e57efa..998f4ba 100644
--- a/core/java/android/net/metrics/IpConnectivityLog.java
+++ b/core/java/android/net/metrics/IpConnectivityLog.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.UnsupportedAppUsage;
import android.net.ConnectivityMetricsEvent;
import android.net.IIpConnectivityMetrics;
import android.os.Parcelable;
@@ -37,6 +38,7 @@
private IIpConnectivityMetrics mService;
+ @UnsupportedAppUsage
public IpConnectivityLog() {
}
@@ -104,6 +106,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
+ @UnsupportedAppUsage
public boolean log(String ifname, Parcelable data) {
ConnectivityMetricsEvent ev = makeEv(data);
ev.ifname = ifname;
@@ -130,6 +133,7 @@
* @param data is a Parcelable instance representing the event.
* @return true if the event was successfully logged.
*/
+ @UnsupportedAppUsage
public boolean log(Parcelable data) {
return log(makeEv(data));
}
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index f8a63ce..c47650f 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -53,6 +54,7 @@
public final @EventType int eventType;
public final long durationMs;
+ @UnsupportedAppUsage
public IpManagerEvent(@EventType int eventType, long duration) {
this.eventType = eventType;
this.durationMs = duration;
diff --git a/core/java/android/net/metrics/IpReachabilityEvent.java b/core/java/android/net/metrics/IpReachabilityEvent.java
index 019c2c5..715c95e 100644
--- a/core/java/android/net/metrics/IpReachabilityEvent.java
+++ b/core/java/android/net/metrics/IpReachabilityEvent.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -48,6 +49,7 @@
// byte 3: when byte 2 == PROBE, errno code from RTNetlink or IpReachabilityMonitor.
public final int eventType;
+ @UnsupportedAppUsage
public IpReachabilityEvent(int eventType) {
this.eventType = eventType;
}
@@ -80,6 +82,7 @@
/**
* Returns the NUD failure event type code corresponding to the given conditions.
*/
+ @UnsupportedAppUsage
public static int nudFailureEventType(boolean isFromProbe, boolean isProvisioningLost) {
if (isFromProbe) {
return isProvisioningLost ? PROVISIONING_LOST : NUD_FAILED;
diff --git a/core/java/android/net/metrics/RaEvent.java b/core/java/android/net/metrics/RaEvent.java
index 3249f80..c41881c 100644
--- a/core/java/android/net/metrics/RaEvent.java
+++ b/core/java/android/net/metrics/RaEvent.java
@@ -16,6 +16,7 @@
package android.net.metrics;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -101,39 +102,47 @@
long rdnssLifetime = NO_LIFETIME;
long dnsslLifetime = NO_LIFETIME;
+ @UnsupportedAppUsage
public Builder() {
}
+ @UnsupportedAppUsage
public RaEvent build() {
return new RaEvent(routerLifetime, prefixValidLifetime, prefixPreferredLifetime,
routeInfoLifetime, rdnssLifetime, dnsslLifetime);
}
+ @UnsupportedAppUsage
public Builder updateRouterLifetime(long lifetime) {
routerLifetime = updateLifetime(routerLifetime, lifetime);
return this;
}
+ @UnsupportedAppUsage
public Builder updatePrefixValidLifetime(long lifetime) {
prefixValidLifetime = updateLifetime(prefixValidLifetime, lifetime);
return this;
}
+ @UnsupportedAppUsage
public Builder updatePrefixPreferredLifetime(long lifetime) {
prefixPreferredLifetime = updateLifetime(prefixPreferredLifetime, lifetime);
return this;
}
+ @UnsupportedAppUsage
public Builder updateRouteInfoLifetime(long lifetime) {
routeInfoLifetime = updateLifetime(routeInfoLifetime, lifetime);
return this;
}
+ @UnsupportedAppUsage
public Builder updateRdnssLifetime(long lifetime) {
rdnssLifetime = updateLifetime(rdnssLifetime, lifetime);
return this;
}
+ @UnsupportedAppUsage
public Builder updateDnsslLifetime(long lifetime) {
dnsslLifetime = updateLifetime(dnsslLifetime, lifetime);
return this;
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/net/nsd/NsdServiceInfo.java b/core/java/android/net/nsd/NsdServiceInfo.java
index bccaf60..9ba17ed 100644
--- a/core/java/android/net/nsd/NsdServiceInfo.java
+++ b/core/java/android/net/nsd/NsdServiceInfo.java
@@ -17,6 +17,7 @@
package android.net.nsd;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
import android.text.TextUtils;
@@ -185,6 +186,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setAttribute(String key, byte[] value) {
if (TextUtils.isEmpty(key)) {
throw new IllegalArgumentException("Key cannot be empty");
diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java
index 5752b6f..591370f 100644
--- a/core/java/android/os/BinderProxy.java
+++ b/core/java/android/os/BinderProxy.java
@@ -241,6 +241,9 @@
} else {
try {
key = bp.getInterfaceDescriptor();
+ if ((key == null || key.isEmpty()) && !bp.isBinderAlive()) {
+ key = "<proxy to dead node>";
+ }
} catch (Throwable t) {
key = "<exception during getDescriptor>";
}
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/Debug.java b/core/java/android/os/Debug.java
index e606964..6ddcbe0 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -1752,13 +1752,13 @@
public static native long getPss();
/**
- * Retrieves the PSS memory used by the process as given by the
- * smaps. Optionally supply a long array of 2 entries to also
- * receive the Uss and SwapPss of the process, and another array to also
- * retrieve the separate memtrack size.
+ * Retrieves the PSS memory used by the process as given by the smaps. Optionally supply a long
+ * array of up to 3 entries to also receive (up to 3 values in order): the Uss and SwapPss and
+ * Rss (only filled in as of {@link android.os.Build.VERSION_CODES#P}) of the process, and
+ * another array to also retrieve the separate memtrack size.
* @hide
*/
- public static native long getPss(int pid, long[] outUssSwapPss, long[] outMemtrack);
+ public static native long getPss(int pid, long[] outUssSwapPssRss, long[] outMemtrack);
/** @hide */
public static final int MEMINFO_TOTAL = 0;
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index e32ed9d..347f60f 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -45,6 +45,7 @@
private static final String ENV_ODM_ROOT = "ODM_ROOT";
private static final String ENV_VENDOR_ROOT = "VENDOR_ROOT";
private static final String ENV_PRODUCT_ROOT = "PRODUCT_ROOT";
+ private static final String ENV_PRODUCT_SERVICES_ROOT = "PRODUCT_SERVICES_ROOT";
/** {@hide} */
public static final String DIR_ANDROID = "Android";
@@ -67,6 +68,8 @@
private static final File DIR_ODM_ROOT = getDirectory(ENV_ODM_ROOT, "/odm");
private static final File DIR_VENDOR_ROOT = getDirectory(ENV_VENDOR_ROOT, "/vendor");
private static final File DIR_PRODUCT_ROOT = getDirectory(ENV_PRODUCT_ROOT, "/product");
+ private static final File DIR_PRODUCT_SERVICES_ROOT = getDirectory(ENV_PRODUCT_SERVICES_ROOT,
+ "/product_services");
private static UserEnvironment sCurrentUser;
private static boolean sUserRequired;
@@ -196,6 +199,16 @@
}
/**
+ * Return root directory of the "product_services" partition holding middleware
+ * services if any. If present, the partition is mounted read-only.
+ *
+ * @hide
+ */
+ public static File getProductServicesDirectory() {
+ return DIR_PRODUCT_SERVICES_ROOT;
+ }
+
+ /**
* Return the system directory for a user. This is for use by system
* services to store files relating to the user. This directory will be
* automatically deleted when the user is removed.
diff --git a/core/java/android/os/HwBlob.java b/core/java/android/os/HwBlob.java
index 405651e..6a5bb1c 100644
--- a/core/java/android/os/HwBlob.java
+++ b/core/java/android/os/HwBlob.java
@@ -232,6 +232,14 @@
* @throws IndexOutOfBoundsException when [offset, offset + sizeof(jstring)] is out of range
*/
public native final void putString(long offset, String x);
+ /**
+ * Writes a native handle (without duplicating the underlying file descriptors) at an offset.
+ *
+ * @param offset location to write value
+ * @param x a {@link NativeHandle} instance to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jobject)] is out of range
+ */
+ public native final void putNativeHandle(long offset, NativeHandle x);
/**
* Put a boolean array contiguously at an offset in the blob.
diff --git a/core/java/android/os/HwParcel.java b/core/java/android/os/HwParcel.java
index 0eb62c95..7a51db2 100644
--- a/core/java/android/os/HwParcel.java
+++ b/core/java/android/os/HwParcel.java
@@ -115,6 +115,13 @@
* @param val to write
*/
public native final void writeString(String val);
+ /**
+ * Writes a native handle (without duplicating the underlying
+ * file descriptors) to the end of the parcel.
+ *
+ * @param val to write
+ */
+ public native final void writeNativeHandle(NativeHandle val);
/**
* Writes an array of boolean values to the end of the parcel.
@@ -159,6 +166,11 @@
* @param val to write
*/
private native final void writeStringVector(String[] val);
+ /**
+ * Writes an array of native handles to the end of the parcel.
+ * @param val array of {@link NativeHandle} objects to write
+ */
+ private native final void writeNativeHandleVector(NativeHandle[] val);
/**
* Helper method to write a list of Booleans to val.
@@ -267,6 +279,14 @@
}
/**
+ * Helper method to write a list of native handles to the end of the parcel.
+ * @param val list of {@link NativeHandle} objects to write
+ */
+ public final void writeNativeHandleVector(ArrayList<NativeHandle> val) {
+ writeNativeHandleVector(val.toArray(new NativeHandle[val.size()]));
+ }
+
+ /**
* Write a hwbinder object to the end of the parcel.
* @param binder value to write
*/
@@ -328,6 +348,30 @@
* @throws IllegalArgumentException if the parcel has no more data
*/
public native final String readString();
+ /**
+ * Reads a native handle (without duplicating the underlying file
+ * descriptors) from the parcel. These file descriptors will only
+ * be open for the duration that the binder window is open. If they
+ * are needed further, you must call {@link NativeHandle#dup()}.
+ *
+ * @return a {@link NativeHandle} instance parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
+ public native final NativeHandle readNativeHandle();
+ /**
+ * Reads an embedded native handle (without duplicating the underlying
+ * file descriptors) from the parcel. These file descriptors will only
+ * be open for the duration that the binder window is open. If they
+ * are needed further, you must call {@link NativeHandle#dup()}. You
+ * do not need to call close on the NativeHandle returned from this.
+ *
+ * @param parentHandle handle from which to read the embedded object
+ * @param offset offset into parent
+ * @return a {@link NativeHandle} instance parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
+ public native final NativeHandle readEmbeddedNativeHandle(
+ long parentHandle, long offset);
/**
* Reads an array of boolean values from the parcel.
@@ -377,6 +421,12 @@
* @throws IllegalArgumentException if the parcel has no more data
*/
private native final String[] readStringVectorAsArray();
+ /**
+ * Reads an array of native handles from the parcel.
+ * @return array of {@link NativeHandle} objects
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
+ private native final NativeHandle[] readNativeHandleAsArray();
/**
* Convenience method to read a Boolean vector as an ArrayList.
@@ -465,6 +515,15 @@
}
/**
+ * Convenience method to read a vector of native handles as an ArrayList.
+ * @return array of {@link NativeHandle} objects.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
+ public final ArrayList<NativeHandle> readNativeHandleVector() {
+ return new ArrayList<NativeHandle>(Arrays.asList(readNativeHandleAsArray()));
+ }
+
+ /**
* Reads a strong binder value from the parcel.
* @return binder object read from parcel or null if no binder can be read
* @throws IllegalArgumentException if the parcel has no more data
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 31dbafa..20ca19b 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -372,11 +372,6 @@
void stopClatd(String interfaceName);
/**
- * Determine whether the clatd (464xlat) service has been started on the given interface.
- */
- boolean isClatdStarted(String interfaceName);
-
- /**
* Start listening for mobile activity state changes.
*/
void registerNetworkActivityListener(INetworkActivityListener listener);
diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl
index 13e4e38..7ceeb52 100644
--- a/core/java/android/os/IPowerManager.aidl
+++ b/core/java/android/os/IPowerManager.aidl
@@ -56,6 +56,7 @@
void shutdown(boolean confirm, String reason, boolean wait);
void crash(String message);
int getLastShutdownReason();
+ int getLastSleepReason();
void setStayOnSetting(int val);
void boostScreenBrightness(long time);
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/Message.java b/core/java/android/os/Message.java
index b303e10..455d8ed 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -349,7 +349,7 @@
}
/**
- * Retrieve the a {@link android.os.Handler Handler} implementation that
+ * Retrieve the {@link android.os.Handler Handler} implementation that
* will receive this message. The object must implement
* {@link android.os.Handler#handleMessage(android.os.Message)
* Handler.handleMessage()}. Each Handler has its own name-space for
diff --git a/core/java/android/os/NativeHandle.java b/core/java/android/os/NativeHandle.java
new file mode 100644
index 0000000..fbecc8e
--- /dev/null
+++ b/core/java/android/os/NativeHandle.java
@@ -0,0 +1,194 @@
+/*
+ * 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.os;
+
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.system.ErrnoException;
+import android.system.Os;
+
+import java.io.Closeable;
+import java.io.FileDescriptor;
+
+/**
+ * Collection representing a set of open file descriptors and an opaque data stream.
+ *
+ * @hide
+ */
+@SystemApi
+public final class NativeHandle implements Closeable {
+ // whether this object owns mFds
+ private boolean mOwn = false;
+ private FileDescriptor[] mFds;
+ private int[] mInts;
+
+ /**
+ * Constructs a {@link NativeHandle} object containing
+ * zero file descriptors and an empty data stream.
+ */
+ public NativeHandle() {
+ this(new FileDescriptor[0], new int[0], false);
+ }
+
+ /**
+ * Constructs a {@link NativeHandle} object containing the given
+ * {@link FileDescriptor} object and an empty data stream.
+ */
+ public NativeHandle(@NonNull FileDescriptor descriptor, boolean own) {
+ this(new FileDescriptor[] {descriptor}, new int[0], own);
+ }
+
+ /**
+ * Convenience method for creating a list of file descriptors.
+ *
+ * @hide
+ */
+ private static FileDescriptor[] createFileDescriptorArray(@NonNull int[] fds) {
+ FileDescriptor[] list = new FileDescriptor[fds.length];
+ for (int i = 0; i < fds.length; i++) {
+ FileDescriptor descriptor = new FileDescriptor();
+ descriptor.setInt$(fds[i]);
+ list[i] = descriptor;
+ }
+ return list;
+ }
+
+ /**
+ * Convenience method for instantiating a {@link NativeHandle} from JNI. It does
+ * not take ownership of the int[] params. It does not dupe the FileDescriptors.
+ *
+ * @hide
+ */
+ private NativeHandle(@NonNull int[] fds, @NonNull int[] ints, boolean own) {
+ this(createFileDescriptorArray(fds), ints, own);
+ }
+
+ /**
+ * Instantiate an opaque {@link NativeHandle} from fds and integers.
+ *
+ * @param own whether the fds are owned by this object and should be closed
+ */
+ public NativeHandle(@NonNull FileDescriptor[] fds, @NonNull int[] ints, boolean own) {
+ mFds = fds.clone();
+ mInts = ints.clone();
+ mOwn = own;
+ }
+
+ /**
+ * Returns whether this {@link NativeHandle} object contains a single file
+ * descriptor and nothing else.
+ *
+ * @return a boolean value
+ */
+ public boolean hasSingleFileDescriptor() {
+ return mFds.length == 1 && mInts.length == 0;
+ }
+
+ /**
+ * Explicitly duplicate NativeHandle (this dups all file descritptors).
+ *
+ * If this method is called, this must also be explicitly closed with
+ * {@link #close()}.
+ */
+ public NativeHandle dup() throws java.io.IOException {
+ FileDescriptor[] fds = new FileDescriptor[mFds.length];
+ try {
+ for (int i = 0; i < mFds.length; i++) {
+ fds[i] = Os.dup(mFds[i]);
+ }
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ }
+ return new NativeHandle(fds, mInts, true /*own*/);
+ }
+
+ /**
+ * Closes the file descriptors if they are owned by this object.
+ *
+ * This also invalidates the object.
+ */
+ @Override
+ public void close() throws java.io.IOException {
+ if (!mOwn) {
+ return;
+ }
+
+ try {
+ for (FileDescriptor fd : mFds) {
+ Os.close(fd);
+ }
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ }
+
+ mOwn = false;
+ mFds = null;
+ mInts = null;
+ }
+
+ /**
+ * Returns the underlying lone file descriptor.
+ *
+ * @return a {@link FileDescriptor} object
+ * @throws IllegalStateException if this object contains either zero or
+ * more than one file descriptor, or a non-empty data stream.
+ */
+ public FileDescriptor getFileDescriptor() {
+ if (!hasSingleFileDescriptor()) {
+ throw new IllegalStateException(
+ "NativeHandle is not single file descriptor. Contents must"
+ + " be retreived through getFileDescriptors and getInts.");
+ }
+
+ return mFds[0];
+ }
+
+ /**
+ * Convenience method for fetching this object's file descriptors from JNI.
+ * @return a mutable copy of the underlying file descriptors (as an int[])
+ *
+ * @hide
+ */
+ private int[] getFdsAsIntArray() {
+ int numFds = mFds.length;
+ int[] fds = new int[numFds];
+
+ for (int i = 0; i < numFds; i++) {
+ fds[i] = mFds[i].getInt$();
+ }
+
+ return fds;
+ }
+
+ /**
+ * Fetch file descriptors.
+ *
+ * @return the fds.
+ */
+ public FileDescriptor[] getFileDescriptors() {
+ return mFds;
+ }
+
+ /**
+ * Fetch opaque ints. Note: This object retains ownership of the data.
+ *
+ * @return the opaque data stream.
+ */
+ public int[] getInts() {
+ return mInts;
+ }
+}
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/PowerManager.java b/core/java/android/os/PowerManager.java
index 463a6aa..89a5def 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -397,6 +397,23 @@
public static final int GO_TO_SLEEP_REASON_ACCESSIBILITY = 7;
/**
+ * @hide
+ */
+ public static String sleepReasonToString(int sleepReason) {
+ switch (sleepReason) {
+ case GO_TO_SLEEP_REASON_APPLICATION: return "application";
+ case GO_TO_SLEEP_REASON_DEVICE_ADMIN: return "device_admin";
+ case GO_TO_SLEEP_REASON_TIMEOUT: return "timeout";
+ case GO_TO_SLEEP_REASON_LID_SWITCH: return "lid_switch";
+ case GO_TO_SLEEP_REASON_POWER_BUTTON: return "power_button";
+ case GO_TO_SLEEP_REASON_HDMI: return "hdmi";
+ case GO_TO_SLEEP_REASON_SLEEP_BUTTON: return "sleep_button";
+ case GO_TO_SLEEP_REASON_ACCESSIBILITY: return "accessibility";
+ default: return Integer.toString(sleepReason);
+ }
+ }
+
+ /**
* Go to sleep flag: Skip dozing state and directly go to full sleep.
* @hide
*/
@@ -1310,6 +1327,22 @@
}
/**
+ * Returns the reason the device last went to sleep (i.e. the last value of
+ * the second argument of {@link #goToSleep(long, int, int) goToSleep}).
+ *
+ * @return One of the {@code GO_TO_SLEEP_REASON_*} constants.
+ *
+ * @hide
+ */
+ public int getLastSleepReason() {
+ try {
+ return mService.getLastSleepReason();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Intent that is broadcast when the state of {@link #isPowerSaveMode()} changes.
* This broadcast is only sent to registered receivers.
*/
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/os/storage/IStorageManager.aidl b/core/java/android/os/storage/IStorageManager.aidl
index 55a202f..5c2d41e 100644
--- a/core/java/android/os/storage/IStorageManager.aidl
+++ b/core/java/android/os/storage/IStorageManager.aidl
@@ -187,4 +187,6 @@
void allocateBytes(String volumeUuid, long bytes, int flags, String callingPackage) = 78;
void runIdleMaintenance() = 79;
void abortIdleMaintenance() = 80;
+ String translateAppToSystem(String path, String packageName, int userId) = 81;
+ String translateSystemToApp(String path, String packageName, int userId) = 82;
}
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index 8b8ae1c..5a1ea68 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -124,6 +124,8 @@
public static final String PROP_SDCARDFS = "persist.sys.sdcardfs";
/** {@hide} */
public static final String PROP_VIRTUAL_DISK = "persist.sys.virtual_disk";
+ /** {@hide} */
+ public static final String PROP_ISOLATED_STORAGE = "persist.sys.isolated_storage";
/** {@hide} */
public static final String UUID_PRIVATE_INTERNAL = null;
@@ -1484,6 +1486,36 @@
return path;
}
+ /**
+ * Translate given shared storage path from a path in an app sandbox
+ * namespace to a path in the system namespace.
+ *
+ * @hide
+ */
+ public File translateAppToSystem(File file, String packageName) {
+ try {
+ return new File(mStorageManager.translateAppToSystem(file.getAbsolutePath(),
+ packageName, mContext.getUserId()));
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Translate given shared storage path from a path in the system namespace
+ * to a path in an app sandbox namespace.
+ *
+ * @hide
+ */
+ public File translateSystemToApp(File file, String packageName) {
+ try {
+ return new File(mStorageManager.translateSystemToApp(file.getAbsolutePath(),
+ packageName, mContext.getUserId()));
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
/** {@hide} */
@VisibleForTesting
public @NonNull ParcelFileDescriptor openProxyFileDescriptor(
diff --git a/core/java/android/permissionpresenterservice/RuntimePermissionPresenterService.java b/core/java/android/permissionpresenterservice/RuntimePermissionPresenterService.java
index 2931627f..e0bffae 100644
--- a/core/java/android/permissionpresenterservice/RuntimePermissionPresenterService.java
+++ b/core/java/android/permissionpresenterservice/RuntimePermissionPresenterService.java
@@ -17,6 +17,7 @@
package android.permissionpresenterservice;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
@@ -80,6 +81,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public abstract void onRevokeRuntimePermission(String packageName, String permissionName);
@Override
diff --git a/core/java/android/preference/DialogPreference.java b/core/java/android/preference/DialogPreference.java
index ed29f74..4b5a7b4 100644
--- a/core/java/android/preference/DialogPreference.java
+++ b/core/java/android/preference/DialogPreference.java
@@ -20,6 +20,7 @@
import android.annotation.CallSuper;
import android.annotation.DrawableRes;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
@@ -53,19 +54,27 @@
public abstract class DialogPreference extends Preference implements
DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
PreferenceManager.OnActivityDestroyListener {
+ @UnsupportedAppUsage
private AlertDialog.Builder mBuilder;
+ @UnsupportedAppUsage
private CharSequence mDialogTitle;
+ @UnsupportedAppUsage
private CharSequence mDialogMessage;
+ @UnsupportedAppUsage
private Drawable mDialogIcon;
+ @UnsupportedAppUsage
private CharSequence mPositiveButtonText;
+ @UnsupportedAppUsage
private CharSequence mNegativeButtonText;
private int mDialogLayoutResId;
/** The dialog, if it is showing. */
+ @UnsupportedAppUsage
private Dialog mDialog;
/** Which button was clicked. */
+ @UnsupportedAppUsage
private int mWhichButtonClicked;
/** Dismiss the dialog on the UI thread, but not inline with handlers */
diff --git a/core/java/android/preference/EditTextPreference.java b/core/java/android/preference/EditTextPreference.java
index 9467c22..4d2ac67 100644
--- a/core/java/android/preference/EditTextPreference.java
+++ b/core/java/android/preference/EditTextPreference.java
@@ -17,6 +17,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
@@ -46,6 +47,7 @@
/**
* The edit text shown in the dialog.
*/
+ @UnsupportedAppUsage
private EditText mEditText;
private String mText;
diff --git a/core/java/android/preference/ListPreference.java b/core/java/android/preference/ListPreference.java
index f9323ed..c0c71af 100644
--- a/core/java/android/preference/ListPreference.java
+++ b/core/java/android/preference/ListPreference.java
@@ -17,6 +17,7 @@
package android.preference;
import android.annotation.ArrayRes;
+import android.annotation.UnsupportedAppUsage;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
@@ -41,6 +42,7 @@
private CharSequence[] mEntryValues;
private String mValue;
private String mSummary;
+ @UnsupportedAppUsage
private int mClickedDialogEntryIndex;
private boolean mValueSet;
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java
index 4306bc4..98b69a8 100644
--- a/core/java/android/preference/Preference.java
+++ b/core/java/android/preference/Preference.java
@@ -21,6 +21,7 @@
import android.annotation.LayoutRes;
import android.annotation.Nullable;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -116,6 +117,7 @@
private int mOrder = DEFAULT_ORDER;
private CharSequence mTitle;
private int mTitleRes;
+ @UnsupportedAppUsage
private CharSequence mSummary;
/**
* mIconResId is overridden by mIcon, if mIcon is specified.
@@ -144,7 +146,9 @@
*/
private boolean mShouldDisableView = true;
+ @UnsupportedAppUsage
private int mLayoutResId = com.android.internal.R.layout.preference;
+ @UnsupportedAppUsage
private int mWidgetLayoutResId;
private OnPreferenceChangeInternalListener mListener;
@@ -974,6 +978,7 @@
*
* @return A unique ID for this Preference.
*/
+ @UnsupportedAppUsage
long getId() {
return mId;
}
@@ -1126,6 +1131,7 @@
* processing). May be {@code null}.
* @hide
*/
+ @UnsupportedAppUsage
public void performClick(PreferenceScreen preferenceScreen) {
if (!isEnabled()) {
@@ -1161,6 +1167,7 @@
* @return True if the Preference handled the key. Returns false by default.
* @hide
*/
+ @UnsupportedAppUsage
public boolean onKey(View v, int keyCode, KeyEvent event) {
return false;
}
@@ -1281,6 +1288,7 @@
* @param listener The listener.
* @see #notifyChanged()
*/
+ @UnsupportedAppUsage
final void setOnPreferenceChangeInternalListener(OnPreferenceChangeInternalListener listener) {
mListener = listener;
}
@@ -1399,6 +1407,7 @@
* @param dependent The dependent Preference that will be enabled/disabled
* according to the state of this Preference.
*/
+ @UnsupportedAppUsage
private void registerDependent(Preference dependent) {
if (mDependents == null) {
mDependents = new ArrayList<Preference>();
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index 02fa7ed..8ed2605 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -19,6 +19,7 @@
import android.animation.LayoutTransition;
import android.annotation.Nullable;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.app.Fragment;
import android.app.FragmentBreadCrumbs;
@@ -79,7 +80,7 @@
* <li>On a small screen it may display only the headers as a single list when first launched.
* Selecting one of the header items will only show the PreferenceFragment of that header (on
* Android N and lower a new Activity is launched).
- * <li>On a large screen in may display both the headers and current PreferenceFragment together as
+ * <li>On a large screen it may display both the headers and current PreferenceFragment together as
* panes. Selecting a header item switches to showing the correct PreferenceFragment for that item.
* </ul>
*
@@ -198,6 +199,7 @@
private FrameLayout mListFooter;
+ @UnsupportedAppUsage
private ViewGroup mPrefsContainer;
// Backup of the original activity title. This is used when navigating back to the headers list
@@ -215,6 +217,7 @@
// --- State for old mode when showing a single preference list
+ @UnsupportedAppUsage
private PreferenceManager mPreferenceManager;
private Bundle mSavedInstanceState;
@@ -739,6 +742,7 @@
* Returns the Header list
* @hide
*/
+ @UnsupportedAppUsage
public List<Header> getHeaders() {
return mHeaders;
}
@@ -1441,6 +1445,7 @@
* Binding late is preferred as any custom preference types created in
* {@link #onCreate(Bundle)} are able to have their views recycled.
*/
+ @UnsupportedAppUsage
private void postBindPreferences() {
if (mHandler.hasMessages(MSG_BIND_PREFERENCES)) return;
mHandler.obtainMessage(MSG_BIND_PREFERENCES).sendToTarget();
@@ -1469,6 +1474,7 @@
return mPreferenceManager;
}
+ @UnsupportedAppUsage
private void requirePreferenceManager() {
if (mPreferenceManager == null) {
if (mAdapter == null) {
diff --git a/core/java/android/preference/PreferenceFragment.java b/core/java/android/preference/PreferenceFragment.java
index 4c556ef..548895e 100644
--- a/core/java/android/preference/PreferenceFragment.java
+++ b/core/java/android/preference/PreferenceFragment.java
@@ -17,6 +17,7 @@
package android.preference;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.app.Activity;
import android.app.Fragment;
@@ -113,6 +114,7 @@
private static final String PREFERENCES_TAG = "android:preferences";
+ @UnsupportedAppUsage
private PreferenceManager mPreferenceManager;
private ListView mList;
private boolean mHavePrefs;
@@ -402,6 +404,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public ListView getListView() {
ensureList();
return mList;
diff --git a/core/java/android/preference/PreferenceManager.java b/core/java/android/preference/PreferenceManager.java
index 6095e6f..c76c8d3 100644
--- a/core/java/android/preference/PreferenceManager.java
+++ b/core/java/android/preference/PreferenceManager.java
@@ -18,6 +18,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.app.Activity;
import android.content.Context;
@@ -67,6 +68,7 @@
* Fragment that owns this instance.
*/
@Nullable
+ @UnsupportedAppUsage
private PreferenceFragment mFragment;
/**
@@ -90,6 +92,7 @@
* Cached shared preferences.
*/
@Nullable
+ @UnsupportedAppUsage
private SharedPreferences mSharedPreferences;
/**
@@ -152,6 +155,7 @@
* List of activity destroy listeners.
*/
@Nullable
+ @UnsupportedAppUsage
private List<OnActivityDestroyListener> mActivityDestroyListeners;
/**
@@ -161,11 +165,13 @@
@Nullable
private List<DialogInterface> mPreferencesScreens;
+ @UnsupportedAppUsage
private OnPreferenceTreeClickListener mOnPreferenceTreeClickListener;
/**
* @hide
*/
+ @UnsupportedAppUsage
public PreferenceManager(Activity activity, int firstRequestCode) {
mActivity = activity;
mNextRequestCode = firstRequestCode;
@@ -181,6 +187,7 @@
* should be used ANY time a preference will be displayed, since some preference
* types need an Activity for managed queries.
*/
+ @UnsupportedAppUsage
/*package*/ PreferenceManager(Context context) {
init(context);
}
@@ -194,6 +201,7 @@
/**
* Sets the owning preference fragment
*/
+ @UnsupportedAppUsage
void setFragment(PreferenceFragment fragment) {
mFragment = fragment;
}
@@ -202,6 +210,7 @@
* Returns the owning preference fragment, if any.
*/
@Nullable
+ @UnsupportedAppUsage
PreferenceFragment getFragment() {
return mFragment;
}
@@ -260,6 +269,7 @@
* @return The root hierarchy (if one was not provided, the new hierarchy's
* root).
*/
+ @UnsupportedAppUsage
PreferenceScreen inflateFromIntent(Intent queryIntent, PreferenceScreen rootPreferences) {
final List<ResolveInfo> activities = queryIntentActivities(queryIntent);
final HashSet<String> inflatedRes = new HashSet<String>();
@@ -315,6 +325,7 @@
* root).
* @hide
*/
+ @UnsupportedAppUsage
public PreferenceScreen inflateFromResource(Context context, @XmlRes int resId,
PreferenceScreen rootPreferences) {
// Block commits
@@ -546,6 +557,7 @@
* @return The {@link PreferenceScreen} object that is at the root of the hierarchy.
*/
@Nullable
+ @UnsupportedAppUsage
PreferenceScreen getPreferenceScreen() {
return mPreferenceScreen;
}
@@ -556,6 +568,7 @@
* @param preferenceScreen The root {@link PreferenceScreen} of the preference hierarchy.
* @return Whether the {@link PreferenceScreen} given is different than the previous.
*/
+ @UnsupportedAppUsage
boolean setPreferences(PreferenceScreen preferenceScreen) {
if (preferenceScreen != mPreferenceScreen) {
mPreferenceScreen = preferenceScreen;
@@ -670,6 +683,7 @@
* has been set, this method returns {@code null}.
* @see #shouldCommit()
*/
+ @UnsupportedAppUsage
SharedPreferences.Editor getEditor() {
if (mPreferenceDataStore != null) {
return null;
@@ -695,10 +709,12 @@
*
* @return Whether the client should commit.
*/
+ @UnsupportedAppUsage
boolean shouldCommit() {
return !mNoCommit;
}
+ @UnsupportedAppUsage
private void setNoCommit(boolean noCommit) {
if (!noCommit && mEditor != null) {
try {
@@ -725,6 +741,7 @@
* @see #mContext
*/
@Nullable
+ @UnsupportedAppUsage
Activity getActivity() {
return mActivity;
}
@@ -744,6 +761,7 @@
*
* @see OnActivityResultListener
*/
+ @UnsupportedAppUsage
void registerOnActivityResultListener(OnActivityResultListener listener) {
synchronized (this) {
if (mActivityResultListeners == null) {
@@ -761,6 +779,7 @@
*
* @see OnActivityResultListener
*/
+ @UnsupportedAppUsage
void unregisterOnActivityResultListener(OnActivityResultListener listener) {
synchronized (this) {
if (mActivityResultListeners != null) {
@@ -772,6 +791,7 @@
/**
* Called by the {@link PreferenceManager} to dispatch a subactivity result.
*/
+ @UnsupportedAppUsage
void dispatchActivityResult(int requestCode, int resultCode, Intent data) {
List<OnActivityResultListener> list;
@@ -794,6 +814,7 @@
* @see OnActivityStopListener
* @hide
*/
+ @UnsupportedAppUsage
public void registerOnActivityStopListener(OnActivityStopListener listener) {
synchronized (this) {
if (mActivityStopListeners == null) {
@@ -812,6 +833,7 @@
* @see OnActivityStopListener
* @hide
*/
+ @UnsupportedAppUsage
public void unregisterOnActivityStopListener(OnActivityStopListener listener) {
synchronized (this) {
if (mActivityStopListeners != null) {
@@ -824,6 +846,7 @@
* Called by the {@link PreferenceManager} to dispatch the activity stop
* event.
*/
+ @UnsupportedAppUsage
void dispatchActivityStop() {
List<OnActivityStopListener> list;
@@ -843,6 +866,7 @@
*
* @see OnActivityDestroyListener
*/
+ @UnsupportedAppUsage
void registerOnActivityDestroyListener(OnActivityDestroyListener listener) {
synchronized (this) {
if (mActivityDestroyListeners == null) {
@@ -860,6 +884,7 @@
*
* @see OnActivityDestroyListener
*/
+ @UnsupportedAppUsage
void unregisterOnActivityDestroyListener(OnActivityDestroyListener listener) {
synchronized (this) {
if (mActivityDestroyListeners != null) {
@@ -872,6 +897,7 @@
* Called by the {@link PreferenceManager} to dispatch the activity destroy
* event.
*/
+ @UnsupportedAppUsage
void dispatchActivityDestroy() {
List<OnActivityDestroyListener> list = null;
@@ -899,6 +925,7 @@
* @return A unique request code that will never be used by anyone other
* than the caller of this method.
*/
+ @UnsupportedAppUsage
int getNextRequestCode() {
synchronized (this) {
return mNextRequestCode++;
diff --git a/core/java/android/preference/PreferenceScreen.java b/core/java/android/preference/PreferenceScreen.java
index 2305b05..dd00a53 100644
--- a/core/java/android/preference/PreferenceScreen.java
+++ b/core/java/android/preference/PreferenceScreen.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -89,10 +90,12 @@
public final class PreferenceScreen extends PreferenceGroup implements AdapterView.OnItemClickListener,
DialogInterface.OnDismissListener {
+ @UnsupportedAppUsage
private ListAdapter mRootAdapter;
private Dialog mDialog;
+ @UnsupportedAppUsage
private ListView mListView;
private int mLayoutResId = com.android.internal.R.layout.preference_list_fragment;
@@ -103,6 +106,7 @@
* Do NOT use this constructor, use {@link PreferenceManager#createPreferenceScreen(Context)}.
* @hide-
*/
+ @UnsupportedAppUsage
public PreferenceScreen(Context context, AttributeSet attrs) {
super(context, attrs, com.android.internal.R.attr.preferenceScreenStyle);
diff --git a/core/java/android/preference/RingtonePreference.java b/core/java/android/preference/RingtonePreference.java
index a76bb09..cd751cd 100644
--- a/core/java/android/preference/RingtonePreference.java
+++ b/core/java/android/preference/RingtonePreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -49,6 +50,7 @@
private boolean mShowDefault;
private boolean mShowSilent;
+ @UnsupportedAppUsage
private int mRequestCode;
public RingtonePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
diff --git a/core/java/android/preference/SeekBarDialogPreference.java b/core/java/android/preference/SeekBarDialogPreference.java
index eeb69a3..a8e5992 100644
--- a/core/java/android/preference/SeekBarDialogPreference.java
+++ b/core/java/android/preference/SeekBarDialogPreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
@@ -47,6 +48,7 @@
this(context, attrs, defStyleAttr, 0);
}
+ @UnsupportedAppUsage
public SeekBarDialogPreference(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.seekBarDialogPreferenceStyle);
}
diff --git a/core/java/android/preference/SeekBarPreference.java b/core/java/android/preference/SeekBarPreference.java
index 1fabf3d..cd35f3d 100644
--- a/core/java/android/preference/SeekBarPreference.java
+++ b/core/java/android/preference/SeekBarPreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
@@ -55,14 +56,17 @@
setLayoutResource(layoutResId);
}
+ @UnsupportedAppUsage
public SeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
+ @UnsupportedAppUsage
public SeekBarPreference(Context context, AttributeSet attrs) {
this(context, attrs, com.android.internal.R.attr.seekBarPreferenceStyle);
}
+ @UnsupportedAppUsage
public SeekBarPreference(Context context) {
this(context, null);
}
diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java
index 2a094bb..e8daf21 100644
--- a/core/java/android/preference/SeekBarVolumizer.java
+++ b/core/java/android/preference/SeekBarVolumizer.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -54,12 +55,15 @@
void onMuted(boolean muted, boolean zenMuted);
}
+ @UnsupportedAppUsage
private final Context mContext;
private final H mUiHandler = new H();
private final Callback mCallback;
private final Uri mDefaultUri;
+ @UnsupportedAppUsage
private final AudioManager mAudioManager;
private final NotificationManager mNotificationManager;
+ @UnsupportedAppUsage
private final int mStreamType;
private final int mMaxStreamVolume;
private boolean mAffectedByRingerMode;
@@ -68,19 +72,24 @@
private Handler mHandler;
private Observer mVolumeObserver;
+ @UnsupportedAppUsage
private int mOriginalStreamVolume;
private int mLastAudibleStreamVolume;
// When the old handler is destroyed and a new one is created, there could be a situation where
// this is accessed at the same time in different handlers. So, access to this field needs to be
// synchronized.
@GuardedBy("this")
+ @UnsupportedAppUsage
private Ringtone mRingtone;
+ @UnsupportedAppUsage
private int mLastProgress = -1;
private boolean mMuted;
+ @UnsupportedAppUsage
private SeekBar mSeekBar;
private int mVolumeBeforeMute = -1;
private int mRingerMode;
private int mZenMode;
+ private boolean mPlaySample;
private static final int MSG_SET_STREAM_VOLUME = 0;
private static final int MSG_START_SAMPLE = 1;
@@ -93,7 +102,17 @@
private boolean mAllowMedia;
private boolean mAllowRinger;
+ @UnsupportedAppUsage
public SeekBarVolumizer(Context context, int streamType, Uri defaultUri, Callback callback) {
+ this(context, streamType, defaultUri, callback, true /* playSample */);
+ }
+
+ public SeekBarVolumizer(
+ Context context,
+ int streamType,
+ Uri defaultUri,
+ Callback callback,
+ boolean playSample) {
mContext = context;
mAudioManager = context.getSystemService(AudioManager.class);
mNotificationManager = context.getSystemService(NotificationManager.class);
@@ -116,6 +135,7 @@
mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType);
mLastAudibleStreamVolume = mAudioManager.getLastAudibleStreamVolume(mStreamType);
mMuted = mAudioManager.isStreamMute(mStreamType);
+ mPlaySample = playSample;
if (mCallback != null) {
mCallback.onMuted(mMuted, isZenMuted());
}
@@ -190,13 +210,19 @@
AudioManager.FLAG_SHOW_UI_WARNINGS);
break;
case MSG_START_SAMPLE:
- onStartSample();
+ if (mPlaySample) {
+ onStartSample();
+ }
break;
case MSG_STOP_SAMPLE:
- onStopSample();
+ if (mPlaySample) {
+ onStopSample();
+ }
break;
case MSG_INIT_SAMPLE:
- onInitSample();
+ if (mPlaySample) {
+ onInitSample();
+ }
break;
default:
Log.e(TAG, "invalid SeekBarVolumizer message: "+msg.what);
@@ -258,6 +284,7 @@
}
}
+ @UnsupportedAppUsage
public void stop() {
if (mHandler == null) return; // already stopped
postStopSample();
diff --git a/core/java/android/preference/SwitchPreference.java b/core/java/android/preference/SwitchPreference.java
index aa8674e..1ec18bb 100644
--- a/core/java/android/preference/SwitchPreference.java
+++ b/core/java/android/preference/SwitchPreference.java
@@ -17,6 +17,7 @@
package android.preference;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
@@ -37,6 +38,7 @@
* @attr ref android.R.styleable#SwitchPreference_disableDependentsState
*/
public class SwitchPreference extends TwoStatePreference {
+ @UnsupportedAppUsage
private final Listener mListener = new Listener();
// Switch text for on and off states
diff --git a/core/java/android/preference/TwoStatePreference.java b/core/java/android/preference/TwoStatePreference.java
index 7037aca..2079a63 100644
--- a/core/java/android/preference/TwoStatePreference.java
+++ b/core/java/android/preference/TwoStatePreference.java
@@ -17,6 +17,7 @@
package android.preference;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
@@ -193,6 +194,7 @@
* Sync a summary view contained within view's subhierarchy with the correct summary text.
* @param view View where a summary should be located
*/
+ @UnsupportedAppUsage
void syncSummaryView(View view) {
// Sync the summary view
TextView summaryView = (TextView) view.findViewById(com.android.internal.R.id.summary);
diff --git a/core/java/android/preference/VolumePreference.java b/core/java/android/preference/VolumePreference.java
index 8a66c24..ea1d1eb 100644
--- a/core/java/android/preference/VolumePreference.java
+++ b/core/java/android/preference/VolumePreference.java
@@ -16,6 +16,7 @@
package android.preference;
+import android.annotation.UnsupportedAppUsage;
import android.app.Dialog;
import android.content.Context;
import android.content.res.TypedArray;
@@ -33,6 +34,7 @@
*/
public class VolumePreference extends SeekBarDialogPreference implements
PreferenceManager.OnActivityStopListener, View.OnKeyListener, SeekBarVolumizer.Callback {
+ @UnsupportedAppUsage
private int mStreamType;
/** May be null if the dialog isn't visible. */
@@ -52,6 +54,7 @@
this(context, attrs, defStyleAttr, 0);
}
+ @UnsupportedAppUsage
public VolumePreference(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.seekBarDialogPreferenceStyle);
}
@@ -196,7 +199,9 @@
}
public static class VolumeStore {
+ @UnsupportedAppUsage
public int volume = -1;
+ @UnsupportedAppUsage
public int originalVolume = -1;
}
diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java
index 7d05522..30021b4 100644
--- a/core/java/android/provider/Browser.java
+++ b/core/java/android/provider/Browser.java
@@ -16,6 +16,7 @@
package android.provider;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
@@ -218,6 +219,7 @@
* the string.
* @hide pending API council approval
*/
+ @UnsupportedAppUsage
public static final void sendString(Context c,
String stringToSend,
String chooserDialogTitle) {
@@ -323,6 +325,7 @@
* @hide pending API council approval
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String[] getVisitedHistory(ContentResolver cr) {
return new String[0];
}
diff --git a/core/java/android/provider/BrowserContract.java b/core/java/android/provider/BrowserContract.java
index 118b5eb..57dde66 100644
--- a/core/java/android/provider/BrowserContract.java
+++ b/core/java/android/provider/BrowserContract.java
@@ -17,6 +17,7 @@
package android.provider;
import android.accounts.Account;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProviderClient;
import android.content.ContentProviderOperation;
import android.content.ContentResolver;
@@ -46,6 +47,7 @@
public static final String AUTHORITY = "com.android.browser";
/** A content:// style uri to the authority for the browser provider */
+ @UnsupportedAppUsage
public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
/**
@@ -251,6 +253,7 @@
/**
* The content:// style URI for this table
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "bookmarks");
/**
@@ -300,6 +303,7 @@
* The content:// style URI for the default folder
* @hide
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI_DEFAULT_FOLDER =
Uri.withAppendedPath(CONTENT_URI, "folder");
@@ -320,6 +324,7 @@
* @param folderId the ID of the folder to point to
* @hide
*/
+ @UnsupportedAppUsage
public static final Uri buildFolderUri(long folderId) {
return ContentUris.withAppendedId(CONTENT_URI_DEFAULT_FOLDER, folderId);
}
@@ -407,6 +412,7 @@
/**
* Directory under {@link Bookmarks#CONTENT_URI}
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI =
AUTHORITY_URI.buildUpon().appendPath("accounts").build();
@@ -444,6 +450,7 @@
/**
* The content:// style URI for this table
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "history");
/**
@@ -573,6 +580,7 @@
/**
* The content:// style URI for this table
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "images");
/**
@@ -673,6 +681,7 @@
/**
* The content:// style URI for this table
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "combined");
/**
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index d9ce57a..a8f3665 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -19,6 +19,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
@@ -1664,6 +1665,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String[] PROVIDER_WRITABLE_COLUMNS = new String[] {
ACCOUNT_NAME,
ACCOUNT_TYPE,
@@ -2288,6 +2290,7 @@
* if no such alarm exists.
* @hide
*/
+ @UnsupportedAppUsage
public static final long findNextAlarmTime(ContentResolver cr, long millis) {
String selection = ALARM_TIME + ">=" + millis;
// TODO: construct an explicit SQL query so that we can add
@@ -2321,6 +2324,7 @@
* @param manager the AlarmManager
* @hide
*/
+ @UnsupportedAppUsage
public static final void rescheduleMissedAlarms(ContentResolver cr,
Context context, AlarmManager manager) {
// Get all the alerts that have been scheduled but have not fired
@@ -2377,6 +2381,7 @@
* epoch
* @hide
*/
+ @UnsupportedAppUsage
public static void scheduleAlarm(Context context, AlarmManager manager, long alarmTime) {
if (DEBUG) {
Time time = new Time();
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 70de09e..bc72c4e 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -17,6 +17,7 @@
package android.provider;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentValues;
@@ -609,6 +610,7 @@
* as they don't have permissions.
* {@hide}
*/
+ @UnsupportedAppUsage
public static Uri addCall(CallerInfo ci, Context context, String number,
String postDialDigits, String viaNumber, int presentation, int callType,
int features, PhoneAccountHandle accountHandle, long start, int duration,
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index f7409d0..112329e 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -21,6 +21,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -187,8 +188,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 +870,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 +1323,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 +1424,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.
@@ -1532,6 +1520,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final Uri CORP_CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI,
"contacts_corp");
@@ -1696,16 +1685,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 +1712,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");
@@ -2024,6 +2015,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static final Builder builder() {
return new Builder();
}
@@ -2631,27 +2623,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 +4257,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 +4748,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 +5192,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>
@@ -6145,6 +6104,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final CharSequence getDisplayLabel(Context context, int type,
CharSequence label) {
return getTypeLabel(context.getResources(), type, label);
@@ -8305,7 +8265,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 {
/**
@@ -8522,6 +8487,7 @@
* Constructs the QuickContacts intent.
* @hide
*/
+ @UnsupportedAppUsage
public static Intent composeQuickContactsIntent(Context context, Rect target,
Uri lookupUri, int mode, String[] excludeMimes) {
// When launching from an Activiy, we don't want to start a new task, but otherwise
@@ -8925,10 +8891,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/ContactsInternal.java b/core/java/android/provider/ContactsInternal.java
index 362eba9..69c4b9b 100644
--- a/core/java/android/provider/ContactsInternal.java
+++ b/core/java/android/provider/ContactsInternal.java
@@ -15,6 +15,7 @@
*/
package android.provider;
+import android.annotation.UnsupportedAppUsage;
import android.app.admin.DevicePolicyManager;
import android.content.ActivityNotFoundException;
import android.content.ContentUris;
@@ -54,6 +55,7 @@
/**
* Called by {@link ContactsContract} to star Quick Contact, possibly on the managed profile.
*/
+ @UnsupportedAppUsage
public static void startQuickContactWithErrorToast(Context context, Intent intent) {
final Uri uri = intent.getData();
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java
index f97c64c..b12d9cf 100644
--- a/core/java/android/provider/DocumentsContract.java
+++ b/core/java/android/provider/DocumentsContract.java
@@ -23,6 +23,7 @@
import static com.android.internal.util.Preconditions.checkCollectionNotEmpty;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.content.Context;
@@ -636,6 +637,7 @@
* @see #COLUMN_FLAGS
* @hide
*/
+ @UnsupportedAppUsage
public static final int FLAG_ADVANCED = 1 << 17;
/**
@@ -699,6 +701,7 @@
public static final String EXTRA_RESULT = "result";
/** {@hide} */
+ @UnsupportedAppUsage
public static final String METHOD_CREATE_DOCUMENT = "android:createDocument";
/** {@hide} */
public static final String METHOD_RENAME_DOCUMENT = "android:renameDocument";
@@ -734,11 +737,13 @@
private static final String PATH_ROOT = "root";
private static final String PATH_RECENT = "recent";
+ @UnsupportedAppUsage
private static final String PATH_DOCUMENT = "document";
private static final String PATH_CHILDREN = "children";
private static final String PATH_SEARCH = "search";
// TODO(b/72055774): make private again once ScopedAccessProvider is refactored
/** {@hide} */
+ @UnsupportedAppUsage
public static final String PATH_TREE = "tree";
private static final String PARAM_QUERY = "query";
@@ -1022,6 +1027,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static Uri setManageMode(Uri uri) {
return uri.buildUpon().appendQueryParameter(PARAM_MANAGE, "true").build();
}
@@ -1065,6 +1071,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static Bitmap getDocumentThumbnail(
ContentProviderClient client, Uri documentUri, Point size, CancellationSignal signal)
throws RemoteException, IOException {
@@ -1320,6 +1327,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static Uri moveDocument(ContentProviderClient client, Uri sourceDocumentUri,
Uri sourceParentDocumentUri, Uri targetParentDocumentUri) throws RemoteException {
final Bundle in = new Bundle();
diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java
index a2c5a92..e5fd29c 100644
--- a/core/java/android/provider/Downloads.java
+++ b/core/java/android/provider/Downloads.java
@@ -16,6 +16,7 @@
package android.provider;
+import android.annotation.UnsupportedAppUsage;
import android.app.DownloadManager;
import android.content.Context;
import android.net.NetworkPolicyManager;
@@ -88,6 +89,7 @@
/**
* The content:// URI to access downloads owned by the caller's UID.
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI =
Uri.parse("content://downloads/my_downloads");
@@ -95,6 +97,7 @@
* The content URI for accessing all downloads across all UIDs (requires the
* ACCESS_ALL_DOWNLOADS permission).
*/
+ @UnsupportedAppUsage
public static final Uri ALL_DOWNLOADS_CONTENT_URI =
Uri.parse("content://downloads/all_downloads");
@@ -105,6 +108,7 @@
* The content URI for accessing publicly accessible downloads (i.e., it requires no
* permissions to access this downloaded file)
*/
+ @UnsupportedAppUsage
public static final Uri PUBLICLY_ACCESSIBLE_DOWNLOADS_URI =
Uri.parse("content://downloads/" + PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT);
@@ -134,6 +138,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_URI = "uri";
/**
@@ -163,6 +168,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_FILE_NAME_HINT = "hint";
/**
@@ -178,6 +184,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_MIME_TYPE = "mimetype";
/**
@@ -186,6 +193,7 @@
* <P>Type: INTEGER</P>
* <P>Owner can Init</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_DESTINATION = "destination";
/**
@@ -195,6 +203,7 @@
* <P>Type: INTEGER</P>
* <P>Owner can Init/Read/Write</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_VISIBILITY = "visibility";
/**
@@ -231,6 +240,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_NOTIFICATION_PACKAGE = "notificationpackage";
/**
@@ -241,6 +251,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_NOTIFICATION_CLASS = "notificationclass";
/**
@@ -249,6 +260,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_NOTIFICATION_EXTRAS = "notificationextras";
/**
@@ -258,6 +270,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_COOKIE_DATA = "cookiedata";
/**
@@ -274,6 +287,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_REFERER = "referer";
/**
@@ -311,6 +325,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init/Read/Write</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_TITLE = "title";
/**
@@ -320,6 +335,7 @@
* <P>Type: TEXT</P>
* <P>Owner can Init/Read/Write</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_DESCRIPTION = "description";
/**
@@ -328,6 +344,7 @@
* <P>Type: BOOLEAN</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_IS_PUBLIC_API = "is_public_api";
/**
@@ -336,6 +353,7 @@
* <P>Type: INTEGER</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_ALLOWED_NETWORK_TYPES = "allowed_network_types";
/**
@@ -344,6 +362,7 @@
* <P>Type: BOOLEAN</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_ALLOW_ROAMING = "allow_roaming";
/**
@@ -360,6 +379,7 @@
* <P>Type: INTEGER</P>
* <P>Owner can Init/Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI = "is_visible_in_downloads_ui";
/**
@@ -376,6 +396,7 @@
* <P>Type: BOOLEAN</P>
* <P>Owner can Read</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_DELETED = "deleted";
/**
@@ -392,6 +413,7 @@
* It can take the values: null or 0(not scanned), 1(scanned), 2 (not scannable).
* <P>Type: TEXT</P>
*/
+ @UnsupportedAppUsage
public static final String COLUMN_MEDIA_SCANNED = "scanned";
/**
@@ -465,6 +487,7 @@
* immediately after they are used, and are kept around by the download
* manager as long as space is available.
*/
+ @UnsupportedAppUsage
public static final int DESTINATION_CACHE_PARTITION_PURGEABLE = 2;
/**
@@ -478,6 +501,7 @@
* This download will be saved to the location given by the file URI in
* {@link #COLUMN_FILE_NAME_HINT}.
*/
+ @UnsupportedAppUsage
public static final int DESTINATION_FILE_URI = 4;
/**
@@ -525,6 +549,7 @@
/**
* Returns whether the status is a success (i.e. 2xx).
*/
+ @UnsupportedAppUsage
public static boolean isStatusSuccess(int status) {
return (status >= 200 && status < 300);
}
@@ -532,6 +557,7 @@
/**
* Returns whether the status is an error (i.e. 4xx or 5xx).
*/
+ @UnsupportedAppUsage
public static boolean isStatusError(int status) {
return (status >= 400 && status < 600);
}
@@ -556,6 +582,7 @@
* @param visibility the value of {@link #COLUMN_VISIBILITY}.
* @return true if the notification should be displayed. false otherwise.
*/
+ @UnsupportedAppUsage
public static boolean isNotificationToBeDisplayed(int visibility) {
return visibility == DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED ||
visibility == DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION;
@@ -565,6 +592,7 @@
* Returns whether the download has completed (either with success or
* error).
*/
+ @UnsupportedAppUsage
public static boolean isStatusCompleted(int status) {
return (status >= 200 && status < 300) || (status >= 400 && status < 600);
}
@@ -795,6 +823,7 @@
* Prefix for ContentValues keys that contain HTTP header lines, to be passed to
* DownloadProvider.insert().
*/
+ @UnsupportedAppUsage
public static final String INSERT_KEY_PREFIX = "http_header_";
}
}
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index 9c3a409..189b7b4 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
@@ -458,6 +459,7 @@
* <P>Type: INTEGER (boolean)</P>
* @hide
*/
+ @UnsupportedAppUsage
public static final String IS_DRM = "is_drm";
/**
@@ -469,6 +471,12 @@
* The height of the image/video in pixels.
*/
public static final String HEIGHT = "height";
+
+ /**
+ * Package that contributed this media.
+ * @hide
+ */
+ public static final String OWNER_PACKAGE_NAME = "owner_package_name";
}
/**
@@ -509,6 +517,7 @@
* For use only by the MTP implementation.
* @hide
*/
+ @UnsupportedAppUsage
public static Uri getMtpObjectsUri(String volumeName) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName +
"/object");
@@ -518,6 +527,7 @@
* For use only by the MTP implementation.
* @hide
*/
+ @UnsupportedAppUsage
public static final Uri getMtpObjectsUri(String volumeName,
long fileId) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName
@@ -528,6 +538,7 @@
* Used to implement the MTP GetObjectReferences and SetObjectReferences commands.
* @hide
*/
+ @UnsupportedAppUsage
public static final Uri getMtpReferencesUri(String volumeName,
long fileId) {
return Uri.parse(CONTENT_AUTHORITY_SLASH + volumeName
@@ -552,6 +563,7 @@
* <P>Type: INTEGER</P>
* @hide
*/
+ @UnsupportedAppUsage
public static final String STORAGE_ID = "storage_id";
/**
@@ -559,6 +571,7 @@
* <P>Type: INTEGER</P>
* @hide
*/
+ @UnsupportedAppUsage
public static final String FORMAT = "format";
/**
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 6cf67de..7980af1 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -37,6 +37,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.app.ActivityThread;
import android.app.AppOpsManager;
@@ -374,6 +375,7 @@
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ @UnsupportedAppUsage
public static final String ACTION_TRUSTED_CREDENTIALS_USER =
"com.android.settings.TRUSTED_CREDENTIALS_USER";
@@ -684,6 +686,7 @@
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ @UnsupportedAppUsage
public static final String ACTION_USER_DICTIONARY_INSERT =
"com.android.settings.USER_DICTIONARY_INSERT";
@@ -1451,7 +1454,9 @@
public static final String ACTION_APP_NOTIFICATION_REDACTION
= "android.settings.ACTION_APP_NOTIFICATION_REDACTION";
- /** @hide */ public static final String EXTRA_APP_UID = "app_uid";
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final String EXTRA_APP_UID = "app_uid";
/**
* Activity Action: Show a dialog with disabled by policy message.
@@ -1951,6 +1956,7 @@
@GuardedBy("mLock")
private final Uri mUri;
@GuardedBy("mLock")
+ @UnsupportedAppUsage
private IContentProvider mContentProvider;
public ContentProviderHolder(Uri uri) {
@@ -1988,6 +1994,7 @@
private final HashMap<String, String> mValues = new HashMap<>();
private final Uri mUri;
+ @UnsupportedAppUsage
private final ContentProviderHolder mProviderHolder;
// The method we'll call (or null, to not use) on the provider
@@ -2027,6 +2034,7 @@
return true;
}
+ @UnsupportedAppUsage
public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
final boolean isSelf = (userHandle == UserHandle.myUserId());
int currentGeneration = -1;
@@ -2244,15 +2252,18 @@
public static final Uri CONTENT_URI =
Uri.parse("content://" + AUTHORITY + "/system");
+ @UnsupportedAppUsage
private static final ContentProviderHolder sProviderHolder =
new ContentProviderHolder(CONTENT_URI);
+ @UnsupportedAppUsage
private static final NameValueCache sNameValueCache = new NameValueCache(
CONTENT_URI,
CALL_METHOD_GET_SYSTEM,
CALL_METHOD_PUT_SYSTEM,
sProviderHolder);
+ @UnsupportedAppUsage
private static final HashSet<String> MOVED_TO_SECURE;
static {
MOVED_TO_SECURE = new HashSet<>(30);
@@ -2289,7 +2300,9 @@
MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS);
}
+ @UnsupportedAppUsage
private static final HashSet<String> MOVED_TO_GLOBAL;
+ @UnsupportedAppUsage
private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL;
static {
MOVED_TO_GLOBAL = new HashSet<>();
@@ -2375,6 +2388,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static String getStringForUser(ContentResolver resolver, String name,
int userHandle) {
if (MOVED_TO_SECURE.contains(name)) {
@@ -2402,6 +2416,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userHandle) {
if (MOVED_TO_SECURE.contains(name)) {
@@ -2456,6 +2471,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
String v = getStringForUser(cr, name, userHandle);
try {
@@ -2489,6 +2505,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static int getIntForUser(ContentResolver cr, String name, int userHandle)
throws SettingNotFoundException {
String v = getStringForUser(cr, name, userHandle);
@@ -2517,6 +2534,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putIntForUser(ContentResolver cr, String name, int value,
int userHandle) {
return putStringForUser(cr, name, Integer.toString(value), userHandle);
@@ -2935,6 +2953,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS =
Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS;
@@ -3214,6 +3233,7 @@
* or less (<0.0 >-1.0) bright.
* @hide
*/
+ @UnsupportedAppUsage
public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj";
private static final Validator SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR =
@@ -3404,6 +3424,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String MASTER_MONO = "master_mono";
private static final Validator MASTER_MONO_VALIDATOR = BOOLEAN_VALIDATOR;
@@ -3440,6 +3461,7 @@
* Kept for use by legacy database upgrade code in DatabaseHelper.
* @hide
*/
+ @UnsupportedAppUsage
public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
private static final Validator VIBRATE_IN_SILENT_VALIDATOR = BOOLEAN_VALIDATOR;
@@ -3742,6 +3764,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY =
"hide_rotation_lock_toggle_for_accessibility";
@@ -3797,6 +3820,7 @@
* boolean (1 or 0).
* @hide
*/
+ @UnsupportedAppUsage
public static final String HEARING_AID = "hearing_aid";
/** @hide */
@@ -3811,6 +3835,7 @@
* 3 = HCO
* @hide
*/
+ @UnsupportedAppUsage
public static final String TTY_MODE = "tty_mode";
/** @hide */
@@ -3850,6 +3875,7 @@
* pending. The value is boolean (1 or 0).
* @hide
*/
+ @UnsupportedAppUsage
public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
/** @hide */
@@ -3861,6 +3887,7 @@
* 1 = yes
* @hide
*/
+ @UnsupportedAppUsage
public static final String POINTER_LOCATION = "pointer_location";
/** @hide */
@@ -3872,6 +3899,7 @@
* 1 = yes
* @hide
*/
+ @UnsupportedAppUsage
public static final String SHOW_TOUCHES = "show_touches";
/** @hide */
@@ -3907,6 +3935,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED;
private static final Validator DOCK_SOUNDS_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR;
@@ -3915,6 +3944,7 @@
* Whether to play sounds when the keyguard is shown and dismissed.
* @hide
*/
+ @UnsupportedAppUsage
public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
/** @hide */
@@ -3943,6 +3973,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND;
/**
@@ -3951,6 +3982,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND;
/**
@@ -3959,6 +3991,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND;
/**
@@ -3967,6 +4000,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND;
/**
@@ -3975,6 +4009,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String LOCK_SOUND = Global.LOCK_SOUND;
/**
@@ -3983,6 +4018,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND;
/**
@@ -4048,6 +4084,7 @@
* +7 = fastest
* @hide
*/
+ @UnsupportedAppUsage
public static final String POINTER_SPEED = "pointer_speed";
/** @hide */
@@ -4112,6 +4149,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String[] SETTINGS_TO_BACKUP = {
STAY_ON_WHILE_PLUGGED_IN, // moved to global
WIFI_USE_STATIC_IP,
@@ -4182,6 +4220,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>();
static {
PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR);
@@ -4236,6 +4275,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>();
static {
PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP);
@@ -4287,6 +4327,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final Map<String, Validator> VALIDATORS = new ArrayMap<>();
static {
VALIDATORS.put(STAY_ON_WHILE_PLUGGED_IN, STAY_ON_WHILE_PLUGGED_IN_VALIDATOR);
@@ -4372,6 +4413,7 @@
* These entries are considered common between the personal and the managed profile,
* since the managed profile doesn't get to change them.
*/
+ @UnsupportedAppUsage
private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
static {
CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT);
@@ -4710,10 +4752,12 @@
public static final Uri CONTENT_URI =
Uri.parse("content://" + AUTHORITY + "/secure");
+ @UnsupportedAppUsage
private static final ContentProviderHolder sProviderHolder =
new ContentProviderHolder(CONTENT_URI);
// Populated lazily, guarded by class object:
+ @UnsupportedAppUsage
private static final NameValueCache sNameValueCache = new NameValueCache(
CONTENT_URI,
CALL_METHOD_GET_SECURE,
@@ -4723,7 +4767,9 @@
private static ILockSettings sLockSettings = null;
private static boolean sIsSystemProcess;
+ @UnsupportedAppUsage
private static final HashSet<String> MOVED_TO_LOCK_SETTINGS;
+ @UnsupportedAppUsage
private static final HashSet<String> MOVED_TO_GLOBAL;
static {
MOVED_TO_LOCK_SETTINGS = new HashSet<>(3);
@@ -4867,6 +4913,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static String getStringForUser(ContentResolver resolver, String name,
int userHandle) {
if (MOVED_TO_GLOBAL.contains(name)) {
@@ -4921,12 +4968,14 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userHandle) {
return putStringForUser(resolver, name, value, null, false, userHandle);
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putStringForUser(@NonNull ContentResolver resolver,
@NonNull String name, @Nullable String value, @Nullable String tag,
boolean makeDefault, @UserIdInt int userHandle) {
@@ -5082,6 +5131,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
if (LOCATION_MODE.equals(name)) {
// Map from to underlying location provider storage API to location mode
@@ -5151,6 +5201,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putIntForUser(ContentResolver cr, String name, int value,
int userHandle) {
return putStringForUser(cr, name, Integer.toString(value), userHandle);
@@ -5175,6 +5226,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static long getLongForUser(ContentResolver cr, String name, long def,
int userHandle) {
String valString = getStringForUser(cr, name, userHandle);
@@ -5238,6 +5290,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putLongForUser(ContentResolver cr, String name, long value,
int userHandle) {
return putStringForUser(cr, name, Long.toString(value), userHandle);
@@ -5791,6 +5844,7 @@
* subject to current DeviceAdmin policy limits.
* @hide
*/
+ @UnsupportedAppUsage
public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout";
@@ -5832,6 +5886,7 @@
* @deprecated
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String LOCK_SCREEN_OWNER_INFO_ENABLED =
"lock_screen_owner_info_enabled";
@@ -5840,6 +5895,7 @@
* in their full "private" form (same as when the device is unlocked).
* @hide
*/
+ @UnsupportedAppUsage
public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS =
"lock_screen_allow_private_notifications";
@@ -6017,6 +6073,7 @@
* Whether the hush gesture has ever been used
* @hide
*/
+ @SystemApi
public static final String HUSH_GESTURE_USED = "hush_gesture_used";
private static final Validator HUSH_GESTURE_USED_VALIDATOR = BOOLEAN_VALIDATOR;
@@ -6025,6 +6082,7 @@
* Number of times the user has manually clicked the ringer toggle
* @hide
*/
+ @SystemApi
public static final String MANUAL_RINGER_TOGGLE_COUNT = "manual_ringer_toggle_count";
private static final Validator MANUAL_RINGER_TOGGLE_COUNT_VALIDATOR =
@@ -6331,6 +6389,7 @@
* @see android.graphics.Typeface
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE =
"accessibility_captioning_typeface";
@@ -6364,6 +6423,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED =
"accessibility_display_daltonizer_enabled";
@@ -6382,6 +6442,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACCESSIBILITY_DISPLAY_DALTONIZER =
"accessibility_display_daltonizer";
@@ -6395,6 +6456,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACCESSIBILITY_AUTOCLICK_ENABLED =
"accessibility_autoclick_enabled";
@@ -6420,6 +6482,7 @@
* (0 = false, 1 = true)
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACCESSIBILITY_LARGE_POINTER_ICON =
"accessibility_large_pointer_icon";
@@ -6430,6 +6493,7 @@
* The timeout for considering a press to be a long press in milliseconds.
* @hide
*/
+ @UnsupportedAppUsage
public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
private static final Validator LONG_PRESS_TIMEOUT_VALIDATOR =
@@ -6450,6 +6514,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ENABLED_PRINT_SERVICES =
"enabled_print_services";
@@ -6808,6 +6873,7 @@
* Type: int ( 0 = disabled, 1 = enabled )
* @hide
*/
+ @UnsupportedAppUsage
public static final String BACKUP_ENABLED = "backup_enabled";
/**
@@ -6816,6 +6882,7 @@
* Type: int ( 0 = disabled, 1 = enabled )
* @hide
*/
+ @UnsupportedAppUsage
public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore";
/**
@@ -6823,12 +6890,14 @@
* Type: int ( 0 = unprovisioned, 1 = fully provisioned )
* @hide
*/
+ @UnsupportedAppUsage
public static final String BACKUP_PROVISIONED = "backup_provisioned";
/**
* Component of the transport to use for backup/restore.
* @hide
*/
+ @UnsupportedAppUsage
public static final String BACKUP_TRANSPORT = "backup_transport";
/**
@@ -7006,6 +7075,7 @@
* Also prevents ANRs and crash dialogs from being suppressed.
* @hide
*/
+ @UnsupportedAppUsage
public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
/**
@@ -7025,6 +7095,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
/**
@@ -7033,6 +7104,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String PACKAGE_VERIFIER_USER_CONSENT =
"package_verifier_user_consent";
@@ -7042,6 +7114,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker";
/**
@@ -7051,6 +7124,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String SELECTED_SPELL_CHECKER_SUBTYPE =
"selected_spell_checker_subtype";
@@ -7070,6 +7144,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";
private static final Validator INCALL_POWER_BUTTON_BEHAVIOR_VALIDATOR =
@@ -7136,6 +7211,7 @@
* Whether the device should doze if configured.
* @hide
*/
+ @UnsupportedAppUsage
public static final String DOZE_ENABLED = "doze_enabled";
private static final Validator DOZE_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR;
@@ -7152,9 +7228,9 @@
* Whether the device should pulse on pick up gesture.
* @hide
*/
- public static final String DOZE_PULSE_ON_PICK_UP = "doze_pulse_on_pick_up";
+ public static final String DOZE_PICK_UP_GESTURE = "doze_pulse_on_pick_up";
- private static final Validator DOZE_PULSE_ON_PICK_UP_VALIDATOR = BOOLEAN_VALIDATOR;
+ private static final Validator DOZE_PICK_UP_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR;
/**
* Whether the device should pulse on long press gesture.
@@ -7166,9 +7242,17 @@
* Whether the device should pulse on double tap gesture.
* @hide
*/
- public static final String DOZE_PULSE_ON_DOUBLE_TAP = "doze_pulse_on_double_tap";
+ public static final String DOZE_DOUBLE_TAP_GESTURE = "doze_pulse_on_double_tap";
- private static final Validator DOZE_PULSE_ON_DOUBLE_TAP_VALIDATOR = BOOLEAN_VALIDATOR;
+ private static final Validator DOZE_DOUBLE_TAP_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR;
+
+ /**
+ * Whether the device should pulse on reach gesture.
+ * @hide
+ */
+ public static final String DOZE_REACH_GESTURE = "doze_reach_gesture";
+
+ private static final Validator DOZE_REACH_GESTURE_VALIDATOR = BOOLEAN_VALIDATOR;
/**
* The current night mode that has been selected by the user. Owned
@@ -7226,6 +7310,7 @@
* The default NFC payment component
* @hide
*/
+ @UnsupportedAppUsage
public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component";
private static final Validator NFC_PAYMENT_DEFAULT_COMPONENT_VALIDATOR =
@@ -7241,12 +7326,14 @@
* Specifies the package name currently configured to be the primary sms application
* @hide
*/
+ @UnsupportedAppUsage
public static final String SMS_DEFAULT_APPLICATION = "sms_default_application";
/**
* Specifies the package name currently configured to be the default dialer application
* @hide
*/
+ @UnsupportedAppUsage
public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application";
/**
@@ -7348,6 +7435,7 @@
* {@link NotificationManager#isNotificationListenerAccessGranted(ComponentName)}.
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
private static final Validator ENABLED_NOTIFICATION_LISTENERS_VALIDATOR =
@@ -7384,6 +7472,7 @@
private static final Validator SYNC_PARENT_SOUNDS_VALIDATOR = BOOLEAN_VALIDATOR;
/** @hide */
+ @UnsupportedAppUsage
public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations";
/**
@@ -7426,6 +7515,7 @@
* This preference enables notification display on the lockscreen.
* @hide
*/
+ @UnsupportedAppUsage
public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS =
"lock_screen_show_notifications";
@@ -7484,6 +7574,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ASSISTANT = "assistant";
/**
@@ -7942,6 +8033,7 @@
*
* @hide
*/
+ @SystemApi
public static final String VOLUME_HUSH_GESTURE = "volume_hush_gesture";
/** @hide */ public static final int VOLUME_HUSH_OFF = 0;
@@ -7992,6 +8084,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String[] SETTINGS_TO_BACKUP = {
BUGREPORT_IN_POWER_MENU, // moved to global
ALLOW_MOCK_LOCATION,
@@ -8061,8 +8154,9 @@
QS_TILES,
DOZE_ENABLED,
DOZE_ALWAYS_ON,
- DOZE_PULSE_ON_PICK_UP,
- DOZE_PULSE_ON_DOUBLE_TAP,
+ DOZE_PICK_UP_GESTURE,
+ DOZE_DOUBLE_TAP_GESTURE,
+ DOZE_REACH_GESTURE,
NFC_PAYMENT_DEFAULT_COMPONENT,
AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
FACE_UNLOCK_KEYGUARD_ENABLED,
@@ -8204,8 +8298,9 @@
VALIDATORS.put(QS_TILES, QS_TILES_VALIDATOR);
VALIDATORS.put(DOZE_ENABLED, DOZE_ENABLED_VALIDATOR);
VALIDATORS.put(DOZE_ALWAYS_ON, DOZE_ALWAYS_ON_VALIDATOR);
- VALIDATORS.put(DOZE_PULSE_ON_PICK_UP, DOZE_PULSE_ON_PICK_UP_VALIDATOR);
- VALIDATORS.put(DOZE_PULSE_ON_DOUBLE_TAP, DOZE_PULSE_ON_DOUBLE_TAP_VALIDATOR);
+ VALIDATORS.put(DOZE_PICK_UP_GESTURE, DOZE_PICK_UP_GESTURE_VALIDATOR);
+ VALIDATORS.put(DOZE_DOUBLE_TAP_GESTURE, DOZE_DOUBLE_TAP_GESTURE_VALIDATOR);
+ VALIDATORS.put(DOZE_REACH_GESTURE, DOZE_REACH_GESTURE_VALIDATOR);
VALIDATORS.put(NFC_PAYMENT_DEFAULT_COMPONENT, NFC_PAYMENT_DEFAULT_COMPONENT_VALIDATOR);
VALIDATORS.put(AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN_VALIDATOR);
@@ -8270,7 +8365,6 @@
CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED);
CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION);
CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS);
- CLONE_TO_MANAGED_PROFILE.add(AUTOFILL_SERVICE);
CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD);
CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES);
CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS);
@@ -8508,6 +8602,7 @@
* @hide
* No longer used. Should be removed once all dependencies have been updated.
*/
+ @UnsupportedAppUsage
public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED =
"enable_accessibility_global_gesture_enabled";
@@ -9098,6 +9193,7 @@
* ConnectivityManager for more info.
* @hide
*/
+ @UnsupportedAppUsage
public static final String MOBILE_DATA = "mobile_data";
/**
@@ -9184,6 +9280,7 @@
* scorer app, external network scores will neither be requested nor accepted.
* @hide
*/
+ @UnsupportedAppUsage
public static final String NETWORK_SCORER_APP = "network_scorer_app";
/**
@@ -9274,6 +9371,7 @@
* 0 = do not verify apps before installation
* @hide
*/
+ @UnsupportedAppUsage
public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
/** Timeout for package verification.
@@ -9519,6 +9617,7 @@
* by the system).
* @hide
*/
+ @UnsupportedAppUsage
public static final String WEBVIEW_PROVIDER = "webview_provider";
/**
@@ -9908,6 +10007,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String WIFI_SAVED_STATE = "wifi_saved_state";
/**
@@ -9948,6 +10048,7 @@
* the setting needs to be set to 0 to disable it.
* @hide
*/
+ @UnsupportedAppUsage
public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
"wifi_watchdog_poor_network_test_enabled";
@@ -10656,6 +10757,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:
*
@@ -11393,6 +11503,7 @@
* See RIL_PreferredNetworkType in ril.h
* @hide
*/
+ @UnsupportedAppUsage
public static final String PREFERRED_NETWORK_MODE =
"preferred_network_mode";
@@ -11774,12 +11885,21 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ZEN_MODE = "zen_mode";
- /** @hide */ public static final int ZEN_MODE_OFF = 0;
- /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
- /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2;
- /** @hide */ public static final int ZEN_MODE_ALARMS = 3;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int ZEN_MODE_OFF = 0;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int ZEN_MODE_ALARMS = 3;
/** @hide */ public static String zenModeToString(int mode) {
if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS";
@@ -11812,6 +11932,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag";
/**
@@ -11842,11 +11963,16 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String HEADS_UP_NOTIFICATIONS_ENABLED =
"heads_up_notifications_enabled";
- /** @hide */ public static final int HEADS_UP_OFF = 0;
- /** @hide */ public static final int HEADS_UP_ON = 1;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int HEADS_UP_OFF = 0;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int HEADS_UP_ON = 1;
/**
* The name of the device
@@ -11868,6 +11994,7 @@
* Type: int (0 for false, 1 for true)
* @hide
*/
+ @UnsupportedAppUsage
public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
/**
@@ -12367,10 +12494,12 @@
public static final String[] LEGACY_RESTORE_SETTINGS = {
};
+ @UnsupportedAppUsage
private static final ContentProviderHolder sProviderHolder =
new ContentProviderHolder(CONTENT_URI);
// Populated lazily, guarded by class object:
+ @UnsupportedAppUsage
private static final NameValueCache sNameValueCache = new NameValueCache(
CONTENT_URI,
CALL_METHOD_GET_GLOBAL,
@@ -12378,6 +12507,7 @@
sProviderHolder);
// Certain settings have been moved from global to the per-user secure namespace
+ @UnsupportedAppUsage
private static final HashSet<String> MOVED_TO_SECURE;
static {
MOVED_TO_SECURE = new HashSet<>(8);
@@ -12414,6 +12544,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static String getStringForUser(ContentResolver resolver, String name,
int userHandle) {
if (MOVED_TO_SECURE.contains(name)) {
@@ -12540,6 +12671,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean putStringForUser(ContentResolver resolver,
String name, String value, int userHandle) {
return putStringForUser(resolver, name, value, null, false, userHandle);
@@ -12794,6 +12926,7 @@
* The supported values are 0 = disable or 1 = enable prompt.
* @hide
*/
+ @UnsupportedAppUsage
public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt";
/**
@@ -12823,6 +12956,7 @@
* iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index
* @hide
*/
+ @UnsupportedAppUsage
public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1",
"user_preferred_sub2","user_preferred_sub3"};
@@ -13177,6 +13311,7 @@
/**
* The content:// style URL for this table
*/
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI =
Uri.parse("content://" + AUTHORITY + "/bookmarks");
@@ -13285,6 +13420,7 @@
* cleared (the bookmark is not removed).
* @return The unique content URL for the new bookmark entry.
*/
+ @UnsupportedAppUsage
public static Uri add(ContentResolver cr,
Intent intent,
String title,
@@ -13383,6 +13519,7 @@
* callingPackage, a negative result will be returned.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isCallingPackageAllowedToWriteSettings(Context context, int uid,
String callingPackage, boolean throwException) {
return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid,
@@ -13439,6 +13576,7 @@
* a negative result will be returned.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isCallingPackageAllowedToDrawOverlays(Context context, int uid,
String callingPackage, boolean throwException) {
return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid,
@@ -13469,6 +13607,7 @@
* OP_WRITE_SETTINGS
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context,
int uid, String callingPackage, boolean throwException, int appOpsOpCode, String[]
permissions, boolean makeNote) {
diff --git a/core/java/android/security/KeystoreArguments.java b/core/java/android/security/KeystoreArguments.java
index 16054e5..7d85ca7 100644
--- a/core/java/android/security/KeystoreArguments.java
+++ b/core/java/android/security/KeystoreArguments.java
@@ -16,6 +16,7 @@
package android.security;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -27,6 +28,7 @@
public class KeystoreArguments implements Parcelable {
public byte[][] args;
+ @UnsupportedAppUsage
public static final Parcelable.Creator<KeystoreArguments> CREATOR = new
Parcelable.Creator<KeystoreArguments>() {
public KeystoreArguments createFromParcel(Parcel in) {
@@ -41,6 +43,7 @@
args = null;
}
+ @UnsupportedAppUsage
public KeystoreArguments(byte[][] args) {
this.args = args;
}
diff --git a/core/java/android/security/keymaster/ExportResult.java b/core/java/android/security/keymaster/ExportResult.java
index 2b3ccbc..c104671 100644
--- a/core/java/android/security/keymaster/ExportResult.java
+++ b/core/java/android/security/keymaster/ExportResult.java
@@ -16,6 +16,7 @@
package android.security.keymaster;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -27,6 +28,7 @@
public final int resultCode;
public final byte[] exportData;
+ @UnsupportedAppUsage
public static final Parcelable.Creator<ExportResult> CREATOR = new
Parcelable.Creator<ExportResult>() {
public ExportResult createFromParcel(Parcel in) {
diff --git a/core/java/android/security/keymaster/KeyCharacteristics.java b/core/java/android/security/keymaster/KeyCharacteristics.java
index 89300d1..555863e 100644
--- a/core/java/android/security/keymaster/KeyCharacteristics.java
+++ b/core/java/android/security/keymaster/KeyCharacteristics.java
@@ -16,6 +16,7 @@
package android.security.keymaster;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -44,6 +45,7 @@
}
};
+ @UnsupportedAppUsage
public KeyCharacteristics() {}
protected KeyCharacteristics(Parcel in) {
@@ -61,6 +63,7 @@
hwEnforced.writeToParcel(out, flags);
}
+ @UnsupportedAppUsage
public void readFromParcel(Parcel in) {
swEnforced = KeymasterArguments.CREATOR.createFromParcel(in);
hwEnforced = KeymasterArguments.CREATOR.createFromParcel(in);
diff --git a/core/java/android/security/keymaster/KeymasterArguments.java b/core/java/android/security/keymaster/KeymasterArguments.java
index e862252..5aa0f91 100644
--- a/core/java/android/security/keymaster/KeymasterArguments.java
+++ b/core/java/android/security/keymaster/KeymasterArguments.java
@@ -16,6 +16,7 @@
package android.security.keymaster;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -40,6 +41,7 @@
private List<KeymasterArgument> mArguments;
+ @UnsupportedAppUsage
public static final Parcelable.Creator<KeymasterArguments> CREATOR = new
Parcelable.Creator<KeymasterArguments>() {
@Override
@@ -53,6 +55,7 @@
}
};
+ @UnsupportedAppUsage
public KeymasterArguments() {
mArguments = new ArrayList<KeymasterArgument>();
}
@@ -66,6 +69,7 @@
*
* @throws IllegalArgumentException if {@code tag} is not an enum tag.
*/
+ @UnsupportedAppUsage
public void addEnum(int tag, int value) {
int tagType = KeymasterDefs.getTagType(tag);
if ((tagType != KeymasterDefs.KM_ENUM) && (tagType != KeymasterDefs.KM_ENUM_REP)) {
@@ -137,6 +141,7 @@
* @throws IllegalArgumentException if {@code tag} is not an unsigned 32-bit int tag or if
* {@code value} is outside of the permitted range [0; 2^32).
*/
+ @UnsupportedAppUsage
public void addUnsignedInt(int tag, long value) {
int tagType = KeymasterDefs.getTagType(tag);
if ((tagType != KeymasterDefs.KM_UINT) && (tagType != KeymasterDefs.KM_UINT_REP)) {
@@ -173,6 +178,7 @@
* @throws IllegalArgumentException if {@code tag} is not an unsigned 64-bit long tag or if
* {@code value} is outside of the permitted range [0; 2^64).
*/
+ @UnsupportedAppUsage
public void addUnsignedLong(int tag, BigInteger value) {
int tagType = KeymasterDefs.getTagType(tag);
if ((tagType != KeymasterDefs.KM_ULONG) && (tagType != KeymasterDefs.KM_ULONG_REP)) {
@@ -358,6 +364,7 @@
out.writeTypedList(mArguments);
}
+ @UnsupportedAppUsage
public void readFromParcel(Parcel in) {
in.readTypedList(mArguments, KeymasterArgument.CREATOR);
}
diff --git a/core/java/android/security/keymaster/KeymasterBlob.java b/core/java/android/security/keymaster/KeymasterBlob.java
index cd36870..0659a22 100644
--- a/core/java/android/security/keymaster/KeymasterBlob.java
+++ b/core/java/android/security/keymaster/KeymasterBlob.java
@@ -16,6 +16,7 @@
package android.security.keymaster;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,6 +29,7 @@
public KeymasterBlob(byte[] blob) {
this.blob = blob;
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<KeymasterBlob> CREATOR = new
Parcelable.Creator<KeymasterBlob>() {
public KeymasterBlob createFromParcel(Parcel in) {
diff --git a/core/java/android/security/keymaster/OperationResult.java b/core/java/android/security/keymaster/OperationResult.java
index 4c962ec..2943211 100644
--- a/core/java/android/security/keymaster/OperationResult.java
+++ b/core/java/android/security/keymaster/OperationResult.java
@@ -16,6 +16,7 @@
package android.security.keymaster;
+import android.annotation.UnsupportedAppUsage;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
@@ -33,6 +34,7 @@
public final byte[] output;
public final KeymasterArguments outParams;
+ @UnsupportedAppUsage
public static final Parcelable.Creator<OperationResult> CREATOR = new
Parcelable.Creator<OperationResult>() {
@Override
diff --git a/core/java/android/security/net/config/ManifestConfigSource.java b/core/java/android/security/net/config/ManifestConfigSource.java
index 79115a5..b885e72 100644
--- a/core/java/android/security/net/config/ManifestConfigSource.java
+++ b/core/java/android/security/net/config/ManifestConfigSource.java
@@ -75,7 +75,7 @@
// should use the network security config.
boolean usesCleartextTraffic =
(mApplicationInfo.flags & ApplicationInfo.FLAG_USES_CLEARTEXT_TRAFFIC) != 0
- && mApplicationInfo.targetSandboxVersion < 2;
+ && !mApplicationInfo.isInstantApp();
source = new DefaultConfigSource(usesCleartextTraffic, mApplicationInfo);
}
mConfigSource = source;
diff --git a/core/java/android/security/net/config/NetworkSecurityConfig.java b/core/java/android/security/net/config/NetworkSecurityConfig.java
index 52f48ef..57068fa 100644
--- a/core/java/android/security/net/config/NetworkSecurityConfig.java
+++ b/core/java/android/security/net/config/NetworkSecurityConfig.java
@@ -185,7 +185,7 @@
.addCertificatesEntryRef(
new CertificatesEntryRef(SystemCertificateSource.getInstance(), false));
final boolean cleartextTrafficPermitted = info.targetSdkVersion < Build.VERSION_CODES.P
- && info.targetSandboxVersion < 2;
+ && !info.isInstantApp();
builder.setCleartextTrafficPermitted(cleartextTrafficPermitted);
// Applications targeting N and above must opt in into trusting the user added certificate
// store.
diff --git a/core/java/android/security/net/config/RootTrustManager.java b/core/java/android/security/net/config/RootTrustManager.java
index 2a30f11..d8936d9 100644
--- a/core/java/android/security/net/config/RootTrustManager.java
+++ b/core/java/android/security/net/config/RootTrustManager.java
@@ -21,6 +21,7 @@
import java.security.cert.X509Certificate;
import java.util.List;
+import android.annotation.UnsupportedAppUsage;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSession;
@@ -121,6 +122,7 @@
* This interface is used by conscrypt and android.net.http.X509TrustManagerExtensions do not
* modify without modifying those callers.
*/
+ @UnsupportedAppUsage
public List<X509Certificate> checkServerTrusted(X509Certificate[] certs, String authType,
String hostname) throws CertificateException {
if (hostname == null && mConfig.hasPerDomainConfigs()) {
diff --git a/core/java/android/service/autofill/CustomDescription.java b/core/java/android/service/autofill/CustomDescription.java
index fb468a8..b1ae7a5 100644
--- a/core/java/android/service/autofill/CustomDescription.java
+++ b/core/java/android/service/autofill/CustomDescription.java
@@ -20,11 +20,13 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.TestApi;
import android.app.Activity;
import android.app.PendingIntent;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Pair;
+import android.util.SparseArray;
import android.widget.RemoteViews;
import com.android.internal.util.Preconditions;
@@ -90,11 +92,13 @@
private final RemoteViews mPresentation;
private final ArrayList<Pair<Integer, InternalTransformation>> mTransformations;
private final ArrayList<Pair<InternalValidator, BatchUpdates>> mUpdates;
+ private final SparseArray<InternalOnClickAction> mActions;
private CustomDescription(Builder builder) {
mPresentation = builder.mPresentation;
mTransformations = builder.mTransformations;
mUpdates = builder.mUpdates;
+ mActions = builder.mActions;
}
/** @hide */
@@ -115,6 +119,13 @@
return mUpdates;
}
+ /** @hide */
+ @Nullable
+ @TestApi
+ public SparseArray<InternalOnClickAction> getActions() {
+ return mActions;
+ }
+
/**
* Builder for {@link CustomDescription} objects.
*/
@@ -124,6 +135,7 @@
private boolean mDestroyed;
private ArrayList<Pair<Integer, InternalTransformation>> mTransformations;
private ArrayList<Pair<InternalValidator, BatchUpdates>> mUpdates;
+ private SparseArray<InternalOnClickAction> mActions;
/**
* Default constructor.
@@ -157,9 +169,12 @@
*
* @param id view id of the children view.
* @param transformation an implementation provided by the Android System.
+ *
* @return this builder.
+ *
* @throws IllegalArgumentException if {@code transformation} is not a class provided
* by the Android System.
+ * @throws IllegalStateException if {@link #build()} was already called.
*/
public Builder addChild(int id, @NonNull Transformation transformation) {
throwIfDestroyed();
@@ -250,8 +265,10 @@
* is satisfied.
*
* @return this builder
+ *
* @throws IllegalArgumentException if {@code condition} is not a class provided
* by the Android System.
+ * @throws IllegalStateException if {@link #build()} was already called.
*/
public Builder batchUpdate(@NonNull Validator condition, @NonNull BatchUpdates updates) {
throwIfDestroyed();
@@ -266,6 +283,58 @@
}
/**
+ * Sets an action to be applied to the {@link RemoteViews presentation template} when the
+ * child view with the given {@code id} is clicked.
+ *
+ * <p>Typically used when the presentation uses a masked field (like {@code ****}) for
+ * sensitive fields like passwords or credit cards numbers, but offers a an icon that the
+ * user can tap to show the value for that field.
+ *
+ * <p>Example:
+ *
+ * <pre class="prettyprint">
+ * customDescriptionBuilder
+ * .addChild(R.id.password_plain, new CharSequenceTransformation
+ * .Builder(passwordId, Pattern.compile("^(.*)$"), "$1").build())
+ * .addOnClickAction(R.id.showIcon, new VisibilitySetterAction
+ * .Builder(R.id.hideIcon, View.VISIBLE)
+ * .setVisibility(R.id.showIcon, View.GONE)
+ * .setVisibility(R.id.password_plain, View.VISIBLE)
+ * .setVisibility(R.id.password_masked, View.GONE)
+ * .build())
+ * .addOnClickAction(R.id.hideIcon, new VisibilitySetterAction
+ * .Builder(R.id.showIcon, View.VISIBLE)
+ * .setVisibility(R.id.hideIcon, View.GONE)
+ * .setVisibility(R.id.password_masked, View.VISIBLE)
+ * .setVisibility(R.id.password_plain, View.GONE)
+ * .build());
+ * </pre>
+ *
+ * <p><b>Note:</b> Currently only one action can be applied to a child; if this method
+ * is called multiple times passing the same {@code id}, only the last call will be used.
+ *
+ * @param id resource id of the child view.
+ * @param action action to be performed.
+ *
+ * @return this builder
+ *
+ * @throws IllegalArgumentException if {@code action} is not a class provided
+ * by the Android System.
+ * @throws IllegalStateException if {@link #build()} was already called.
+ */
+ public Builder addOnClickAction(int id, @NonNull OnClickAction action) {
+ throwIfDestroyed();
+ Preconditions.checkArgument((action instanceof InternalOnClickAction),
+ "not provided by Android System: " + action);
+ if (mActions == null) {
+ mActions = new SparseArray<InternalOnClickAction>();
+ }
+ mActions.put(id, (InternalOnClickAction) action);
+
+ return this;
+ }
+
+ /**
* Creates a new {@link CustomDescription} instance.
*/
public CustomDescription build() {
@@ -294,6 +363,8 @@
.append(mTransformations == null ? "N/A" : mTransformations.size())
.append(", updates=")
.append(mUpdates == null ? "N/A" : mUpdates.size())
+ .append(", actions=")
+ .append(mActions == null ? "N/A" : mActions.size())
.append("]").toString();
}
@@ -339,6 +410,19 @@
dest.writeParcelableArray(conditions, flags);
dest.writeParcelableArray(updates, flags);
}
+ if (mActions == null) {
+ dest.writeIntArray(null);
+ } else {
+ final int size = mActions.size();
+ final int[] ids = new int[size];
+ final InternalOnClickAction[] values = new InternalOnClickAction[size];
+ for (int i = 0; i < size; i++) {
+ ids[i] = mActions.keyAt(i);
+ values[i] = mActions.valueAt(i);
+ }
+ dest.writeIntArray(ids);
+ dest.writeParcelableArray(values, flags);
+ }
}
public static final Parcelable.Creator<CustomDescription> CREATOR =
new Parcelable.Creator<CustomDescription>() {
@@ -351,13 +435,13 @@
if (parentPresentation == null) return null;
final Builder builder = new Builder(parentPresentation);
- final int[] ids = parcel.createIntArray();
- if (ids != null) {
+ final int[] transformationIds = parcel.createIntArray();
+ if (transformationIds != null) {
final InternalTransformation[] values =
parcel.readParcelableArray(null, InternalTransformation.class);
- final int size = ids.length;
+ final int size = transformationIds.length;
for (int i = 0; i < size; i++) {
- builder.addChild(ids[i], values[i]);
+ builder.addChild(transformationIds[i], values[i]);
}
}
final InternalValidator[] conditions =
@@ -369,6 +453,15 @@
builder.batchUpdate(conditions[i], updates[i]);
}
}
+ final int[] actionIds = parcel.createIntArray();
+ if (actionIds != null) {
+ final InternalOnClickAction[] values =
+ parcel.readParcelableArray(null, InternalOnClickAction.class);
+ final int size = actionIds.length;
+ for (int i = 0; i < size; i++) {
+ builder.addOnClickAction(actionIds[i], values[i]);
+ }
+ }
return builder.build();
}
diff --git a/core/java/android/service/autofill/Dataset.java b/core/java/android/service/autofill/Dataset.java
index 5211767..f8408be 100644
--- a/core/java/android/service/autofill/Dataset.java
+++ b/core/java/android/service/autofill/Dataset.java
@@ -33,8 +33,13 @@
import java.util.regex.Pattern;
/**
- * A dataset object represents a group of fields (key / value pairs) used to autofill parts of a
- * screen.
+ * <p>A <code>Dataset</code> object represents a group of fields (key / value pairs) used
+ * to autofill parts of a screen.
+ *
+ * <p>For more information about the role of datasets in the autofill workflow, read
+ * <a href="/guide/topics/text/autofill-services">Build autofill services</a> and the
+ * <code><a href="/reference/android/service/autofill/AutofillService">AutofillService</a></code>
+ * documentation.
*
* <a name="BasicUsage"></a>
* <h3>Basic usage</h3>
@@ -88,10 +93,6 @@
* <li>All other datasets are hidden.
* </ol>
*
- * <a name="MoreInfo"></a>
- * <h3>More information</h3>
- * <p>See {@link android.service.autofill.AutofillService} for more information and examples about
- * the role of datasets in the autofill workflow.
*/
public final class Dataset implements Parcelable {
diff --git a/core/java/android/service/autofill/FillCallback.java b/core/java/android/service/autofill/FillCallback.java
index 0257891..1695c13 100644
--- a/core/java/android/service/autofill/FillCallback.java
+++ b/core/java/android/service/autofill/FillCallback.java
@@ -21,8 +21,11 @@
import android.os.RemoteException;
/**
- * Handles autofill requests from the {@link AutofillService} into the {@link Activity} being
- * autofilled.
+ * <p><code>FillCallback</code> handles autofill requests from the {@link AutofillService} into
+ * the {@link Activity} being autofilled.
+ *
+ * <p>To learn about using Autofill services in your app, read
+ * <a href="/guide/topics/text/autofill-services">Build autofill services</a>.
*/
public final class FillCallback {
private final IFillCallback mCallback;
diff --git a/core/java/android/service/autofill/FillRequest.java b/core/java/android/service/autofill/FillRequest.java
index 33619ac..4bd6e5c 100644
--- a/core/java/android/service/autofill/FillRequest.java
+++ b/core/java/android/service/autofill/FillRequest.java
@@ -65,12 +65,18 @@
*/
public static final int FLAG_MANUAL_REQUEST = 0x1;
+ /**
+ * Indicates this request was made using
+ * <a href="AutofillService.html#CompatibilityMode">compatibility mode</a>.
+ */
+ public static final int FLAG_COMPATIBILITY_MODE_REQUEST = 0x2;
+
/** @hide */
public static final int INVALID_REQUEST_ID = Integer.MIN_VALUE;
/** @hide */
@IntDef(flag = true, prefix = { "FLAG_" }, value = {
- FLAG_MANUAL_REQUEST
+ FLAG_MANUAL_REQUEST, FLAG_COMPATIBILITY_MODE_REQUEST
})
@Retention(RetentionPolicy.SOURCE)
@interface RequestFlags{}
@@ -93,7 +99,8 @@
public FillRequest(int id, @NonNull ArrayList<FillContext> contexts,
@Nullable Bundle clientState, @RequestFlags int flags) {
mId = id;
- mFlags = Preconditions.checkFlagsArgument(flags, FLAG_MANUAL_REQUEST);
+ mFlags = Preconditions.checkFlagsArgument(flags,
+ FLAG_MANUAL_REQUEST | FLAG_COMPATIBILITY_MODE_REQUEST);
mContexts = Preconditions.checkCollectionElementsNotNull(contexts, "contexts");
mClientState = clientState;
}
diff --git a/core/java/android/service/autofill/InternalOnClickAction.java b/core/java/android/service/autofill/InternalOnClickAction.java
new file mode 100644
index 0000000..6602f2d
--- /dev/null
+++ b/core/java/android/service/autofill/InternalOnClickAction.java
@@ -0,0 +1,36 @@
+/*
+ * 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.service.autofill;
+
+import android.annotation.NonNull;
+import android.annotation.TestApi;
+import android.os.Parcelable;
+import android.view.ViewGroup;
+
+/**
+ * Superclass of all {@link OnClickAction} the system understands. As this is not public, all public
+ * subclasses have to implement {@link OnClickAction} again.
+ *
+ * @hide
+ */
+@TestApi
+public abstract class InternalOnClickAction implements OnClickAction, Parcelable {
+
+ /**
+ * Applies the action to the children of the {@code rootView} when clicked.
+ */
+ public abstract void onClick(@NonNull ViewGroup rootView);
+}
diff --git a/core/java/android/service/autofill/InternalSanitizer.java b/core/java/android/service/autofill/InternalSanitizer.java
index d77e41e..ccffc70 100644
--- a/core/java/android/service/autofill/InternalSanitizer.java
+++ b/core/java/android/service/autofill/InternalSanitizer.java
@@ -35,8 +35,6 @@
*
* @return sanitized value or {@code null} if value could not be sanitized (for example: didn't
* match regex, it's an invalid type, regex failed, etc).
- *
- * @hide
*/
@Nullable
public abstract AutofillValue sanitize(@NonNull AutofillValue value);
diff --git a/core/java/android/service/autofill/InternalTransformation.java b/core/java/android/service/autofill/InternalTransformation.java
index c9864a0..0dba2b9 100644
--- a/core/java/android/service/autofill/InternalTransformation.java
+++ b/core/java/android/service/autofill/InternalTransformation.java
@@ -44,8 +44,6 @@
* @param finder object used to find the value of a field in the screen.
* @param template the {@link RemoteViews presentation template}.
* @param childViewId resource id of the child view inside the template.
- *
- * @hide
*/
abstract void apply(@NonNull ValueFinder finder, @NonNull RemoteViews template,
int childViewId) throws Exception;
@@ -58,8 +56,6 @@
* @param template the {@link RemoteViews presentation template}.
* @param transformations map of resource id of the child view inside the template to
* transformation.
- *
- * @hide
*/
public static boolean batchApply(@NonNull ValueFinder finder, @NonNull RemoteViews template,
@NonNull ArrayList<Pair<Integer, InternalTransformation>> transformations) {
diff --git a/core/java/android/service/autofill/InternalValidator.java b/core/java/android/service/autofill/InternalValidator.java
index e08bb6c..4bea98d 100644
--- a/core/java/android/service/autofill/InternalValidator.java
+++ b/core/java/android/service/autofill/InternalValidator.java
@@ -33,9 +33,6 @@
*
* @param finder object used to find the value of a field in the screen.
* @return {@code true} if the contents are valid, {@code false} otherwise.
- *
- * @hide
*/
- @TestApi
public abstract boolean isValid(@NonNull ValueFinder finder);
}
diff --git a/core/java/android/service/autofill/OnClickAction.java b/core/java/android/service/autofill/OnClickAction.java
new file mode 100644
index 0000000..7439b00
--- /dev/null
+++ b/core/java/android/service/autofill/OnClickAction.java
@@ -0,0 +1,26 @@
+/*
+ * 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.service.autofill;
+
+/**
+ * Class used to define an action to be performed when a child view in a
+ * {@link android.widget.RemoteViews presentation} is clicked.
+ *
+ * <p>Typically used to switch the visibility of other views in a
+ * {@link CustomDescription custom save UI}.
+ */
+public interface OnClickAction {
+}
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/service/autofill/UserData.java b/core/java/android/service/autofill/UserData.java
index 55aecdd..fccb85b 100644
--- a/core/java/android/service/autofill/UserData.java
+++ b/core/java/android/service/autofill/UserData.java
@@ -145,6 +145,9 @@
// Non-persistent array used to limit the number of unique ids.
private final ArraySet<String> mUniqueCategoryIds;
+ // Non-persistent array used to ignore duplaicated value/category pairs.
+ private final ArraySet<String> mUniqueValueCategoryPairs;
+
/**
* Creates a new builder for the user data used for <a href="#FieldClassification">field
@@ -185,6 +188,7 @@
final int maxUserDataSize = getMaxUserDataSize();
mCategoryIds = new ArrayList<>(maxUserDataSize);
mValues = new ArrayList<>(maxUserDataSize);
+ mUniqueValueCategoryPairs = new ArraySet<>(maxUserDataSize);
mUniqueCategoryIds = new ArraySet<>(getMaxCategoryCount());
addMapping(value, categoryId);
@@ -222,7 +226,8 @@
* @throws IllegalStateException if:
* <ul>
* <li>{@link #build()} already called</li>
- * <li>the {@code value} has already been added</li>
+ * <li>the {@code value} has already been added (<b>Note: </b> this restriction was
+ * lifted on Android {@link android.os.Build.VERSION_CODES#Q} and later)</li>
* <li>the number of unique {@code categoryId} values added so far is more than
* {@link UserData#getMaxCategoryCount()}</li>
* <li>the number of {@code values} added so far is is more than
@@ -248,12 +253,8 @@
// New category - check size
Preconditions.checkState(mUniqueCategoryIds.size() < getMaxCategoryCount(),
"already added " + mUniqueCategoryIds.size() + " unique category ids");
-
}
- Preconditions.checkState(!mValues.contains(value),
- // Don't include value on message because it could contain PII
- "already has entry with same value");
Preconditions.checkState(mValues.size() < getMaxUserDataSize(),
"already added " + mValues.size() + " elements");
addMapping(value, categoryId);
@@ -262,9 +263,16 @@
}
private void addMapping(@NonNull String value, @NonNull String categoryId) {
+ final String pair = value + ":" + categoryId;
+ if (mUniqueValueCategoryPairs.contains(pair)) {
+ // Don't include value on message because it could contain PII
+ Log.w(TAG, "Ignoring entry with same value / category");
+ return;
+ }
mCategoryIds.add(categoryId);
mValues.add(value);
mUniqueCategoryIds.add(categoryId);
+ mUniqueValueCategoryPairs.add(pair);
}
private String checkNotEmpty(@NonNull String name, @Nullable String value) {
diff --git a/core/java/android/service/autofill/VisibilitySetterAction.java b/core/java/android/service/autofill/VisibilitySetterAction.java
new file mode 100644
index 0000000..9f977d7
--- /dev/null
+++ b/core/java/android/service/autofill/VisibilitySetterAction.java
@@ -0,0 +1,173 @@
+/*
+ * 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.service.autofill;
+
+import static android.view.autofill.Helper.sDebug;
+import static android.view.autofill.Helper.sVerbose;
+
+import android.annotation.IdRes;
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Slog;
+import android.util.SparseIntArray;
+import android.view.View;
+import android.view.View.Visibility;
+import android.view.ViewGroup;
+import android.widget.RemoteViews;
+
+import com.android.internal.util.Preconditions;
+
+/**
+ * Action used to change the visibility of other child view in a {@link CustomDescription}
+ * {@link RemoteViews presentation template}.
+ *
+ * <p>See {@link CustomDescription.Builder#addOnClickAction(int, OnClickAction)} for more details.
+ */
+public final class VisibilitySetterAction extends InternalOnClickAction implements
+ OnClickAction, Parcelable {
+ private static final String TAG = "VisibilitySetterAction";
+
+ @NonNull private final SparseIntArray mVisibilities;
+
+ private VisibilitySetterAction(@NonNull Builder builder) {
+ mVisibilities = builder.mVisibilities;
+ }
+
+ /** @hide */
+ @Override
+ public void onClick(@NonNull ViewGroup rootView) {
+ for (int i = 0; i < mVisibilities.size(); i++) {
+ final int id = mVisibilities.keyAt(i);
+ final View child = rootView.findViewById(id);
+ if (child == null) {
+ Slog.w(TAG, "Skipping view id " + id + " because it's not found on " + rootView);
+ continue;
+ }
+ final int visibility = mVisibilities.valueAt(i);
+ if (sVerbose) {
+ Slog.v(TAG, "Changing visibility of view " + child + " from "
+ + child.getVisibility() + " to " + visibility);
+ }
+ child.setVisibility(visibility);
+ }
+ }
+
+ /**
+ * Builder for {@link VisibilitySetterAction} objects.
+ */
+ public static class Builder {
+ private final SparseIntArray mVisibilities = new SparseIntArray();
+ private boolean mDestroyed;
+
+ /**
+ * Creates a new builder for an action that change the visibility of one child view.
+ *
+ * @param id view resource id of the children view.
+ * @param visibility one of {@link View#VISIBLE}, {@link View#INVISIBLE}, or
+ * {@link View#GONE}.
+ * @throws IllegalArgumentException if visibility is not one of {@link View#VISIBLE},
+ * {@link View#INVISIBLE}, or {@link View#GONE}.
+ */
+ public Builder(@IdRes int id, @Visibility int visibility) {
+ setVisibility(id, visibility);
+ }
+
+ /**
+ * Sets the action to changes the visibility of a child view.
+ *
+ * @param id view resource id of the children view.
+ * @param visibility one of {@link View#VISIBLE}, {@link View#INVISIBLE}, or
+ * {@link View#GONE}.
+ * @throws IllegalArgumentException if visibility is not one of {@link View#VISIBLE},
+ * {@link View#INVISIBLE}, or {@link View#GONE}.
+ */
+ public Builder setVisibility(@IdRes int id, @Visibility int visibility) {
+ throwIfDestroyed();
+ switch (visibility) {
+ case View.VISIBLE:
+ case View.INVISIBLE:
+ case View.GONE:
+ mVisibilities.put(id, visibility);
+ return this;
+ }
+ throw new IllegalArgumentException("Invalid visibility: " + visibility);
+ }
+
+ /**
+ * Creates a new {@link VisibilitySetterAction} instance.
+ */
+ public VisibilitySetterAction build() {
+ throwIfDestroyed();
+ mDestroyed = true;
+ return new VisibilitySetterAction(this);
+ }
+
+ private void throwIfDestroyed() {
+ Preconditions.checkState(!mDestroyed, "Already called build()");
+ }
+ }
+
+ /////////////////////////////////////
+ // Object "contract" methods. //
+ /////////////////////////////////////
+ @Override
+ public String toString() {
+ if (!sDebug) return super.toString();
+
+ return "VisibilitySetterAction: [" + mVisibilities + "]";
+ }
+
+ /////////////////////////////////////
+ // Parcelable "contract" methods. //
+ /////////////////////////////////////
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel parcel, int flags) {
+ parcel.writeSparseIntArray(mVisibilities);
+ }
+
+ public static final Parcelable.Creator<VisibilitySetterAction> CREATOR =
+ new Parcelable.Creator<VisibilitySetterAction>() {
+ @Override
+ public VisibilitySetterAction createFromParcel(Parcel parcel) {
+ // Always go through the builder to ensure the data ingested by
+ // the system obeys the contract of the builder to avoid attacks
+ final SparseIntArray visibilities = parcel.readSparseIntArray();
+ Builder builder = null;
+ for (int i = 0; i < visibilities.size(); i++) {
+ final int id = visibilities.keyAt(i);
+ final int visibility = visibilities.valueAt(i);
+ if (builder == null) {
+ builder = new Builder(id, visibility);
+ } else {
+ builder.setVisibility(id, visibility);
+ }
+ }
+ return builder == null ? null : builder.build();
+ }
+
+ @Override
+ public VisibilitySetterAction[] newArray(int size) {
+ return new VisibilitySetterAction[size];
+ }
+ };
+}
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 2b114d5..15b2aae 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.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.AlarmManager;
import android.app.Service;
import android.content.Intent;
@@ -601,6 +602,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setWindowless(boolean windowless) {
mWindowless = windowless;
}
@@ -624,6 +626,7 @@
* @see #startDozing
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public boolean canDoze() {
return mCanDoze;
}
@@ -657,6 +660,7 @@
* @see #stopDozing
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public void startDozing() {
if (mCanDoze && !mDozing) {
mDozing = true;
@@ -690,6 +694,7 @@
* @see #startDozing
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public void stopDozing() {
if (mDozing) {
mDozing = false;
@@ -711,6 +716,7 @@
* @see #setDozing(boolean)
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public boolean isDozing() {
return mDozing;
}
@@ -767,6 +773,7 @@
*
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public void setDozeScreenState(int state) {
if (mDozeScreenState != state) {
mDozeScreenState = state;
@@ -785,6 +792,7 @@
* @see #setDozeScreenBrightness
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public int getDozeScreenBrightness() {
return mDozeScreenBrightness;
}
@@ -816,6 +824,7 @@
*
* @hide For use by system UI components only.
*/
+ @UnsupportedAppUsage
public void setDozeScreenBrightness(int brightness) {
if (brightness != PowerManager.BRIGHTNESS_DEFAULT) {
brightness = clampAbsoluteBrightness(brightness);
diff --git a/core/java/android/service/euicc/EuiccProfileInfo.java b/core/java/android/service/euicc/EuiccProfileInfo.java
index 4bbee61..4a39782 100644
--- a/core/java/android/service/euicc/EuiccProfileInfo.java
+++ b/core/java/android/service/euicc/EuiccProfileInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.service.carrier.CarrierIdentifier;
@@ -143,6 +144,7 @@
* @deprecated - Do not use.
*/
@Deprecated
+ @UnsupportedAppUsage
public EuiccProfileInfo(String iccid, @Nullable UiccAccessRule[] accessRules,
@Nullable String nickname) {
if (!TextUtils.isDigitsOnly(iccid)) {
diff --git a/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java b/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java
index e2171ae..bd91ca0 100644
--- a/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java
+++ b/core/java/android/service/euicc/GetDefaultDownloadableSubscriptionListResult.java
@@ -17,6 +17,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.euicc.DownloadableSubscription;
@@ -49,6 +50,7 @@
* @deprecated - Do no use. Use getResult() instead.
*/
@Deprecated
+ @UnsupportedAppUsage
public final int result;
@Nullable
diff --git a/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java b/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
index 1edb539..71f1d22 100644
--- a/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
+++ b/core/java/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
@@ -17,6 +17,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.euicc.DownloadableSubscription;
@@ -46,6 +47,7 @@
* @deprecated - Do no use. Use getResult() instead.
*/
@Deprecated
+ @UnsupportedAppUsage
public final int result;
@Nullable
diff --git a/core/java/android/service/notification/Adjustment.java b/core/java/android/service/notification/Adjustment.java
index e0c354a..518f8ed 100644
--- a/core/java/android/service/notification/Adjustment.java
+++ b/core/java/android/service/notification/Adjustment.java
@@ -77,6 +77,18 @@
public static final String KEY_SMART_REPLIES = "key_smart_replies";
/**
+ * Data type: int, one of importance values e.g.
+ * {@link android.app.NotificationManager#IMPORTANCE_MIN}.
+ *
+ * If used from
+ * {@link NotificationAssistantService#onNotificationEnqueued(StatusBarNotification)}, it can
+ * block a notification from appearing or silence it. If used from
+ * {@link NotificationAssistantService#adjustNotification(Adjustment)}, it can visually
+ * demote a notification.
+ */
+ public static final String KEY_IMPORTANCE = "key_importance";
+
+ /**
* Create a notification adjustment.
*
* @param pkg The package of the notification.
diff --git a/core/java/android/service/notification/INotificationListener.aidl b/core/java/android/service/notification/INotificationListener.aidl
index c388367..d8bd002 100644
--- a/core/java/android/service/notification/INotificationListener.aidl
+++ b/core/java/android/service/notification/INotificationListener.aidl
@@ -18,6 +18,7 @@
import android.app.NotificationChannel;
import android.app.NotificationChannelGroup;
+import android.content.pm.ParceledListSlice;
import android.os.UserHandle;
import android.service.notification.NotificationStats;
import android.service.notification.IStatusBarNotificationHolder;
@@ -43,6 +44,7 @@
void onNotificationChannelGroupModification(String pkgName, in UserHandle user, in NotificationChannelGroup group, int modificationType);
// assistants only
- void onNotificationEnqueued(in IStatusBarNotificationHolder notificationHolder);
+ void onNotificationEnqueuedWithChannel(in IStatusBarNotificationHolder notificationHolder, in NotificationChannel channel);
void onNotificationSnoozedUntilContext(in IStatusBarNotificationHolder notificationHolder, String snoozeCriterionId);
+ void onNotificationsSeen(in List<String> keys);
}
diff --git a/core/java/android/service/notification/NotificationAssistantService.java b/core/java/android/service/notification/NotificationAssistantService.java
index 81889c1..3b820ca 100644
--- a/core/java/android/service/notification/NotificationAssistantService.java
+++ b/core/java/android/service/notification/NotificationAssistantService.java
@@ -19,6 +19,7 @@
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.app.NotificationChannel;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
@@ -102,7 +103,22 @@
* @param sbn the new notification
* @return an adjustment or null to take no action, within 100ms.
*/
- abstract public Adjustment onNotificationEnqueued(StatusBarNotification sbn);
+ public Adjustment onNotificationEnqueued(StatusBarNotification sbn) {
+ return null;
+ }
+
+ /**
+ * A notification was posted by an app. Called before post.
+ *
+ * @param sbn the new notification
+ * @param channel the channel the notification was posted to
+ * @return an adjustment or null to take no action, within 100ms.
+ */
+ public Adjustment onNotificationEnqueued(StatusBarNotification sbn,
+ NotificationChannel channel) {
+ return onNotificationEnqueued(sbn);
+ }
+
/**
* Implement this method to learn when notifications are removed, how they were interacted with
@@ -133,6 +149,14 @@
}
/**
+ * Implement this to know when a user has seen notifications, as triggered by
+ * {@link #setNotificationsShown(String[])}.
+ */
+ public void onNotificationsSeen(List<String> keys) {
+
+ }
+
+ /**
* Updates a notification. N.B. this won’t cause
* an existing notification to alert, but might allow a future update to
* this notification to alert.
@@ -186,7 +210,8 @@
private class NotificationAssistantServiceWrapper extends NotificationListenerWrapper {
@Override
- public void onNotificationEnqueued(IStatusBarNotificationHolder sbnHolder) {
+ public void onNotificationEnqueuedWithChannel(IStatusBarNotificationHolder sbnHolder,
+ NotificationChannel channel) {
StatusBarNotification sbn;
try {
sbn = sbnHolder.get();
@@ -197,14 +222,14 @@
SomeArgs args = SomeArgs.obtain();
args.arg1 = sbn;
+ args.arg2 = channel;
mHandler.obtainMessage(MyHandler.MSG_ON_NOTIFICATION_ENQUEUED,
args).sendToTarget();
}
@Override
public void onNotificationSnoozedUntilContext(
- IStatusBarNotificationHolder sbnHolder, String snoozeCriterionId)
- throws RemoteException {
+ IStatusBarNotificationHolder sbnHolder, String snoozeCriterionId) {
StatusBarNotification sbn;
try {
sbn = sbnHolder.get();
@@ -219,11 +244,20 @@
mHandler.obtainMessage(MyHandler.MSG_ON_NOTIFICATION_SNOOZED,
args).sendToTarget();
}
+
+ @Override
+ public void onNotificationsSeen(List<String> keys) {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = keys;
+ mHandler.obtainMessage(MyHandler.MSG_ON_NOTIFICATIONS_SEEN,
+ args).sendToTarget();
+ }
}
private final class MyHandler extends Handler {
public static final int MSG_ON_NOTIFICATION_ENQUEUED = 1;
public static final int MSG_ON_NOTIFICATION_SNOOZED = 2;
+ public static final int MSG_ON_NOTIFICATIONS_SEEN = 3;
public MyHandler(Looper looper) {
super(looper, null, false);
@@ -235,8 +269,9 @@
case MSG_ON_NOTIFICATION_ENQUEUED: {
SomeArgs args = (SomeArgs) msg.obj;
StatusBarNotification sbn = (StatusBarNotification) args.arg1;
+ NotificationChannel channel = (NotificationChannel) args.arg2;
args.recycle();
- Adjustment adjustment = onNotificationEnqueued(sbn);
+ Adjustment adjustment = onNotificationEnqueued(sbn, channel);
if (adjustment != null) {
if (!isBound()) return;
try {
@@ -257,6 +292,13 @@
onNotificationSnoozedUntilContext(sbn, snoozeCriterionId);
break;
}
+ case MSG_ON_NOTIFICATIONS_SEEN: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ List<String> keys = (List<String>) args.arg1;
+ args.recycle();
+ onNotificationsSeen(keys);
+ break;
+ }
}
}
}
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 09eecd8..1b588f4 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -21,6 +21,7 @@
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.INotificationManager;
import android.app.Notification;
@@ -93,6 +94,7 @@
*/
public abstract class NotificationListenerService extends Service {
+ @UnsupportedAppUsage
private final String TAG = getClass().getSimpleName();
/**
@@ -274,9 +276,11 @@
private final Object mLock = new Object();
+ @UnsupportedAppUsage
private Handler mHandler;
/** @hide */
+ @UnsupportedAppUsage
protected NotificationListenerWrapper mWrapper = null;
private boolean isConnected = false;
@@ -286,6 +290,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected INotificationManager mNoMan;
/**
@@ -507,6 +512,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
protected final INotificationManager getNotificationInterface() {
if (mNoMan == null) {
mNoMan = INotificationManager.Stub.asInterface(
@@ -1065,6 +1071,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
protected boolean isBound() {
if (mWrapper == null) {
Log.w(TAG, "Notification listener service not yet bound.");
@@ -1318,7 +1325,14 @@
}
@Override
- public void onNotificationEnqueued(IStatusBarNotificationHolder notificationHolder)
+ public void onNotificationEnqueuedWithChannel(
+ IStatusBarNotificationHolder notificationHolder, NotificationChannel channel)
+ throws RemoteException {
+ // no-op in the listener
+ }
+
+ @Override
+ public void onNotificationsSeen(List<String> keys)
throws RemoteException {
// no-op in the listener
}
@@ -1463,6 +1477,7 @@
* no such preference has been expressed.
* @hide
*/
+ @UnsupportedAppUsage
public int getVisibilityOverride() {
return mVisibilityOverride;
}
@@ -1871,23 +1886,41 @@
Collections.addAll(mIntercepted, dndInterceptedKeys);
}
+ private ArrayMap<String, Integer> buildIntMapFromBundle(Bundle bundle) {
+ ArrayMap<String, Integer> newMap = new ArrayMap<>(bundle.size());
+ for (String key : bundle.keySet()) {
+ newMap.put(key, bundle.getInt(key));
+ }
+ return newMap;
+ }
+
+ private ArrayMap<String, String> buildStringMapFromBundle(Bundle bundle) {
+ ArrayMap<String, String> newMap = new ArrayMap<>(bundle.size());
+ for (String key : bundle.keySet()) {
+ newMap.put(key, bundle.getString(key));
+ }
+ return newMap;
+ }
+
+ private ArrayMap<String, Boolean> buildBooleanMapFromBundle(Bundle bundle) {
+ ArrayMap<String, Boolean> newMap = new ArrayMap<>(bundle.size());
+ for (String key : bundle.keySet()) {
+ newMap.put(key, bundle.getBoolean(key));
+ }
+ return newMap;
+ }
+
// Locked by 'this'
private void buildVisibilityOverridesLocked() {
- Bundle visibilityBundle = mRankingUpdate.getVisibilityOverrides();
- mVisibilityOverrides = new ArrayMap<>(visibilityBundle.size());
- for (String key: visibilityBundle.keySet()) {
- mVisibilityOverrides.put(key, visibilityBundle.getInt(key));
- }
+ mVisibilityOverrides = buildIntMapFromBundle(mRankingUpdate.getVisibilityOverrides());
}
// Locked by 'this'
private void buildSuppressedVisualEffectsLocked() {
- Bundle suppressedBundle = mRankingUpdate.getSuppressedVisualEffects();
- mSuppressedVisualEffects = new ArrayMap<>(suppressedBundle.size());
- for (String key: suppressedBundle.keySet()) {
- mSuppressedVisualEffects.put(key, suppressedBundle.getInt(key));
- }
+ mSuppressedVisualEffects =
+ buildIntMapFromBundle(mRankingUpdate.getSuppressedVisualEffects());
}
+
// Locked by 'this'
private void buildImportanceLocked() {
String[] orderedKeys = mRankingUpdate.getOrderedKeys();
@@ -1901,20 +1934,13 @@
// Locked by 'this'
private void buildImportanceExplanationLocked() {
- Bundle explanationBundle = mRankingUpdate.getImportanceExplanation();
- mImportanceExplanation = new ArrayMap<>(explanationBundle.size());
- for (String key: explanationBundle.keySet()) {
- mImportanceExplanation.put(key, explanationBundle.getString(key));
- }
+ mImportanceExplanation =
+ buildStringMapFromBundle(mRankingUpdate.getImportanceExplanation());
}
// Locked by 'this'
private void buildOverrideGroupKeys() {
- Bundle overrideGroupKeys = mRankingUpdate.getOverrideGroupKeys();
- mOverrideGroupKeys = new ArrayMap<>(overrideGroupKeys.size());
- for (String key: overrideGroupKeys.keySet()) {
- mOverrideGroupKeys.put(key, overrideGroupKeys.getString(key));
- }
+ mOverrideGroupKeys = buildStringMapFromBundle(mRankingUpdate.getOverrideGroupKeys());
}
// Locked by 'this'
@@ -1946,29 +1972,17 @@
// Locked by 'this'
private void buildShowBadgeLocked() {
- Bundle showBadge = mRankingUpdate.getShowBadge();
- mShowBadge = new ArrayMap<>(showBadge.size());
- for (String key : showBadge.keySet()) {
- mShowBadge.put(key, showBadge.getBoolean(key));
- }
+ mShowBadge = buildBooleanMapFromBundle(mRankingUpdate.getShowBadge());
}
// Locked by 'this'
private void buildUserSentimentLocked() {
- Bundle userSentiment = mRankingUpdate.getUserSentiment();
- mUserSentiment = new ArrayMap<>(userSentiment.size());
- for (String key : userSentiment.keySet()) {
- mUserSentiment.put(key, userSentiment.getInt(key));
- }
+ mUserSentiment = buildIntMapFromBundle(mRankingUpdate.getUserSentiment());
}
// Locked by 'this'
private void buildHiddenLocked() {
- Bundle hidden = mRankingUpdate.getHidden();
- mHidden = new ArrayMap<>(hidden.size());
- for (String key : hidden.keySet()) {
- mHidden.put(key, hidden.getBoolean(key));
- }
+ mHidden = buildBooleanMapFromBundle(mRankingUpdate.getHidden());
}
// Locked by 'this'
diff --git a/core/java/android/service/notification/NotificationStats.java b/core/java/android/service/notification/NotificationStats.java
index 76d5328..9e23de1 100644
--- a/core/java/android/service/notification/NotificationStats.java
+++ b/core/java/android/service/notification/NotificationStats.java
@@ -52,7 +52,7 @@
/**
* Notification has not been dismissed yet.
*/
- public static final int DISMISSAL_NOT_DISMISSED = -1;
+ public static final int DISMISSAL_NOT_DISMISSED = -1000;
/**
* Notification has been dismissed from a {@link NotificationListenerService} or the app
* itself.
@@ -71,6 +71,37 @@
*/
public static final int DISMISSAL_SHADE = 3;
+ /** @hide */
+ @IntDef(prefix = { "DISMISS_SENTIMENT_" }, value = {
+ DISMISS_SENTIMENT_UNKNOWN, DISMISS_SENTIMENT_NEGATIVE, DISMISS_SENTIMENT_NEUTRAL,
+ DISMISS_SENTIMENT_POSITIVE
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface DismissalSentiment {}
+
+ /**
+ * No information is available about why this notification was dismissed, or the notification
+ * isn't dismissed yet.
+ */
+ public static final int DISMISS_SENTIMENT_UNKNOWN = -1000;
+ /**
+ * The user indicated while dismissing that they did not like the notification.
+ */
+ public static final int DISMISS_SENTIMENT_NEGATIVE = 0;
+ /**
+ * The user didn't indicate one way or another how they felt about the notification while
+ * dismissing it.
+ */
+ public static final int DISMISS_SENTIMENT_NEUTRAL = 1;
+ /**
+ * The user indicated while dismissing that they did like the notification.
+ */
+ public static final int DISMISS_SENTIMENT_POSITIVE = 2;
+
+
+ private @DismissalSentiment
+ int mDismissalSentiment = DISMISS_SENTIMENT_UNKNOWN;
+
public NotificationStats() {
}
@@ -82,6 +113,7 @@
mViewedSettings = in.readByte() != 0;
mInteracted = in.readByte() != 0;
mDismissalSurface = in.readInt();
+ mDismissalSentiment = in.readInt();
}
@Override
@@ -93,6 +125,7 @@
dest.writeByte((byte) (mViewedSettings ? 1 : 0));
dest.writeByte((byte) (mInteracted ? 1 : 0));
dest.writeInt(mDismissalSurface);
+ dest.writeInt(mDismissalSentiment);
}
@Override
@@ -212,6 +245,21 @@
mDismissalSurface = dismissalSurface;
}
+ /**
+ * Records whether the user indicated how they felt about a notification before or
+ * during dismissal.
+ */
+ public void setDismissalSentiment(@DismissalSentiment int dismissalSentiment) {
+ mDismissalSentiment = dismissalSentiment;
+ }
+
+ /**
+ * Returns how the user indicated they felt about a notification before or during dismissal.
+ */
+ public @DismissalSentiment int getDismissalSentiment() {
+ return mDismissalSentiment;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
diff --git a/core/java/android/service/notification/ScheduleCalendar.java b/core/java/android/service/notification/ScheduleCalendar.java
index 8b7946c..6ed966e 100644
--- a/core/java/android/service/notification/ScheduleCalendar.java
+++ b/core/java/android/service/notification/ScheduleCalendar.java
@@ -70,10 +70,10 @@
}
// only allow alarms in the future
if (nextAlarm > now) {
- // store earliest alarm
- if (mSchedule.nextAlarm == 0) {
+ if (mSchedule.nextAlarm == 0 || mSchedule.nextAlarm < now) {
mSchedule.nextAlarm = nextAlarm;
} else {
+ // store earliest alarm
mSchedule.nextAlarm = Math.min(mSchedule.nextAlarm, nextAlarm);
}
} else if (mSchedule.nextAlarm < now) {
diff --git a/core/java/android/service/notification/StatusBarNotification.java b/core/java/android/service/notification/StatusBarNotification.java
index d1ebc6e..dd97d52 100644
--- a/core/java/android/service/notification/StatusBarNotification.java
+++ b/core/java/android/service/notification/StatusBarNotification.java
@@ -16,6 +16,7 @@
package android.service.notification;
+import android.annotation.UnsupportedAppUsage;
import android.app.Notification;
import android.app.NotificationChannel;
import android.content.Context;
@@ -30,18 +31,26 @@
* the status bar and any {@link android.service.notification.NotificationListenerService}s.
*/
public class StatusBarNotification implements Parcelable {
+ @UnsupportedAppUsage
private final String pkg;
+ @UnsupportedAppUsage
private final int id;
+ @UnsupportedAppUsage
private final String tag;
private final String key;
private String groupKey;
private String overrideGroupKey;
+ @UnsupportedAppUsage
private final int uid;
private final String opPkg;
+ @UnsupportedAppUsage
private final int initialPid;
+ @UnsupportedAppUsage
private final Notification notification;
+ @UnsupportedAppUsage
private final UserHandle user;
+ @UnsupportedAppUsage
private final long postTime;
private Context mContext; // used for inflation & icon expansion
@@ -269,16 +278,19 @@
}
/** The notifying app's calling uid. @hide */
+ @UnsupportedAppUsage
public int getUid() {
return uid;
}
/** The package used for AppOps tracking. @hide */
+ @UnsupportedAppUsage
public String getOpPkg() {
return opPkg;
}
/** @hide */
+ @UnsupportedAppUsage
public int getInitialPid() {
return initialPid;
}
@@ -346,6 +358,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Context getPackageContext(Context context) {
if (mContext == null) {
try {
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index 5ac36afc..f90eb14 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -20,6 +20,7 @@
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.AlarmManager;
import android.app.NotificationManager;
@@ -145,6 +146,7 @@
private static final String RULE_ATT_CREATION_TIME = "creationTime";
private static final String RULE_ATT_ENABLER = "enabler";
+ @UnsupportedAppUsage
public boolean allowAlarms = DEFAULT_ALLOW_ALARMS;
public boolean allowMedia = DEFAULT_ALLOW_MEDIA;
public boolean allowSystem = DEFAULT_ALLOW_SYSTEM;
@@ -161,8 +163,10 @@
public int version;
public ZenRule manualRule;
+ @UnsupportedAppUsage
public ArrayMap<String, ZenRule> automaticRules = new ArrayMap<>();
+ @UnsupportedAppUsage
public ZenModeConfig() { }
public ZenModeConfig(Parcel source) {
@@ -1043,6 +1047,7 @@
return true;
}
+ @UnsupportedAppUsage
public static ScheduleInfo tryParseScheduleConditionId(Uri conditionId) {
final boolean isSchedule = conditionId != null
&& Condition.SCHEME.equals(conditionId.getScheme())
@@ -1068,10 +1073,15 @@
}
public static class ScheduleInfo {
+ @UnsupportedAppUsage
public int[] days;
+ @UnsupportedAppUsage
public int startHour;
+ @UnsupportedAppUsage
public int startMinute;
+ @UnsupportedAppUsage
public int endHour;
+ @UnsupportedAppUsage
public int endMinute;
public boolean exitAtAlarm;
public long nextAlarm;
@@ -1289,14 +1299,20 @@
}
public static class ZenRule implements Parcelable {
+ @UnsupportedAppUsage
public boolean enabled;
+ @UnsupportedAppUsage
public boolean snoozing; // user manually disabled this instance
+ @UnsupportedAppUsage
public String name; // required for automatic
+ @UnsupportedAppUsage
public int zenMode;
+ @UnsupportedAppUsage
public Uri conditionId; // required for automatic
public Condition condition; // optional
public ComponentName component; // optional
public String id; // required for automatic (unique)
+ @UnsupportedAppUsage
public long creationTime; // required for automatic
public String enabler; // package name, only used for manual rules.
@@ -1456,14 +1472,13 @@
&& Objects.equals(other.condition, condition)
&& Objects.equals(other.component, component)
&& Objects.equals(other.id, id)
- && other.creationTime == creationTime
&& Objects.equals(other.enabler, enabler);
}
@Override
public int hashCode() {
return Objects.hash(enabled, snoozing, name, zenMode, conditionId, condition,
- component, id, creationTime, enabler);
+ component, id, enabler);
}
public boolean isAutomaticActive() {
diff --git a/core/java/android/service/voice/AlwaysOnHotwordDetector.java b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
index 76d89ef..bd953ca 100644
--- a/core/java/android/service/voice/AlwaysOnHotwordDetector.java
+++ b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.content.Intent;
import android.hardware.soundtrigger.IRecognitionStatusCallback;
@@ -266,6 +267,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public Integer getCaptureSession() {
if (mCaptureAvailable) {
return mCaptureSession;
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java
index 8f79bcf..0bbc07e 100644
--- a/core/java/android/service/voice/VoiceInteractionService.java
+++ b/core/java/android/service/voice/VoiceInteractionService.java
@@ -17,6 +17,7 @@
package android.service.voice;
import android.annotation.SdkConstant;
+import android.annotation.UnsupportedAppUsage;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
@@ -294,6 +295,7 @@
* @return true if the keyphrase and locale combination is supported, false otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public final boolean isKeyphraseAndLocaleSupportedForHotword(String keyphrase, Locale locale) {
if (mKeyphraseEnrollmentInfo == null) {
return false;
diff --git a/core/java/android/service/vr/VrListenerService.java b/core/java/android/service/vr/VrListenerService.java
index fa3d065..3c38495 100644
--- a/core/java/android/service/vr/VrListenerService.java
+++ b/core/java/android/service/vr/VrListenerService.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.SdkConstant;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
@@ -139,6 +140,7 @@
* @see android.R.attr#enableVrMode
* @hide
*/
+ @UnsupportedAppUsage
public void onCurrentVrActivityChanged(
ComponentName component, boolean running2dInVr, int pid) {
// Override to implement. Default to old behaviour of sending null for 2D.
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 29f73b5..2846730 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -19,6 +19,7 @@
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.app.Service;
import android.app.WallpaperColors;
import android.app.WallpaperInfo;
@@ -109,6 +110,7 @@
private static final int MSG_VISIBILITY_CHANGED = 10010;
private static final int MSG_WALLPAPER_OFFSETS = 10020;
private static final int MSG_WALLPAPER_COMMAND = 10025;
+ @UnsupportedAppUsage
private static final int MSG_WINDOW_RESIZED = 10030;
private static final int MSG_WINDOW_MOVED = 10035;
private static final int MSG_TOUCH_EVENT = 10040;
@@ -191,6 +193,7 @@
final Object mLock = new Object();
boolean mOffsetMessageEnqueued;
+ @UnsupportedAppUsage
float mPendingXOffset;
float mPendingYOffset;
float mPendingXOffsetStep;
@@ -479,6 +482,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public void setFixedSizeAllowed(boolean allowed) {
mFixedSizeAllowed = allowed;
}
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/AndroidBidi.java b/core/java/android/text/AndroidBidi.java
index 72383cf..bb7fb44 100644
--- a/core/java/android/text/AndroidBidi.java
+++ b/core/java/android/text/AndroidBidi.java
@@ -16,6 +16,7 @@
package android.text;
+import android.annotation.UnsupportedAppUsage;
import android.icu.lang.UCharacter;
import android.icu.lang.UCharacterDirection;
import android.icu.lang.UProperty;
@@ -61,6 +62,7 @@
/**
* Runs the bidi algorithm on input text.
*/
+ @UnsupportedAppUsage
public static int bidi(int dir, char[] chs, byte[] chInfo) {
if (chs == null || chInfo == null) {
throw new NullPointerException();
diff --git a/core/java/android/text/BoringLayout.java b/core/java/android/text/BoringLayout.java
index fc1bfef..2b33fae 100644
--- a/core/java/android/text/BoringLayout.java
+++ b/core/java/android/text/BoringLayout.java
@@ -16,6 +16,7 @@
package android.text;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
@@ -321,6 +322,7 @@
* if boring.
* @hide
*/
+ @UnsupportedAppUsage
public static Metrics isBoring(CharSequence text, TextPaint paint,
TextDirectionHeuristic textDir, Metrics metrics) {
final int textLength = text.length();
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index febca7e..c46c831 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -20,6 +20,7 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Paint;
import android.graphics.Rect;
import android.text.style.ReplacementSpan;
@@ -353,6 +354,7 @@
* @deprecated Use {@link Builder} instead.
*/
@Deprecated
+ @UnsupportedAppUsage
public DynamicLayout(@NonNull CharSequence base, @NonNull CharSequence display,
@NonNull TextPaint paint,
@IntRange(from = 0) int width,
@@ -944,6 +946,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int[] getBlockEndLines() {
return mBlockEndLines;
}
@@ -951,6 +954,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int[] getBlockIndices() {
return mBlockIndices;
}
@@ -973,6 +977,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getNumberOfBlocks() {
return mNumberOfBlocks;
}
@@ -980,6 +985,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getIndexFirstChangedBlock() {
return mIndexFirstChangedBlock;
}
@@ -987,6 +993,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setIndexFirstChangedBlock(int i) {
mIndexFirstChangedBlock = i;
}
@@ -1169,6 +1176,7 @@
private Rect mTempRect = new Rect();
+ @UnsupportedAppUsage
private static StaticLayout sStaticLayout = null;
private static StaticLayout.Builder sBuilder = null;
diff --git a/core/java/android/text/FontConfig.java b/core/java/android/text/FontConfig.java
index 7386e3e..9e0fee33 100644
--- a/core/java/android/text/FontConfig.java
+++ b/core/java/android/text/FontConfig.java
@@ -21,6 +21,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.fonts.FontVariationAxis;
import android.net.Uri;
@@ -43,6 +44,7 @@
/**
* Returns the ordered list of families included in the system fonts.
*/
+ @UnsupportedAppUsage
public @NonNull Family[] getFamilies() {
return mFamilies;
}
@@ -89,6 +91,7 @@
/**
* Returns the index to be used to access this font when accessing a TTC file.
*/
+ @UnsupportedAppUsage
public int getTtcIndex() {
return mTtcIndex;
}
@@ -96,6 +99,7 @@
/**
* Returns the list of axes associated to this font.
*/
+ @UnsupportedAppUsage
public @NonNull FontVariationAxis[] getAxes() {
return mAxes;
}
@@ -103,6 +107,7 @@
/**
* Returns the weight value for this font.
*/
+ @UnsupportedAppUsage
public int getWeight() {
return mWeight;
}
@@ -110,6 +115,7 @@
/**
* Returns whether this font is italic.
*/
+ @UnsupportedAppUsage
public boolean isItalic() {
return mIsItalic;
}
@@ -224,6 +230,7 @@
/**
* Returns the name given by the system to this font family.
*/
+ @UnsupportedAppUsage
public @Nullable String getName() {
return mName;
}
@@ -231,6 +238,7 @@
/**
* Returns the list of fonts included in this family.
*/
+ @UnsupportedAppUsage
public @Nullable Font[] getFonts() {
return mFonts;
}
@@ -245,6 +253,7 @@
/**
* Returns the font variant for this family, e.g. "elegant" or "compact". May be null.
*/
+ @UnsupportedAppUsage
public @Variant int getVariant() {
return mVariant;
}
diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java
index c3aac74..18f8db2 100644
--- a/core/java/android/text/Html.java
+++ b/core/java/android/text/Html.java
@@ -16,6 +16,7 @@
package android.text;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.app.Application;
import android.content.res.Resources;
@@ -628,6 +629,7 @@
}
}
+ @UnsupportedAppUsage
private static void withinStyle(StringBuilder out, CharSequence text,
int start, int end) {
for (int i = start; i < end; i++) {
diff --git a/core/java/android/text/InputFilter.java b/core/java/android/text/InputFilter.java
index a507f2b..a9a7b2f 100644
--- a/core/java/android/text/InputFilter.java
+++ b/core/java/android/text/InputFilter.java
@@ -17,6 +17,7 @@
package android.text;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import com.android.internal.util.Preconditions;
@@ -164,6 +165,7 @@
* greater than the specified length.
*/
public static class LengthFilter implements InputFilter {
+ @UnsupportedAppUsage
private final int mMax;
public LengthFilter(int max) {
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index c6c1e8a..33c977b 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.IntRange;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
@@ -49,9 +50,9 @@
public abstract class Layout {
/** @hide */
@IntDef(prefix = { "BREAK_STRATEGY_" }, value = {
- BREAK_STRATEGY_SIMPLE,
- BREAK_STRATEGY_HIGH_QUALITY,
- BREAK_STRATEGY_BALANCED
+ NativeLineBreaker.BREAK_STRATEGY_SIMPLE,
+ NativeLineBreaker.BREAK_STRATEGY_HIGH_QUALITY,
+ NativeLineBreaker.BREAK_STRATEGY_BALANCED
})
@Retention(RetentionPolicy.SOURCE)
public @interface BreakStrategy {}
@@ -62,19 +63,20 @@
* before it (which yields a more consistent user experience when editing), but layout may not
* be the highest quality.
*/
- public static final int BREAK_STRATEGY_SIMPLE = 0;
+ public static final int BREAK_STRATEGY_SIMPLE = NativeLineBreaker.BREAK_STRATEGY_SIMPLE;
/**
* Value for break strategy indicating high quality line breaking, including automatic
* hyphenation and doing whole-paragraph optimization of line breaks.
*/
- public static final int BREAK_STRATEGY_HIGH_QUALITY = 1;
+ public static final int BREAK_STRATEGY_HIGH_QUALITY =
+ NativeLineBreaker.BREAK_STRATEGY_HIGH_QUALITY;
/**
* Value for break strategy indicating balanced line breaking. The breaks are chosen to
* make all lines as close to the same length as possible, including automatic hyphenation.
*/
- public static final int BREAK_STRATEGY_BALANCED = 2;
+ public static final int BREAK_STRATEGY_BALANCED = NativeLineBreaker.BREAK_STRATEGY_BALANCED;
/** @hide */
@IntDef(prefix = { "HYPHENATION_FREQUENCY_" }, value = {
@@ -92,29 +94,32 @@
* layout and there is otherwise no valid break. Soft hyphens are ignored and will not be used
* as suggestions for potential line breaks.
*/
- public static final int HYPHENATION_FREQUENCY_NONE = 0;
+ public static final int HYPHENATION_FREQUENCY_NONE =
+ NativeLineBreaker.HYPHENATION_FREQUENCY_NONE;
/**
* Value for hyphenation frequency indicating a light amount of automatic hyphenation, which
* is a conservative default. Useful for informal cases, such as short sentences or chat
* messages.
*/
- public static final int HYPHENATION_FREQUENCY_NORMAL = 1;
+ public static final int HYPHENATION_FREQUENCY_NORMAL =
+ NativeLineBreaker.HYPHENATION_FREQUENCY_NORMAL;
/**
* Value for hyphenation frequency indicating the full amount of automatic hyphenation, typical
* in typography. Useful for running text and where it's important to put the maximum amount of
* text in a screen with limited space.
*/
- public static final int HYPHENATION_FREQUENCY_FULL = 2;
+ public static final int HYPHENATION_FREQUENCY_FULL =
+ NativeLineBreaker.HYPHENATION_FREQUENCY_FULL;
private static final ParagraphStyle[] NO_PARA_SPANS =
ArrayUtils.emptyArray(ParagraphStyle.class);
/** @hide */
@IntDef(prefix = { "JUSTIFICATION_MODE_" }, value = {
- JUSTIFICATION_MODE_NONE,
- JUSTIFICATION_MODE_INTER_WORD
+ NativeLineBreaker.JUSTIFICATION_MODE_NONE,
+ NativeLineBreaker.JUSTIFICATION_MODE_INTER_WORD
})
@Retention(RetentionPolicy.SOURCE)
public @interface JustificationMode {}
@@ -122,12 +127,13 @@
/**
* Value for justification mode indicating no justification.
*/
- public static final int JUSTIFICATION_MODE_NONE = 0;
+ public static final int JUSTIFICATION_MODE_NONE = NativeLineBreaker.JUSTIFICATION_MODE_NONE;
/**
* Value for justification mode indicating the text is justified by stretching word spacing.
*/
- public static final int JUSTIFICATION_MODE_INTER_WORD = 1;
+ public static final int JUSTIFICATION_MODE_INTER_WORD =
+ NativeLineBreaker.JUSTIFICATION_MODE_INTER_WORD;
/*
* Line spacing multiplier for default line spacing.
@@ -411,6 +417,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void drawText(Canvas canvas, int firstLine, int lastLine) {
int previousLineBottom = getLineTop(firstLine);
int previousLineEnd = getLineStart(firstLine);
@@ -578,6 +585,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void drawBackground(Canvas canvas, Path highlight, Paint highlightPaint,
int cursorOffsetVertical, int firstLine, int lastLine) {
// First, draw LineBackgroundSpans.
@@ -658,6 +666,7 @@
* @return The range of lines that need to be drawn, possibly empty.
* @hide
*/
+ @UnsupportedAppUsage
public long getLineRangeForDraw(Canvas canvas) {
int dtop, dbottom;
@@ -928,6 +937,7 @@
* @return true if at a level boundary
* @hide
*/
+ @UnsupportedAppUsage
public boolean isLevelBoundary(int offset) {
int line = getLineForOffset(offset);
Directions dirs = getLineDirections(line);
@@ -1134,6 +1144,7 @@
* optionally clamp it so that it doesn't exceed the width of the layout.
* @hide
*/
+ @UnsupportedAppUsage
public float getPrimaryHorizontal(int offset, boolean clamped) {
boolean trailing = primaryIsTrailingPrevious(offset);
return getHorizontal(offset, trailing, clamped);
@@ -1153,6 +1164,7 @@
* optionally clamp it so that it doesn't exceed the width of the layout.
* @hide
*/
+ @UnsupportedAppUsage
public float getSecondaryHorizontal(int offset, boolean clamped) {
boolean trailing = primaryIsTrailingPrevious(offset);
return getHorizontal(offset, !trailing, clamped);
@@ -1594,10 +1606,11 @@
}
float get(final int offset) {
- if (mHorizontals == null || offset < 0 || offset >= mHorizontals.length) {
+ final int index = offset - mLineStartOffset;
+ if (mHorizontals == null || index < 0 || index >= mHorizontals.length) {
return getHorizontal(offset, mPrimary);
} else {
- return mHorizontals[offset - mLineStartOffset];
+ return mHorizontals[index];
}
}
}
@@ -1783,6 +1796,7 @@
* only robust for left-aligned displays.
* @hide
*/
+ @UnsupportedAppUsage
public boolean shouldClampCursor(int line) {
// Only clamp cursor position in left-aligned displays.
switch (getParagraphAlignment(line)) {
@@ -2435,6 +2449,7 @@
}
private CharSequence mText;
+ @UnsupportedAppUsage
private TextPaint mPaint;
private TextPaint mWorkPaint = new TextPaint();
private int mWidth;
@@ -2460,6 +2475,7 @@
/* package */ static final int DIR_REQUEST_LTR = 1;
/* package */ static final int DIR_REQUEST_RTL = -1;
+ @UnsupportedAppUsage
/* package */ static final int DIR_REQUEST_DEFAULT_LTR = 2;
/* package */ static final int DIR_REQUEST_DEFAULT_RTL = -2;
@@ -2473,8 +2489,10 @@
ALIGN_OPPOSITE,
ALIGN_CENTER,
/** @hide */
+ @UnsupportedAppUsage
ALIGN_LEFT,
/** @hide */
+ @UnsupportedAppUsage
ALIGN_RIGHT,
}
@@ -2482,11 +2500,13 @@
/** @hide */
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+ @UnsupportedAppUsage
public static final Directions DIRS_ALL_LEFT_TO_RIGHT =
new Directions(new int[] { 0, RUN_LENGTH_MASK });
/** @hide */
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+ @UnsupportedAppUsage
public static final Directions DIRS_ALL_RIGHT_TO_LEFT =
new Directions(new int[] { 0, RUN_LENGTH_MASK | RUN_RTL_FLAG });
diff --git a/core/java/android/text/NativeLineBreaker.java b/core/java/android/text/NativeLineBreaker.java
index a31b336..2bcfa5f 100644
--- a/core/java/android/text/NativeLineBreaker.java
+++ b/core/java/android/text/NativeLineBreaker.java
@@ -17,6 +17,7 @@
package android.text;
import android.annotation.FloatRange;
+import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -26,12 +27,233 @@
import libcore.util.NativeAllocationRegistry;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* A native implementation of the line breaker.
* TODO: Consider to make this class public.
* @hide
*/
public class NativeLineBreaker {
+ @IntDef(prefix = { "BREAK_STRATEGY_" }, value = {
+ BREAK_STRATEGY_SIMPLE,
+ BREAK_STRATEGY_HIGH_QUALITY,
+ BREAK_STRATEGY_BALANCED
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface BreakStrategy {}
+
+ /**
+ * Value for break strategy indicating simple line breaking. Automatic hyphens are not added
+ * (though soft hyphens are respected), and modifying text generally doesn't affect the layout
+ * before it (which yields a more consistent user experience when editing), but layout may not
+ * be the highest quality.
+ */
+ public static final int BREAK_STRATEGY_SIMPLE = 0;
+
+ /**
+ * Value for break strategy indicating high quality line breaking, including automatic
+ * hyphenation and doing whole-paragraph optimization of line breaks.
+ */
+ public static final int BREAK_STRATEGY_HIGH_QUALITY = 1;
+
+ /**
+ * Value for break strategy indicating balanced line breaking. The breaks are chosen to
+ * make all lines as close to the same length as possible, including automatic hyphenation.
+ */
+ public static final int BREAK_STRATEGY_BALANCED = 2;
+
+ @IntDef(prefix = { "HYPHENATION_FREQUENCY_" }, value = {
+ HYPHENATION_FREQUENCY_NORMAL,
+ HYPHENATION_FREQUENCY_FULL,
+ HYPHENATION_FREQUENCY_NONE
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface HyphenationFrequency {}
+
+ /**
+ * Value for hyphenation frequency indicating no automatic hyphenation. Useful
+ * for backward compatibility, and for cases where the automatic hyphenation algorithm results
+ * in incorrect hyphenation. Mid-word breaks may still happen when a word is wider than the
+ * layout and there is otherwise no valid break. Soft hyphens are ignored and will not be used
+ * as suggestions for potential line breaks.
+ */
+ public static final int HYPHENATION_FREQUENCY_NONE = 0;
+
+ /**
+ * Value for hyphenation frequency indicating a light amount of automatic hyphenation, which
+ * is a conservative default. Useful for informal cases, such as short sentences or chat
+ * messages.
+ */
+ public static final int HYPHENATION_FREQUENCY_NORMAL = 1;
+
+ /**
+ * Value for hyphenation frequency indicating the full amount of automatic hyphenation, typical
+ * in typography. Useful for running text and where it's important to put the maximum amount of
+ * text in a screen with limited space.
+ */
+ public static final int HYPHENATION_FREQUENCY_FULL = 2;
+
+ @IntDef(prefix = { "JUSTIFICATION_MODE_" }, value = {
+ JUSTIFICATION_MODE_NONE,
+ JUSTIFICATION_MODE_INTER_WORD
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface JustificationMode {}
+
+ /**
+ * Value for justification mode indicating no justification.
+ */
+ public static final int JUSTIFICATION_MODE_NONE = 0;
+
+ /**
+ * Value for justification mode indicating the text is justified by stretching word spacing.
+ */
+ public static final int JUSTIFICATION_MODE_INTER_WORD = 1;
+
+ /**
+ * A builder class of NativeLineBreaker.
+ */
+ public static class Builder {
+ private @BreakStrategy int mBreakStrategy = BREAK_STRATEGY_SIMPLE;
+ private @HyphenationFrequency int mHyphenationFrequency = HYPHENATION_FREQUENCY_NONE;
+ private @JustificationMode int mJustified = JUSTIFICATION_MODE_NONE;
+ private @Nullable int[] mIndents = null;
+
+ /**
+ * Construct a builder class.
+ */
+ public Builder() {}
+
+ /**
+ * Set break strategy.
+ */
+ public Builder setBreakStrategy(@BreakStrategy int breakStrategy) {
+ mBreakStrategy = breakStrategy;
+ return this;
+ }
+
+ /**
+ * Set hyphenation frequency.
+ */
+ public Builder setHyphenationFrequency(@HyphenationFrequency int hyphenationFrequency) {
+ mHyphenationFrequency = hyphenationFrequency;
+ return this;
+ }
+
+ /**
+ * Set whether the text is justified.
+ */
+ public Builder setJustified(@JustificationMode int justified) {
+ mJustified = justified;
+ return this;
+ }
+
+ /**
+ * Set indents for entire text.
+ *
+ * Sets the total (left + right) indents in pixel per lines.
+ */
+ public Builder setIndents(@Nullable int[] indents) {
+ mIndents = indents;
+ return this;
+ }
+
+ /**
+ * Returns the NativeLineBreaker with given parameters.
+ */
+ NativeLineBreaker build() {
+ return new NativeLineBreaker(mBreakStrategy, mHyphenationFrequency, mJustified,
+ mIndents);
+ }
+ }
+
+ /**
+ * Line breaking constraints for single paragraph.
+ */
+ public static class ParagraphConstraints {
+ private @FloatRange(from = 0.0f) float mWidth = 0;
+ private @FloatRange(from = 0.0f) float mFirstWidth = 0;
+ private @IntRange(from = 0) int mFirstWidthLineCount = 0;
+ private @Nullable int[] mVariableTabStops = null;
+ private @IntRange(from = 0) int mDefaultTabStop = 0;
+
+ public ParagraphConstraints() {}
+
+ /**
+ * Set width for this paragraph.
+ */
+ public void setWidth(@FloatRange(from = 0.0f) float width) {
+ mWidth = width;
+ }
+
+ /**
+ * Set indent for this paragraph.
+ *
+ * @param firstWidth the line width of the starting of the paragraph
+ * @param firstWidthLineCount the number of lines that applies the firstWidth
+ */
+ public void setIndent(@FloatRange(from = 0.0f) float firstWidth,
+ @IntRange(from = 0) int firstWidthLineCount) {
+ mFirstWidth = firstWidth;
+ mFirstWidthLineCount = firstWidthLineCount;
+ }
+
+ /**
+ * Set tab stops for this paragraph.
+ *
+ * @param tabStops the array of pixels of tap stopping position
+ * @param defaultTabStop pixels of the default tab stopping position
+ */
+ public void setTabStops(@Nullable int[] tabStops, @IntRange(from = 0) int defaultTabStop) {
+ mVariableTabStops = tabStops;
+ mDefaultTabStop = defaultTabStop;
+ }
+
+ /**
+ * Return the width for this paragraph in pixels.
+ */
+ public @FloatRange(from = 0.0f) float getWidth() {
+ return mWidth;
+ }
+
+ /**
+ * Return the first line's width for this paragraph in pixel.
+ *
+ * @see #setIndent(float, int)
+ */
+ public @FloatRange(from = 0.0f) float getFirstWidth() {
+ return mFirstWidth;
+ }
+
+ /**
+ * Return the number of lines to apply the first line's width.
+ *
+ * @see #setIndent(float, int)
+ */
+ public @IntRange(from = 0) int getFirstWidthLineCount() {
+ return mFirstWidthLineCount;
+ }
+
+ /**
+ * Returns the array of tab stops in pixels.
+ *
+ * @see #setTabStops(int[], int)
+ */
+ public @Nullable int[] getTabStops() {
+ return mVariableTabStops;
+ }
+
+ /**
+ * Returns the default tab stops in pixels.
+ *
+ * @see #setTabStop(int[], int)
+ */
+ public @IntRange(from = 0) int getDefaultTabStop() {
+ return mDefaultTabStop;
+ }
+ }
/**
* A result object of a line breaking
@@ -43,6 +265,7 @@
public float[] widths = new float[INITIAL_SIZE];
public float[] ascents = new float[INITIAL_SIZE];
public float[] descents = new float[INITIAL_SIZE];
+ // TODO: Introduce Hyphenator for explaining the meaning of flags.
public int[] flags = new int[INITIAL_SIZE];
// breaks, widths, and flags should all have the same length
}
@@ -53,54 +276,44 @@
private final long mNativePtr;
/**
- * A constructor of NativeLineBreaker
+ * Use Builder instead.
*/
- public NativeLineBreaker(@Layout.BreakStrategy int breakStrategy,
- @Layout.HyphenationFrequency int hyphenationFrequency,
- boolean justify, @Nullable int[] indents) {
- mNativePtr = nInit(breakStrategy, hyphenationFrequency, justify, indents);
+ private NativeLineBreaker(@BreakStrategy int breakStrategy,
+ @HyphenationFrequency int hyphenationFrequency, @JustificationMode int justify,
+ @Nullable int[] indents) {
+ mNativePtr = nInit(breakStrategy, hyphenationFrequency,
+ justify == JUSTIFICATION_MODE_INTER_WORD, indents);
sRegistry.registerNativeAllocation(this, mNativePtr);
}
/**
- * Break text into lines
+ * Break paragraph into lines.
*
- * @param chars an array of characters
+ * The result is filled to out param.
+ *
* @param measuredPara a result of the text measurement
- * @param length a length of the target text from the begining
- * @param firstWidth a width of the first width of the line in this paragraph
- * @param firstWidthLineCount a number of lines that has the length of the firstWidth
- * @param restWidth a width of the rest of the lines.
- * @param variableTabStops an array of tab stop widths
- * @param defaultTabStop a width of the tab stop
- * @param indentsOffset an offset of the indents to be used.
- * @param out output buffer
- * @return a number of the lines
+ * @param constraints for a single paragraph
+ * @param lineNumber a line number of this paragraph
+ * @param out object to set line break information for the given paragraph
*/
- @NonNull public int computeLineBreaks(
- @NonNull char[] chars,
+ public void computeLineBreaks(
@NonNull NativeMeasuredParagraph measuredPara,
- @IntRange(from = 0) int length,
- @FloatRange(from = 0.0f) float firstWidth,
- @IntRange(from = 0) int firstWidthLineCount,
- @FloatRange(from = 0.0f) float restWidth,
- @Nullable int[] variableTabStops,
- int defaultTabStop,
- @IntRange(from = 0) int indentsOffset,
+ @NonNull ParagraphConstraints constraints,
+ @IntRange(from = 0) int lineNumber,
@NonNull LineBreaks out) {
- return nComputeLineBreaks(
+ out.breakCount = nComputeLineBreaks(
mNativePtr,
// Inputs
- chars,
+ measuredPara.getChars(),
measuredPara.getNativePtr(),
- length,
- firstWidth,
- firstWidthLineCount,
- restWidth,
- variableTabStops,
- defaultTabStop,
- indentsOffset,
+ measuredPara.getChars().length,
+ constraints.mFirstWidth,
+ constraints.mFirstWidthLineCount,
+ constraints.mWidth,
+ constraints.mVariableTabStops,
+ constraints.mDefaultTabStop,
+ lineNumber,
// Outputs
out,
@@ -114,10 +327,8 @@
}
@FastNative
- private static native long nInit(
- @Layout.BreakStrategy int breakStrategy,
- @Layout.HyphenationFrequency int hyphenationFrequency,
- boolean isJustified,
+ private static native long nInit(@BreakStrategy int breakStrategy,
+ @HyphenationFrequency int hyphenationFrequency, boolean isJustified,
@Nullable int[] indents);
@CriticalNative
diff --git a/core/java/android/text/NativeMeasuredParagraph.java b/core/java/android/text/NativeMeasuredParagraph.java
index d03674f..bfdccca 100644
--- a/core/java/android/text/NativeMeasuredParagraph.java
+++ b/core/java/android/text/NativeMeasuredParagraph.java
@@ -36,10 +36,19 @@
NativeMeasuredParagraph.class.getClassLoader(), nGetReleaseFunc(), 1024);
private long mNativePtr;
+ private @NonNull char[] mChars;
// Use builder instead.
- private NativeMeasuredParagraph(long ptr) {
+ private NativeMeasuredParagraph(long ptr, @NonNull char[] chars) {
mNativePtr = ptr;
+ mChars = chars;
+ }
+
+ /**
+ * Returns a characters of this paragraph.
+ */
+ public char[] getChars() {
+ return mChars;
}
/**
@@ -126,7 +135,7 @@
try {
long ptr = nBuildNativeMeasuredParagraph(mNativePtr, text, computeHyphenation,
computeLayout);
- NativeMeasuredParagraph res = new NativeMeasuredParagraph(ptr);
+ NativeMeasuredParagraph res = new NativeMeasuredParagraph(ptr, text);
sRegistry.registerNativeAllocation(res, ptr);
return res;
} finally {
diff --git a/core/java/android/text/Selection.java b/core/java/android/text/Selection.java
index 5256e47..68199a4 100644
--- a/core/java/android/text/Selection.java
+++ b/core/java/android/text/Selection.java
@@ -17,6 +17,7 @@
package android.text;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import java.text.BreakIterator;
@@ -448,6 +449,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static boolean moveToPreceding(
Spannable text, PositionIterator iter, boolean extendSelection) {
final int offset = iter.preceding(getSelectionEnd(text));
@@ -462,6 +464,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static boolean moveToFollowing(
Spannable text, PositionIterator iter, boolean extendSelection) {
final int offset = iter.following(getSelectionEnd(text));
diff --git a/core/java/android/text/SpanSet.java b/core/java/android/text/SpanSet.java
index 00f1493..362825a 100644
--- a/core/java/android/text/SpanSet.java
+++ b/core/java/android/text/SpanSet.java
@@ -16,6 +16,7 @@
package android.text;
+import android.annotation.UnsupportedAppUsage;
import java.lang.reflect.Array;
import java.util.Arrays;
@@ -32,6 +33,7 @@
private final Class<? extends E> classType;
int numberOfSpans;
+ @UnsupportedAppUsage
E[] spans;
int[] spanStarts;
int[] spanEnds;
diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java
index 41a9c45..9d841e8 100644
--- a/core/java/android/text/SpannableStringBuilder.java
+++ b/core/java/android/text/SpannableStringBuilder.java
@@ -17,6 +17,7 @@
package android.text;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.BaseCanvas;
import android.graphics.Paint;
import android.util.Log;
@@ -595,6 +596,7 @@
return false;
}
+ @UnsupportedAppUsage
private void sendToSpanWatchers(int replaceStart, int replaceEnd, int nbNewChars) {
for (int i = 0; i < mSpanCount; i++) {
int spanFlags = mSpanFlags[i];
@@ -861,6 +863,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public <T> T[] getSpans(int queryStart, int queryEnd, @Nullable Class<T> kind,
boolean sortByInsertionOrder) {
if (kind == null) return (T[]) ArrayUtils.emptyArray(Object.class);
@@ -1230,6 +1233,7 @@
* [start, end[ range.
* @hide
*/
+ @UnsupportedAppUsage
public String substring(int start, int end) {
char[] buf = new char[end - start];
getChars(start, end, buf, 0);
@@ -1765,18 +1769,26 @@
private InputFilter[] mFilters = NO_FILTERS;
+ @UnsupportedAppUsage
private char[] mText;
+ @UnsupportedAppUsage
private int mGapStart;
+ @UnsupportedAppUsage
private int mGapLength;
+ @UnsupportedAppUsage
private Object[] mSpans;
+ @UnsupportedAppUsage
private int[] mSpanStarts;
+ @UnsupportedAppUsage
private int[] mSpanEnds;
private int[] mSpanMax; // see calcMax() for an explanation of what this array stores
+ @UnsupportedAppUsage
private int[] mSpanFlags;
private int[] mSpanOrder; // store the order of span insertion
private int mSpanInsertCount; // counter for the span insertion
+ @UnsupportedAppUsage
private int mSpanCount;
private IdentityHashMap<Object, Integer> mIndexOfSpan;
private int mLowWaterMark; // indices below this have not been touched
diff --git a/core/java/android/text/SpannableStringInternal.java b/core/java/android/text/SpannableStringInternal.java
index bcc2fda..7acd539 100644
--- a/core/java/android/text/SpannableStringInternal.java
+++ b/core/java/android/text/SpannableStringInternal.java
@@ -21,6 +21,7 @@
import libcore.util.EmptyArray;
+import android.annotation.UnsupportedAppUsage;
import java.lang.reflect.Array;
/* package */ abstract class SpannableStringInternal
@@ -50,6 +51,7 @@
*
* Due to backward compatibility reasons, we copy even NoCopySpan by default
*/
+ @UnsupportedAppUsage
/* package */ SpannableStringInternal(CharSequence source, int start, int end) {
this(source, start, end, false /* ignoreNoCopySpan */);
}
@@ -148,6 +150,7 @@
*
* @return True if excluded, false if included.
*/
+ @UnsupportedAppUsage
private final boolean isOutOfCopyRange(int start, int end, int spanStart, int spanEnd) {
if (spanStart > end || spanEnd < start) return true;
if (spanStart != spanEnd && start != end) {
@@ -174,14 +177,17 @@
mText.getChars(start, end, dest, off);
}
+ @UnsupportedAppUsage
/* package */ void setSpan(Object what, int start, int end, int flags) {
setSpan(what, start, end, flags, true/*enforceParagraph*/);
}
+ @UnsupportedAppUsage
private boolean isIndexFollowsNextLine(int index) {
return index != 0 && index != length() && charAt(index - 1) != '\n';
}
+ @UnsupportedAppUsage
private void setSpan(Object what, int start, int end, int flags, boolean enforceParagraph) {
int nstart = start;
int nend = end;
@@ -248,6 +254,7 @@
sendSpanAdded(what, nstart, nend);
}
+ @UnsupportedAppUsage
/* package */ void removeSpan(Object what) {
removeSpan(what, 0 /* flags */);
}
@@ -281,6 +288,7 @@
}
}
+ @UnsupportedAppUsage
public int getSpanStart(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
@@ -295,6 +303,7 @@
return -1;
}
+ @UnsupportedAppUsage
public int getSpanEnd(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
@@ -309,6 +318,7 @@
return -1;
}
+ @UnsupportedAppUsage
public int getSpanFlags(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
@@ -323,6 +333,7 @@
return 0;
}
+ @UnsupportedAppUsage
public <T> T[] getSpans(int queryStart, int queryEnd, Class<T> kind) {
int count = 0;
@@ -404,6 +415,7 @@
return (T[]) nret;
}
+ @UnsupportedAppUsage
public int nextSpanTransition(int start, int limit, Class kind) {
int count = mSpanCount;
Object[] spans = mSpans;
@@ -426,6 +438,7 @@
return limit;
}
+ @UnsupportedAppUsage
private void sendSpanAdded(Object what, int start, int end) {
SpanWatcher[] recip = getSpans(start, end, SpanWatcher.class);
int n = recip.length;
@@ -435,6 +448,7 @@
}
}
+ @UnsupportedAppUsage
private void sendSpanRemoved(Object what, int start, int end) {
SpanWatcher[] recip = getSpans(start, end, SpanWatcher.class);
int n = recip.length;
@@ -444,6 +458,7 @@
}
}
+ @UnsupportedAppUsage
private void sendSpanChanged(Object what, int s, int e, int st, int en) {
SpanWatcher[] recip = getSpans(Math.min(s, st), Math.max(e, en),
SpanWatcher.class);
@@ -454,10 +469,12 @@
}
}
+ @UnsupportedAppUsage
private static String region(int start, int end) {
return "(" + start + " ... " + end + ")";
}
+ @UnsupportedAppUsage
private void checkRange(final String operation, int start, int end) {
if (end < start) {
throw new IndexOutOfBoundsException(operation + " " +
@@ -534,25 +551,36 @@
*
* Due to backward compatibility reasons, we copy even NoCopySpan by default
*/
+ @UnsupportedAppUsage
private void copySpans(Spanned src, int start, int end) {
copySpans(src, start, end, false);
}
+ @UnsupportedAppUsage
private void copySpans(SpannableStringInternal src, int start, int end) {
copySpans(src, start, end, false);
}
+ @UnsupportedAppUsage
private String mText;
+ @UnsupportedAppUsage
private Object[] mSpans;
+ @UnsupportedAppUsage
private int[] mSpanData;
+ @UnsupportedAppUsage
private int mSpanCount;
+ @UnsupportedAppUsage
/* package */ static final Object[] EMPTY = new Object[0];
+ @UnsupportedAppUsage
private static final int START = 0;
+ @UnsupportedAppUsage
private static final int END = 1;
+ @UnsupportedAppUsage
private static final int FLAGS = 2;
+ @UnsupportedAppUsage
private static final int COLUMNS = 3;
}
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 6dad238..128f860 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -20,6 +20,7 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Paint;
import android.text.style.LeadingMarginSpan;
import android.text.style.LeadingMarginSpan.LeadingMarginSpan2;
@@ -313,10 +314,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 +337,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) {
@@ -468,6 +483,7 @@
* @deprecated Use {@link Builder} instead.
*/
@Deprecated
+ @UnsupportedAppUsage
public StaticLayout(CharSequence source, int bufstart, int bufend,
TextPaint paint, int outerwidth,
Alignment align, TextDirectionHeuristic textDir,
@@ -610,11 +626,16 @@
indents = null;
}
- final NativeLineBreaker lineBreaker = new NativeLineBreaker(
- b.mBreakStrategy, b.mHyphenationFrequency,
+ final NativeLineBreaker lineBreaker = new NativeLineBreaker.Builder()
+ .setBreakStrategy(b.mBreakStrategy)
+ .setHyphenationFrequency(b.mHyphenationFrequency)
// TODO: Support more justification mode, e.g. letter spacing, stretching.
- b.mJustificationMode != Layout.JUSTIFICATION_MODE_NONE,
- indents);
+ .setJustified(b.mJustificationMode)
+ .setIndents(indents)
+ .build();
+
+ NativeLineBreaker.ParagraphConstraints constraints =
+ new NativeLineBreaker.ParagraphConstraints();
PrecomputedText.ParagraphInfo[] paragraphInfo = null;
final Spanned spanned = (source instanceof Spanned) ? (Spanned) source : null;
@@ -705,18 +726,14 @@
final char[] chs = measuredPara.getChars();
final int[] spanEndCache = measuredPara.getSpanEndCache().getRawArray();
final int[] fmCache = measuredPara.getFontMetrics().getRawArray();
- int breakCount = lineBreaker.computeLineBreaks(
- measuredPara.getChars(),
- measuredPara.getNativeMeasuredParagraph(),
- paraEnd - paraStart,
- firstWidth,
- firstWidthLineCount,
- restWidth,
- variableTabStops,
- TAB_INCREMENT,
- mLineCount,
- lineBreaks);
+ constraints.setWidth(restWidth);
+ constraints.setIndent(firstWidth, firstWidthLineCount);
+ constraints.setTabStops(variableTabStops, TAB_INCREMENT);
+
+ lineBreaker.computeLineBreaks(measuredPara.getNativeMeasuredParagraph(),
+ constraints, mLineCount, lineBreaks);
+ int breakCount = lineBreaks.breakCount;
final int[] breaks = lineBreaks.breaks;
final float[] lineWidths = lineBreaks.widths;
final float[] ascents = lineBreaks.ascents;
@@ -1268,6 +1285,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getHeight(boolean cap) {
if (cap && mLineCount > mMaximumVisibleLineCount && mMaxLineHeight == -1
&& Log.isLoggable(TAG, Log.WARN)) {
@@ -1280,8 +1298,10 @@
? mMaxLineHeight : super.getHeight();
}
+ @UnsupportedAppUsage
private int mLineCount;
private int mTopPadding, mBottomPadding;
+ @UnsupportedAppUsage
private int mColumns;
private int mEllipsizedWidth;
@@ -1309,11 +1329,15 @@
private static final int DESCENT = 2;
private static final int EXTRA = 3;
private static final int HYPHEN = 4;
+ @UnsupportedAppUsage
private static final int ELLIPSIS_START = 5;
private static final int ELLIPSIS_COUNT = 6;
+ @UnsupportedAppUsage
private int[] mLines;
+ @UnsupportedAppUsage
private Directions[] mLineDirections;
+ @UnsupportedAppUsage
private int mMaximumVisibleLineCount = Integer.MAX_VALUE;
private static final int START_MASK = 0x1FFFFFFF;
@@ -1332,10 +1356,15 @@
// Unused, here because of gray list private API accesses.
/*package*/ static class LineBreaks {
private static final int INITIAL_SIZE = 16;
+ @UnsupportedAppUsage
public int[] breaks = new int[INITIAL_SIZE];
+ @UnsupportedAppUsage
public float[] widths = new float[INITIAL_SIZE];
+ @UnsupportedAppUsage
public float[] ascents = new float[INITIAL_SIZE];
+ @UnsupportedAppUsage
public float[] descents = new float[INITIAL_SIZE];
+ @UnsupportedAppUsage
public int[] flags = new int[INITIAL_SIZE]; // hasTab
// breaks, widths, and flags should all have the same length
}
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index b1a44ae..9667b10 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.FontMetricsInt;
@@ -50,6 +51,7 @@
private static final boolean DEBUG = false;
private TextPaint mPaint;
+ @UnsupportedAppUsage
private CharSequence mText;
private int mStart;
private int mLen;
@@ -59,6 +61,7 @@
private TabStops mTabs;
private char[] mChars;
private boolean mCharsValid;
+ @UnsupportedAppUsage
private Spanned mSpanned;
private PrecomputedText mComputed;
@@ -73,16 +76,20 @@
private final TextPaint mWorkPaint = new TextPaint();
private final TextPaint mActivePaint = new TextPaint();
+ @UnsupportedAppUsage
private final SpanSet<MetricAffectingSpan> mMetricAffectingSpanSpanSet =
new SpanSet<MetricAffectingSpan>(MetricAffectingSpan.class);
+ @UnsupportedAppUsage
private final SpanSet<CharacterStyle> mCharacterStyleSpanSet =
new SpanSet<CharacterStyle>(CharacterStyle.class);
+ @UnsupportedAppUsage
private final SpanSet<ReplacementSpan> mReplacementSpanSpanSet =
new SpanSet<ReplacementSpan>(ReplacementSpan.class);
private final DecorationInfo mDecorationInfo = new DecorationInfo();
private final ArrayList<DecorationInfo> mDecorations = new ArrayList<>();
+ @UnsupportedAppUsage
private static final TextLine[] sCached = new TextLine[3];
/**
@@ -91,6 +98,7 @@
* @return an uninitialized TextLine
*/
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+ @UnsupportedAppUsage
public static TextLine obtain() {
TextLine tl;
synchronized (sCached) {
diff --git a/core/java/android/text/TextPaint.java b/core/java/android/text/TextPaint.java
index 5234fa9..7bcc685 100644
--- a/core/java/android/text/TextPaint.java
+++ b/core/java/android/text/TextPaint.java
@@ -18,6 +18,7 @@
import android.annotation.ColorInt;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Paint;
/**
@@ -39,11 +40,13 @@
* @hide
*/
@ColorInt
+ @UnsupportedAppUsage
public int underlineColor = 0;
/**
* Thickness of the underline, in pixels.
* @hide
*/
+ @UnsupportedAppUsage
public float underlineThickness;
public TextPaint() {
@@ -98,6 +101,7 @@
* @param thickness underline thickness
* @hide
*/
+ @UnsupportedAppUsage
public void setUnderlineText(int color, float thickness) {
underlineColor = color;
underlineThickness = thickness;
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index dde4c1d..e31e928 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.PluralsRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.icu.lang.UCharacter;
@@ -1194,6 +1195,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
END_SMALL
}
@@ -1733,6 +1735,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isPrintableAsciiOnly(final CharSequence str) {
final int len = str.length();
for (int i = 0; i < len; i++) {
@@ -1958,6 +1961,7 @@
* @see #unpackRangeEndFromLong(long)
* @hide
*/
+ @UnsupportedAppUsage
public static long packRangeInLong(int start, int end) {
return (((long) start) << 32) | end;
}
@@ -1968,6 +1972,7 @@
* @see #packRangeInLong(int, int)
* @hide
*/
+ @UnsupportedAppUsage
public static int unpackRangeStartFromLong(long range) {
return (int) (range >>> 32);
}
@@ -1978,6 +1983,7 @@
* @see #packRangeInLong(int, int)
* @hide
*/
+ @UnsupportedAppUsage
public static int unpackRangeEndFromLong(long range) {
return (int) (range & 0x00000000FFFFFFFFL);
}
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java
index 94025ef..3c8de94 100755
--- a/core/java/android/text/format/DateFormat.java
+++ b/core/java/android/text/format/DateFormat.java
@@ -17,6 +17,7 @@
package android.text.format;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.UserHandle;
import android.provider.Settings;
@@ -178,6 +179,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean is24HourFormat(Context context, int userHandle) {
final String value = Settings.System.getStringForUser(context.getContentResolver(),
Settings.System.TIME_12_24, userHandle);
@@ -270,6 +272,7 @@
* @param context the application context
* @hide
*/
+ @UnsupportedAppUsage
public static String getTimeFormatString(Context context) {
return getTimeFormatString(context, context.getUserId());
}
@@ -281,6 +284,7 @@
* @param userHandle the user handle of the user to query the format for
* @hide
*/
+ @UnsupportedAppUsage
public static String getTimeFormatString(Context context, int userHandle) {
final LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
return is24HourFormat(context, userHandle) ? d.timeFormat_Hm : d.timeFormat_hm;
@@ -379,6 +383,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean hasSeconds(CharSequence inFormat) {
return hasDesignator(inFormat, SECONDS);
}
@@ -392,6 +397,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean hasDesignator(CharSequence inFormat, char designator) {
if (inFormat == null) return false;
diff --git a/core/java/android/text/format/DateUtils.java b/core/java/android/text/format/DateUtils.java
index e19b2c7..e94b800 100644
--- a/core/java/android/text/format/DateUtils.java
+++ b/core/java/android/text/format/DateUtils.java
@@ -16,6 +16,7 @@
package android.text.format;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -361,6 +362,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static CharSequence formatDuration(long millis) {
return formatDuration(millis, LENGTH_LONG);
}
@@ -376,6 +378,7 @@
* the briefest form available (e.g. "2h").
* @hide
*/
+ @UnsupportedAppUsage
public static CharSequence formatDuration(long millis, int abbrev) {
final FormatWidth width;
switch (abbrev) {
diff --git a/core/java/android/text/format/Formatter.java b/core/java/android/text/format/Formatter.java
index de86a66..077d12d 100644
--- a/core/java/android/text/format/Formatter.java
+++ b/core/java/android/text/format/Formatter.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.icu.text.MeasureFormat;
@@ -114,6 +115,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static BytesResult formatBytes(Resources res, long sizeBytes, int flags) {
final int unit = ((flags & FLAG_IEC_UNITS) != 0) ? 1024 : 1000;
final boolean isNegative = (sizeBytes < 0);
@@ -216,6 +218,7 @@
* @return the formatted elapsed time
* @hide
*/
+ @UnsupportedAppUsage
public static String formatShortElapsedTime(Context context, long millis) {
long secondsLong = millis / 1000;
@@ -271,6 +274,7 @@
* @return the formatted elapsed time
* @hide
*/
+ @UnsupportedAppUsage
public static String formatShortElapsedTimeRoundingUpToMinutes(Context context, long millis) {
long minutesRoundedUp = (millis + MILLIS_PER_MINUTE - 1) / MILLIS_PER_MINUTE;
diff --git a/core/java/android/text/method/AllCapsTransformationMethod.java b/core/java/android/text/method/AllCapsTransformationMethod.java
index c807e7d..5a7c98d 100644
--- a/core/java/android/text/method/AllCapsTransformationMethod.java
+++ b/core/java/android/text/method/AllCapsTransformationMethod.java
@@ -17,6 +17,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Rect;
import android.text.Spanned;
@@ -38,6 +39,7 @@
private boolean mEnabled;
private Locale mLocale;
+ @UnsupportedAppUsage
public AllCapsTransformationMethod(@NonNull Context context) {
mLocale = context.getResources().getConfiguration().getLocales().get(0);
}
diff --git a/core/java/android/text/method/HideReturnsTransformationMethod.java b/core/java/android/text/method/HideReturnsTransformationMethod.java
index c6a90ca..e753754 100644
--- a/core/java/android/text/method/HideReturnsTransformationMethod.java
+++ b/core/java/android/text/method/HideReturnsTransformationMethod.java
@@ -16,6 +16,8 @@
package android.text.method;
+import android.annotation.UnsupportedAppUsage;
+
/**
* This transformation method causes any carriage return characters (\r)
* to be hidden by displaying them as zero-width non-breaking space
@@ -48,5 +50,6 @@
return sInstance;
}
+ @UnsupportedAppUsage
private static HideReturnsTransformationMethod sInstance;
}
diff --git a/core/java/android/text/method/LinkMovementMethod.java b/core/java/android/text/method/LinkMovementMethod.java
index 549f8b3..a0c44a8 100644
--- a/core/java/android/text/method/LinkMovementMethod.java
+++ b/core/java/android/text/method/LinkMovementMethod.java
@@ -16,6 +16,7 @@
package android.text.method;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.text.Layout;
import android.text.NoCopySpan;
@@ -274,6 +275,7 @@
return sInstance;
}
+ @UnsupportedAppUsage
private static LinkMovementMethod sInstance;
private static Object FROM_BELOW = new NoCopySpan.Concrete();
}
diff --git a/core/java/android/text/method/MetaKeyKeyListener.java b/core/java/android/text/method/MetaKeyKeyListener.java
index c3c7302..ec7ed34b 100644
--- a/core/java/android/text/method/MetaKeyKeyListener.java
+++ b/core/java/android/text/method/MetaKeyKeyListener.java
@@ -16,6 +16,7 @@
package android.text.method;
+import android.annotation.UnsupportedAppUsage;
import android.text.Editable;
import android.text.NoCopySpan;
import android.text.Spannable;
@@ -361,6 +362,7 @@
* Start selecting text.
* @hide pending API review
*/
+ @UnsupportedAppUsage
public static void startSelecting(View view, Spannable content) {
content.setSpan(SELECTING, 0, 0, PRESSED);
}
@@ -370,6 +372,7 @@
* call {@link android.text.Selection#setSelection} too.
* @hide pending API review
*/
+ @UnsupportedAppUsage
public static void stopSelecting(View view, Spannable content) {
content.removeSpan(SELECTING);
}
diff --git a/core/java/android/text/method/PasswordTransformationMethod.java b/core/java/android/text/method/PasswordTransformationMethod.java
index 4485e38..479fdf4 100644
--- a/core/java/android/text/method/PasswordTransformationMethod.java
+++ b/core/java/android/text/method/PasswordTransformationMethod.java
@@ -16,6 +16,7 @@
package android.text.method;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import android.os.Handler;
import android.os.SystemClock;
@@ -261,6 +262,8 @@
}
}
+ @UnsupportedAppUsage
private static PasswordTransformationMethod sInstance;
+ @UnsupportedAppUsage
private static char DOT = '\u2022';
}
diff --git a/core/java/android/text/method/TransformationMethod2.java b/core/java/android/text/method/TransformationMethod2.java
index ef00ecd..0bf401a 100644
--- a/core/java/android/text/method/TransformationMethod2.java
+++ b/core/java/android/text/method/TransformationMethod2.java
@@ -15,6 +15,8 @@
*/
package android.text.method;
+import android.annotation.UnsupportedAppUsage;
+
/**
* TransformationMethod2 extends the TransformationMethod interface
* and adds the ability to relax restrictions of TransformationMethod.
@@ -29,5 +31,6 @@
* @param allowLengthChanges true to allow the transformation to change the length
* of the input string.
*/
+ @UnsupportedAppUsage
public void setLengthChangesAllowed(boolean allowLengthChanges);
}
diff --git a/core/java/android/text/method/WordIterator.java b/core/java/android/text/method/WordIterator.java
index 33e96a8..313567a 100644
--- a/core/java/android/text/method/WordIterator.java
+++ b/core/java/android/text/method/WordIterator.java
@@ -17,6 +17,7 @@
package android.text.method;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.icu.lang.UCharacter;
import android.icu.lang.UProperty;
import android.icu.text.BreakIterator;
@@ -52,10 +53,12 @@
* Constructs a new WordIterator for the specified locale.
* @param locale The locale to be used for analyzing the text.
*/
+ @UnsupportedAppUsage
public WordIterator(Locale locale) {
mIterator = BreakIterator.getWordInstance(locale);
}
+ @UnsupportedAppUsage
public void setCharSequence(@NonNull CharSequence charSequence, int start, int end) {
if (0 <= start && end <= charSequence.length()) {
mCharSeq = charSequence;
@@ -68,6 +71,7 @@
}
/** {@inheritDoc} */
+ @UnsupportedAppUsage
public int preceding(int offset) {
checkOffsetIsValid(offset);
while (true) {
@@ -79,6 +83,7 @@
}
/** {@inheritDoc} */
+ @UnsupportedAppUsage
public int following(int offset) {
checkOffsetIsValid(offset);
while (true) {
@@ -90,6 +95,7 @@
}
/** {@inheritDoc} */
+ @UnsupportedAppUsage
public boolean isBoundary(int offset) {
checkOffsetIsValid(offset);
return mIterator.isBoundary(offset);
@@ -102,6 +108,7 @@
* @param offset the given start position to search from.
* @return the position of the last boundary preceding the given offset.
*/
+ @UnsupportedAppUsage
public int nextBoundary(int offset) {
checkOffsetIsValid(offset);
return mIterator.following(offset);
@@ -114,6 +121,7 @@
* @param offset the given start position to search from.
* @return the position of the last boundary preceding the given offset.
*/
+ @UnsupportedAppUsage
public int prevBoundary(int offset) {
checkOffsetIsValid(offset);
return mIterator.preceding(offset);
@@ -131,6 +139,7 @@
*
* @throws IllegalArgumentException is offset is not valid.
*/
+ @UnsupportedAppUsage
public int getBeginning(int offset) {
// TODO: Check if usage of this can be updated to getBeginning(offset, true) if
// so this method can be removed.
@@ -150,6 +159,7 @@
*
* @throws IllegalArgumentException is offset is not valid.
*/
+ @UnsupportedAppUsage
public int getEnd(int offset) {
// TODO: Check if usage of this can be updated to getEnd(offset, true), if
// so this method can be removed.
@@ -170,6 +180,7 @@
*
* @throws IllegalArgumentException is offset is not valid.
*/
+ @UnsupportedAppUsage
public int getPrevWordBeginningOnTwoWordsBoundary(int offset) {
return getBeginning(offset, true);
}
@@ -188,6 +199,7 @@
*
* @throws IllegalArgumentException is offset is not valid.
*/
+ @UnsupportedAppUsage
public int getNextWordEndOnTwoWordBoundary(int offset) {
return getEnd(offset, true);
}
@@ -268,6 +280,7 @@
*
* @param offset the offset to search from.
*/
+ @UnsupportedAppUsage
public int getPunctuationBeginning(int offset) {
checkOffsetIsValid(offset);
while (offset != BreakIterator.DONE && !isPunctuationStartBoundary(offset)) {
@@ -284,6 +297,7 @@
*
* @param offset the offset to search from.
*/
+ @UnsupportedAppUsage
public int getPunctuationEnd(int offset) {
checkOffsetIsValid(offset);
while (offset != BreakIterator.DONE && !isPunctuationEndBoundary(offset)) {
@@ -300,6 +314,7 @@
* @param offset the offset to check from.
* @return Whether the offset is after a punctuation character.
*/
+ @UnsupportedAppUsage
public boolean isAfterPunctuation(int offset) {
if (mStart < offset && offset <= mEnd) {
final int codePoint = Character.codePointBefore(mCharSeq, offset);
@@ -315,6 +330,7 @@
* @param offset the offset to check from.
* @return Whether the offset is at a punctuation character.
*/
+ @UnsupportedAppUsage
public boolean isOnPunctuation(int offset) {
if (mStart <= offset && offset < mEnd) {
final int codePoint = Character.codePointAt(mCharSeq, offset);
diff --git a/core/java/android/text/style/BulletSpan.java b/core/java/android/text/style/BulletSpan.java
index c0ac70e..679698b 100644
--- a/core/java/android/text/style/BulletSpan.java
+++ b/core/java/android/text/style/BulletSpan.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Px;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Parcel;
@@ -68,11 +69,14 @@
private static final int STANDARD_COLOR = 0;
@Px
+ @UnsupportedAppUsage
private final int mGapWidth;
@Px
private final int mBulletRadius;
@ColorInt
+ @UnsupportedAppUsage
private final int mColor;
+ @UnsupportedAppUsage
private final boolean mWantColor;
/**
diff --git a/core/java/android/text/style/DynamicDrawableSpan.java b/core/java/android/text/style/DynamicDrawableSpan.java
index 1b16f33..be772af 100644
--- a/core/java/android/text/style/DynamicDrawableSpan.java
+++ b/core/java/android/text/style/DynamicDrawableSpan.java
@@ -19,6 +19,7 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
@@ -78,6 +79,7 @@
protected final int mVerticalAlignment;
+ @UnsupportedAppUsage
private WeakReference<Drawable> mDrawableRef;
/**
diff --git a/core/java/android/text/style/EasyEditSpan.java b/core/java/android/text/style/EasyEditSpan.java
index 305b3306..bfb2873 100644
--- a/core/java/android/text/style/EasyEditSpan.java
+++ b/core/java/android/text/style/EasyEditSpan.java
@@ -17,6 +17,7 @@
package android.text.style;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.os.Parcel;
import android.text.ParcelableSpan;
@@ -115,6 +116,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isDeleteEnabled() {
return mDeleteEnabled;
}
@@ -124,6 +126,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setDeleteEnabled(boolean value) {
mDeleteEnabled = value;
}
@@ -133,6 +136,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public PendingIntent getPendingIntent() {
return mPendingIntent;
}
diff --git a/core/java/android/text/style/ImageSpan.java b/core/java/android/text/style/ImageSpan.java
index 95f0b43..d4edde9 100644
--- a/core/java/android/text/style/ImageSpan.java
+++ b/core/java/android/text/style/ImageSpan.java
@@ -19,6 +19,7 @@
import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -57,6 +58,7 @@
public class ImageSpan extends DynamicDrawableSpan {
@Nullable
+ @UnsupportedAppUsage
private Drawable mDrawable;
@Nullable
private Uri mContentUri;
diff --git a/core/java/android/text/style/SpellCheckSpan.java b/core/java/android/text/style/SpellCheckSpan.java
index 10275c2..6ffde38 100644
--- a/core/java/android/text/style/SpellCheckSpan.java
+++ b/core/java/android/text/style/SpellCheckSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.text.ParcelableSpan;
import android.text.TextUtils;
@@ -31,18 +32,22 @@
private boolean mSpellCheckInProgress;
+ @UnsupportedAppUsage
public SpellCheckSpan() {
mSpellCheckInProgress = false;
}
+ @UnsupportedAppUsage
public SpellCheckSpan(Parcel src) {
mSpellCheckInProgress = (src.readInt() != 0);
}
+ @UnsupportedAppUsage
public void setSpellCheckInProgress(boolean inProgress) {
mSpellCheckInProgress = inProgress;
}
+ @UnsupportedAppUsage
public boolean isSpellCheckInProgress() {
return mSpellCheckInProgress;
}
diff --git a/core/java/android/text/style/SuggestionRangeSpan.java b/core/java/android/text/style/SuggestionRangeSpan.java
index c1943d5..d958dde 100644
--- a/core/java/android/text/style/SuggestionRangeSpan.java
+++ b/core/java/android/text/style/SuggestionRangeSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.text.ParcelableSpan;
import android.text.TextPaint;
@@ -30,11 +31,13 @@
public class SuggestionRangeSpan extends CharacterStyle implements ParcelableSpan {
private int mBackgroundColor;
+ @UnsupportedAppUsage
public SuggestionRangeSpan() {
// 0 is a fully transparent black. Has to be set using #setBackgroundColor
mBackgroundColor = 0;
}
+ @UnsupportedAppUsage
public SuggestionRangeSpan(Parcel src) {
mBackgroundColor = src.readInt();
}
@@ -64,6 +67,7 @@
return TextUtils.SUGGESTION_RANGE_SPAN;
}
+ @UnsupportedAppUsage
public void setBackgroundColor(int backgroundColor) {
mBackgroundColor = backgroundColor;
}
diff --git a/core/java/android/text/style/SuggestionSpan.java b/core/java/android/text/style/SuggestionSpan.java
index 1b00db2..5210447 100644
--- a/core/java/android/text/style/SuggestionSpan.java
+++ b/core/java/android/text/style/SuggestionSpan.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -99,7 +100,9 @@
private final String mNotificationTargetPackageName;
private final int mHashCode;
+ @UnsupportedAppUsage
private float mEasyCorrectUnderlineThickness;
+ @UnsupportedAppUsage
private int mEasyCorrectUnderlineColor;
private float mMisspelledUnderlineThickness;
@@ -264,6 +267,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getNotificationTargetClassName() {
return mNotificationTargetClassName;
}
@@ -368,6 +372,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getUnderlineColor() {
// The order here should match what is used in updateDrawState
final boolean misspelled = (mFlags & FLAG_MISSPELLED) != 0;
@@ -390,6 +395,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void notifySelection(Context context, String original, int index) {
final Intent intent = new Intent();
diff --git a/core/java/android/text/util/Linkify.java b/core/java/android/text/util/Linkify.java
index 08cbbe6..f4dad62 100644
--- a/core/java/android/text/util/Linkify.java
+++ b/core/java/android/text/util/Linkify.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
@@ -654,6 +655,7 @@
}
}
+ @UnsupportedAppUsage
private static void gatherTelLinks(ArrayList<LinkSpec> links, Spannable s,
@Nullable Context context) {
PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
diff --git a/core/java/android/transition/Scene.java b/core/java/android/transition/Scene.java
index 15ad7de..2c858cd 100644
--- a/core/java/android/transition/Scene.java
+++ b/core/java/android/transition/Scene.java
@@ -35,7 +35,8 @@
private int mLayoutId = -1;
private ViewGroup mSceneRoot;
private View mLayout; // alternative to layoutId
- Runnable mEnterAction, mExitAction;
+ Runnable mEnterAction;
+ Runnable mExitAction;
/**
* Returns a Scene described by the resource file associated with the given
@@ -265,4 +266,4 @@
boolean isCreatedFromLayoutResource() {
return (mLayoutId > 0);
}
-}
\ No newline at end of file
+}
diff --git a/core/java/android/util/ArrayMap.java b/core/java/android/util/ArrayMap.java
index f1e937e..5108a79 100644
--- a/core/java/android/util/ArrayMap.java
+++ b/core/java/android/util/ArrayMap.java
@@ -18,6 +18,7 @@
import libcore.util.EmptyArray;
+import android.annotation.UnsupportedAppUsage;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Map;
@@ -70,16 +71,19 @@
/**
* Maximum number of entries to have in array caches.
*/
+ @UnsupportedAppUsage
private static final int CACHE_SIZE = 10;
/**
* Special hash array value that indicates the container is immutable.
*/
+ @UnsupportedAppUsage
static final int[] EMPTY_IMMUTABLE_INTS = new int[0];
/**
* @hide Special immutable empty ArrayMap.
*/
+ @UnsupportedAppUsage
public static final ArrayMap EMPTY = new ArrayMap<>(-1);
/**
@@ -88,14 +92,21 @@
* The first entry in the array is a pointer to the next array in the
* list; the second entry is a pointer to the int[] hash code array for it.
*/
+ @UnsupportedAppUsage
static Object[] mBaseCache;
+ @UnsupportedAppUsage
static int mBaseCacheSize;
+ @UnsupportedAppUsage
static Object[] mTwiceBaseCache;
+ @UnsupportedAppUsage
static int mTwiceBaseCacheSize;
final boolean mIdentityHashCode;
+ @UnsupportedAppUsage
int[] mHashes;
+ @UnsupportedAppUsage
Object[] mArray;
+ @UnsupportedAppUsage
int mSize;
MapCollections<K, V> mCollections;
@@ -111,6 +122,7 @@
}
}
+ @UnsupportedAppUsage
int indexOf(Object key, int hash) {
final int N = mSize;
@@ -149,6 +161,7 @@
return ~end;
}
+ @UnsupportedAppUsage
int indexOfNull() {
final int N = mSize;
@@ -187,6 +200,7 @@
return ~end;
}
+ @UnsupportedAppUsage
private void allocArrays(final int size) {
if (mHashes == EMPTY_IMMUTABLE_INTS) {
throw new UnsupportedOperationException("ArrayMap is immutable");
@@ -225,6 +239,7 @@
mArray = new Object[size<<1];
}
+ @UnsupportedAppUsage
private static void freeArrays(final int[] hashes, final Object[] array, final int size) {
if (hashes.length == (BASE_SIZE*2)) {
synchronized (ArrayMap.class) {
@@ -378,6 +393,7 @@
: indexOf(key, mIdentityHashCode ? System.identityHashCode(key) : key.hashCode());
}
+ @UnsupportedAppUsage
int indexOfValue(Object value) {
final int N = mSize*2;
final Object[] array = mArray;
@@ -535,6 +551,7 @@
* The array must already be large enough to contain the item.
* @hide
*/
+ @UnsupportedAppUsage
public void append(K key, V value) {
int index = mSize;
final int hash = key == null ? 0
diff --git a/core/java/android/util/ArraySet.java b/core/java/android/util/ArraySet.java
index 2eea7df..526a950 100644
--- a/core/java/android/util/ArraySet.java
+++ b/core/java/android/util/ArraySet.java
@@ -18,6 +18,7 @@
import libcore.util.EmptyArray;
+import android.annotation.UnsupportedAppUsage;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Iterator;
@@ -70,11 +71,15 @@
static int sTwiceBaseCacheSize;
final boolean mIdentityHashCode;
+ @UnsupportedAppUsage
int[] mHashes;
+ @UnsupportedAppUsage
Object[] mArray;
+ @UnsupportedAppUsage
int mSize;
MapCollections<E, E> mCollections;
+ @UnsupportedAppUsage
private int indexOf(Object key, int hash) {
final int N = mSize;
@@ -113,6 +118,7 @@
return ~end;
}
+ @UnsupportedAppUsage
private int indexOfNull() {
final int N = mSize;
@@ -151,6 +157,7 @@
return ~end;
}
+ @UnsupportedAppUsage
private void allocArrays(final int size) {
if (size == (BASE_SIZE * 2)) {
synchronized (ArraySet.class) {
@@ -208,6 +215,7 @@
mArray = new Object[size];
}
+ @UnsupportedAppUsage
private static void freeArrays(final int[] hashes, final Object[] array, final int size) {
if (hashes.length == (BASE_SIZE * 2)) {
synchronized (ArraySet.class) {
@@ -282,6 +290,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public ArraySet(Collection<E> set) {
this();
if (set != null) {
diff --git a/core/java/android/util/Base64.java b/core/java/android/util/Base64.java
index 1f2a5a7..ecc0c9c 100644
--- a/core/java/android/util/Base64.java
+++ b/core/java/android/util/Base64.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import java.io.UnsupportedEncodingException;
/**
@@ -737,5 +738,6 @@
}
}
+ @UnsupportedAppUsage
private Base64() { } // don't instantiate
}
diff --git a/core/java/android/util/Base64OutputStream.java b/core/java/android/util/Base64OutputStream.java
index 8378705..230a3a5 100644
--- a/core/java/android/util/Base64OutputStream.java
+++ b/core/java/android/util/Base64OutputStream.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
@@ -57,6 +58,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Base64OutputStream(OutputStream out, int flags, boolean encode) {
super(out);
this.flags = flags;
diff --git a/core/java/android/util/DebugUtils.java b/core/java/android/util/DebugUtils.java
index 46e3169..e87fcff 100644
--- a/core/java/android/util/DebugUtils.java
+++ b/core/java/android/util/DebugUtils.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -108,6 +109,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void buildShortClassTag(Object cls, StringBuilder out) {
if (cls == null) {
out.append("null");
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index 13de172..b092fcf 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import android.os.SystemProperties;
@@ -172,6 +173,7 @@
* density for a specific display.
*/
@Deprecated
+ @UnsupportedAppUsage
public static int DENSITY_DEVICE = getDeviceDensity();
/**
@@ -234,12 +236,14 @@
* being applied.
* @hide
*/
+ @UnsupportedAppUsage
public int noncompatWidthPixels;
/**
* The reported display height prior to any compatibility mode scaling
* being applied.
* @hide
*/
+ @UnsupportedAppUsage
public int noncompatHeightPixels;
/**
* The reported display density prior to any compatibility mode scaling
@@ -252,6 +256,7 @@
* being applied.
* @hide
*/
+ @UnsupportedAppUsage
public int noncompatDensityDpi;
/**
* The reported scaled density prior to any compatibility mode scaling
diff --git a/core/java/android/util/EventLog.java b/core/java/android/util/EventLog.java
index 92f218b..65d825a 100644
--- a/core/java/android/util/EventLog.java
+++ b/core/java/android/util/EventLog.java
@@ -17,6 +17,7 @@
package android.util;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import java.io.BufferedReader;
import java.io.FileReader;
@@ -82,6 +83,7 @@
private static final byte FLOAT_TYPE = 4;
/** @param data containing event, read from the system */
+ @UnsupportedAppUsage
/*package*/ Event(byte[] data) {
mBuffer = ByteBuffer.wrap(data);
mBuffer.order(ByteOrder.nativeOrder());
diff --git a/core/java/android/util/IconDrawableFactory.java b/core/java/android/util/IconDrawableFactory.java
index 6a6c2ce..d90b65e 100644
--- a/core/java/android/util/IconDrawableFactory.java
+++ b/core/java/android/util/IconDrawableFactory.java
@@ -15,6 +15,7 @@
*/
package android.util;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.UserIdInt;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -52,6 +53,7 @@
return appInfo.isInstantApp() || mUm.isManagedProfile(userId);
}
+ @UnsupportedAppUsage
public Drawable getBadgedIcon(ApplicationInfo appInfo) {
return getBadgedIcon(appInfo, UserHandle.getUserId(appInfo.uid));
}
@@ -60,6 +62,7 @@
return getBadgedIcon(appInfo, appInfo, userId);
}
+ @UnsupportedAppUsage
public Drawable getBadgedIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo,
@UserIdInt int userId) {
Drawable icon = mPm.loadUnbadgedItemIcon(itemInfo, appInfo);
@@ -107,6 +110,7 @@
return Resources.getSystem().getColor(resourceId, null);
}
+ @UnsupportedAppUsage
public static IconDrawableFactory newInstance(Context context) {
return new IconDrawableFactory(context, true);
}
diff --git a/core/java/android/util/LocalLog.java b/core/java/android/util/LocalLog.java
index eb84479f..adfa4fc 100644
--- a/core/java/android/util/LocalLog.java
+++ b/core/java/android/util/LocalLog.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.time.LocalDateTime;
@@ -31,11 +32,13 @@
private final Deque<String> mLog;
private final int mMaxLines;
+ @UnsupportedAppUsage
public LocalLog(int maxLines) {
mMaxLines = Math.max(0, maxLines);
mLog = new ArrayDeque<>(mMaxLines);
}
+ @UnsupportedAppUsage
public void log(String msg) {
if (mMaxLines <= 0) {
return;
@@ -50,6 +53,7 @@
mLog.add(logLine);
}
+ @UnsupportedAppUsage
public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
Iterator<String> itr = mLog.iterator();
while (itr.hasNext()) {
@@ -69,6 +73,7 @@
ReadOnlyLocalLog(LocalLog log) {
mLog = log;
}
+ @UnsupportedAppUsage
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
mLog.dump(fd, pw, args);
}
@@ -77,6 +82,7 @@
}
}
+ @UnsupportedAppUsage
public ReadOnlyLocalLog readOnlyLocalLog() {
return new ReadOnlyLocalLog(this);
}
diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java
index 1b063e1..50779031 100644
--- a/core/java/android/util/Log.java
+++ b/core/java/android/util/Log.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.DeadSystemException;
import com.android.internal.os.RuntimeInit;
@@ -302,6 +303,7 @@
return wtf(LOG_ID_MAIN, tag, msg, tr, false, false);
}
+ @UnsupportedAppUsage
static int wtf(int logId, @Nullable String tag, @Nullable String msg, @Nullable Throwable tr,
boolean localStack, boolean system) {
TerribleFailure what = new TerribleFailure(msg, tr);
@@ -381,6 +383,7 @@
/** @hide */ public static final int LOG_ID_CRASH = 4;
/** @hide */
+ @UnsupportedAppUsage
public static native int println_native(int bufID, int priority, String tag, String msg);
/**
diff --git a/core/java/android/util/LogWriter.java b/core/java/android/util/LogWriter.java
index ce30631..b062ace 100644
--- a/core/java/android/util/LogWriter.java
+++ b/core/java/android/util/LogWriter.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import java.io.Writer;
/** @hide */
@@ -37,6 +38,7 @@
* {@link android.util.Log#ERROR Log.ERROR}.
* @param tag A string tag to associate with each printed log statement.
*/
+ @UnsupportedAppUsage
public LogWriter(int priority, String tag) {
mPriority = priority;
mTag = tag;
diff --git a/core/java/android/util/LongArray.java b/core/java/android/util/LongArray.java
index 5ed1c8c..6f4aa52 100644
--- a/core/java/android/util/LongArray.java
+++ b/core/java/android/util/LongArray.java
@@ -17,6 +17,7 @@
package android.util;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.Preconditions;
@@ -44,6 +45,7 @@
/**
* Creates an empty LongArray with the default initial capacity.
*/
+ @UnsupportedAppUsage
public LongArray() {
this(10);
}
@@ -102,6 +104,7 @@
*
* @throws IndexOutOfBoundsException when index < 0 || index > size()
*/
+ @UnsupportedAppUsage
public void add(int index, long value) {
ensureCapacity(1);
int rightSegment = mSize - index;
@@ -165,6 +168,7 @@
/**
* Returns the value at the specified position in this array.
*/
+ @UnsupportedAppUsage
public long get(int index) {
ArrayUtils.checkBounds(mSize, index);
return mValues[index];
@@ -204,6 +208,7 @@
/**
* Returns the number of values in this array.
*/
+ @UnsupportedAppUsage
public int size() {
return mSize;
}
diff --git a/core/java/android/util/LongSparseLongArray.java b/core/java/android/util/LongSparseLongArray.java
index a361457..d5af922 100644
--- a/core/java/android/util/LongSparseLongArray.java
+++ b/core/java/android/util/LongSparseLongArray.java
@@ -19,6 +19,7 @@
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.GrowingArrayUtils;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.EmptyArray;
/**
@@ -45,8 +46,11 @@
* @hide
*/
public class LongSparseLongArray implements Cloneable {
+ @UnsupportedAppUsage
private long[] mKeys;
+ @UnsupportedAppUsage
private long[] mValues;
+ @UnsupportedAppUsage
private int mSize;
/**
diff --git a/core/java/android/util/LruCache.java b/core/java/android/util/LruCache.java
index 4015488..f04e7cb 100644
--- a/core/java/android/util/LruCache.java
+++ b/core/java/android/util/LruCache.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -60,6 +61,7 @@
* Support Package</a> for earlier releases.
*/
public class LruCache<K, V> {
+ @UnsupportedAppUsage
private final LinkedHashMap<K, V> map;
/** Size of this cache in units. Not necessarily the number of elements. */
diff --git a/core/java/android/util/MathUtils.java b/core/java/android/util/MathUtils.java
index 72865cc..37bb597 100644
--- a/core/java/android/util/MathUtils.java
+++ b/core/java/android/util/MathUtils.java
@@ -16,6 +16,8 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
+
/**
* A class that contains utility methods related to numbers.
*
@@ -28,10 +30,12 @@
private MathUtils() {
}
+ @UnsupportedAppUsage
public static float abs(float v) {
return v > 0 ? v : -v;
}
+ @UnsupportedAppUsage
public static int constrain(int amount, int low, int high) {
return amount < low ? low : (amount > high ? high : amount);
}
@@ -40,6 +44,7 @@
return amount < low ? low : (amount > high ? high : amount);
}
+ @UnsupportedAppUsage
public static float constrain(float amount, float low, float high) {
return amount < low ? low : (amount > high ? high : amount);
}
@@ -64,6 +69,7 @@
return a > b ? a : b;
}
+ @UnsupportedAppUsage
public static float max(int a, int b) {
return a > b ? a : b;
}
@@ -153,6 +159,7 @@
return (float) Math.tan(angle);
}
+ @UnsupportedAppUsage
public static float lerp(float start, float stop, float amount) {
return start + (stop - start) * amount;
}
diff --git a/core/java/android/util/MemoryIntArray.java b/core/java/android/util/MemoryIntArray.java
index bf33519..d5bec0f 100644
--- a/core/java/android/util/MemoryIntArray.java
+++ b/core/java/android/util/MemoryIntArray.java
@@ -20,9 +20,10 @@
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
-import libcore.io.IoUtils;
import dalvik.system.CloseGuard;
+import libcore.io.IoUtils;
+
import java.io.Closeable;
import java.io.IOException;
import java.util.UUID;
@@ -56,7 +57,7 @@
private final boolean mIsOwner;
private final long mMemoryAddr;
- private int mFd = -1;
+ private ParcelFileDescriptor mFd;
/**
* Creates a new instance.
@@ -71,8 +72,8 @@
}
mIsOwner = true;
final String name = UUID.randomUUID().toString();
- mFd = nativeCreate(name, size);
- mMemoryAddr = nativeOpen(mFd, mIsOwner);
+ mFd = ParcelFileDescriptor.adoptFd(nativeCreate(name, size));
+ mMemoryAddr = nativeOpen(mFd.getFd(), mIsOwner);
mCloseGuard.open("close");
}
@@ -82,8 +83,8 @@
if (pfd == null) {
throw new IOException("No backing file descriptor");
}
- mFd = pfd.detachFd();
- mMemoryAddr = nativeOpen(mFd, mIsOwner);
+ mFd = ParcelFileDescriptor.adoptFd(pfd.detachFd());
+ mMemoryAddr = nativeOpen(mFd.getFd(), mIsOwner);
mCloseGuard.open("close");
}
@@ -105,7 +106,7 @@
public int get(int index) throws IOException {
enforceNotClosed();
enforceValidIndex(index);
- return nativeGet(mFd, mMemoryAddr, index);
+ return nativeGet(mFd.getFd(), mMemoryAddr, index);
}
/**
@@ -121,7 +122,7 @@
enforceNotClosed();
enforceWritable();
enforceValidIndex(index);
- nativeSet(mFd, mMemoryAddr, index, value);
+ nativeSet(mFd.getFd(), mMemoryAddr, index, value);
}
/**
@@ -131,7 +132,7 @@
*/
public int size() throws IOException {
enforceNotClosed();
- return nativeSize(mFd);
+ return nativeSize(mFd.getFd());
}
/**
@@ -142,8 +143,9 @@
@Override
public void close() throws IOException {
if (!isClosed()) {
- nativeClose(mFd, mMemoryAddr, mIsOwner);
- mFd = -1;
+ nativeClose(mFd.getFd(), mMemoryAddr, mIsOwner);
+ mFd.close();
+ mFd = null;
mCloseGuard.close();
}
}
@@ -152,7 +154,7 @@
* @return Whether this array is closed and shouldn't be used.
*/
public boolean isClosed() {
- return mFd == -1;
+ return mFd == null;
}
@Override
@@ -175,13 +177,8 @@
@Override
public void writeToParcel(Parcel parcel, int flags) {
- ParcelFileDescriptor pfd = ParcelFileDescriptor.adoptFd(mFd);
- try {
- // Don't let writing to a parcel to close our fd - plz
- parcel.writeParcelable(pfd, flags & ~Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
- } finally {
- pfd.detachFd();
- }
+ // Don't let writing to a parcel to close our fd - plz
+ parcel.writeParcelable(mFd, flags & ~Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
}
@Override
@@ -195,13 +192,13 @@
if (getClass() != obj.getClass()) {
return false;
}
- MemoryIntArray other = (MemoryIntArray) obj;
- return mFd == other.mFd;
+
+ return false;
}
@Override
public int hashCode() {
- return mFd;
+ return mFd.hashCode();
}
private void enforceNotClosed() {
diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java
index 30d7b6c..da566c9 100644
--- a/core/java/android/util/NtpTrustedTime.java
+++ b/core/java/android/util/NtpTrustedTime.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Resources;
@@ -56,6 +57,7 @@
mTimeout = timeout;
}
+ @UnsupportedAppUsage
public static synchronized NtpTrustedTime getInstance(Context context) {
if (sSingleton == null) {
final Resources res = context.getResources();
@@ -80,6 +82,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean forceRefresh() {
// We can't do this at initialization time: ConnectivityService might not be running yet.
synchronized (this) {
@@ -126,6 +129,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean hasCache() {
return mHasCache;
}
@@ -149,6 +153,7 @@
}
@Override
+ @UnsupportedAppUsage
public long currentTimeMillis() {
if (!mHasCache) {
throw new IllegalStateException("Missing authoritative time source");
@@ -160,11 +165,13 @@
return mCachedNtpTime + getCacheAge();
}
+ @UnsupportedAppUsage
public long getCachedNtpTime() {
if (LOGD) Log.d(TAG, "getCachedNtpTime() cache hit");
return mCachedNtpTime;
}
+ @UnsupportedAppUsage
public long getCachedNtpTimeReference() {
return mCachedNtpElapsedRealtime;
}
diff --git a/core/java/android/util/PathParser.java b/core/java/android/util/PathParser.java
index 6f314d0..5342d5d 100644
--- a/core/java/android/util/PathParser.java
+++ b/core/java/android/util/PathParser.java
@@ -14,6 +14,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Path;
import dalvik.annotation.optimization.FastNative;
@@ -28,6 +29,7 @@
* @param pathString The string representing a path, the same as "d" string in svg file.
* @return the generated Path object.
*/
+ @UnsupportedAppUsage
public static Path createPathFromPathData(String pathString) {
if (pathString == null) {
throw new IllegalArgumentException("Path string can not be null.");
diff --git a/core/java/android/util/Pools.java b/core/java/android/util/Pools.java
index f0b7e01..e242fe5 100644
--- a/core/java/android/util/Pools.java
+++ b/core/java/android/util/Pools.java
@@ -16,6 +16,8 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Helper class for crating pools of objects. An example use looks like this:
* <pre>
@@ -52,6 +54,7 @@
/**
* @return An instance from the pool if such, null otherwise.
*/
+ @UnsupportedAppUsage
public T acquire();
/**
@@ -62,6 +65,7 @@
*
* @throws IllegalStateException If the instance is already in the pool.
*/
+ @UnsupportedAppUsage
public boolean release(T instance);
}
@@ -75,6 +79,7 @@
* @param <T> The pooled type.
*/
public static class SimplePool<T> implements Pool<T> {
+ @UnsupportedAppUsage
private final Object[] mPool;
private int mPoolSize;
@@ -86,6 +91,7 @@
*
* @throws IllegalArgumentException If the max pool size is less than zero.
*/
+ @UnsupportedAppUsage
public SimplePool(int maxPoolSize) {
if (maxPoolSize <= 0) {
throw new IllegalArgumentException("The max pool size must be > 0");
@@ -95,6 +101,7 @@
@Override
@SuppressWarnings("unchecked")
+ @UnsupportedAppUsage
public T acquire() {
if (mPoolSize > 0) {
final int lastPooledIndex = mPoolSize - 1;
@@ -107,6 +114,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean release(T instance) {
if (isInPool(instance)) {
throw new IllegalStateException("Already in the pool!");
@@ -151,11 +159,13 @@
}
/** @see #SynchronizedPool(int, Object) */
+ @UnsupportedAppUsage
public SynchronizedPool(int maxPoolSize) {
this(maxPoolSize, new Object());
}
@Override
+ @UnsupportedAppUsage
public T acquire() {
synchronized (mLock) {
return super.acquire();
@@ -163,6 +173,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean release(T element) {
synchronized (mLock) {
return super.release(element);
diff --git a/core/java/android/util/Rational.java b/core/java/android/util/Rational.java
index 80d26d9..39e8b14 100644
--- a/core/java/android/util/Rational.java
+++ b/core/java/android/util/Rational.java
@@ -17,6 +17,7 @@
import static com.android.internal.util.Preconditions.*;
+import android.annotation.UnsupportedAppUsage;
import java.io.IOException;
import java.io.InvalidObjectException;
@@ -74,7 +75,9 @@
* Do not change the order of these fields or add new instance fields to maintain the
* Serializable compatibility across API revisions.
*/
+ @UnsupportedAppUsage
private final int mNumerator;
+ @UnsupportedAppUsage
private final int mDenominator;
/**
diff --git a/core/java/android/util/RecurrenceRule.java b/core/java/android/util/RecurrenceRule.java
index 9c89876..209a5912 100644
--- a/core/java/android/util/RecurrenceRule.java
+++ b/core/java/android/util/RecurrenceRule.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -49,6 +50,7 @@
@VisibleForTesting
public static Clock sClock = Clock.systemDefaultZone();
+ @UnsupportedAppUsage
public final ZonedDateTime start;
public final ZonedDateTime end;
public final Period period;
@@ -65,6 +67,7 @@
}
@Deprecated
+ @UnsupportedAppUsage
public static RecurrenceRule buildRecurringMonthly(int dayOfMonth, ZoneId zone) {
// Assume we started last January, since it has all possible days
final ZonedDateTime now = ZonedDateTime.now(sClock).withZoneSameInstant(zone);
diff --git a/core/java/android/util/Singleton.java b/core/java/android/util/Singleton.java
index 8a38bdb..33135e6 100644
--- a/core/java/android/util/Singleton.java
+++ b/core/java/android/util/Singleton.java
@@ -16,6 +16,8 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Singleton helper class for lazily initialization.
*
@@ -24,10 +26,12 @@
* @hide
*/
public abstract class Singleton<T> {
+ @UnsupportedAppUsage
private T mInstance;
protected abstract T create();
+ @UnsupportedAppUsage
public final T get() {
synchronized (this) {
if (mInstance == null) {
diff --git a/core/java/android/util/Slog.java b/core/java/android/util/Slog.java
index 58a2703..c9fc3f2 100644
--- a/core/java/android/util/Slog.java
+++ b/core/java/android/util/Slog.java
@@ -16,6 +16,8 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
*/
@@ -24,6 +26,7 @@
private Slog() {
}
+ @UnsupportedAppUsage
public static int v(String tag, String msg) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.VERBOSE, tag, msg);
}
@@ -33,15 +36,18 @@
msg + '\n' + Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int d(String tag, String msg) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.DEBUG, tag, msg);
}
+ @UnsupportedAppUsage
public static int d(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.DEBUG, tag,
msg + '\n' + Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int i(String tag, String msg) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.INFO, tag, msg);
}
@@ -51,10 +57,12 @@
msg + '\n' + Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int w(String tag, String msg) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.WARN, tag, msg);
}
+ @UnsupportedAppUsage
public static int w(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.WARN, tag,
msg + '\n' + Log.getStackTraceString(tr));
@@ -64,10 +72,12 @@
return Log.println_native(Log.LOG_ID_SYSTEM, Log.WARN, tag, Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int e(String tag, String msg) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.ERROR, tag, msg);
}
+ @UnsupportedAppUsage
public static int e(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_SYSTEM, Log.ERROR, tag,
msg + '\n' + Log.getStackTraceString(tr));
@@ -78,6 +88,7 @@
* will always be handled asynchronously. Primarily for use by coding running within
* the system process.
*/
+ @UnsupportedAppUsage
public static int wtf(String tag, String msg) {
return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, null, false, true);
}
@@ -94,6 +105,7 @@
* will always be handled asynchronously. Primarily for use by coding running within
* the system process.
*/
+ @UnsupportedAppUsage
public static int wtfStack(String tag, String msg) {
return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, null, true, true);
}
@@ -112,10 +124,12 @@
* and will always be handled asynchronously. Primarily for use by coding running within
* the system process.
*/
+ @UnsupportedAppUsage
public static int wtf(String tag, String msg, Throwable tr) {
return Log.wtf(Log.LOG_ID_SYSTEM, tag, msg, tr, false, true);
}
+ @UnsupportedAppUsage
public static int println(int priority, String tag, String msg) {
return Log.println_native(Log.LOG_ID_SYSTEM, priority, tag, msg);
}
diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java
index af18caa..aa5ca35 100644
--- a/core/java/android/util/SparseArray.java
+++ b/core/java/android/util/SparseArray.java
@@ -19,6 +19,7 @@
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.GrowingArrayUtils;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.EmptyArray;
/**
@@ -55,8 +56,11 @@
private static final Object DELETED = new Object();
private boolean mGarbage = false;
+ @UnsupportedAppUsage
private int[] mKeys;
+ @UnsupportedAppUsage
private Object[] mValues;
+ @UnsupportedAppUsage
private int mSize;
/**
diff --git a/core/java/android/util/SparseBooleanArray.java b/core/java/android/util/SparseBooleanArray.java
index 68d347c..9c6b969 100644
--- a/core/java/android/util/SparseBooleanArray.java
+++ b/core/java/android/util/SparseBooleanArray.java
@@ -19,6 +19,7 @@
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.GrowingArrayUtils;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.EmptyArray;
/**
@@ -303,7 +304,10 @@
return buffer.toString();
}
+ @UnsupportedAppUsage
private int[] mKeys;
+ @UnsupportedAppUsage
private boolean[] mValues;
+ @UnsupportedAppUsage
private int mSize;
}
diff --git a/core/java/android/util/SparseIntArray.java b/core/java/android/util/SparseIntArray.java
index 3b832dd..1954753 100644
--- a/core/java/android/util/SparseIntArray.java
+++ b/core/java/android/util/SparseIntArray.java
@@ -21,6 +21,7 @@
import java.util.Arrays;
+import android.annotation.UnsupportedAppUsage;
import libcore.util.EmptyArray;
/**
@@ -45,8 +46,11 @@
* order in the case of <code>valueAt(int)</code>.</p>
*/
public class SparseIntArray implements Cloneable {
+ @UnsupportedAppUsage
private int[] mKeys;
+ @UnsupportedAppUsage
private int[] mValues;
+ @UnsupportedAppUsage
private int mSize;
/**
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 05b613c..0e25038 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -16,6 +16,7 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
import android.os.SystemClock;
import libcore.util.TimeZoneFinder;
@@ -248,6 +249,7 @@
}
/** @hide Just for debugging; not internationalized. */
+ @UnsupportedAppUsage
public static void formatDuration(long duration, PrintWriter pw, int fieldLen) {
synchronized (sFormatSync) {
int len = formatDurationLocked(duration, fieldLen);
@@ -264,6 +266,7 @@
}
/** @hide Just for debugging; not internationalized. */
+ @UnsupportedAppUsage
public static void formatDuration(long duration, PrintWriter pw) {
formatDuration(duration, pw, 0);
}
@@ -297,6 +300,7 @@
* @return String representation of the time.
* @hide
*/
+ @UnsupportedAppUsage
public static String logTimeOfDay(long millis) {
Calendar c = Calendar.getInstance();
if (millis >= 0) {
diff --git a/core/java/android/util/TrustedTime.java b/core/java/android/util/TrustedTime.java
index 263d782..c78665d 100644
--- a/core/java/android/util/TrustedTime.java
+++ b/core/java/android/util/TrustedTime.java
@@ -16,6 +16,8 @@
package android.util;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Interface that provides trusted time information, possibly coming from an NTP
* server. Implementations may cache answers until {@link #forceRefresh()}.
@@ -27,17 +29,20 @@
* Force update with an external trusted time source, returning {@code true}
* when successful.
*/
+ @UnsupportedAppUsage
public boolean forceRefresh();
/**
* Check if this instance has cached a response from a trusted time source.
*/
+ @UnsupportedAppUsage
public boolean hasCache();
/**
* Return time since last trusted time source contact, or
* {@link Long#MAX_VALUE} if never contacted.
*/
+ @UnsupportedAppUsage
public long getCacheAge();
/**
@@ -51,5 +56,6 @@
* Return current time similar to {@link System#currentTimeMillis()},
* possibly using a cached authoritative time source.
*/
+ @UnsupportedAppUsage
public long currentTimeMillis();
}
diff --git a/core/java/android/view/AccessibilityIterators.java b/core/java/android/view/AccessibilityIterators.java
index ca54bef..9f7560c 100644
--- a/core/java/android/view/AccessibilityIterators.java
+++ b/core/java/android/view/AccessibilityIterators.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.Configuration;
import java.text.BreakIterator;
@@ -45,6 +46,7 @@
*/
public static abstract class AbstractTextSegmentIterator implements TextSegmentIterator {
+ @UnsupportedAppUsage
protected String mText;
private final int[] mSegment = new int[2];
diff --git a/core/java/android/view/ActionProvider.java b/core/java/android/view/ActionProvider.java
index 353b4c2..cd7e67e 100644
--- a/core/java/android/view/ActionProvider.java
+++ b/core/java/android/view/ActionProvider.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.Log;
@@ -218,6 +219,7 @@
/**
* @hide Internal use only
*/
+ @UnsupportedAppUsage
public void setSubUiVisibilityListener(SubUiVisibilityListener listener) {
mSubUiVisibilityListener = listener;
}
@@ -240,6 +242,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void reset() {
mVisibilityListener = null;
mSubUiVisibilityListener = null;
diff --git a/core/java/android/view/AppTransitionAnimationSpec.java b/core/java/android/view/AppTransitionAnimationSpec.java
index 86a5fb7..6585e40 100644
--- a/core/java/android/view/AppTransitionAnimationSpec.java
+++ b/core/java/android/view/AppTransitionAnimationSpec.java
@@ -1,5 +1,6 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.GraphicBuffer;
import android.graphics.Rect;
import android.os.Parcel;
@@ -18,6 +19,7 @@
public final GraphicBuffer buffer;
public final Rect rect;
+ @UnsupportedAppUsage
public AppTransitionAnimationSpec(int taskId, GraphicBuffer buffer, Rect rect) {
this.taskId = taskId;
this.rect = rect;
diff --git a/core/java/android/view/BatchedInputEventReceiver.java b/core/java/android/view/BatchedInputEventReceiver.java
index b1d28e0..61ccac9 100644
--- a/core/java/android/view/BatchedInputEventReceiver.java
+++ b/core/java/android/view/BatchedInputEventReceiver.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
/**
@@ -26,6 +27,7 @@
Choreographer mChoreographer;
private boolean mBatchedInputScheduled;
+ @UnsupportedAppUsage
public BatchedInputEventReceiver(
InputChannel inputChannel, Looper looper, Choreographer choreographer) {
super(inputChannel, looper);
diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java
index f8cfd0d..ce16ffc 100644
--- a/core/java/android/view/Choreographer.java
+++ b/core/java/android/view/Choreographer.java
@@ -20,6 +20,7 @@
import static android.view.DisplayEventReceiver.VSYNC_SOURCE_SURFACE_FLINGER;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.display.DisplayManagerGlobal;
import android.os.Handler;
import android.os.Looper;
@@ -130,6 +131,7 @@
};
// Enable/disable vsync for animations and drawing.
+ @UnsupportedAppUsage
private static final boolean USE_VSYNC = SystemProperties.getBoolean(
"debug.choreographer.vsync", true);
@@ -151,6 +153,7 @@
public String toString() { return "FRAME_CALLBACK_TOKEN"; }
};
+ @UnsupportedAppUsage
private final Object mLock = new Object();
private final Looper mLooper;
@@ -159,15 +162,19 @@
// The display event receiver can only be accessed by the looper thread to which
// it is attached. We take care to ensure that we post message to the looper
// if appropriate when interacting with the display event receiver.
+ @UnsupportedAppUsage
private final FrameDisplayEventReceiver mDisplayEventReceiver;
private CallbackRecord mCallbackPool;
+ @UnsupportedAppUsage
private final CallbackQueue[] mCallbackQueues;
private boolean mFrameScheduled;
private boolean mCallbacksRunning;
+ @UnsupportedAppUsage
private long mLastFrameTimeNanos;
+ @UnsupportedAppUsage
private long mFrameIntervalNanos;
private boolean mDebugPrintNextFrameTimeDelta;
private int mFPSDivisor = 1;
@@ -265,6 +272,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static Choreographer getSfInstance() {
return sSfThreadInstance.get();
}
@@ -556,6 +564,7 @@
* @throws IllegalStateException if no frame is in progress.
* @hide
*/
+ @UnsupportedAppUsage
public long getFrameTime() {
return getFrameTimeNanos() / TimeUtils.NANOS_PER_MS;
}
@@ -568,6 +577,7 @@
* @throws IllegalStateException if no frame is in progress.
* @hide
*/
+ @UnsupportedAppUsage
public long getFrameTimeNanos() {
synchronized (mLock) {
if (!mCallbacksRunning) {
@@ -627,6 +637,7 @@
ThreadedRenderer.setFPSDivisor(divisor);
}
+ @UnsupportedAppUsage
void doFrame(long frameTimeNanos, int frame) {
final long startNanos;
synchronized (mLock) {
@@ -792,6 +803,7 @@
}
}
+ @UnsupportedAppUsage
private void scheduleVsyncLocked() {
mDisplayEventReceiver.scheduleVsync();
}
@@ -942,6 +954,7 @@
public Object action; // Runnable or FrameCallback
public Object token;
+ @UnsupportedAppUsage
public void run(long frameTimeNanos) {
if (token == FRAME_CALLBACK_TOKEN) {
((FrameCallback)action).doFrame(frameTimeNanos);
@@ -978,6 +991,7 @@
return callbacks;
}
+ @UnsupportedAppUsage
public void addCallbackLocked(long dueTime, Object action, Object token) {
CallbackRecord callback = obtainCallbackLocked(dueTime, action, token);
CallbackRecord entry = mHead;
diff --git a/core/java/android/view/ContextThemeWrapper.java b/core/java/android/view/ContextThemeWrapper.java
index d3cc175..c77500a 100644
--- a/core/java/android/view/ContextThemeWrapper.java
+++ b/core/java/android/view/ContextThemeWrapper.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.AssetManager;
@@ -28,10 +29,14 @@
* wrapped context.
*/
public class ContextThemeWrapper extends ContextWrapper {
+ @UnsupportedAppUsage
private int mThemeResource;
+ @UnsupportedAppUsage
private Resources.Theme mTheme;
+ @UnsupportedAppUsage
private LayoutInflater mInflater;
private Configuration mOverrideConfiguration;
+ @UnsupportedAppUsage
private Resources mResources;
/**
@@ -143,6 +148,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public int getThemeResId() {
return mThemeResource;
}
@@ -186,6 +192,7 @@
theme.applyStyle(resId, true);
}
+ @UnsupportedAppUsage
private void initializeTheme() {
final boolean first = mTheme == null;
if (first) {
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 20f8066..4d96fc3 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -21,6 +21,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
+import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
@@ -79,6 +80,7 @@
private final Resources mResources;
private DisplayAdjustments mDisplayAdjustments;
+ @UnsupportedAppUsage
private DisplayInfo mDisplayInfo; // never null
private boolean mIsValid;
@@ -231,6 +233,7 @@
* Display type: Unknown display type.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_UNKNOWN = 0;
/**
@@ -243,12 +246,14 @@
* Display type: HDMI display.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_HDMI = 2;
/**
* Display type: WiFi display.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_WIFI = 3;
/**
@@ -261,6 +266,7 @@
* Display type: Virtual display.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_VIRTUAL = 5;
/**
@@ -459,6 +465,7 @@
* @return True if the display is still valid.
* @hide
*/
+ @UnsupportedAppUsage
public boolean getDisplayInfo(DisplayInfo outDisplayInfo) {
synchronized (this) {
updateDisplayInfoLocked();
@@ -506,6 +513,7 @@
* @see #TYPE_VIRTUAL
* @hide
*/
+ @UnsupportedAppUsage
public int getType() {
return mType;
}
@@ -517,6 +525,7 @@
* @return The display address.
* @hide
*/
+ @UnsupportedAppUsage
public String getAddress() {
return mAddress;
}
@@ -543,6 +552,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getOwnerPackageName() {
return mOwnerPackageName;
}
@@ -553,6 +563,7 @@
* @return The display adjustments holder, or null if none is required.
* @hide
*/
+ @UnsupportedAppUsage
public DisplayAdjustments getDisplayAdjustments() {
if (mResources != null) {
final DisplayAdjustments currentAdjustements = mResources.getDisplayAdjustments();
@@ -676,6 +687,7 @@
* mostly for wallpapers.
* @hide
*/
+ @UnsupportedAppUsage
public int getMaximumSizeDimension() {
synchronized (this) {
updateDisplayInfoLocked();
@@ -1184,6 +1196,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Mode(int modeId, int width, int height, float refreshRate) {
mModeId = modeId;
mWidth = width;
@@ -1360,6 +1373,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public HdrCapabilities(int[] supportedHdrTypes, float maxLuminance,
float maxAverageLuminance, float minLuminance) {
mSupportedHdrTypes = supportedHdrTypes;
diff --git a/core/java/android/view/DisplayAdjustments.java b/core/java/android/view/DisplayAdjustments.java
index 790029b..da4d92fa 100644
--- a/core/java/android/view/DisplayAdjustments.java
+++ b/core/java/android/view/DisplayAdjustments.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
@@ -28,6 +29,7 @@
private volatile CompatibilityInfo mCompatInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
private Configuration mConfiguration;
+ @UnsupportedAppUsage
public DisplayAdjustments() {
}
@@ -42,6 +44,7 @@
? daj.mConfiguration : Configuration.EMPTY);
}
+ @UnsupportedAppUsage
public void setCompatibilityInfo(CompatibilityInfo compatInfo) {
if (this == DEFAULT_DISPLAY_ADJUSTMENTS) {
throw new IllegalArgumentException(
@@ -67,6 +70,7 @@
mConfiguration.setTo(configuration != null ? configuration : Configuration.EMPTY);
}
+ @UnsupportedAppUsage
public Configuration getConfiguration() {
return mConfiguration;
}
diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java
index 496bc9f..5f80d31 100644
--- a/core/java/android/view/DisplayCutout.java
+++ b/core/java/android/view/DisplayCutout.java
@@ -325,6 +325,7 @@
*
* @hide
*/
+ @VisibleForTesting
public static DisplayCutout fromBoundingRect(int left, int top, int right, int bottom) {
Region r = Region.obtain();
r.set(left, top, right, bottom);
@@ -422,8 +423,11 @@
m.postTranslate(offsetX, 0);
p.transform(m);
- addToRegion(p, r);
+ final Rect tmpRect = new Rect();
+ toRectAndAddToRegion(p, r, tmpRect);
+ final int topInset = tmpRect.bottom;
+ final int bottomInset;
if (bottomSpec != null) {
final Path bottomPath;
try {
@@ -436,10 +440,17 @@
m.postTranslate(0, displayHeight);
bottomPath.transform(m);
p.addPath(bottomPath);
- addToRegion(bottomPath, r);
+ toRectAndAddToRegion(bottomPath, r, tmpRect);
+ bottomInset = displayHeight - tmpRect.top;
+ } else {
+ bottomInset = 0;
}
- final Pair<Path, DisplayCutout> result = new Pair<>(p, fromBounds(r));
+ // Reuse tmpRect as the inset rect we store into the DisplayCutout instance.
+ tmpRect.set(0, topInset, 0, bottomInset);
+ final DisplayCutout cutout = new DisplayCutout(tmpRect, r, false /* copyArguments */);
+
+ final Pair<Path, DisplayCutout> result = new Pair<>(p, cutout);
synchronized (CACHE_LOCK) {
sCachedSpec = spec;
sCachedDisplayWidth = displayWidth;
@@ -450,12 +461,11 @@
return result;
}
- private static void addToRegion(Path p, Region r) {
+ private static void toRectAndAddToRegion(Path p, Region inoutRegion, Rect inoutRect) {
final RectF rectF = new RectF();
- final Rect rect = new Rect();
p.computeBounds(rectF, false /* unused */);
- rectF.round(rect);
- r.op(rect, Op.UNION);
+ rectF.round(inoutRect);
+ inoutRegion.op(inoutRect, Op.UNION);
}
private static Region boundingRectsToRegion(List<Rect> rects) {
diff --git a/core/java/android/view/DisplayEventReceiver.java b/core/java/android/view/DisplayEventReceiver.java
index cb98c88..edd3f1a 100644
--- a/core/java/android/view/DisplayEventReceiver.java
+++ b/core/java/android/view/DisplayEventReceiver.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
@@ -56,6 +57,7 @@
private final CloseGuard mCloseGuard = CloseGuard.get();
+ @UnsupportedAppUsage
private long mReceiverPtr;
// We keep a reference message queue object here so that it is not
@@ -73,6 +75,7 @@
*
* @param looper The looper to use when invoking callbacks.
*/
+ @UnsupportedAppUsage
public DisplayEventReceiver(Looper looper) {
this(looper, VSYNC_SOURCE_APP);
}
@@ -137,6 +140,7 @@
* {@link SurfaceControl#BUILT_IN_DISPLAY_ID_MAIN}.
* @param frame The frame number. Increases by one for each vertical sync interval.
*/
+ @UnsupportedAppUsage
public void onVsync(long timestampNanos, int builtInDisplayId, int frame) {
}
@@ -149,6 +153,7 @@
* {@link SurfaceControl#BUILT_IN_DISPLAY_ID_HDMI}.
* @param connected True if the display is connected, false if it disconnected.
*/
+ @UnsupportedAppUsage
public void onHotplug(long timestampNanos, int builtInDisplayId, boolean connected) {
}
@@ -156,6 +161,7 @@
* Schedules a single vertical sync pulse to be delivered when the next
* display frame begins.
*/
+ @UnsupportedAppUsage
public void scheduleVsync() {
if (mReceiverPtr == 0) {
Log.w(TAG, "Attempted to schedule a vertical sync pulse but the display event "
@@ -167,12 +173,14 @@
// Called from native code.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void dispatchVsync(long timestampNanos, int builtInDisplayId, int frame) {
onVsync(timestampNanos, builtInDisplayId, frame);
}
// Called from native code.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void dispatchHotplug(long timestampNanos, int builtInDisplayId, boolean connected) {
onHotplug(timestampNanos, builtInDisplayId, connected);
}
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index 2421ba4..34bcbdd 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -23,6 +23,7 @@
import static android.view.DisplayInfoProto.NAME;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.graphics.Rect;
@@ -116,6 +117,7 @@
* Represents the usable size of the display which may be smaller than the
* physical size when the system is emulating a smaller display.
*/
+ @UnsupportedAppUsage
public int logicalWidth;
/**
@@ -123,6 +125,7 @@
* Represents the usable size of the display which may be smaller than the
* physical size when the system is emulating a smaller display.
*/
+ @UnsupportedAppUsage
public int logicalHeight;
/**
@@ -155,6 +158,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public DisplayCutout displayCutout;
/**
@@ -168,6 +172,7 @@
* </p>
*/
@Surface.Rotation
+ @UnsupportedAppUsage
public int rotation;
/**
@@ -275,6 +280,7 @@
}
};
+ @UnsupportedAppUsage
public DisplayInfo() {
}
diff --git a/core/java/android/view/DisplayListCanvas.java b/core/java/android/view/DisplayListCanvas.java
index df4d5c4..4b946d7 100644
--- a/core/java/android/view/DisplayListCanvas.java
+++ b/core/java/android/view/DisplayListCanvas.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;
import android.graphics.CanvasProperty;
import android.graphics.Paint;
@@ -39,7 +40,7 @@
// view hierarchy because display lists are generated recursively.
private static final int POOL_LIMIT = 25;
- private static final int MAX_BITMAP_SIZE = 100 * 1024 * 1024; // 100 MB
+ public static final int MAX_BITMAP_SIZE = 100 * 1024 * 1024; // 100 MB
private static final SynchronizedPool<DisplayListCanvas> sPool =
new SynchronizedPool<>(POOL_LIMIT);
@@ -155,6 +156,7 @@
*
* @param drawGLFunction A native function pointer
*/
+ @UnsupportedAppUsage
public void callDrawGLFunction2(long drawGLFunction) {
nCallDrawGLFunction(mNativeCanvasWrapper, drawGLFunction, null);
}
@@ -171,6 +173,7 @@
* any references to the functor, just that the reference from this specific
* canvas's display list has been released.
*/
+ @UnsupportedAppUsage
public void drawGLFunctor2(long drawGLFunctor, @Nullable Runnable releasedCallback) {
nCallDrawGLFunction(mNativeCanvasWrapper, drawGLFunctor, releasedCallback);
}
@@ -184,6 +187,7 @@
*
* @param renderNode The RenderNode to draw.
*/
+ @UnsupportedAppUsage
public void drawRenderNode(RenderNode renderNode) {
nDrawRenderNode(mNativeCanvasWrapper, renderNode.mNativeRenderNode);
}
@@ -205,6 +209,7 @@
// Drawing
///////////////////////////////////////////////////////////////////////////
+ @UnsupportedAppUsage
public void drawCircle(CanvasProperty<Float> cx, CanvasProperty<Float> cy,
CanvasProperty<Float> radius, CanvasProperty<Paint> paint) {
nDrawCircle(mNativeCanvasWrapper, cx.getNativeContainer(), cy.getNativeContainer(),
diff --git a/core/java/android/view/DragEvent.java b/core/java/android/view/DragEvent.java
index 2c9f871..bd4dda2 100644
--- a/core/java/android/view/DragEvent.java
+++ b/core/java/android/view/DragEvent.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.ClipDescription;
import android.os.Parcel;
@@ -129,7 +130,9 @@
int mAction;
float mX, mY;
+ @UnsupportedAppUsage
ClipDescription mClipDescription;
+ @UnsupportedAppUsage
ClipData mClipData;
IDragAndDropPermissions mDragAndDropPermissions;
@@ -313,6 +316,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static DragEvent obtain(DragEvent source) {
return obtain(source.mAction, source.mX, source.mY, source.mLocalState,
source.mClipDescription, source.mClipData, source.mDragAndDropPermissions,
diff --git a/core/java/android/view/FrameMetrics.java b/core/java/android/view/FrameMetrics.java
index 358a2d1..dcdef3e 100644
--- a/core/java/android/view/FrameMetrics.java
+++ b/core/java/android/view/FrameMetrics.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -249,6 +250,7 @@
Index.INTENDED_VSYNC, Index.FRAME_COMPLETED,
};
+ @UnsupportedAppUsage
/* package */ final long[] mTimingData;
/**
diff --git a/core/java/android/view/FrameMetricsObserver.java b/core/java/android/view/FrameMetricsObserver.java
index 9e81de0..597089b 100644
--- a/core/java/android/view/FrameMetricsObserver.java
+++ b/core/java/android/view/FrameMetricsObserver.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
import android.os.MessageQueue;
@@ -31,10 +32,12 @@
* @hide
*/
public class FrameMetricsObserver {
+ @UnsupportedAppUsage
private MessageQueue mMessageQueue;
private WeakReference<Window> mWindow;
+ @UnsupportedAppUsage
private FrameMetrics mFrameMetrics;
/* package */ Window.OnFrameMetricsAvailableListener mListener;
@@ -63,6 +66,7 @@
// Called by native on the provided Handler
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void notifyDataAvailable(int dropCount) {
final Window window = mWindow.get();
if (window != null) {
diff --git a/core/java/android/view/GestureDetector.java b/core/java/android/view/GestureDetector.java
index bc2953e..3ee5f1f 100644
--- a/core/java/android/view/GestureDetector.java
+++ b/core/java/android/view/GestureDetector.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
@@ -216,12 +217,15 @@
}
}
+ @UnsupportedAppUsage
private int mTouchSlopSquare;
private int mDoubleTapTouchSlopSquare;
private int mDoubleTapSlopSquare;
+ @UnsupportedAppUsage
private int mMinimumFlingVelocity;
private int mMaximumFlingVelocity;
+ @UnsupportedAppUsage
private static final int LONGPRESS_TIMEOUT = ViewConfiguration.getLongPressTimeout();
private static final int TAP_TIMEOUT = ViewConfiguration.getTapTimeout();
private static final int DOUBLE_TAP_TIMEOUT = ViewConfiguration.getDoubleTapTimeout();
@@ -233,6 +237,7 @@
private static final int TAP = 3;
private final Handler mHandler;
+ @UnsupportedAppUsage
private final OnGestureListener mListener;
private OnDoubleTapListener mDoubleTapListener;
private OnContextClickListener mContextClickListener;
@@ -241,6 +246,7 @@
private boolean mDeferConfirmSingleTap;
private boolean mInLongPress;
private boolean mInContextClick;
+ @UnsupportedAppUsage
private boolean mAlwaysInTapRegion;
private boolean mAlwaysInBiggerTapRegion;
private boolean mIgnoreNextUpEvent;
diff --git a/core/java/android/view/GhostView.java b/core/java/android/view/GhostView.java
index d1b96ba..fa7b067 100644
--- a/core/java/android/view/GhostView.java
+++ b/core/java/android/view/GhostView.java
@@ -15,6 +15,7 @@
*/
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.widget.FrameLayout;
@@ -91,6 +92,7 @@
host.transformMatrixToLocal(matrix);
}
+ @UnsupportedAppUsage
public static GhostView addGhost(View view, ViewGroup viewGroup, Matrix matrix) {
if (!(view.getParent() instanceof ViewGroup)) {
throw new IllegalArgumentException("Ghosted views must be parented by a ViewGroup");
@@ -131,10 +133,12 @@
return ghostView;
}
+ @UnsupportedAppUsage
public static GhostView addGhost(View view, ViewGroup viewGroup) {
return addGhost(view, viewGroup, null);
}
+ @UnsupportedAppUsage
public static void removeGhost(View view) {
GhostView ghostView = view.mGhostView;
if (ghostView != null) {
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 131fe13..0398b8f 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -223,10 +223,12 @@
/**
* Determine the preferred edge of the screen to pin the compact options menu against.
- * @return a Gravity value for the options menu panel
+ *
+ * @param displayId Id of the display where the menu window currently resides.
+ * @return a Gravity value for the options menu panel.
* @hide
*/
- int getPreferredOptionsPanelGravity();
+ int getPreferredOptionsPanelGravity(int displayId);
/**
* Lock the device orientation to the specified rotation, or to the
@@ -421,8 +423,8 @@
boolean isWindowTraceEnabled();
/**
- * Requests that the WindowManager sends WindowManagerPolicy#ACTION_USER_ACTIVITY_NOTIFICATION
- * on the next user activity.
+ * Requests that the WindowManager sends
+ * WindowManagerPolicyConstants#ACTION_USER_ACTIVITY_NOTIFICATION on the next user activity.
*/
void requestUserActivityNotification();
diff --git a/core/java/android/view/InputChannel.java b/core/java/android/view/InputChannel.java
index de195ae..b2dd6ac 100644
--- a/core/java/android/view/InputChannel.java
+++ b/core/java/android/view/InputChannel.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Slog;
@@ -32,6 +33,7 @@
private static final boolean DEBUG = false;
+ @UnsupportedAppUsage
public static final Parcelable.Creator<InputChannel> CREATOR
= new Parcelable.Creator<InputChannel>() {
public InputChannel createFromParcel(Parcel source) {
@@ -46,6 +48,7 @@
};
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mPtr; // used by native code
private static native InputChannel[] nativeOpenInputChannelPair(String name);
@@ -63,6 +66,7 @@
* It can be initialized by reading from a Parcel or by transferring the state of
* another input channel into this one.
*/
+ @UnsupportedAppUsage
public InputChannel() {
}
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index 8405d9e..7295259 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -18,6 +18,7 @@
import android.annotation.RequiresPermission;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.hardware.input.InputDeviceIdentifier;
import android.hardware.input.InputManager;
@@ -53,6 +54,7 @@
private final int mProductId;
private final String mDescriptor;
private final InputDeviceIdentifier mIdentifier;
+ @UnsupportedAppUsage
private final boolean mIsExternal;
private final int mSources;
private final int mKeyboardType;
@@ -405,6 +407,7 @@
};
// Called by native code.
+ @UnsupportedAppUsage
private InputDevice(int id, int generation, int controllerNumber, String name, int vendorId,
int productId, String descriptor, boolean isExternal, int sources, int keyboardType,
KeyCharacterMap keyCharacterMap, boolean hasVibrator, boolean hasMicrophone,
@@ -608,6 +611,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isExternal() {
return mIsExternal;
}
@@ -739,6 +743,7 @@
}
// Called from native code.
+ @UnsupportedAppUsage
private void addMotionRange(int axis, int source,
float min, float max, float flat, float fuzz, float resolution) {
mMotionRanges.add(new MotionRange(axis, source, min, max, flat, fuzz, resolution));
diff --git a/core/java/android/view/InputEvent.java b/core/java/android/view/InputEvent.java
index c257364..c2848d4 100644
--- a/core/java/android/view/InputEvent.java
+++ b/core/java/android/view/InputEvent.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -227,6 +228,7 @@
* @return The unique sequence number of this event.
* @hide
*/
+ @UnsupportedAppUsage
public int getSequenceNumber() {
return mSeq;
}
diff --git a/core/java/android/view/InputEventConsistencyVerifier.java b/core/java/android/view/InputEventConsistencyVerifier.java
index 7e8ec04..e4b1a8d 100644
--- a/core/java/android/view/InputEventConsistencyVerifier.java
+++ b/core/java/android/view/InputEventConsistencyVerifier.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.util.Log;
@@ -115,6 +116,7 @@
* @param caller The object to which the verifier is attached.
* @param flags Flags to the verifier, or 0 if none.
*/
+ @UnsupportedAppUsage
public InputEventConsistencyVerifier(Object caller, int flags) {
this(caller, flags, null);
}
@@ -135,6 +137,7 @@
* Determines whether the instrumentation should be enabled.
* @return True if it should be enabled.
*/
+ @UnsupportedAppUsage
public static boolean isInstrumentationEnabled() {
return IS_ENG_BUILD;
}
@@ -319,6 +322,7 @@
* where a subclass dispatching method delegates to its superclass's dispatching method
* and both dispatching methods call into the consistency verifier.
*/
+ @UnsupportedAppUsage
public void onTouchEvent(MotionEvent event, int nestingLevel) {
if (!startEvent(event, nestingLevel, EVENT_TYPE_TOUCH)) {
return;
@@ -579,6 +583,7 @@
* where a subclass dispatching method delegates to its superclass's dispatching method
* and both dispatching methods call into the consistency verifier.
*/
+ @UnsupportedAppUsage
public void onUnhandledEvent(InputEvent event, int nestingLevel) {
if (nestingLevel != mLastNestingLevel) {
return;
diff --git a/core/java/android/view/InputEventReceiver.java b/core/java/android/view/InputEventReceiver.java
index 20ab539..7260a65 100644
--- a/core/java/android/view/InputEventReceiver.java
+++ b/core/java/android/view/InputEventReceiver.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
@@ -113,6 +114,7 @@
*
* @param event The input event that was received.
*/
+ @UnsupportedAppUsage
public void onInputEvent(InputEvent event) {
finishInputEvent(event, false);
}
@@ -180,6 +182,7 @@
// Called from native code.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void dispatchInputEvent(int seq, InputEvent event) {
mSeqMap.put(event.getSequenceNumber(), seq);
onInputEvent(event);
@@ -187,6 +190,7 @@
// Called from native code.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void dispatchBatchedInputEventPending() {
onBatchedInputEventPending();
}
diff --git a/core/java/android/view/InputEventSender.java b/core/java/android/view/InputEventSender.java
index b25fb65..c5f4c23 100644
--- a/core/java/android/view/InputEventSender.java
+++ b/core/java/android/view/InputEventSender.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
@@ -137,6 +138,7 @@
// Called from native code.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void dispatchInputEventFinished(int seq, boolean handled) {
onInputEventFinished(seq, handled);
}
diff --git a/core/java/android/view/InputFilter.java b/core/java/android/view/InputFilter.java
index 0ab4dc0..3aaf31e 100644
--- a/core/java/android/view/InputFilter.java
+++ b/core/java/android/view/InputFilter.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -117,6 +118,7 @@
*
* @param looper The looper to run callbacks on.
*/
+ @UnsupportedAppUsage
public InputFilter(Looper looper) {
mH = new H(looper);
}
@@ -186,6 +188,7 @@
* @param event The input event that was received.
* @param policyFlags The input event policy flags.
*/
+ @UnsupportedAppUsage
public void onInputEvent(InputEvent event, int policyFlags) {
sendInputEvent(event, policyFlags);
}
diff --git a/core/java/android/view/InputQueue.java b/core/java/android/view/InputQueue.java
index 582ae79..69ebc46 100644
--- a/core/java/android/view/InputQueue.java
+++ b/core/java/android/view/InputQueue.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.LongSparseArray;
@@ -100,6 +101,7 @@
mActiveEventArray.put(id, event);
}
+ @UnsupportedAppUsage
private void finishInputEvent(long id, boolean handled) {
int index = mActiveEventArray.indexOfKey(id);
if (index >= 0) {
diff --git a/core/java/android/view/KeyCharacterMap.java b/core/java/android/view/KeyCharacterMap.java
index b7b56e8..989bf67 100644
--- a/core/java/android/view/KeyCharacterMap.java
+++ b/core/java/android/view/KeyCharacterMap.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.input.InputManager;
import android.os.Parcel;
import android.os.Parcelable;
@@ -307,6 +308,7 @@
}
// Called from native
+ @UnsupportedAppUsage
private KeyCharacterMap(long ptr) {
mPtr = ptr;
}
@@ -748,7 +750,9 @@
private FallbackAction next;
+ @UnsupportedAppUsage
public int keyCode;
+ @UnsupportedAppUsage
public int metaState;
private FallbackAction() {
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 2c00391..8641d7f 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.method.MetaKeyKeyListener;
@@ -837,6 +838,7 @@
// Symbolic names of all metakeys in bit order from least significant to most significant.
// Accordingly there are exactly 32 values in this table.
+ @UnsupportedAppUsage
private static final String[] META_SYMBOLIC_NAMES = new String[] {
"META_SHIFT_ON",
"META_ALT_ON",
@@ -890,6 +892,7 @@
*/
public static final int ACTION_UP = 1;
/**
+ * @deprecated No longer used by the input system.
* {@link #getAction} value: multiple duplicate key events have
* occurred in a row, or a complex string is being delivered. If the
* key code is not {#link {@link #KEYCODE_UNKNOWN} then the
@@ -898,6 +901,7 @@
* Otherwise, if the key code is {@link #KEYCODE_UNKNOWN}, then
* this is a sequence of characters as returned by {@link #getCharacters}.
*/
+ @Deprecated
public static final int ACTION_MULTIPLE = 2;
/**
@@ -905,6 +909,7 @@
* Reserved for use by {@link MetaKeyKeyListener} for a published constant in its API.
* @hide
*/
+ @UnsupportedAppUsage
public static final int META_CAP_LOCKED = 0x100;
/**
@@ -912,6 +917,7 @@
* Reserved for use by {@link MetaKeyKeyListener} for a published constant in its API.
* @hide
*/
+ @UnsupportedAppUsage
public static final int META_ALT_LOCKED = 0x200;
/**
@@ -919,6 +925,7 @@
* Reserved for use by {@link MetaKeyKeyListener} for a published constant in its API.
* @hide
*/
+ @UnsupportedAppUsage
public static final int META_SYM_LOCKED = 0x400;
/**
@@ -927,6 +934,7 @@
* in its API that is currently being retained for legacy reasons.
* @hide
*/
+ @UnsupportedAppUsage
public static final int META_SELECTING = 0x800;
/**
@@ -1246,17 +1254,28 @@
private KeyEvent mNext;
+ @UnsupportedAppUsage
private int mDeviceId;
+ @UnsupportedAppUsage
private int mSource;
private int mDisplayId;
+ @UnsupportedAppUsage
private int mMetaState;
+ @UnsupportedAppUsage
private int mAction;
+ @UnsupportedAppUsage
private int mKeyCode;
+ @UnsupportedAppUsage
private int mScanCode;
+ @UnsupportedAppUsage
private int mRepeatCount;
+ @UnsupportedAppUsage
private int mFlags;
+ @UnsupportedAppUsage
private long mDownTime;
+ @UnsupportedAppUsage
private long mEventTime;
+ @UnsupportedAppUsage
private String mCharacters;
public interface Callback {
@@ -1593,6 +1612,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static KeyEvent obtain(long downTime, long eventTime, int action,
int code, int repeat, int metaState,
int deviceId, int scancode, int flags, int source, String characters) {
@@ -1638,6 +1658,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public final void recycle() {
super.recycle();
mCharacters = null;
@@ -1758,6 +1779,7 @@
* @deprecated
* @hide
*/
+ @UnsupportedAppUsage
@Deprecated public final boolean isDown() {
return mAction == ACTION_DOWN;
}
@@ -1819,6 +1841,7 @@
/** Whether key will, by default, trigger a click on the focused view.
* @hide
*/
+ @UnsupportedAppUsage
public static final boolean isConfirmKey(int keyCode) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_CENTER:
@@ -2021,6 +2044,7 @@
}
// Mask of all modifier key meta states. Specifically excludes locked keys like caps lock.
+ @UnsupportedAppUsage
private static final int META_MODIFIER_MASK =
META_SHIFT_ON | META_SHIFT_LEFT_ON | META_SHIFT_RIGHT_ON
| META_ALT_ON | META_ALT_LEFT_ON | META_ALT_RIGHT_ON
@@ -2029,19 +2053,23 @@
| META_SYM_ON | META_FUNCTION_ON;
// Mask of all lock key meta states.
+ @UnsupportedAppUsage
private static final int META_LOCK_MASK =
META_CAPS_LOCK_ON | META_NUM_LOCK_ON | META_SCROLL_LOCK_ON;
// Mask of all valid meta states.
+ @UnsupportedAppUsage
private static final int META_ALL_MASK = META_MODIFIER_MASK | META_LOCK_MASK;
// Mask of all synthetic meta states that are reserved for API compatibility with
// historical uses in MetaKeyKeyListener.
+ @UnsupportedAppUsage
private static final int META_SYNTHETIC_MASK =
META_CAP_LOCKED | META_ALT_LOCKED | META_SYM_LOCKED | META_SELECTING;
// Mask of all meta states that are not valid use in specifying a modifier key.
// These bits are known to be used for purposes other than specifying modifiers.
+ @UnsupportedAppUsage
private static final int META_INVALID_MODIFIER_MASK =
META_LOCK_MASK | META_SYNTHETIC_MASK;
@@ -2474,7 +2502,10 @@
*
* @return Returns a String of 1 or more characters associated with
* the event.
+ *
+ * @deprecated no longer used by the input system.
*/
+ @Deprecated
public final String getCharacters() {
return mCharacters;
}
@@ -2920,6 +2951,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.
*
@@ -3029,6 +3063,7 @@
mFlags = in.readInt();
mDownTime = in.readLong();
mEventTime = in.readLong();
+ mCharacters = in.readString();
}
@Override
@@ -3046,5 +3081,6 @@
out.writeInt(mFlags);
out.writeLong(mDownTime);
out.writeLong(mEventTime);
+ out.writeString(mCharacters);
}
}
diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java
index 47b8d92..c520a99 100644
--- a/core/java/android/view/LayoutInflater.java
+++ b/core/java/android/view/LayoutInflater.java
@@ -19,6 +19,7 @@
import android.annotation.LayoutRes;
import android.annotation.Nullable;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -76,20 +77,28 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected final Context mContext;
// these are optional, set by the caller
+ @UnsupportedAppUsage
private boolean mFactorySet;
+ @UnsupportedAppUsage
private Factory mFactory;
+ @UnsupportedAppUsage
private Factory2 mFactory2;
+ @UnsupportedAppUsage
private Factory2 mPrivateFactory;
private Filter mFilter;
+ @UnsupportedAppUsage
final Object[] mConstructorArgs = new Object[2];
+ @UnsupportedAppUsage
static final Class<?>[] mConstructorSignature = new Class[] {
Context.class, AttributeSet.class};
+ @UnsupportedAppUsage
private static final HashMap<String, Constructor<? extends View>> sConstructorMap =
new HashMap<String, Constructor<? extends View>>();
@@ -105,6 +114,7 @@
private static final String ATTR_LAYOUT = "layout";
+ @UnsupportedAppUsage
private static final int[] ATTRS_THEME = new int[] {
com.android.internal.R.attr.theme };
@@ -327,6 +337,7 @@
/**
* @hide for use by framework
*/
+ @UnsupportedAppUsage
public void setPrivateFactory(Factory2 factory) {
if (mPrivateFactory == null) {
mPrivateFactory = factory;
@@ -726,6 +737,7 @@
* argument and should be used for everything except {@code >include>}
* tag parsing.
*/
+ @UnsupportedAppUsage
private View createViewFromTag(View parent, String name, Context context, AttributeSet attrs) {
return createViewFromTag(parent, name, context, attrs, false);
}
@@ -745,6 +757,7 @@
* attribute (if set) for the view being inflated,
* {@code false} otherwise
*/
+ @UnsupportedAppUsage
View createViewFromTag(View parent, String name, Context context, AttributeSet attrs,
boolean ignoreThemeAttr) {
if (name.equals("view")) {
@@ -893,6 +906,7 @@
consumeChildElements(parser);
}
+ @UnsupportedAppUsage
private void parseInclude(XmlPullParser parser, Context context, View parent,
AttributeSet attrs) throws XmlPullParserException, IOException {
int type;
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 344806a..29c58dc 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -19,6 +19,7 @@
import static android.view.Display.DEFAULT_DISPLAY;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Matrix;
import android.os.Parcel;
import android.os.Parcelable;
@@ -1441,6 +1442,7 @@
}
// Private value for history pos that obtains the current sample.
+ @UnsupportedAppUsage
private static final int HISTORY_CURRENT = -0x80000000;
private static final int MAX_RECYCLED = 10;
@@ -1469,6 +1471,7 @@
}
// Pointer to the native MotionEvent object that contains the actual data.
+ @UnsupportedAppUsage
private long mNativePtr;
private MotionEvent mNext;
@@ -1502,6 +1505,7 @@
@FastNative
private static native long nativeGetEventTimeNanos(long nativePtr, int historyPos);
@FastNative
+ @UnsupportedAppUsage
private static native float nativeGetRawAxisValue(long nativePtr,
int axis, int pointerIndex, int historyPos);
@FastNative
@@ -1590,6 +1594,7 @@
}
}
+ @UnsupportedAppUsage
static private MotionEvent obtain() {
final MotionEvent ev;
synchronized (gRecyclerLock) {
@@ -1886,6 +1891,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public MotionEvent copy() {
return obtain(this);
}
@@ -1918,6 +1924,7 @@
* @param scale The scale factor to apply.
* @hide
*/
+ @UnsupportedAppUsage
public final void scale(float scale) {
if (scale != 1.0f) {
nativeScale(mNativePtr, scale);
@@ -1949,6 +1956,7 @@
}
/** @hide */
+ @TestApi
@Override
public void setDisplayId(int displayId) {
nativeSetDisplayId(mNativePtr, displayId);
@@ -2068,6 +2076,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final void setDownTime(long downTime) {
nativeSetDownTimeNanos(mNativePtr, downTime * NS_PER_MS);
}
@@ -2099,6 +2108,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public final long getEventTimeNano() {
return nativeGetEventTimeNanos(mNativePtr, HISTORY_CURRENT);
}
@@ -3098,6 +3108,7 @@
* @return True if batching was performed or false if batching was not possible.
* @hide
*/
+ @UnsupportedAppUsage
public final boolean addBatch(MotionEvent event) {
final int action = nativeGetAction(mNativePtr);
if (action != ACTION_MOVE && action != ACTION_HOVER_MOVE) {
@@ -3212,6 +3223,7 @@
* Gets an integer where each pointer id present in the event is marked as a bit.
* @hide
*/
+ @UnsupportedAppUsage
public final int getPointerIdBits() {
int idBits = 0;
final int pointerCount = nativeGetPointerCount(mNativePtr);
@@ -3225,6 +3237,7 @@
* Splits a motion event such that it includes only a subset of pointer ids.
* @hide
*/
+ @UnsupportedAppUsage
public final MotionEvent split(int idBits) {
MotionEvent ev = obtain();
synchronized (gSharedTempLock) {
@@ -3535,7 +3548,9 @@
*/
public static final class PointerCoords {
private static final int INITIAL_PACKED_AXIS_VALUES = 8;
+ @UnsupportedAppUsage
private long mPackedAxisBits;
+ @UnsupportedAppUsage
private float[] mPackedAxisValues;
/**
@@ -3555,6 +3570,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static PointerCoords[] createArray(int size) {
PointerCoords[] array = new PointerCoords[size];
for (int i = 0; i < size; i++) {
@@ -3848,6 +3864,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static PointerProperties[] createArray(int size) {
PointerProperties[] array = new PointerProperties[size];
for (int i = 0; i < size; i++) {
diff --git a/core/java/android/view/NotificationHeaderView.java b/core/java/android/view/NotificationHeaderView.java
index a3676ba..81da76d 100644
--- a/core/java/android/view/NotificationHeaderView.java
+++ b/core/java/android/view/NotificationHeaderView.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.AppOpsManager;
import android.app.Notification;
import android.content.Context;
@@ -85,6 +86,7 @@
this(context, null);
}
+ @UnsupportedAppUsage
public NotificationHeaderView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
diff --git a/core/java/android/view/PointerIcon.java b/core/java/android/view/PointerIcon.java
index 8cb46b7..dc097a1 100644
--- a/core/java/android/view/PointerIcon.java
+++ b/core/java/android/view/PointerIcon.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.content.Context;
import android.content.res.Resources;
@@ -145,14 +146,20 @@
private static final SparseArray<PointerIcon> gSystemIcons = new SparseArray<PointerIcon>();
private static boolean sUseLargeIcons = false;
+ @UnsupportedAppUsage
private final int mType;
private int mSystemIconResourceId;
+ @UnsupportedAppUsage
private Bitmap mBitmap;
+ @UnsupportedAppUsage
private float mHotSpotX;
+ @UnsupportedAppUsage
private float mHotSpotY;
// The bitmaps for the additional frame of animated pointer icon. Note that the first frame
// will be stored in mBitmap.
+ @UnsupportedAppUsage
private Bitmap mBitmapFrames[];
+ @UnsupportedAppUsage
private int mDurationPerFrame;
private PointerIcon(int type) {
@@ -312,6 +319,7 @@
* @throws IllegalArgumentException if context is null.
* @hide
*/
+ @UnsupportedAppUsage
public PointerIcon load(@NonNull Context context) {
if (context == null) {
throw new IllegalArgumentException("context must not be null");
diff --git a/core/java/android/view/RemoteAnimationAdapter.java b/core/java/android/view/RemoteAnimationAdapter.java
index a864e55..3c9ce78 100644
--- a/core/java/android/view/RemoteAnimationAdapter.java
+++ b/core/java/android/view/RemoteAnimationAdapter.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityOptions;
import android.os.IBinder;
import android.os.Parcel;
@@ -61,6 +62,7 @@
* @param statusBarTransitionDelay The desired delay for all visual animations in the
* status bar caused by this app animation in millis.
*/
+ @UnsupportedAppUsage
public RemoteAnimationAdapter(IRemoteAnimationRunner runner, long duration,
long statusBarTransitionDelay) {
mRunner = runner;
diff --git a/core/java/android/view/RemoteAnimationDefinition.java b/core/java/android/view/RemoteAnimationDefinition.java
index d2240e1..beb1c1d 100644
--- a/core/java/android/view/RemoteAnimationDefinition.java
+++ b/core/java/android/view/RemoteAnimationDefinition.java
@@ -19,6 +19,7 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.WindowConfiguration;
import android.app.WindowConfiguration.ActivityType;
import android.os.Parcel;
@@ -36,6 +37,7 @@
private final SparseArray<RemoteAnimationAdapterEntry> mTransitionAnimationMap;
+ @UnsupportedAppUsage
public RemoteAnimationDefinition() {
mTransitionAnimationMap = new SparseArray<>();
}
@@ -48,6 +50,7 @@
* parameter is involved in the transition.
* @param adapter The adapter that described how to run the remote animation.
*/
+ @UnsupportedAppUsage
public void addRemoteAnimation(@TransitionType int transition,
@ActivityType int activityTypeFilter, RemoteAnimationAdapter adapter) {
mTransitionAnimationMap.put(transition,
@@ -61,6 +64,7 @@
* @param transition The transition type. Must be one of WindowManager.TRANSIT_* values.
* @param adapter The adapter that described how to run the remote animation.
*/
+ @UnsupportedAppUsage
public void addRemoteAnimation(@TransitionType int transition, RemoteAnimationAdapter adapter) {
addRemoteAnimation(transition, ACTIVITY_TYPE_UNDEFINED, adapter);
}
diff --git a/core/java/android/view/RemoteAnimationTarget.java b/core/java/android/view/RemoteAnimationTarget.java
index 5b2cc81..567b279 100644
--- a/core/java/android/view/RemoteAnimationTarget.java
+++ b/core/java/android/view/RemoteAnimationTarget.java
@@ -16,18 +16,19 @@
package android.view;
-import static android.app.RemoteAnimationTargetProto.CLIP_RECT;
-import static android.app.RemoteAnimationTargetProto.CONTENT_INSETS;
-import static android.app.RemoteAnimationTargetProto.IS_TRANSLUCENT;
-import static android.app.RemoteAnimationTargetProto.LEASH;
-import static android.app.RemoteAnimationTargetProto.MODE;
-import static android.app.RemoteAnimationTargetProto.POSITION;
-import static android.app.RemoteAnimationTargetProto.PREFIX_ORDER_INDEX;
-import static android.app.RemoteAnimationTargetProto.SOURCE_CONTAINER_BOUNDS;
-import static android.app.RemoteAnimationTargetProto.TASK_ID;
-import static android.app.RemoteAnimationTargetProto.WINDOW_CONFIGURATION;
+import static android.view.RemoteAnimationTargetProto.CLIP_RECT;
+import static android.view.RemoteAnimationTargetProto.CONTENT_INSETS;
+import static android.view.RemoteAnimationTargetProto.IS_TRANSLUCENT;
+import static android.view.RemoteAnimationTargetProto.LEASH;
+import static android.view.RemoteAnimationTargetProto.MODE;
+import static android.view.RemoteAnimationTargetProto.POSITION;
+import static android.view.RemoteAnimationTargetProto.PREFIX_ORDER_INDEX;
+import static android.view.RemoteAnimationTargetProto.SOURCE_CONTAINER_BOUNDS;
+import static android.view.RemoteAnimationTargetProto.TASK_ID;
+import static android.view.RemoteAnimationTargetProto.WINDOW_CONFIGURATION;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.app.WindowConfiguration;
import android.graphics.Point;
import android.graphics.Rect;
@@ -66,21 +67,25 @@
/**
* The {@link Mode} to describe whether this app is opening or closing.
*/
+ @UnsupportedAppUsage
public final @Mode int mode;
/**
* The id of the task this app belongs to.
*/
+ @UnsupportedAppUsage
public final int taskId;
/**
* The {@link SurfaceControl} object to actually control the transform of the app.
*/
+ @UnsupportedAppUsage
public final SurfaceControl leash;
/**
* Whether the app is translucent and may reveal apps behind.
*/
+ @UnsupportedAppUsage
public final boolean isTranslucent;
/**
@@ -89,11 +94,13 @@
* anything that extends beyond these bounds will not have any effect. This implies that any
* clip-rect animation should likely stop at these bounds.
*/
+ @UnsupportedAppUsage
public final Rect clipRect;
/**
* The insets of the main app window.
*/
+ @UnsupportedAppUsage
public final Rect contentInsets;
/**
@@ -101,6 +108,7 @@
* to preserve original z-layer order in the hierarchy tree assuming no "boosting" needs to
* happen.
*/
+ @UnsupportedAppUsage
public final int prefixOrderIndex;
/**
@@ -108,6 +116,7 @@
* is modified from the controlling app, any animation transform needs to be offset by this
* amount.
*/
+ @UnsupportedAppUsage
public final Point position;
/**
@@ -115,16 +124,19 @@
* of the leash is modified from the controlling app, it needs to take the source container
* bounds into account when calculating the crop.
*/
+ @UnsupportedAppUsage
public final Rect sourceContainerBounds;
/**
* The window configuration for the target.
*/
+ @UnsupportedAppUsage
public final WindowConfiguration windowConfiguration;
/**
* Whether the task is not presented in Recents UI.
*/
+ @UnsupportedAppUsage
public boolean isNotInRecents;
public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent,
diff --git a/core/java/android/view/RenderNode.java b/core/java/android/view/RenderNode.java
index e0df59f..fcea0c3 100644
--- a/core/java/android/view/RenderNode.java
+++ b/core/java/android/view/RenderNode.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Matrix;
import android.graphics.Outline;
import android.graphics.Paint;
@@ -172,6 +173,7 @@
*
* @return A new RenderNode.
*/
+ @UnsupportedAppUsage
public static RenderNode create(String name, @Nullable View owningView) {
return new RenderNode(name, owningView);
}
@@ -211,6 +213,7 @@
* @see #end(DisplayListCanvas)
* @see #isValid()
*/
+ @UnsupportedAppUsage
public DisplayListCanvas start(int width, int height) {
return DisplayListCanvas.obtain(this, width, height);
}
@@ -231,6 +234,7 @@
* @see #start(int, int)
* @see #isValid()
*/
+ @UnsupportedAppUsage
public void end(DisplayListCanvas canvas) {
long displayList = canvas.finishRecording();
nSetDisplayList(mNativeRenderNode, displayList);
@@ -242,6 +246,7 @@
* during destruction of hardware resources, to ensure that we do not hold onto
* obsolete resources after related resources are gone.
*/
+ @UnsupportedAppUsage
public void discardDisplayList() {
nSetDisplayList(mNativeRenderNode, 0);
}
@@ -252,6 +257,7 @@
*
* @return boolean true if the display list is able to be replayed, false otherwise.
*/
+ @UnsupportedAppUsage
public boolean isValid() {
return nIsValid(mNativeRenderNode);
}
@@ -298,6 +304,7 @@
*
* @param clipToBounds true if the display list should clip to its bounds
*/
+ @UnsupportedAppUsage
public boolean setClipToBounds(boolean clipToBounds) {
return nSetClipToBounds(mNativeRenderNode, clipToBounds);
}
@@ -309,6 +316,7 @@
* @param shouldProject true if the display list should be projected onto a
* containing volume.
*/
+ @UnsupportedAppUsage
public boolean setProjectBackwards(boolean shouldProject) {
return nSetProjectBackwards(mNativeRenderNode, shouldProject);
}
@@ -449,6 +457,7 @@
* @see android.view.View#hasOverlappingRendering()
* @see #hasOverlappingRendering()
*/
+ @UnsupportedAppUsage
public boolean setHasOverlappingRendering(boolean hasOverlappingRendering) {
return nSetHasOverlappingRendering(mNativeRenderNode, hasOverlappingRendering);
}
@@ -788,6 +797,7 @@
* @see View#setRight(int)
* @see View#setBottom(int)
*/
+ @UnsupportedAppUsage
public boolean setLeftTopRightBottom(int left, int top, int right, int bottom) {
return nSetLeftTopRightBottom(mNativeRenderNode, left, top, right, bottom);
}
@@ -800,6 +810,7 @@
*
* @see View#offsetLeftAndRight(int)
*/
+ @UnsupportedAppUsage
public boolean offsetLeftAndRight(int offset) {
return nOffsetLeftAndRight(mNativeRenderNode, offset);
}
@@ -820,6 +831,7 @@
* Outputs the display list to the log. This method exists for use by
* tools to output display lists for selected nodes to the log.
*/
+ @UnsupportedAppUsage
public void output() {
nOutput(mNativeRenderNode);
}
diff --git a/core/java/android/view/RenderNodeAnimator.java b/core/java/android/view/RenderNodeAnimator.java
index d26a2f6..e48bcfd 100644
--- a/core/java/android/view/RenderNodeAnimator.java
+++ b/core/java/android/view/RenderNodeAnimator.java
@@ -19,6 +19,7 @@
import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.CanvasProperty;
import android.graphics.Paint;
import android.util.SparseIntArray;
@@ -103,10 +104,12 @@
private long mStartDelay = 0;
private long mStartTime;
+ @UnsupportedAppUsage
public static int mapViewPropertyToRenderProperty(int viewProperty) {
return sViewPropertyAnimatorMap.get(viewProperty);
}
+ @UnsupportedAppUsage
public RenderNodeAnimator(int property, float finalValue) {
mRenderProperty = property;
mFinalValue = finalValue;
@@ -114,6 +117,7 @@
init(nCreateAnimator(property, finalValue));
}
+ @UnsupportedAppUsage
public RenderNodeAnimator(CanvasProperty<Float> property, float finalValue) {
init(nCreateCanvasPropertyFloatAnimator(
property.getNativeContainer(), finalValue));
@@ -128,6 +132,7 @@
* {@link #PAINT_STROKE_WIDTH}
* @param finalValue The target value for the property
*/
+ @UnsupportedAppUsage
public RenderNodeAnimator(CanvasProperty<Paint> property, int paintField, float finalValue) {
init(nCreateCanvasPropertyPaintAnimator(
property.getNativeContainer(), paintField, finalValue));
@@ -275,6 +280,7 @@
throw new UnsupportedOperationException();
}
+ @UnsupportedAppUsage
public void setTarget(View view) {
mViewTarget = view;
setTarget(mViewTarget.mRenderNode);
@@ -295,6 +301,7 @@
mTarget.addAnimator(this);
}
+ @UnsupportedAppUsage
public void setStartValue(float startValue) {
checkMutable();
nSetStartValue(mNativePtr.get(), startValue);
@@ -479,6 +486,7 @@
}
// Called by native
+ @UnsupportedAppUsage
private static void callOnFinished(RenderNodeAnimator animator) {
animator.onFinished();
}
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index 9787494..c189afe 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
@@ -123,6 +124,7 @@
}
private final Context mContext;
+ @UnsupportedAppUsage
private final OnScaleGestureListener mListener;
private float mFocusX;
@@ -141,7 +143,9 @@
private long mCurrTime;
private long mPrevTime;
private boolean mInProgress;
+ @UnsupportedAppUsage
private int mSpanSlop;
+ @UnsupportedAppUsage
private int mMinSpan;
private final Handler mHandler;
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index df81a31..427f570 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.CompatibilityInfo.Translator;
import android.graphics.Canvas;
import android.graphics.GraphicBuffer;
@@ -60,6 +61,7 @@
throws OutOfResourcesException;
private static native void nativeUnlockCanvasAndPost(long nativeObject, Canvas canvas);
+ @UnsupportedAppUsage
private static native void nativeRelease(long nativeObject);
private static native boolean nativeIsValid(long nativeObject);
private static native boolean nativeIsConsumerRunningBehind(long nativeObject);
@@ -102,9 +104,13 @@
private final CloseGuard mCloseGuard = CloseGuard.get();
// Guarded state.
+ @UnsupportedAppUsage
final Object mLock = new Object(); // protects the native state
+ @UnsupportedAppUsage
private String mName;
+ @UnsupportedAppUsage
long mNativeObject; // package scope only for SurfaceControl access
+ @UnsupportedAppUsage
private long mLockedObject;
private int mGenerationId; // incremented each time mNativeObject changes
private final Canvas mCanvas = new CompatibleCanvas();
@@ -172,6 +178,7 @@
* Create an empty surface, which will later be filled in by readFromParcel().
* @hide
*/
+ @UnsupportedAppUsage
public Surface() {
}
@@ -203,6 +210,7 @@
}
/* called from android_view_Surface_createFromIGraphicBufferProducer() */
+ @UnsupportedAppUsage
private Surface(long nativeObject) {
synchronized (mLock) {
setNativeObjectLocked(nativeObject);
@@ -245,6 +253,7 @@
* called from the process that created the service.
* @hide
*/
+ @UnsupportedAppUsage
public void destroy() {
release();
}
@@ -293,6 +302,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getNextFrameNumber() {
synchronized (mLock) {
checkNotReleasedLocked();
@@ -485,6 +495,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void copyFrom(SurfaceControl other) {
if (other == null) {
throw new IllegalArgumentException("other must not be null");
@@ -544,6 +555,7 @@
* @deprecated
*/
@Deprecated
+ @UnsupportedAppUsage
public void transferFrom(Surface other) {
if (other == null) {
throw new IllegalArgumentException("other must not be null");
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index ed8b005..d9c8f30 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -28,6 +28,7 @@
import static android.view.SurfaceControlProto.NAME;
import android.annotation.Size;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;
import android.graphics.GraphicBuffer;
import android.graphics.Matrix;
@@ -179,6 +180,7 @@
/**
* Surface creation flag: Surface is created hidden
*/
+ @UnsupportedAppUsage
public static final int HIDDEN = 0x00000004;
/**
@@ -720,6 +722,7 @@
*/
/** start a transaction */
+ @UnsupportedAppUsage
public static void openTransaction() {
synchronized (SurfaceControl.class) {
if (sGlobalTransaction == null) {
@@ -756,6 +759,7 @@
}
/** end a transaction */
+ @UnsupportedAppUsage
public static void closeTransaction() {
closeTransaction(false);
}
@@ -811,6 +815,7 @@
}
}
+ @UnsupportedAppUsage
public void setLayer(int zorder) {
checkNotReleased();
synchronized(SurfaceControl.class) {
@@ -825,6 +830,7 @@
}
}
+ @UnsupportedAppUsage
public void setPosition(float x, float y) {
checkNotReleased();
synchronized(SurfaceControl.class) {
@@ -846,6 +852,7 @@
}
}
+ @UnsupportedAppUsage
public void hide() {
checkNotReleased();
synchronized(SurfaceControl.class) {
@@ -853,6 +860,7 @@
}
}
+ @UnsupportedAppUsage
public void show() {
checkNotReleased();
synchronized(SurfaceControl.class) {
@@ -986,16 +994,26 @@
* Describes the properties of a physical display known to surface flinger.
*/
public static final class PhysicalDisplayInfo {
+ @UnsupportedAppUsage
public int width;
+ @UnsupportedAppUsage
public int height;
+ @UnsupportedAppUsage
public float refreshRate;
+ @UnsupportedAppUsage
public float density;
+ @UnsupportedAppUsage
public float xDpi;
+ @UnsupportedAppUsage
public float yDpi;
+ @UnsupportedAppUsage
public boolean secure;
+ @UnsupportedAppUsage
public long appVsyncOffsetNanos;
+ @UnsupportedAppUsage
public long presentationDeadlineNanos;
+ @UnsupportedAppUsage
public PhysicalDisplayInfo() {
}
@@ -1055,6 +1073,7 @@
nativeSetDisplayPowerMode(displayToken, mode);
}
+ @UnsupportedAppUsage
public static SurfaceControl.PhysicalDisplayInfo[] getDisplayConfigs(IBinder displayToken) {
if (displayToken == null) {
throw new IllegalArgumentException("displayToken must not be null");
@@ -1097,6 +1116,7 @@
return nativeSetActiveColorMode(displayToken, colorMode);
}
+ @UnsupportedAppUsage
public static void setDisplayProjection(IBinder displayToken,
int orientation, Rect layerStackRect, Rect displayRect) {
synchronized (SurfaceControl.class) {
@@ -1105,12 +1125,14 @@
}
}
+ @UnsupportedAppUsage
public static void setDisplayLayerStack(IBinder displayToken, int layerStack) {
synchronized (SurfaceControl.class) {
sGlobalTransaction.setDisplayLayerStack(displayToken, layerStack);
}
}
+ @UnsupportedAppUsage
public static void setDisplaySurface(IBinder displayToken, Surface surface) {
synchronized (SurfaceControl.class) {
sGlobalTransaction.setDisplaySurface(displayToken, surface);
@@ -1130,6 +1152,7 @@
return nativeGetHdrCapabilities(displayToken);
}
+ @UnsupportedAppUsage
public static IBinder createDisplay(String name, boolean secure) {
if (name == null) {
throw new IllegalArgumentException("name must not be null");
@@ -1137,6 +1160,7 @@
return nativeCreateDisplay(name, secure);
}
+ @UnsupportedAppUsage
public static void destroyDisplay(IBinder displayToken) {
if (displayToken == null) {
throw new IllegalArgumentException("displayToken must not be null");
@@ -1144,6 +1168,7 @@
nativeDestroyDisplay(displayToken);
}
+ @UnsupportedAppUsage
public static IBinder getBuiltInDisplay(int builtInDisplayId) {
return nativeGetBuiltInDisplay(builtInDisplayId);
}
@@ -1229,6 +1254,7 @@
* if an error occurs. Make sure to call Bitmap.recycle() as soon as
* possible, once its content is not needed anymore.
*/
+ @UnsupportedAppUsage
public static Bitmap screenshot(Rect sourceCrop, int width, int height,
int minLayer, int maxLayer, boolean useIdentityTransform,
int rotation) {
@@ -1272,6 +1298,7 @@
* if an error occurs. Make sure to call Bitmap.recycle() as soon as
* possible, once its content is not needed anymore.
*/
+ @UnsupportedAppUsage
public static Bitmap screenshot(Rect sourceCrop, int width, int height, int rotation) {
// TODO: should take the display as a parameter
IBinder displayToken = SurfaceControl.getBuiltInDisplay(
@@ -1285,6 +1312,7 @@
false, rotation);
}
+ @UnsupportedAppUsage
private static void screenshot(IBinder display, Surface consumer, Rect sourceCrop,
int width, int height, int minLayer, int maxLayer, boolean allLayers,
boolean useIdentityTransform) {
@@ -1334,6 +1362,7 @@
private final ArrayMap<SurfaceControl, Point> mResizedSurfaces = new ArrayMap<>();
Runnable mFreeNativeResources;
+ @UnsupportedAppUsage
public Transaction() {
mNativeObject = nativeCreateTransaction();
mFreeNativeResources
@@ -1344,6 +1373,7 @@
* Apply the transaction, clearing it's state, and making it usable
* as a new transaction.
*/
+ @UnsupportedAppUsage
public void apply() {
apply(false);
}
@@ -1378,24 +1408,28 @@
mResizedSurfaces.clear();
}
+ @UnsupportedAppUsage
public Transaction show(SurfaceControl sc) {
sc.checkNotReleased();
nativeSetFlags(mNativeObject, sc.mNativeObject, 0, SURFACE_HIDDEN);
return this;
}
+ @UnsupportedAppUsage
public Transaction hide(SurfaceControl sc) {
sc.checkNotReleased();
nativeSetFlags(mNativeObject, sc.mNativeObject, SURFACE_HIDDEN, SURFACE_HIDDEN);
return this;
}
+ @UnsupportedAppUsage
public Transaction setPosition(SurfaceControl sc, float x, float y) {
sc.checkNotReleased();
nativeSetPosition(mNativeObject, sc.mNativeObject, x, y);
return this;
}
+ @UnsupportedAppUsage
public Transaction setSize(SurfaceControl sc, int w, int h) {
sc.checkNotReleased();
mResizedSurfaces.put(sc, new Point(w, h));
@@ -1403,6 +1437,7 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction setLayer(SurfaceControl sc, int z) {
sc.checkNotReleased();
nativeSetLayer(mNativeObject, sc.mNativeObject, z);
@@ -1423,12 +1458,14 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction setAlpha(SurfaceControl sc, float alpha) {
sc.checkNotReleased();
nativeSetAlpha(mNativeObject, sc.mNativeObject, alpha);
return this;
}
+ @UnsupportedAppUsage
public Transaction setMatrix(SurfaceControl sc,
float dsdx, float dtdx, float dtdy, float dsdy) {
sc.checkNotReleased();
@@ -1437,6 +1474,7 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction setMatrix(SurfaceControl sc, Matrix matrix, float[] float9) {
matrix.getValues(float9);
setMatrix(sc, float9[MSCALE_X], float9[MSKEW_Y],
@@ -1445,6 +1483,7 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction setWindowCrop(SurfaceControl sc, Rect crop) {
sc.checkNotReleased();
if (crop != null) {
@@ -1457,6 +1496,7 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction setFinalCrop(SurfaceControl sc, Rect crop) {
sc.checkNotReleased();
if (crop != null) {
@@ -1475,6 +1515,7 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction deferTransactionUntil(SurfaceControl sc, IBinder handle,
long frameNumber) {
if (frameNumber < 0) {
@@ -1485,6 +1526,7 @@
return this;
}
+ @UnsupportedAppUsage
public Transaction deferTransactionUntilSurface(SurfaceControl sc, Surface barrierSurface,
long frameNumber) {
if (frameNumber < 0) {
@@ -1527,6 +1569,7 @@
* Sets a color for the Surface.
* @param color A float array with three values to represent r, g, b in range [0..1]
*/
+ @UnsupportedAppUsage
public Transaction setColor(SurfaceControl sc, @Size(3) float[] color) {
sc.checkNotReleased();
nativeSetColor(mNativeObject, sc.mNativeObject, color);
diff --git a/core/java/android/view/SurfaceSession.java b/core/java/android/view/SurfaceSession.java
index ee08bf7..a4fa12a 100644
--- a/core/java/android/view/SurfaceSession.java
+++ b/core/java/android/view/SurfaceSession.java
@@ -16,6 +16,8 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An instance of this class represents a connection to the surface
* flinger, from which you can create one or more Surface instances that will
@@ -24,6 +26,7 @@
*/
public final class SurfaceSession {
// Note: This field is accessed by native code.
+ @UnsupportedAppUsage
private long mNativeClient; // SurfaceComposerClient*
private static native long nativeCreate();
@@ -32,6 +35,7 @@
private static native void nativeKill(long ptr);
/** Create a new connection with the surface flinger. */
+ @UnsupportedAppUsage
public SurfaceSession() {
mNativeClient = nativeCreate();
}
@@ -62,6 +66,7 @@
* Unlike destroy(), after this call any surfaces that were created
* from the session will no longer work.
*/
+ @UnsupportedAppUsage
public void kill() {
nativeKill(mNativeClient);
}
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 44c1780..6319a8f 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -20,6 +20,7 @@
import static android.view.WindowManagerPolicyConstants.APPLICATION_MEDIA_SUBLAYER;
import static android.view.WindowManagerPolicyConstants.APPLICATION_PANEL_SUBLAYER;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.CompatibilityInfo.Translator;
import android.content.res.Configuration;
@@ -98,13 +99,17 @@
private static final String TAG = "SurfaceView";
private static final boolean DEBUG = false;
+ @UnsupportedAppUsage
final ArrayList<SurfaceHolder.Callback> mCallbacks
= new ArrayList<SurfaceHolder.Callback>();
final int[] mLocation = new int[2];
+ @UnsupportedAppUsage
final ReentrantLock mSurfaceLock = new ReentrantLock();
+ @UnsupportedAppUsage
final Surface mSurface = new Surface(); // Current surface in use
+ @UnsupportedAppUsage
boolean mDrawingStopped = true;
// We use this to track if the application has produced a frame
// in to the Surface. Up until that point, we should be careful not to punch
@@ -123,6 +128,7 @@
int mSubLayer = APPLICATION_MEDIA_SUBLAYER;
+ @UnsupportedAppUsage
boolean mIsCreating = false;
private volatile boolean mRtHandlingPositionUpdates = false;
@@ -134,6 +140,7 @@
}
};
+ @UnsupportedAppUsage
private final ViewTreeObserver.OnPreDrawListener mDrawListener =
new ViewTreeObserver.OnPreDrawListener() {
@Override
@@ -151,15 +158,20 @@
boolean mViewVisibility = false;
boolean mWindowStopped = false;
+ @UnsupportedAppUsage
int mRequestedWidth = -1;
+ @UnsupportedAppUsage
int mRequestedHeight = -1;
/* Set SurfaceView's format to 565 by default to maintain backward
* compatibility with applications assuming this format.
*/
+ @UnsupportedAppUsage
int mRequestedFormat = PixelFormat.RGB_565;
+ @UnsupportedAppUsage
boolean mHaveFrame = false;
boolean mSurfaceCreated = false;
+ @UnsupportedAppUsage
long mLastLockTime = 0;
boolean mVisible = false;
@@ -167,7 +179,9 @@
int mWindowSpaceTop = -1;
int mSurfaceWidth = -1;
int mSurfaceHeight = -1;
+ @UnsupportedAppUsage
int mFormat = -1;
+ @UnsupportedAppUsage
final Rect mSurfaceFrame = new Rect();
int mLastSurfaceWidth = -1, mLastSurfaceHeight = -1;
private Translator mTranslator;
@@ -340,6 +354,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected boolean setFrame(int left, int top, int right, int bottom) {
boolean result = super.setFrame(left, top, right, bottom);
updateSurface();
@@ -814,6 +829,7 @@
* Called by native by a Rendering Worker thread to update the window position
* @hide
*/
+ @UnsupportedAppUsage
public final void updateSurfacePosition_renderWorker(long frameNumber,
int left, int top, int right, int bottom) {
if (mSurfaceControl == null) {
@@ -854,6 +870,7 @@
* draw tree. UI thread is blocked at this point.
* @hide
*/
+ @UnsupportedAppUsage
public final void surfacePositionLost_uiRtSync(long frameNumber) {
if (DEBUG) {
Log.d(TAG, String.format("%d windowPositionLost, frameNr = %d",
@@ -909,6 +926,7 @@
* @return true if the surface has dimensions that are fixed in size
* @hide
*/
+ @UnsupportedAppUsage
public boolean isFixedSize() {
return (mRequestedWidth != -1 || mRequestedHeight != -1);
}
@@ -928,6 +946,7 @@
mSurfaceControl.setBackgroundColor(bgColor);
}
+ @UnsupportedAppUsage
private final SurfaceHolder mSurfaceHolder = new SurfaceHolder() {
private static final String LOG_TAG = "SurfaceHolder";
diff --git a/core/java/android/view/TextureView.java b/core/java/android/view/TextureView.java
index 371794045..997e48fe 100644
--- a/core/java/android/view/TextureView.java
+++ b/core/java/android/view/TextureView.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -106,11 +107,14 @@
public class TextureView extends View {
private static final String LOG_TAG = "TextureView";
+ @UnsupportedAppUsage
private TextureLayer mLayer;
+ @UnsupportedAppUsage
private SurfaceTexture mSurface;
private SurfaceTextureListener mListener;
private boolean mHadSurface;
+ @UnsupportedAppUsage
private boolean mOpaque = true;
private final Matrix mMatrix = new Matrix();
@@ -118,6 +122,7 @@
private final Object[] mLock = new Object[0];
private boolean mUpdateLayer;
+ @UnsupportedAppUsage
private boolean mUpdateSurface;
private Canvas mCanvas;
@@ -125,6 +130,7 @@
private final Object[] mNativeWindowLock = new Object[0];
// Set by native code, do not write!
+ @UnsupportedAppUsage
private long mNativeWindow;
/**
@@ -217,6 +223,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected void onDetachedFromWindowInternal() {
destroyHardwareLayer();
releaseSurfaceTexture();
@@ -227,11 +234,13 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
protected void destroyHardwareResources() {
super.destroyHardwareResources();
destroyHardwareLayer();
}
+ @UnsupportedAppUsage
private void destroyHardwareLayer() {
if (mLayer != null) {
mLayer.detachSurfaceTexture();
@@ -786,6 +795,7 @@
mListener = listener;
}
+ @UnsupportedAppUsage
private final SurfaceTexture.OnFrameAvailableListener mUpdateListener =
new SurfaceTexture.OnFrameAvailableListener() {
@Override
@@ -839,7 +849,9 @@
public void onSurfaceTextureUpdated(SurfaceTexture surface);
}
+ @UnsupportedAppUsage
private native void nCreateNativeWindow(SurfaceTexture surface);
+ @UnsupportedAppUsage
private native void nDestroyNativeWindow();
private static native boolean nLockCanvas(long nativeWindow, Canvas canvas, Rect dirty);
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index 2930699..6737839 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.Context;
import android.content.res.TypedArray;
@@ -276,6 +277,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void setupDiskCache(File cacheDir) {
ThreadedRenderer.setupShadersDiskCache(
new File(cacheDir, CACHE_PATH_SHADERS).getAbsolutePath(),
@@ -719,6 +721,7 @@
* @param placeFront If true, the render node will be placed in front of the content node,
* otherwise behind the content node.
*/
+ @UnsupportedAppUsage
public void addRenderNode(RenderNode node, boolean placeFront) {
nAddRenderNode(mNativeProxy, node.mNativeRenderNode, placeFront);
}
@@ -727,6 +730,7 @@
* Only especially added render nodes can be removed.
* @param node The node which was added via addRenderNode which should get removed again.
*/
+ @UnsupportedAppUsage
public void removeRenderNode(RenderNode node) {
nRemoveRenderNode(mNativeProxy, node.mNativeRenderNode);
}
@@ -736,6 +740,7 @@
* nodes will get drawn and the content remains untouched.
* @param node The node to be drawn.
*/
+ @UnsupportedAppUsage
public void drawRenderNode(RenderNode node) {
nDrawRenderNode(mNativeProxy, node.mNativeRenderNode);
}
@@ -749,6 +754,7 @@
* @param right The right side of the protected bounds.
* @param bottom The bottom side of the protected bounds.
*/
+ @UnsupportedAppUsage
public void setContentDrawBounds(int left, int top, int right, int bottom) {
nSetContentDrawBounds(mNativeProxy, left, top, right, bottom);
}
@@ -929,6 +935,7 @@
* RenderNode. Note that the RenderNode should be created as a root node (so x/y of 0,0), and
* not the RenderNode from a View.
**/
+ @UnsupportedAppUsage
public static Bitmap createHardwareBitmap(RenderNode node, int width, int height) {
return nCreateHardwareBitmap(node.mNativeRenderNode, width, height);
}
diff --git a/core/java/android/view/TouchDelegate.java b/core/java/android/view/TouchDelegate.java
index d6c43e8..b361ab4 100644
--- a/core/java/android/view/TouchDelegate.java
+++ b/core/java/android/view/TouchDelegate.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
/**
@@ -51,6 +52,7 @@
/**
* True if the delegate had been targeted on a down event (intersected mBounds).
*/
+ @UnsupportedAppUsage
private boolean mDelegateTargeted;
/**
diff --git a/core/java/android/view/VelocityTracker.java b/core/java/android/view/VelocityTracker.java
index 22b5cca..7154f2b 100644
--- a/core/java/android/view/VelocityTracker.java
+++ b/core/java/android/view/VelocityTracker.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.util.Pools.SynchronizedPool;
/**
@@ -68,6 +69,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static VelocityTracker obtain(String strategy) {
if (strategy == null) {
return obtain();
@@ -235,21 +237,25 @@
/**
* Polynomial coefficients describing motion in X.
*/
+ @UnsupportedAppUsage
public final float[] xCoeff = new float[MAX_DEGREE + 1];
/**
* Polynomial coefficients describing motion in Y.
*/
+ @UnsupportedAppUsage
public final float[] yCoeff = new float[MAX_DEGREE + 1];
/**
* Polynomial degree, or zero if only position information is available.
*/
+ @UnsupportedAppUsage
public int degree;
/**
* Confidence (coefficient of determination), between 0 (no fit) and 1 (perfect fit).
*/
+ @UnsupportedAppUsage
public float confidence;
/**
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index e2e2b00..9bc53ed 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -35,6 +35,7 @@
import android.annotation.Size;
import android.annotation.TestApi;
import android.annotation.UiThread;
+import android.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.Context;
import android.content.ContextWrapper;
@@ -777,6 +778,7 @@
@UiThread
public class View implements Drawable.Callback, KeyEvent.Callback,
AccessibilityEventSource {
+ @UnsupportedAppUsage
private static final boolean DBG = false;
/** @hide */
@@ -799,6 +801,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String DEBUG_LAYOUT_PROPERTY = "debug.layout";
/**
@@ -2157,6 +2160,7 @@
/**
* Map used to store views' tags.
*/
+ @UnsupportedAppUsage
private SparseArray<Object> mKeyedTags;
/**
@@ -2175,6 +2179,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "measurement")
+ @UnsupportedAppUsage
int mMeasuredWidth;
/**
@@ -2182,6 +2187,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "measurement")
+ @UnsupportedAppUsage
int mMeasuredHeight;
/**
@@ -2193,6 +2199,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
boolean mRecreateDisplayList = false;
/**
@@ -2219,6 +2226,7 @@
private int mAutofillViewId = NO_ID;
// ID for accessibility purposes. This ID must be unique for every window
+ @UnsupportedAppUsage
private int mAccessibilityViewId = NO_ID;
private int mAccessibilityCursorPosition = ACCESSIBILITY_CURSOR_POSITION_UNDEFINED;
@@ -2230,6 +2238,7 @@
* @see #setTag(Object)
* @see #getTag()
*/
+ @UnsupportedAppUsage
protected Object mTag = null;
// for mPrivateFlags:
@@ -3522,6 +3531,7 @@
* Flag to make the status bar not expandable. Unless you also
* set {@link #STATUS_BAR_DISABLE_NOTIFICATION_ICONS}, new notifications will continue to show.
*/
+ @UnsupportedAppUsage
public static final int STATUS_BAR_DISABLE_EXPAND = 0x00010000;
/**
@@ -3576,6 +3586,7 @@
* Flag to hide only the home button. Don't use this
* unless you're a special part of the system UI (i.e., setup wizard, keyguard).
*/
+ @UnsupportedAppUsage
public static final int STATUS_BAR_DISABLE_HOME = 0x00200000;
/**
@@ -3587,6 +3598,7 @@
* Flag to hide only the back button. Don't use this
* unless you're a special part of the system UI (i.e., setup wizard, keyguard).
*/
+ @UnsupportedAppUsage
public static final int STATUS_BAR_DISABLE_BACK = 0x00400000;
/**
@@ -3609,6 +3621,7 @@
* Flag to hide only the recent apps button. Don't use this
* unless you're a special part of the system UI (i.e., setup wizard, keyguard).
*/
+ @UnsupportedAppUsage
public static final int STATUS_BAR_DISABLE_RECENT = 0x01000000;
/**
@@ -3640,6 +3653,7 @@
*
* Flag to specify that the navigation bar is displayed in transient mode.
*/
+ @UnsupportedAppUsage
public static final int NAVIGATION_BAR_TRANSIENT = 0x08000000;
/**
@@ -3813,11 +3827,13 @@
*
* @see #getParent()
*/
+ @UnsupportedAppUsage
protected ViewParent mParent;
/**
* {@hide}
*/
+ @UnsupportedAppUsage
AttachInfo mAttachInfo;
/**
@@ -3836,8 +3852,11 @@
}, formatToHexString = true)
/* @hide */
+ @UnsupportedAppUsage
public int mPrivateFlags;
+ @UnsupportedAppUsage
int mPrivateFlags2;
+ @UnsupportedAppUsage
int mPrivateFlags3;
/**
@@ -3949,6 +3968,7 @@
* laid out.
* {@hide}
*/
+ @UnsupportedAppUsage
protected ViewGroup.LayoutParams mLayoutParams;
/**
@@ -3956,6 +3976,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(formatToHexString = true)
+ @UnsupportedAppUsage
int mViewFlags;
static class TransformationInfo {
@@ -3993,6 +4014,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public TransformationInfo mTransformationInfo;
/**
@@ -4009,6 +4031,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
protected int mLeft;
/**
* The distance in pixels from the left edge of this view's parent
@@ -4016,6 +4039,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
protected int mRight;
/**
* The distance in pixels from the top edge of this view's parent
@@ -4023,6 +4047,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
protected int mTop;
/**
* The distance in pixels from the top edge of this view's parent
@@ -4030,6 +4055,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
protected int mBottom;
/**
@@ -4038,6 +4064,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "scrolling")
+ @UnsupportedAppUsage
protected int mScrollX;
/**
* The offset, in pixels, by which the content of this view is scrolled
@@ -4045,6 +4072,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "scrolling")
+ @UnsupportedAppUsage
protected int mScrollY;
/**
@@ -4053,6 +4081,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
protected int mPaddingLeft = 0;
/**
* The right padding in pixels, that is the distance in pixels between the
@@ -4060,6 +4089,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
protected int mPaddingRight = 0;
/**
* The top padding in pixels, that is the distance in pixels between the
@@ -4067,6 +4097,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
protected int mPaddingTop;
/**
* The bottom padding in pixels, that is the distance in pixels between the
@@ -4074,6 +4105,7 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
protected int mPaddingBottom;
/**
@@ -4199,6 +4231,7 @@
private LongSparseLongArray mMeasureCache;
@ViewDebug.ExportedProperty(deepExport = true, prefix = "bg_")
+ @UnsupportedAppUsage
private Drawable mBackground;
private TintInfo mBackgroundTint;
@@ -4216,6 +4249,7 @@
*/
private RenderNode mBackgroundRenderNode;
+ @UnsupportedAppUsage
private int mBackgroundResource;
private boolean mBackgroundSizeChanged;
@@ -4266,6 +4300,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected OnFocusChangeListener mOnFocusChangeListener;
/**
@@ -4285,6 +4320,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
public OnClickListener mOnClickListener;
/**
@@ -4292,6 +4328,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected OnLongClickListener mOnLongClickListener;
/**
@@ -4306,16 +4343,22 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected OnCreateContextMenuListener mOnCreateContextMenuListener;
+ @UnsupportedAppUsage
private OnKeyListener mOnKeyListener;
+ @UnsupportedAppUsage
private OnTouchListener mOnTouchListener;
+ @UnsupportedAppUsage
private OnHoverListener mOnHoverListener;
+ @UnsupportedAppUsage
private OnGenericMotionListener mOnGenericMotionListener;
+ @UnsupportedAppUsage
private OnDragListener mOnDragListener;
private OnSystemUiVisibilityChangeListener mOnSystemUiVisibilityChangeListener;
@@ -4327,6 +4370,7 @@
private ArrayList<OnUnhandledKeyEventListener> mUnhandledKeyListeners;
}
+ @UnsupportedAppUsage
ListenerInfo mListenerInfo;
private static class TooltipInfo {
@@ -4405,10 +4449,13 @@
* {@hide}
*/
@ViewDebug.ExportedProperty(deepExport = true)
+ @UnsupportedAppUsage
protected Context mContext;
+ @UnsupportedAppUsage
private final Resources mResources;
+ @UnsupportedAppUsage
private ScrollabilityCache mScrollCache;
private int[] mDrawableState = null;
@@ -4464,6 +4511,7 @@
boolean mDefaultFocusHighlightEnabled = true;
private CheckForLongPress mPendingCheckForLongPress;
+ @UnsupportedAppUsage
private CheckForTap mPendingCheckForTap = null;
private PerformClick mPerformClick;
private SendViewScrolledAccessibilityEvent mSendViewScrolledAccessibilityEvent;
@@ -4476,6 +4524,7 @@
* a long press could be performed before the tap is checked, in which case the tap's action
* should not be invoked.
*/
+ @UnsupportedAppUsage
private boolean mHasPerformedLongPress;
/**
@@ -4497,6 +4546,7 @@
* of this view to at least this amount.
*/
@ViewDebug.ExportedProperty(category = "measurement")
+ @UnsupportedAppUsage
private int mMinHeight;
/**
@@ -4504,6 +4554,7 @@
* of this view to at least this amount.
*/
@ViewDebug.ExportedProperty(category = "measurement")
+ @UnsupportedAppUsage
private int mMinWidth;
/**
@@ -4531,6 +4582,7 @@
/**
* Object that handles automatic animation of view properties.
*/
+ @UnsupportedAppUsage
private ViewPropertyAnimator mAnimator = null;
/**
@@ -4599,6 +4651,7 @@
/**
* Position of the vertical scroll bar.
*/
+ @UnsupportedAppUsage
private int mVerticalScrollbarPosition;
/**
@@ -4692,8 +4745,11 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean mCachingFailed;
+ @UnsupportedAppUsage
private Bitmap mDrawingCache;
+ @UnsupportedAppUsage
private Bitmap mUnscaledDrawingCache;
/**
@@ -4703,6 +4759,7 @@
* of the View content. Its DisplayList content is cleared on temporary detach and reset on
* cleanup.
*/
+ @UnsupportedAppUsage
final RenderNode mRenderNode;
/**
@@ -4714,6 +4771,7 @@
/**
* Delegate for injecting accessibility functionality.
*/
+ @UnsupportedAppUsage
AccessibilityDelegate mAccessibilityDelegate;
/**
@@ -4775,6 +4833,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
String mStartActivityRequestWho;
@Nullable
@@ -5670,6 +5729,7 @@
/**
* Non-public constructor for use in testing
*/
+ @UnsupportedAppUsage
View() {
mResources = null;
mRenderNode = RenderNode.create(getClass().getName(), this);
@@ -5993,6 +6053,7 @@
* @param a the styled attributes set to initialize the scrollbars from
* @hide
*/
+ @UnsupportedAppUsage
protected void initializeScrollbarsInternal(TypedArray a) {
initScrollCache();
@@ -6085,6 +6146,7 @@
}
}
+ @UnsupportedAppUsage
private ScrollabilityCache getScrollCache() {
initScrollCache();
return mScrollCache;
@@ -6140,6 +6202,7 @@
return false;
}
+ @UnsupportedAppUsage
boolean isOnScrollbarThumb(float x, float y) {
return isOnVerticalScrollbarThumb(x, y) || isOnHorizontalScrollbarThumb(x, y);
}
@@ -6199,6 +6262,7 @@
return false;
}
+ @UnsupportedAppUsage
boolean isDraggingScrollBar() {
return mScrollCache != null
&& mScrollCache.mScrollBarDraggingState != ScrollabilityCache.NOT_DRAGGING;
@@ -6287,6 +6351,7 @@
>>> SCROLL_INDICATORS_TO_PFLAGS3_LSHIFT;
}
+ @UnsupportedAppUsage
ListenerInfo getListenerInfo() {
if (mListenerInfo != null) {
return mListenerInfo;
@@ -6811,6 +6876,7 @@
* @param requestCode The request code to use.
* @hide
*/
+ @UnsupportedAppUsage
public void startActivityForResult(Intent intent, int requestCode) {
mStartActivityRequestWho = "@android:view:" + System.identityHashCode(this);
getContext().startActivityForResult(mStartActivityRequestWho, intent, requestCode, null);
@@ -7594,6 +7660,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
event.setSource(this);
event.setClassName(getAccessibilityClassName());
@@ -7709,6 +7776,7 @@
* @param outRect The output location
* @hide
*/
+ @UnsupportedAppUsage
public void getBoundsOnScreen(Rect outRect) {
getBoundsOnScreen(outRect, false);
}
@@ -7720,6 +7788,7 @@
* @param clipToParent Whether to clip child bounds to the parent ones.
* @hide
*/
+ @UnsupportedAppUsage
public void getBoundsOnScreen(Rect outRect, boolean clipToParent) {
if (mAttachInfo == null) {
return;
@@ -8747,14 +8816,10 @@
info.setContentDescription(getContentDescription());
info.setEnabled(isEnabled());
- info.setClickable(isClickable());
- info.setFocusable(isFocusable());
info.setScreenReaderFocusable(isScreenReaderFocusable());
info.setFocused(isFocused());
info.setAccessibilityFocused(isAccessibilityFocused());
info.setSelected(isSelected());
- info.setLongClickable(isLongClickable());
- info.setContextClickable(isContextClickable());
info.setLiveRegion(getAccessibilityLiveRegion());
if ((mTooltipInfo != null) && (mTooltipInfo.mTooltipText != null)) {
info.setTooltipText(mTooltipInfo.mTooltipText);
@@ -8947,6 +9012,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isVisibleToUser() {
return isVisibleToUser(null);
}
@@ -8968,6 +9034,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected boolean isVisibleToUser(Rect boundInView) {
if (mAttachInfo != null) {
// Attached to invisible window means this view is not visible.
@@ -9008,8 +9075,6 @@
* composition. For more details see {@link AccessibilityDelegate}.
*
* @return The delegate, or null if none set.
- *
- * @hide
*/
public AccessibilityDelegate getAccessibilityDelegate() {
return mAccessibilityDelegate;
@@ -9077,6 +9142,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getAccessibilityViewId() {
if (mAccessibilityViewId == NO_ID) {
mAccessibilityViewId = sNextAccessibilityViewId++;
@@ -9296,6 +9362,7 @@
* @hide pending API council approval
*/
@CallSuper
+ @UnsupportedAppUsage
protected void onFocusLost() {
resetPressedState();
}
@@ -9821,6 +9888,7 @@
* @hide
* @param location an array of two integers in which to hold the coordinates
*/
+ @UnsupportedAppUsage
public void getLocationInSurface(@Size(2) int[] location) {
getLocationInWindow(location);
if (mAttachInfo != null && mAttachInfo.mViewRootImpl != null) {
@@ -9854,6 +9922,7 @@
* @return
*/
@Deprecated
+ @UnsupportedAppUsage
protected boolean computeFitSystemWindows(Rect inoutInsets, Rect outLocalInsets) {
WindowInsets innerInsets = computeSystemWindowInsets(new WindowInsets(inoutInsets),
outLocalInsets);
@@ -9929,6 +9998,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean fitsSystemWindows() {
return getFitsSystemWindows();
}
@@ -9955,6 +10025,7 @@
* For use by PhoneWindow to make its own system window fitting optional.
* @hide
*/
+ @UnsupportedAppUsage
public void makeOptionalFitsSystemWindows() {
setFlags(OPTIONAL_FITS_SYSTEM_WINDOWS, OPTIONAL_FITS_SYSTEM_WINDOWS);
}
@@ -10299,6 +10370,7 @@
* @hide
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
public boolean isLayoutRtl() {
return (getLayoutDirection() == LAYOUT_DIRECTION_RTL);
}
@@ -10629,6 +10701,7 @@
* @see #onProvideVirtualStructure
* @attr ref android.R.styleable#View_assistBlocked
*/
+ @UnsupportedAppUsage
public void setAssistBlocked(boolean enabled) {
if (enabled) {
mPrivateFlags3 |= PFLAG3_ASSIST_BLOCKED;
@@ -11318,6 +11391,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean requestAccessibilityFocus() {
AccessibilityManager manager = AccessibilityManager.getInstance(mContext);
if (!manager.isEnabled() || !manager.isTouchExplorationEnabled()) {
@@ -11347,6 +11421,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void clearAccessibilityFocus() {
clearAccessibilityFocusNoCallbacks(0);
@@ -11861,6 +11936,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean includeForAccessibility() {
if (mAttachInfo != null) {
return (mAttachInfo.mAccessibilityFetchFlags
@@ -11907,6 +11983,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void notifyViewAccessibilityStateChangedIfNeeded(int changeType) {
if (!AccessibilityManager.getInstance(mContext).isEnabled() || mAttachInfo == null) {
return;
@@ -11966,6 +12043,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void notifySubtreeAccessibilityStateChangedIfNeeded() {
if (!AccessibilityManager.getInstance(mContext).isEnabled() || mAttachInfo == null) {
return;
@@ -12069,6 +12147,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean performAccessibilityActionInternal(int action, Bundle arguments) {
if (isNestedScrollingEnabled()
&& (action == AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD
@@ -12246,6 +12325,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CharSequence getIterableTextForAccessibility() {
return getContentDescription();
}
@@ -12309,6 +12389,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public TextSegmentIterator getIteratorForGranularity(int granularity) {
switch (granularity) {
case AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER: {
@@ -12755,6 +12836,7 @@
* @return True if the event was handled by the view, false otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public final boolean dispatchPointerEvent(MotionEvent event) {
if (event.isTouchEvent()) {
return dispatchTouchEvent(event);
@@ -13028,6 +13110,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void getWindowDisplayFrame(Rect outRect) {
if (mAttachInfo != null) {
try {
@@ -13890,6 +13973,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isInScrollingContainer() {
ViewParent p = getParent();
while (p != null && p instanceof ViewGroup) {
@@ -13913,6 +13997,7 @@
/**
* Remove the pending click action
*/
+ @UnsupportedAppUsage
private void removePerformClickCallback() {
if (mPerformClick != null) {
removeCallbacks(mPerformClick);
@@ -14011,6 +14096,7 @@
* @param flags Constant indicating the value which should be set
* @param mask Constant indicating the bit range that should be changed
*/
+ @UnsupportedAppUsage
void setFlags(int flags, int mask) {
final boolean accessibilityEnabled =
AccessibilityManager.getInstance(mContext).isEnabled();
@@ -14549,10 +14635,12 @@
*
* @return True if the transform matrix is the identity matrix, false otherwise.
*/
+ @UnsupportedAppUsage
final boolean hasIdentityMatrix() {
return mRenderNode.hasIdentityMatrix();
}
+ @UnsupportedAppUsage
void ensureTransformationInfo() {
if (mTransformationInfo == null) {
mTransformationInfo = new TransformationInfo();
@@ -14567,6 +14655,7 @@
* @return The inverse of the current matrix of this view.
* @hide
*/
+ @UnsupportedAppUsage
public final Matrix getInverseMatrix() {
ensureTransformationInfo();
if (mTransformationInfo.mInverseMatrix == null) {
@@ -15079,6 +15168,7 @@
* @return true if the View subclass handles alpha (the return value for onSetAlpha()) and
* the new value for the alpha property is different from the old value
*/
+ @UnsupportedAppUsage
boolean setAlphaNoInvalidation(float alpha) {
ensureTransformationInfo();
if (mTransformationInfo.mAlpha != alpha) {
@@ -15113,6 +15203,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setTransitionAlpha(float alpha) {
ensureTransformationInfo();
if (mTransformationInfo.mTransitionAlpha != alpha) {
@@ -15144,6 +15235,7 @@
* @hide
*/
@ViewDebug.ExportedProperty(category = "drawing")
+ @UnsupportedAppUsage
public float getTransitionAlpha() {
return mTransformationInfo != null ? mTransformationInfo.mTransitionAlpha : 1;
}
@@ -15629,6 +15721,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setAnimationMatrix(Matrix matrix) {
invalidateViewProperty(true, false);
mRenderNode.setAnimationMatrix(matrix);
@@ -15903,6 +15996,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean pointInView(float localX, float localY, float slop) {
return localX >= -slop && localY >= -slop && localX < ((mRight - mLeft) + slop) &&
localY < ((mBottom - mTop) + slop);
@@ -16402,6 +16496,7 @@
* dimensions have not changed.
* @hide
*/
+ @UnsupportedAppUsage
public void invalidate(boolean invalidateCache) {
invalidateInternal(0, 0, mRight - mLeft, mBottom - mTop, invalidateCache, true);
}
@@ -16491,6 +16586,7 @@
* @param forceRedraw Mark the view as DRAWN to force the invalidation to propagate, if display
* list properties are not being used in this view
*/
+ @UnsupportedAppUsage
void invalidateViewProperty(boolean invalidateParent, boolean forceRedraw) {
if (!isHardwareAccelerated()
|| !mRenderNode.isValid()
@@ -16542,6 +16638,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected void invalidateParentCaches() {
if (mParent instanceof View) {
((View) mParent).mPrivateFlags |= PFLAG_INVALIDATED;
@@ -16557,6 +16654,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected void invalidateParentIfNeeded() {
if (isHardwareAccelerated() && mParent instanceof View) {
((View) mParent).invalidate(true);
@@ -16593,6 +16691,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected void computeOpaqueFlags() {
// Opaque if:
// - Has a background
@@ -16651,6 +16750,7 @@
* @return The view root, or null if none.
* @hide
*/
+ @UnsupportedAppUsage
public ViewRootImpl getViewRootImpl() {
if (mAttachInfo != null) {
return mAttachInfo.mViewRootImpl;
@@ -16661,6 +16761,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public ThreadedRenderer getThreadedRenderer() {
return mAttachInfo != null ? mAttachInfo.mThreadedRenderer : null;
}
@@ -17151,6 +17252,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected void recomputePadding() {
internalSetPadding(mUserPaddingLeft, mPaddingTop, mUserPaddingRight, mUserPaddingBottom);
}
@@ -17754,6 +17856,7 @@
* @see #computeHorizontalScrollOffset()
* @hide
*/
+ @UnsupportedAppUsage
protected void onDrawHorizontalScrollBar(Canvas canvas, Drawable scrollBar,
int l, int t, int r, int b) {
scrollBar.setBounds(l, t, r, b);
@@ -17773,6 +17876,7 @@
* @see #computeVerticalScrollOffset()
* @hide
*/
+ @UnsupportedAppUsage
protected void onDrawVerticalScrollBar(Canvas canvas, Drawable scrollBar,
int l, int t, int r, int b) {
scrollBar.setBounds(l, t, r, b);
@@ -17791,6 +17895,7 @@
* Caller is responsible for calling requestLayout if necessary.
* (This allows addViewInLayout to not request a new layout.)
*/
+ @UnsupportedAppUsage
void assignParent(ViewParent parent) {
if (mParent == null) {
mParent = parent;
@@ -17873,6 +17978,7 @@
*
* @hide
*/
+ @TestApi
public void resetRtlProperties() {
resetResolvedLayoutDirection();
resetResolvedTextDirection();
@@ -17935,6 +18041,7 @@
/**
* Return true if the application tag in the AndroidManifest has set "supportRtl" to true
*/
+ @UnsupportedAppUsage
private boolean hasRtlSupport() {
return mContext.getApplicationInfo().hasRtlSupport();
}
@@ -18054,6 +18161,7 @@
*
* @hide
*/
+ @TestApi
public void resetResolvedLayoutDirection() {
// Reset the current resolved bits
mPrivateFlags2 &= ~PFLAG2_LAYOUT_DIRECTION_RESOLVED_MASK;
@@ -18080,6 +18188,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
boolean isPaddingResolved() {
return (mPrivateFlags2 & PFLAG2_PADDING_RESOLVED) == PFLAG2_PADDING_RESOLVED;
}
@@ -18090,6 +18199,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void resolvePadding() {
final int resolvedLayoutDirection = getLayoutDirection();
@@ -18153,6 +18263,7 @@
*
* @hide
*/
+ @TestApi
public void resetResolvedPadding() {
resetResolvedPaddingInternal();
}
@@ -18186,6 +18297,7 @@
* @hide
*/
@CallSuper
+ @UnsupportedAppUsage
protected void onDetachedFromWindowInternal() {
mPrivateFlags &= ~PFLAG_CANCEL_NEXT_UP_EVENT;
mPrivateFlags3 &= ~PFLAG3_IS_LAID_OUT;
@@ -18294,6 +18406,7 @@
* communicate with the window manager.
* @return the session object to communicate with the window manager
*/
+ @UnsupportedAppUsage
/*package*/ IWindowSession getWindowSession() {
return mAttachInfo != null ? mAttachInfo.mSession : null;
}
@@ -18319,6 +18432,7 @@
* @param info the {@link android.view.View.AttachInfo} to associated with
* this view
*/
+ @UnsupportedAppUsage
void dispatchAttachedToWindow(AttachInfo info, int visibility) {
mAttachInfo = info;
if (mOverlay != null) {
@@ -18383,6 +18497,7 @@
notifyEnterOrExitForAutoFillIfNeeded(true);
}
+ @UnsupportedAppUsage
void dispatchDetachedFromWindow() {
AttachInfo info = mAttachInfo;
if (info != null) {
@@ -18888,6 +19003,7 @@
* @hide
*/
@CallSuper
+ @UnsupportedAppUsage
protected void destroyHardwareResources() {
if (mOverlay != null) {
mOverlay.getOverlayView().destroyHardwareResources();
@@ -19023,6 +19139,7 @@
* @hide
*/
@NonNull
+ @UnsupportedAppUsage
public RenderNode updateDisplayListIfDirty() {
final RenderNode renderNode = mRenderNode;
if (!canHaveDisplayList()) {
@@ -19093,6 +19210,7 @@
return renderNode;
}
+ @UnsupportedAppUsage
private void resetDisplayList() {
mRenderNode.discardDisplayList();
if (mBackgroundRenderNode != null) {
@@ -19493,6 +19611,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Bitmap createSnapshot(ViewDebug.CanvasProvider canvasProvider, boolean skipChildren) {
int width = mRight - mLeft;
int height = mBottom - mTop;
@@ -20381,6 +20500,7 @@
*
* @param canvas Canvas on which to draw the background
*/
+ @UnsupportedAppUsage
private void drawBackground(Canvas canvas) {
final Drawable background = mBackground;
if (background == null) {
@@ -20770,6 +20890,7 @@
* previous ones
* {@hide}
*/
+ @UnsupportedAppUsage
protected boolean setFrame(int left, int top, int right, int bottom) {
boolean changed = false;
@@ -20837,6 +20958,7 @@
* Same as setFrame, but public and hidden. For use in {@link android.transition.ChangeBounds}.
* @hide
*/
+ @UnsupportedAppUsage
public void setLeftTopRightBottom(int left, int top, int right, int bottom) {
setFrame(left, top, right, bottom);
}
@@ -21023,6 +21145,7 @@
/**
* @hide
*/
+ @TestApi
protected void resetResolvedDrawables() {
resetResolvedDrawablesInternal();
}
@@ -22022,6 +22145,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected void internalSetPadding(int left, int top, int right, int bottom) {
mUserPaddingLeft = left;
mUserPaddingRight = right;
@@ -22216,6 +22340,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void resetPaddingToInitialValues() {
if (isRtlCompatibilityMode()) {
mPaddingLeft = mUserPaddingLeftInitial;
@@ -22395,6 +22520,7 @@
* @return false if the transformation could not be applied
* @hide
*/
+ @UnsupportedAppUsage
public boolean toGlobalMotionEvent(MotionEvent ev) {
final AttachInfo info = mAttachInfo;
if (info == null) {
@@ -22416,6 +22542,7 @@
* @return false if the transformation could not be applied
* @hide
*/
+ @UnsupportedAppUsage
public boolean toLocalMotionEvent(MotionEvent ev) {
final AttachInfo info = mAttachInfo;
if (info == null) {
@@ -22436,6 +22563,7 @@
* @param m input matrix to modify
* @hide
*/
+ @UnsupportedAppUsage
public void transformMatrixToGlobal(Matrix m) {
final ViewParent parent = mParent;
if (parent instanceof View) {
@@ -22462,6 +22590,7 @@
* @param m input matrix to modify
* @hide
*/
+ @UnsupportedAppUsage
public void transformMatrixToLocal(Matrix m) {
final ViewParent parent = mParent;
if (parent instanceof View) {
@@ -22488,6 +22617,7 @@
@ViewDebug.IntToString(from = 0, to = "x"),
@ViewDebug.IntToString(from = 1, to = "y")
})
+ @UnsupportedAppUsage
public int[] getLocationOnScreen() {
int[] location = new int[2];
getLocationOnScreen(location);
@@ -22668,6 +22798,7 @@
* @param accessibilityId The searched accessibility id.
* @return The found view.
*/
+ @UnsupportedAppUsage
final <T extends View> T findViewByAccessibilityId(int accessibilityId) {
if (accessibilityId < 0) {
return null;
@@ -22804,6 +22935,7 @@
* @param isRoot true if the view belongs to the root namespace, false
* otherwise
*/
+ @TestApi
public void setIsRootNamespace(boolean isRoot) {
if (isRoot) {
mPrivateFlags |= PFLAG_IS_ROOT_NAMESPACE;
@@ -22817,6 +22949,7 @@
*
* @return true if the view belongs to the root namespace, false otherwise
*/
+ @UnsupportedAppUsage
public boolean isRootNamespace() {
return (mPrivateFlags&PFLAG_IS_ROOT_NAMESPACE) != 0;
}
@@ -22920,6 +23053,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setTagInternal(int key, Object tag) {
if ((key >>> 24) != 0x1) {
throw new IllegalArgumentException("The key must be a framework-specific "
@@ -22943,6 +23077,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void debug() {
debug(0);
}
@@ -22956,6 +23091,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected void debug(int depth) {
String output = debugIndent(depth - 1);
@@ -23578,6 +23714,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean gatherTransparentRegion(Region region) {
final AttachInfo attachInfo = mAttachInfo;
if (region != null && attachInfo != null) {
@@ -23805,6 +23942,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setDisabledSystemUiVisibility(int flags) {
if (mAttachInfo != null) {
if (mAttachInfo.mDisabledSystemUiVisibility != flags) {
@@ -23845,6 +23983,7 @@
* </div>
*/
public static class DragShadowBuilder {
+ @UnsupportedAppUsage
private final WeakReference<View> mView;
/**
@@ -24272,6 +24411,7 @@
* it is ever exposed at all.
* @hide
*/
+ @UnsupportedAppUsage
public void onCloseSystemDialogs(String reason) {
}
@@ -24290,6 +24430,7 @@
* Drawable that are not transparent.
* {@hide}
*/
+ @UnsupportedAppUsage
public void applyDrawableToTransparentRegion(Drawable dr, Region region) {
if (DBG) {
Log.i("View", "Getting transparent region for: " + this);
@@ -24785,6 +24926,7 @@
* @return The vertical scroll scale factor.
* @hide
*/
+ @UnsupportedAppUsage
protected float getVerticalScrollFactor() {
if (mVerticalScrollFactor == 0) {
TypedValue outValue = new TypedValue();
@@ -24805,6 +24947,7 @@
* @return The horizontal scroll scale factor.
* @hide
*/
+ @UnsupportedAppUsage
protected float getHorizontalScrollFactor() {
// TODO: Should use something else.
return getVerticalScrollFactor();
@@ -24839,6 +24982,7 @@
@ViewDebug.IntToString(from = TEXT_DIRECTION_FIRST_STRONG_LTR, to = "FIRST_STRONG_LTR"),
@ViewDebug.IntToString(from = TEXT_DIRECTION_FIRST_STRONG_RTL, to = "FIRST_STRONG_RTL")
})
+ @UnsupportedAppUsage
public int getRawTextDirection() {
return (mPrivateFlags2 & PFLAG2_TEXT_DIRECTION_MASK) >> PFLAG2_TEXT_DIRECTION_MASK_SHIFT;
}
@@ -25025,6 +25169,7 @@
*
* @hide
*/
+ @TestApi
public void resetResolvedTextDirection() {
// Reset any previous text direction resolution
mPrivateFlags2 &= ~(PFLAG2_TEXT_DIRECTION_RESOLVED | PFLAG2_TEXT_DIRECTION_RESOLVED_MASK);
@@ -25076,6 +25221,7 @@
@ViewDebug.IntToString(from = TEXT_ALIGNMENT_VIEW_END, to = "VIEW_END")
})
@TextAlignment
+ @UnsupportedAppUsage
public int getRawTextAlignment() {
return (mPrivateFlags2 & PFLAG2_TEXT_ALIGNMENT_MASK) >> PFLAG2_TEXT_ALIGNMENT_MASK_SHIFT;
}
@@ -25262,6 +25408,7 @@
*
* @hide
*/
+ @TestApi
public void resetResolvedTextAlignment() {
// Reset any previous text alignment resolution
mPrivateFlags2 &= ~(PFLAG2_TEXT_ALIGNMENT_RESOLVED | PFLAG2_TEXT_ALIGNMENT_RESOLVED_MASK);
@@ -25764,6 +25911,7 @@
*
* @hide internal use only for compatibility with system widgets and older apps
*/
+ @UnsupportedAppUsage
public static int makeSafeMeasureSpec(int size, int mode) {
if (sUseZeroUnspecifiedMeasureSpec && mode == UNSPECIFIED) {
return 0;
@@ -26315,11 +26463,16 @@
private static final SynchronizedPool<InvalidateInfo> sPool =
new SynchronizedPool<InvalidateInfo>(POOL_LIMIT);
+ @UnsupportedAppUsage
View target;
+ @UnsupportedAppUsage
int left;
+ @UnsupportedAppUsage
int top;
+ @UnsupportedAppUsage
int right;
+ @UnsupportedAppUsage
int bottom;
public static InvalidateInfo obtain() {
@@ -26333,8 +26486,10 @@
}
}
+ @UnsupportedAppUsage
final IWindowSession mSession;
+ @UnsupportedAppUsage
final IWindow mWindow;
final IBinder mWindowToken;
@@ -26365,16 +26520,19 @@
* constants declared by {@link View} (there are more display states than
* screen states).
*/
+ @UnsupportedAppUsage
int mDisplayState = Display.STATE_UNKNOWN;
/**
* Scale factor used by the compatibility mode
*/
+ @UnsupportedAppUsage
float mApplicationScale;
/**
* Indicates whether the application is in compatibility mode
*/
+ @UnsupportedAppUsage
boolean mScalingRequired;
/**
@@ -26404,6 +26562,7 @@
* of the screen decorations, these are the current insets for the
* content of the window.
*/
+ @UnsupportedAppUsage
final Rect mContentInsets = new Rect();
/**
@@ -26411,6 +26570,7 @@
* of the screen decorations, these are the current insets for the
* actual visible parts of the window.
*/
+ @UnsupportedAppUsage
final Rect mVisibleInsets = new Rect();
/**
@@ -26418,6 +26578,7 @@
* of the screen decorations, these are the current insets for the
* stable system windows.
*/
+ @UnsupportedAppUsage
final Rect mStableInsets = new Rect();
final DisplayCutout.ParcelableWrapper mDisplayCutout =
@@ -26443,6 +26604,7 @@
* be given to the window manager when changed to be used in laying
* out windows behind it.
*/
+ @UnsupportedAppUsage
final ViewTreeObserver.InternalInsetsInfo mGivenInternalInsets
= new ViewTreeObserver.InternalInsetsInfo();
@@ -26456,14 +26618,17 @@
* used to determine if the window can be resized or must be panned
* to adjust for a soft input area.
*/
+ @UnsupportedAppUsage
final ArrayList<View> mScrollContainers = new ArrayList<View>();
+ @UnsupportedAppUsage
final KeyEvent.DispatcherState mKeyDispatchState
= new KeyEvent.DispatcherState();
/**
* Indicates whether the view's window currently has the focus.
*/
+ @UnsupportedAppUsage
boolean mHasWindowFocus;
/**
@@ -26474,11 +26639,13 @@
/**
* Indicates the time at which drawing started to occur.
*/
+ @UnsupportedAppUsage
long mDrawingTime;
/**
* Indicates whether the view's window is currently in touch mode.
*/
+ @UnsupportedAppUsage
boolean mInTouchMode;
/**
@@ -26491,6 +26658,7 @@
* Indicates that ViewAncestor should trigger a global layout change
* the next time it performs a traversal
*/
+ @UnsupportedAppUsage
boolean mRecomputeGlobalAttributes;
/**
@@ -26501,6 +26669,7 @@
/**
* Set during a traveral if any views want to keep the screen on.
*/
+ @UnsupportedAppUsage
boolean mKeepScreenOn;
/**
@@ -26538,11 +26707,13 @@
/**
* Set if the visibility of any views has changed.
*/
+ @UnsupportedAppUsage
boolean mViewVisibilityChanged;
/**
* Set to true if a view has been scrolled.
*/
+ @UnsupportedAppUsage
boolean mViewScrollChanged;
/**
@@ -26578,6 +26749,7 @@
* The view tree observer used to dispatch global events like
* layout, pre-draw, touch mode change, etc.
*/
+ @UnsupportedAppUsage
final ViewTreeObserver mTreeObserver;
/**
@@ -26594,6 +26766,7 @@
* A Handler supplied by a view's {@link android.view.ViewRootImpl}. This
* handler can be used to pump events in the UI events queue.
*/
+ @UnsupportedAppUsage
final Handler mHandler;
/**
@@ -26756,8 +26929,10 @@
public int scrollBarSize;
public int scrollBarMinTouchTarget;
+ @UnsupportedAppUsage
public ScrollBarDrawable scrollBar;
public float[] interpolatorValues;
+ @UnsupportedAppUsage
public View host;
public final Paint paint;
@@ -26779,6 +26954,7 @@
/**
* The current state of the scrollbars: ON, OFF, or FADING
*/
+ @UnsupportedAppUsage
public int state = OFF;
private int mLastColor;
@@ -26897,6 +27073,7 @@
* Remove the pending callback for sending a
* {@link AccessibilityEvent#TYPE_VIEW_SCROLLED} accessibility event.
*/
+ @UnsupportedAppUsage
private void cancel(@Nullable SendViewScrolledAccessibilityEvent callback) {
if (callback == null || !callback.mIsPending) return;
removeCallbacks(callback);
@@ -27211,6 +27388,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public AccessibilityNodeInfo createAccessibilityNodeInfo(View host) {
return host.createAccessibilityNodeInfoInternal();
}
@@ -27479,6 +27657,7 @@
/**
* @hide Binary compatibility stub. To be removed when we finalize O APIs.
*/
+ @UnsupportedAppUsage
public void setTooltip(@Nullable CharSequence tooltipText) {
setTooltipText(tooltipText);
}
@@ -27528,6 +27707,7 @@
return true;
}
+ @UnsupportedAppUsage
void hideTooltip() {
if (mTooltipInfo == null) {
return;
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 7a9de45..767cd33 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.AppGlobals;
import android.content.Context;
import android.content.res.Configuration;
@@ -224,6 +225,7 @@
/**
* The coefficient of friction applied to flings/scrolls.
*/
+ @UnsupportedAppUsage
private static final float SCROLL_FRICTION = 0.015f;
/**
@@ -299,15 +301,19 @@
private final int mMaximumDrawingCacheSize;
private final int mOverscrollDistance;
private final int mOverflingDistance;
+ @UnsupportedAppUsage
private final boolean mFadingMarqueeEnabled;
private final long mGlobalActionsKeyTimeout;
private final float mVerticalScrollFactor;
private final float mHorizontalScrollFactor;
private final boolean mShowMenuShortcutsWhenKeyboardPresent;
+ @UnsupportedAppUsage
private boolean sHasPermanentMenuKey;
+ @UnsupportedAppUsage
private boolean sHasPermanentMenuKeySet;
+ @UnsupportedAppUsage
static final SparseArray<ViewConfiguration> sConfigurations =
new SparseArray<ViewConfiguration>(2);
@@ -589,6 +595,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getDoubleTapMinTime() {
return DOUBLE_TAP_MIN_TIME;
}
@@ -609,6 +616,7 @@
* to a hover movement gesture.
* @hide
*/
+ @UnsupportedAppUsage
public static int getHoverTapSlop() {
return HOVER_TAP_SLOP;
}
@@ -662,6 +670,7 @@
* potential double tap event
* @hide
*/
+ @UnsupportedAppUsage
public int getScaledDoubleTapTouchSlop() {
return mDoubleTapTouchSlop;
}
@@ -682,6 +691,7 @@
* for clients that still use its deprecated constructor.
*/
@Deprecated
+ @UnsupportedAppUsage
public static int getDoubleTapSlop() {
return DOUBLE_TAP_SLOP;
}
@@ -857,6 +867,7 @@
* the global actions dialog.
* @hide
*/
+ @TestApi
public long getDeviceGlobalActionKeyTimeout() {
return mGlobalActionsKeyTimeout;
}
@@ -928,6 +939,7 @@
* @hide
* @return Whether or not marquee should use fading edges.
*/
+ @UnsupportedAppUsage
public boolean isFadingMarqueeEnabled() {
return mFadingMarqueeEnabled;
}
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index e4c595b..8dd0347 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
@@ -372,6 +373,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static long getViewInstanceCount() {
return Debug.countInstancesOfClass(View.class);
}
@@ -383,6 +385,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static long getViewRootImplCount() {
return Debug.countInstancesOfClass(ViewRootImpl.class);
}
@@ -434,6 +437,7 @@
public static void stopHierarchyTracing() {
}
+ @UnsupportedAppUsage
static void dispatchCommand(View view, String command, String parameters,
OutputStream clientStream) throws IOException {
@@ -803,6 +807,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static void dump(View root, boolean skipChildren, boolean includeProperties,
OutputStream clientStream) throws IOException {
BufferedWriter out = null;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 2ae2308..0119d2e 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -24,6 +24,7 @@
import android.annotation.NonNull;
import android.annotation.TestApi;
import android.annotation.UiThread;
+import android.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
@@ -120,6 +121,7 @@
public abstract class ViewGroup extends View implements ViewParent, ViewManager {
private static final String TAG = "ViewGroup";
+ @UnsupportedAppUsage
private static final boolean DBG = false;
/**
@@ -128,6 +130,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected ArrayList<View> mDisappearingChildren;
/**
@@ -136,9 +139,11 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected OnHierarchyChangeListener mOnHierarchyChangeListener;
// The view contained within this ViewGroup that has or contains focus.
+ @UnsupportedAppUsage
private View mFocused;
// The view contained within this ViewGroup (excluding nested keyboard navigation clusters)
// that is or contains a default-focus view.
@@ -183,6 +188,7 @@
private Animation.AnimationListener mAnimationListener;
// First touch target in the linked list of touch targets.
+ @UnsupportedAppUsage
private TouchTarget mFirstTouchTarget;
// For debugging only. You can see these in hierarchyviewer.
@@ -230,6 +236,7 @@
@ViewDebug.FlagToString(mask = FLAG_PADDING_NOT_NULL, equals = FLAG_PADDING_NOT_NULL,
name = "PADDING_NOT_NULL")
}, formatToHexString = true)
+ @UnsupportedAppUsage
protected int mGroupFlags;
/**
@@ -290,6 +297,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected static final int FLAG_USE_CHILD_DRAWING_ORDER = 0x400;
/**
@@ -303,6 +311,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
protected static final int FLAG_SUPPORT_STATIC_TRANSFORMATIONS = 0x800;
// UNUSED FLAG VALUE: 0x1000;
@@ -356,6 +365,7 @@
* When set, this ViewGroup should not intercept touch events.
* {@hide}
*/
+ @UnsupportedAppUsage
protected static final int FLAG_DISALLOW_INTERCEPT = 0x80000;
/**
@@ -418,6 +428,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected int mPersistentDrawingCache;
/**
@@ -530,9 +541,11 @@
private static final int CHILD_TOP_INDEX = 1;
// Child views of this ViewGroup
+ @UnsupportedAppUsage
private View[] mChildren;
// Number of valid children in the mChildren array, the rest should be null or not
// considered as children
+ @UnsupportedAppUsage
private int mChildrenCount;
// Whether layout calls are currently being suppressed, controlled by calls to
@@ -1480,6 +1493,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public void makeOptionalFitsSystemWindows() {
super.makeOptionalFitsSystemWindows();
final int count = mChildrenCount;
@@ -1508,6 +1522,7 @@
* @param newVisibility The new visibility value (GONE, INVISIBLE, or VISIBLE).
* @hide
*/
+ @UnsupportedAppUsage
protected void onChildVisibilityChanged(View child, int oldVisibility, int newVisibility) {
if (mTransition != null) {
if (newVisibility == VISIBLE) {
@@ -2907,6 +2922,7 @@
}
}
+ @UnsupportedAppUsage
private void cancelTouchTarget(View view) {
TouchTarget predecessor = null;
TouchTarget target = mFirstTouchTarget;
@@ -2955,6 +2971,7 @@
* Child must not be null.
* @hide
*/
+ @UnsupportedAppUsage
protected boolean isTransformedTouchPointInView(float x, float y, View child,
PointF outLocalPoint) {
final float[] point = getTempPoint();
@@ -2971,6 +2988,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void transformPointToViewLocal(float[] point, View child) {
point[0] += mScrollX - child.mLeft;
point[1] += mScrollY - child.mTop;
@@ -3392,6 +3410,7 @@
}
@Override
+ @UnsupportedAppUsage
void dispatchAttachedToWindow(AttachInfo info, int visibility) {
mGroupFlags |= FLAG_PREVENT_DISPATCH_ATTACHED_TO_WINDOW;
super.dispatchAttachedToWindow(info, visibility);
@@ -3634,6 +3653,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfoInternal(info);
if (getAccessibilityNodeProvider() != null) {
@@ -3740,6 +3760,7 @@
}
@Override
+ @UnsupportedAppUsage
void dispatchDetachedFromWindow() {
// If we still have a touch target, we are still in the process of
// dispatching motion events to a child; we need to get rid of that
@@ -4281,6 +4302,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
protected void dispatchGetDisplayList() {
final int count = mChildrenCount;
final View[] children = mChildren;
@@ -4660,6 +4682,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void addTransientView(View view, int index) {
if (index < 0 || view == null) {
return;
@@ -4702,6 +4725,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void removeTransientView(View view) {
if (mTransientViews == null) {
return;
@@ -4731,6 +4755,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getTransientViewCount() {
return mTransientIndices == null ? 0 : mTransientIndices.size();
}
@@ -4764,6 +4789,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public View getTransientView(int position) {
if (mTransientViews == null || position >= mTransientViews.size()) {
return null;
@@ -4922,6 +4948,7 @@
mOnHierarchyChangeListener = listener;
}
+ @UnsupportedAppUsage
void dispatchViewAdded(View child) {
onViewAdded(child);
if (mOnHierarchyChangeListener != null) {
@@ -4938,6 +4965,7 @@
public void onViewAdded(View child) {
}
+ @UnsupportedAppUsage
void dispatchViewRemoved(View child) {
onViewRemoved(child);
if (mOnHierarchyChangeListener != null) {
@@ -6088,6 +6116,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void offsetChildrenTopAndBottom(int offset) {
final int count = mChildrenCount;
final View[] children = mChildren;
@@ -7006,6 +7035,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void suppressLayout(boolean suppress) {
mSuppressLayout = suppress;
if (!suppress) {
@@ -7303,6 +7333,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public void resolvePadding() {
super.resolvePadding();
int count = getChildCount();
@@ -7345,6 +7376,7 @@
/**
* @hide
*/
+ @TestApi
@Override
public void resetResolvedLayoutDirection() {
super.resetResolvedLayoutDirection();
@@ -7361,6 +7393,7 @@
/**
* @hide
*/
+ @TestApi
@Override
public void resetResolvedTextDirection() {
super.resetResolvedTextDirection();
@@ -7377,6 +7410,7 @@
/**
* @hide
*/
+ @TestApi
@Override
public void resetResolvedTextAlignment() {
super.resetResolvedTextAlignment();
@@ -7393,6 +7427,7 @@
/**
* @hide
*/
+ @TestApi
@Override
public void resetResolvedPadding() {
super.resetResolvedPadding();
@@ -7409,6 +7444,7 @@
/**
* @hide
*/
+ @TestApi
@Override
protected void resetResolvedDrawables() {
super.resetResolvedDrawables();
@@ -7745,6 +7781,7 @@
* Used internally by MarginLayoutParams.
* @hide
*/
+ @UnsupportedAppUsage
LayoutParams() {
}
@@ -7885,6 +7922,7 @@
* to this field.
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
private int startMargin = DEFAULT_MARGIN_RELATIVE;
/**
@@ -7893,6 +7931,7 @@
* to this field.
*/
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
private int endMargin = DEFAULT_MARGIN_RELATIVE;
/**
@@ -8122,6 +8161,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setMarginsRelative(int start, int top, int end, int bottom) {
startMargin = start;
topMargin = top;
@@ -8345,6 +8385,7 @@
public static final int ALL_POINTER_IDS = -1; // all ones
// The touched child view.
+ @UnsupportedAppUsage
public View child;
// The combined bit mask of pointer ids for all pointers captured by the target.
@@ -8353,6 +8394,7 @@
// The next target in the target list.
public TouchTarget next;
+ @UnsupportedAppUsage
private TouchTarget() {
}
@@ -8750,6 +8792,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected void encodeProperties(@NonNull ViewHierarchyEncoder encoder) {
super.encodeProperties(encoder);
diff --git a/core/java/android/view/ViewHierarchyEncoder.java b/core/java/android/view/ViewHierarchyEncoder.java
index 8770216..d5716bf 100644
--- a/core/java/android/view/ViewHierarchyEncoder.java
+++ b/core/java/android/view/ViewHierarchyEncoder.java
@@ -2,6 +2,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
@@ -90,6 +91,7 @@
endPropertyMap();
}
+ @UnsupportedAppUsage
public void addProperty(@NonNull String name, boolean v) {
writeShort(createPropertyIndex(name));
writeBoolean(v);
@@ -100,16 +102,19 @@
writeShort(s);
}
+ @UnsupportedAppUsage
public void addProperty(@NonNull String name, int v) {
writeShort(createPropertyIndex(name));
writeInt(v);
}
+ @UnsupportedAppUsage
public void addProperty(@NonNull String name, float v) {
writeShort(createPropertyIndex(name));
writeFloat(v);
}
+ @UnsupportedAppUsage
public void addProperty(@NonNull String name, @Nullable String s) {
writeShort(createPropertyIndex(name));
writeString(s);
diff --git a/core/java/android/view/ViewOverlay.java b/core/java/android/view/ViewOverlay.java
index 21123c1..e23c687 100644
--- a/core/java/android/view/ViewOverlay.java
+++ b/core/java/android/view/ViewOverlay.java
@@ -17,6 +17,7 @@
import android.animation.LayoutTransition;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
@@ -55,6 +56,7 @@
* of the overlay
* @return
*/
+ @UnsupportedAppUsage
ViewGroup getOverlayView() {
return mOverlayViewGroup;
}
@@ -94,6 +96,7 @@
mOverlayViewGroup.clear();
}
+ @UnsupportedAppUsage
boolean isEmpty() {
return mOverlayViewGroup.isEmpty();
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 97a2d79..23fc4d5 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -30,6 +30,7 @@
import android.animation.LayoutTransition;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.ResourcesManager;
@@ -170,6 +171,7 @@
*/
static final int MAX_TRACKBALL_DELAY = 250;
+ @UnsupportedAppUsage
static final ThreadLocal<HandlerActionQueue> sRunQueues = new ThreadLocal<HandlerActionQueue>();
static final ArrayList<Runnable> sFirstDrawHandlers = new ArrayList();
@@ -233,7 +235,9 @@
*/
@GuardedBy("mWindowCallbacks")
final ArrayList<WindowCallbacks> mWindowCallbacks = new ArrayList<>();
+ @UnsupportedAppUsage
final Context mContext;
+ @UnsupportedAppUsage
final IWindowSession mWindowSession;
@NonNull Display mDisplay;
final DisplayManager mDisplayManager;
@@ -255,6 +259,7 @@
int mSeq;
+ @UnsupportedAppUsage
View mView;
View mAccessibilityFocusedHost;
@@ -287,6 +292,7 @@
// Set to true if the owner of this window is in the stopped state,
// so the window should no longer be active.
+ @UnsupportedAppUsage
boolean mStopped = false;
// Set to true if the owner of this window is in ambient mode,
@@ -306,8 +312,11 @@
final Region mTransparentRegion;
final Region mPreviousTransparentRegion;
+ @UnsupportedAppUsage
int mWidth;
+ @UnsupportedAppUsage
int mHeight;
+ @UnsupportedAppUsage
Rect mDirty;
public boolean mIsAnimating;
@@ -321,10 +330,12 @@
CompatibilityInfo.Translator mTranslator;
+ @UnsupportedAppUsage
final View.AttachInfo mAttachInfo;
InputChannel mInputChannel;
InputQueue.Callback mInputQueueCallback;
InputQueue mInputQueue;
+ @UnsupportedAppUsage
FallbackEventHandler mFallbackEventHandler;
Choreographer mChoreographer;
@@ -389,8 +400,10 @@
// These can be accessed by any thread, must be protected with a lock.
// Surface can never be reassigned or cleared (use Surface.clear()).
+ @UnsupportedAppUsage
public final Surface mSurface = new Surface();
+ @UnsupportedAppUsage
boolean mAdded;
boolean mAddedTouchMode;
@@ -425,6 +438,7 @@
boolean mScrollMayChange;
@SoftInputModeFlags
int mSoftInputMode;
+ @UnsupportedAppUsage
WeakReference<View> mLastScrolledFocus;
int mScrollY;
int mCurScrollY;
@@ -555,6 +569,7 @@
}
/** Add static config callback to be notified about global config changes. */
+ @UnsupportedAppUsage
public static void addConfigCallback(ConfigChangedCallback callback) {
synchronized (sConfigCallbacks) {
sConfigCallbacks.add(callback);
@@ -891,6 +906,7 @@
return (mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE) != 0;
}
+ @UnsupportedAppUsage
public int getWindowFlags() {
return mWindowAttributes.flags;
}
@@ -930,6 +946,7 @@
}
}
+ @UnsupportedAppUsage
public void detachFunctor(long functor) {
if (mAttachInfo.mThreadedRenderer != null) {
// Fence so that any pending invokeFunctor() messages will be processed
@@ -947,6 +964,7 @@
* has invoked. If false, the functor may be invoked
* asynchronously.
*/
+ @UnsupportedAppUsage
public static void invokeFunctor(long functor, boolean waitForCompletion) {
ThreadedRenderer.invokeFunctor(functor, waitForCompletion);
}
@@ -980,6 +998,7 @@
mNextRtFrameCallback = callback;
}
+ @UnsupportedAppUsage
private void enableHardwareAcceleration(WindowManager.LayoutParams attrs) {
mAttachInfo.mHardwareAccelerated = false;
mAttachInfo.mHardwareAccelerationRequested = false;
@@ -1040,6 +1059,7 @@
}
}
+ @UnsupportedAppUsage
public View getView() {
return mView;
}
@@ -1241,6 +1261,7 @@
invalidate();
}
+ @UnsupportedAppUsage
void invalidate() {
mDirty.set(0, 0, mWidth, mHeight);
if (!mWillDrawSoon) {
@@ -1422,6 +1443,7 @@
}
}
+ @UnsupportedAppUsage
void scheduleTraversals() {
if (!mTraversalScheduled) {
mTraversalScheduled = true;
@@ -3657,6 +3679,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public View getAccessibilityFocusedHost() {
return mAccessibilityFocusedHost;
}
@@ -3664,6 +3687,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public AccessibilityNodeInfo getAccessibilityFocusedVirtualView() {
return mAccessibilityFocusedVirtualView;
}
@@ -4281,6 +4305,7 @@
* @param inTouchMode Whether we want to be in touch mode.
* @return True if the touch mode changed and focus changed was changed as a result
*/
+ @UnsupportedAppUsage
boolean ensureTouchMode(boolean inTouchMode) {
if (DBG) Log.d("touchmode", "ensureTouchMode(" + inTouchMode + "), current "
+ "touch mode is " + mAttachInfo.mInTouchMode);
@@ -6276,6 +6301,7 @@
}
/* drag/drop */
+ @UnsupportedAppUsage
void setLocalDragState(Object obj) {
mLocalDragState = obj;
}
@@ -6423,6 +6449,7 @@
}
}
+ @UnsupportedAppUsage
public void getLastTouchPoint(Point outLocation) {
outLocation.x = (int) mLastTouchPoint.x;
outLocation.y = (int) mLastTouchPoint.y;
@@ -6821,6 +6848,7 @@
}
}
+ @UnsupportedAppUsage
private void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets,
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
MergedConfiguration mergedConfiguration, Rect backDropFrame, boolean forceLayout,
@@ -6985,10 +7013,12 @@
}
}
+ @UnsupportedAppUsage
void enqueueInputEvent(InputEvent event) {
enqueueInputEvent(event, null, 0, false);
}
+ @UnsupportedAppUsage
void enqueueInputEvent(InputEvent event,
InputEventReceiver receiver, int flags, boolean processImmediately) {
adjustInputEventForCompatibility(event);
@@ -7329,6 +7359,7 @@
mInvalidateOnAnimationRunnable.addViewRect(info);
}
+ @UnsupportedAppUsage
public void cancelInvalidate(View view) {
mHandler.removeMessages(MSG_INVALIDATE, view);
// fixme: might leak the AttachInfo.InvalidateInfo objects instead of returning
@@ -7337,10 +7368,12 @@
mInvalidateOnAnimationRunnable.removeView(view);
}
+ @UnsupportedAppUsage
public void dispatchInputEvent(InputEvent event) {
dispatchInputEvent(event, null);
}
+ @UnsupportedAppUsage
public void dispatchInputEvent(InputEvent event, InputEventReceiver receiver) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = event;
@@ -7356,6 +7389,7 @@
mHandler.sendMessage(msg);
}
+ @UnsupportedAppUsage
public void dispatchKeyFromIme(KeyEvent event) {
Message msg = mHandler.obtainMessage(MSG_DISPATCH_KEY_FROM_IME, event);
msg.setAsynchronous(true);
@@ -7374,6 +7408,7 @@
* Note that it is the responsibility of the caller of this API to recycle the InputEvent it
* passes in.
*/
+ @UnsupportedAppUsage
public void dispatchUnhandledInputEvent(InputEvent event) {
if (event instanceof MotionEvent) {
event = MotionEvent.obtain((MotionEvent) event);
@@ -8076,6 +8111,7 @@
}
public static final class CalledFromWrongThreadException extends AndroidRuntimeException {
+ @UnsupportedAppUsage
public CalledFromWrongThreadException(String msg) {
super(msg);
}
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java
index 3f7ab2a..38dcdd3 100644
--- a/core/java/android/view/ViewStructure.java
+++ b/core/java/android/view/ViewStructure.java
@@ -33,9 +33,14 @@
import java.util.List;
/**
- * Container for storing additional per-view data generated by {@link View#onProvideStructure
+ * <p><code>ViewStructure</code> is a container for storing additional
+ * per-view data generated by {@link View#onProvideStructure
* View.onProvideStructure} and {@link View#onProvideAutofillStructure
* View.onProvideAutofillStructure}.
+ *
+ * <p>To learn more about using Autofill in your app, read the
+ * <a href="/guide/topics/text/autofill">Autofill Framework</a> guides.
+ *
*/
public abstract class ViewStructure {
diff --git a/core/java/android/view/ViewTreeObserver.java b/core/java/android/view/ViewTreeObserver.java
index efc1807..f7c9a0b 100644
--- a/core/java/android/view/ViewTreeObserver.java
+++ b/core/java/android/view/ViewTreeObserver.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.Region;
@@ -42,14 +43,18 @@
private CopyOnWriteArrayList<OnWindowFocusChangeListener> mOnWindowFocusListeners;
private CopyOnWriteArrayList<OnWindowAttachListener> mOnWindowAttachListeners;
private CopyOnWriteArrayList<OnGlobalFocusChangeListener> mOnGlobalFocusListeners;
+ @UnsupportedAppUsage
private CopyOnWriteArrayList<OnTouchModeChangeListener> mOnTouchModeChangeListeners;
private CopyOnWriteArrayList<OnEnterAnimationCompleteListener>
mOnEnterAnimationCompleteListeners;
// Non-recursive listeners use CopyOnWriteArray
// Any listener invoked from ViewRootImpl.performTraversals() should not be recursive
+ @UnsupportedAppUsage
private CopyOnWriteArray<OnGlobalLayoutListener> mOnGlobalLayoutListeners;
+ @UnsupportedAppUsage
private CopyOnWriteArray<OnComputeInternalInsetsListener> mOnComputeInternalInsetsListeners;
+ @UnsupportedAppUsage
private CopyOnWriteArray<OnScrollChangedListener> mOnScrollChangedListeners;
private CopyOnWriteArray<OnPreDrawListener> mOnPreDrawListeners;
private CopyOnWriteArray<OnWindowShownListener> mOnWindowShownListeners;
@@ -215,12 +220,14 @@
* Offsets from the frame of the window at which the content of
* windows behind it should be placed.
*/
+ @UnsupportedAppUsage
public final Rect contentInsets = new Rect();
/**
* Offsets from the frame of the window at which windows behind it
* are visible.
*/
+ @UnsupportedAppUsage
public final Rect visibleInsets = new Rect();
/**
@@ -228,6 +235,7 @@
* Only used when {@link #setTouchableInsets(int)} is called with
* the option {@link #TOUCHABLE_INSETS_REGION}.
*/
+ @UnsupportedAppUsage
public final Region touchableRegion = new Region();
/**
@@ -252,6 +260,7 @@
* Option for {@link #setTouchableInsets(int)}: the area inside of
* the provided touchable region in {@link #touchableRegion} can be touched.
*/
+ @UnsupportedAppUsage
public static final int TOUCHABLE_INSETS_REGION = 3;
/**
@@ -259,10 +268,12 @@
* {@link #TOUCHABLE_INSETS_FRAME}, {@link #TOUCHABLE_INSETS_CONTENT},
* {@link #TOUCHABLE_INSETS_VISIBLE}, or {@link #TOUCHABLE_INSETS_REGION}.
*/
+ @UnsupportedAppUsage
public void setTouchableInsets(int val) {
mTouchableInsets = val;
}
+ @UnsupportedAppUsage
int mTouchableInsets;
void reset() {
@@ -300,6 +311,7 @@
touchableRegion.equals(other.touchableRegion);
}
+ @UnsupportedAppUsage
void set(InternalInsetsInfo other) {
contentInsets.set(other.contentInsets);
visibleInsets.set(other.visibleInsets);
@@ -848,6 +860,7 @@
* We are not yet ready to commit to this API and support it, so
* @hide
*/
+ @UnsupportedAppUsage
public void addOnComputeInternalInsetsListener(OnComputeInternalInsetsListener listener) {
checkIsAlive();
@@ -871,6 +884,7 @@
* We are not yet ready to commit to this API and support it, so
* @hide
*/
+ @UnsupportedAppUsage
public void removeOnComputeInternalInsetsListener(OnComputeInternalInsetsListener victim) {
checkIsAlive();
if (mOnComputeInternalInsetsListeners == null) {
@@ -970,6 +984,7 @@
/**
* Notifies registered listeners that focus has changed.
*/
+ @UnsupportedAppUsage
final void dispatchOnGlobalFocusChange(View oldFocus, View newFocus) {
// NOTE: because of the use of CopyOnWriteArrayList, we *must* use an iterator to
// perform the dispatching. The iterator is a safe guard against listeners that
@@ -1081,6 +1096,7 @@
*
* @param inTouchMode True if the touch mode is now enabled, false otherwise.
*/
+ @UnsupportedAppUsage
final void dispatchOnTouchModeChanged(boolean inTouchMode) {
final CopyOnWriteArrayList<OnTouchModeChangeListener> listeners =
mOnTouchModeChangeListeners;
@@ -1094,6 +1110,7 @@
/**
* Notifies registered listeners that something has scrolled.
*/
+ @UnsupportedAppUsage
final void dispatchOnScrollChanged() {
// NOTE: because of the use of CopyOnWriteArrayList, we *must* use an iterator to
// perform the dispatching. The iterator is a safe guard against listeners that
@@ -1116,6 +1133,7 @@
/**
* Returns whether there are listeners for computing internal insets.
*/
+ @UnsupportedAppUsage
final boolean hasComputeInternalInsetsListeners() {
final CopyOnWriteArray<OnComputeInternalInsetsListener> listeners =
mOnComputeInternalInsetsListeners;
@@ -1125,6 +1143,7 @@
/**
* Calls all listeners to compute the current insets.
*/
+ @UnsupportedAppUsage
final void dispatchOnComputeInternalInsets(InternalInsetsInfo inoutInfo) {
// NOTE: because of the use of CopyOnWriteArrayList, we *must* use an iterator to
// perform the dispatching. The iterator is a safe guard against listeners that
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 78e4204..f436962 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -25,6 +25,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.app.WindowConfiguration;
import android.content.Context;
import android.content.pm.ActivityInfo;
@@ -150,6 +151,7 @@
* Max value used as a feature ID
* @hide
*/
+ @UnsupportedAppUsage
public static final int FEATURE_MAX = FEATURE_ACTIVITY_TRANSITIONS;
/**
@@ -267,18 +269,25 @@
*/
public static final int DECOR_CAPTION_SHADE_DARK = 2;
+ @UnsupportedAppUsage
private final Context mContext;
+ @UnsupportedAppUsage
private TypedArray mWindowStyle;
+ @UnsupportedAppUsage
private Callback mCallback;
private OnWindowDismissedCallback mOnWindowDismissedCallback;
private OnWindowSwipeDismissedCallback mOnWindowSwipeDismissedCallback;
private WindowControllerCallback mWindowControllerCallback;
private OnRestrictedCaptionAreaChangedListener mOnRestrictedCaptionAreaChangedListener;
private Rect mRestrictedCaptionAreaRect;
+ @UnsupportedAppUsage
private WindowManager mWindowManager;
+ @UnsupportedAppUsage
private IBinder mAppToken;
+ @UnsupportedAppUsage
private String mAppName;
+ @UnsupportedAppUsage
private boolean mHardwareAccelerated;
private Window mContainer;
private Window mActiveChild;
@@ -288,7 +297,9 @@
private boolean mSetCloseOnTouchOutside = false;
private int mForcedWindowFlags = 0;
+ @UnsupportedAppUsage
private int mFeatures;
+ @UnsupportedAppUsage
private int mLocalFeatures;
private boolean mHaveWindowFormat = false;
@@ -297,12 +308,14 @@
private boolean mHasSoftInputMode = false;
+ @UnsupportedAppUsage
private boolean mDestroyed;
private boolean mOverlayWithDecorCaptionEnabled = false;
private boolean mCloseOnSwipeEnabled = false;
// The current window attributes.
+ @UnsupportedAppUsage
private final WindowManager.LayoutParams mWindowAttributes =
new WindowManager.LayoutParams();
@@ -729,6 +742,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public final boolean isDestroyed() {
return mDestroyed;
}
@@ -854,7 +868,7 @@
}
/**
- * Set an observer to collect frame stats for each frame rendererd in this window.
+ * Set an observer to collect frame stats for each frame rendered in this window.
*
* Must be in hardware rendering mode.
*/
@@ -1066,6 +1080,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void addPrivateFlags(int flags) {
setPrivateFlags(flags, flags);
}
@@ -1116,6 +1131,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
protected void setNeedsMenuKey(int value) {
final WindowManager.LayoutParams attrs = getAttributes();
attrs.needsMenuKey = value;
@@ -1236,12 +1252,14 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setCloseOnTouchOutside(boolean close) {
mCloseOnTouchOutside = close;
mSetCloseOnTouchOutside = true;
}
/** @hide */
+ @UnsupportedAppUsage
public void setCloseOnTouchOutsideIfNotSet(boolean close) {
if (!mSetCloseOnTouchOutside) {
mCloseOnTouchOutside = close;
@@ -1250,9 +1268,11 @@
}
/** @hide */
+ @UnsupportedAppUsage
public abstract void alwaysReadCloseOnTouchAttr();
/** @hide */
+ @UnsupportedAppUsage
public boolean shouldCloseOnTouch(Context context, MotionEvent event) {
final boolean isOutside =
event.getAction() == MotionEvent.ACTION_DOWN && isOutOfBounds(context, event)
diff --git a/core/java/android/view/WindowAnimationFrameStats.java b/core/java/android/view/WindowAnimationFrameStats.java
index c60b96c..0233c86 100644
--- a/core/java/android/view/WindowAnimationFrameStats.java
+++ b/core/java/android/view/WindowAnimationFrameStats.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -47,6 +48,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void init(long refreshPeriodNano, long[] framesPresentedTimeNano) {
mRefreshPeriodNano = refreshPeriodNano;
mFramesPresentedTimeNano = framesPresentedTimeNano;
diff --git a/core/java/android/view/WindowContentFrameStats.java b/core/java/android/view/WindowContentFrameStats.java
index c6da2fb..96878e9 100644
--- a/core/java/android/view/WindowContentFrameStats.java
+++ b/core/java/android/view/WindowContentFrameStats.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -60,6 +61,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void init(long refreshPeriodNano, long[] framesPostedTimeNano,
long[] framesPresentedTimeNano, long[] framesReadyTimeNano) {
mRefreshPeriodNano = refreshPeriodNano;
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index fbd8141..8628da3 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -18,6 +18,7 @@
package android.view;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import com.android.internal.util.Preconditions;
@@ -69,6 +70,7 @@
* since it would allow them to inadvertently consume unknown insets by returning it.
* @hide
*/
+ @UnsupportedAppUsage
public static final WindowInsets CONSUMED;
static {
@@ -115,6 +117,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public WindowInsets(Rect systemWindowInsets) {
this(systemWindowInsets, null, null, false, false, null);
}
@@ -124,6 +127,7 @@
* to the existing fitSystemWindows method and other similar internals.
* @hide
*/
+ @UnsupportedAppUsage
public Rect getSystemWindowInsets() {
if (mTempRect == null) {
mTempRect = new Rect();
@@ -578,6 +582,7 @@
*
* @hide pending API
*/
+ @UnsupportedAppUsage
public WindowInsets inset(int left, int top, int right, int bottom) {
Preconditions.checkArgumentNonnegative(left);
Preconditions.checkArgumentNonnegative(top);
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 8c7ac73..0404df0 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -50,6 +50,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;
import android.app.Presentation;
import android.content.Context;
@@ -674,6 +675,7 @@
* is a big ugly hack so:
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW + 4;
/**
@@ -826,6 +828,7 @@
* In multiuser systems shows only on the owning user's window.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15;
/**
@@ -901,6 +904,7 @@
* In multiuser systems shows on all users' windows.
* @hide
*/
+ @UnsupportedAppUsage
public static final int TYPE_DISPLAY_OVERLAY = FIRST_SYSTEM_WINDOW+26;
/**
@@ -1391,6 +1395,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final int FLAG_SLIPPERY = 0x20000000;
/**
@@ -1554,6 +1559,7 @@
* to determine its default behavior.
*
* {@hide} */
+ @UnsupportedAppUsage
public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS = 0x00000010;
/**
@@ -1692,13 +1698,13 @@
public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000;
/**
- * Flag to indicate that the status bar window is now in an explicit expanded state, meaning
- * that status bar will not be hidden by any window with flag {@link #FLAG_FULLSCREEN} or
- * {@link View#SYSTEM_UI_FLAG_FULLSCREEN} set.
- * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}.
+ * Flag to indicate that the status bar window is in a state such that it forces showing
+ * the navigation bar unless the navigation bar window is explicitly set to
+ * {@link View#GONE}.
+ * It only takes effects if this is set by {@link LayoutParams#TYPE_STATUS_BAR}.
* @hide
*/
- public static final int PRIVATE_FLAG_STATUS_BAR_EXPANDED = 0x00800000;
+ public static final int PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION = 0x00800000;
/**
* Control flags that are private to the platform.
@@ -1790,9 +1796,9 @@
equals = PRIVATE_FLAG_IS_SCREEN_DECOR,
name = "IS_SCREEN_DECOR"),
@ViewDebug.FlagToString(
- mask = PRIVATE_FLAG_STATUS_BAR_EXPANDED,
- equals = PRIVATE_FLAG_STATUS_BAR_EXPANDED,
- name = "STATUS_BAR_EXPANDED")
+ mask = PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION,
+ equals = PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION,
+ name = "STATUS_FORCE_SHOW_NAVIGATION")
})
@TestApi
public int privateFlags;
@@ -1813,6 +1819,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int NEEDS_MENU_SET_TRUE = 1;
/**
@@ -1821,6 +1828,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int NEEDS_MENU_SET_FALSE = 2;
/**
@@ -1834,6 +1842,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public int needsMenuKey = NEEDS_MENU_UNSET;
/**
@@ -2238,6 +2247,7 @@
* The ui visibility as requested by the views in this hierarchy.
* the combined value should be systemUiVisibility | subtreeSystemUiVisibility.
*/
+ @UnsupportedAppUsage
public int subtreeSystemUiVisibility;
/**
@@ -2247,6 +2257,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean hasSystemUiListeners;
@@ -2398,6 +2409,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int INPUT_FEATURE_DISABLE_USER_ACTIVITY = 0x00000004;
/**
@@ -2408,6 +2420,7 @@
* @see #INPUT_FEATURE_DISABLE_USER_ACTIVITY
* @hide
*/
+ @UnsupportedAppUsage
public int inputFeatures;
/**
@@ -2423,6 +2436,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long userActivityTimeout = -1;
/**
@@ -2454,6 +2468,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long hideTimeoutMilliseconds = -1;
/**
@@ -3124,6 +3139,7 @@
* Backup the layout parameters used in compatibility mode.
* @see LayoutParams#restore()
*/
+ @UnsupportedAppUsage
void backup() {
int[] backup = mCompatibilityParamsBackup;
if (backup == null) {
@@ -3140,6 +3156,7 @@
* Restore the layout params' coordinates, size and gravity
* @see LayoutParams#backup()
*/
+ @UnsupportedAppUsage
void restore() {
int[] backup = mCompatibilityParamsBackup;
if (backup != null) {
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index 08c2d0b..d810067 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -17,6 +17,7 @@
package android.view;
import android.animation.ValueAnimator;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.ComponentCallbacks2;
import android.content.Context;
@@ -131,14 +132,21 @@
public static final int ADD_INVALID_DISPLAY = -9;
public static final int ADD_INVALID_TYPE = -10;
+ @UnsupportedAppUsage
private static WindowManagerGlobal sDefaultWindowManager;
+ @UnsupportedAppUsage
private static IWindowManager sWindowManagerService;
+ @UnsupportedAppUsage
private static IWindowSession sWindowSession;
+ @UnsupportedAppUsage
private final Object mLock = new Object();
+ @UnsupportedAppUsage
private final ArrayList<View> mViews = new ArrayList<View>();
+ @UnsupportedAppUsage
private final ArrayList<ViewRootImpl> mRoots = new ArrayList<ViewRootImpl>();
+ @UnsupportedAppUsage
private final ArrayList<WindowManager.LayoutParams> mParams =
new ArrayList<WindowManager.LayoutParams>();
private final ArraySet<View> mDyingViews = new ArraySet<View>();
@@ -148,10 +156,12 @@
private WindowManagerGlobal() {
}
+ @UnsupportedAppUsage
public static void initialize() {
getWindowManagerService();
}
+ @UnsupportedAppUsage
public static WindowManagerGlobal getInstance() {
synchronized (WindowManagerGlobal.class) {
if (sDefaultWindowManager == null) {
@@ -161,6 +171,7 @@
}
}
+ @UnsupportedAppUsage
public static IWindowManager getWindowManagerService() {
synchronized (WindowManagerGlobal.class) {
if (sWindowManagerService == null) {
@@ -179,6 +190,7 @@
}
}
+ @UnsupportedAppUsage
public static IWindowSession getWindowSession() {
synchronized (WindowManagerGlobal.class) {
if (sWindowSession == null) {
@@ -201,12 +213,14 @@
}
}
+ @UnsupportedAppUsage
public static IWindowSession peekWindowSession() {
synchronized (WindowManagerGlobal.class) {
return sWindowSession;
}
}
+ @UnsupportedAppUsage
public String[] getViewRootNames() {
synchronized (mLock) {
final int numRoots = mRoots.size();
@@ -218,6 +232,7 @@
}
}
+ @UnsupportedAppUsage
public ArrayList<ViewRootImpl> getRootViews(IBinder token) {
ArrayList<ViewRootImpl> views = new ArrayList<>();
synchronized (mLock) {
@@ -264,6 +279,7 @@
return null;
}
+ @UnsupportedAppUsage
public View getRootView(String name) {
synchronized (mLock) {
for (int i = mRoots.size() - 1; i >= 0; --i) {
@@ -385,6 +401,7 @@
}
}
+ @UnsupportedAppUsage
public void removeView(View view, boolean immediate) {
if (view == null) {
throw new IllegalArgumentException("view must not be null");
@@ -500,6 +517,7 @@
return false;
}
+ @UnsupportedAppUsage
public void trimMemory(int level) {
if (ThreadedRenderer.isAvailable()) {
if (shouldDestroyEglContext(level)) {
@@ -647,6 +665,7 @@
}
final class WindowLeaked extends AndroidRuntimeException {
+ @UnsupportedAppUsage
public WindowLeaked(String msg) {
super(msg);
}
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java
index a8722f1..2339d35 100644
--- a/core/java/android/view/WindowManagerImpl.java
+++ b/core/java/android/view/WindowManagerImpl.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Region;
import android.os.Bundle;
@@ -54,6 +55,7 @@
* @hide
*/
public final class WindowManagerImpl implements WindowManager {
+ @UnsupportedAppUsage
private final WindowManagerGlobal mGlobal = WindowManagerGlobal.getInstance();
private final Context mContext;
private final Window mParentWindow;
diff --git a/core/java/android/view/accessibility/AccessibilityCache.java b/core/java/android/view/accessibility/AccessibilityCache.java
index b4d9c53..5d59e42 100644
--- a/core/java/android/view/accessibility/AccessibilityCache.java
+++ b/core/java/android/view/accessibility/AccessibilityCache.java
@@ -306,6 +306,11 @@
final int oldChildCount = oldInfo.getChildCount();
for (int i = 0; i < oldChildCount; i++) {
+ final long oldChildId = oldInfo.getChildId(i);
+ // If the child is no longer present, remove the sub-tree.
+ if (newChildrenIds == null || newChildrenIds.indexOf(oldChildId) < 0) {
+ clearSubTreeLocked(windowId, oldChildId);
+ }
if (nodes.get(sourceId) == null) {
// We've removed (and thus recycled) this node because it was its own
// ancestor (the app gave us bad data), we can't continue using it.
@@ -313,11 +318,6 @@
clearNodesForWindowLocked(windowId);
return;
}
- final long oldChildId = oldInfo.getChildId(i);
- // If the child is no longer present, remove the sub-tree.
- if (newChildrenIds == null || newChildrenIds.indexOf(oldChildId) < 0) {
- clearSubTreeLocked(windowId, oldChildId);
- }
}
// Also be careful if the parent has changed since the new
diff --git a/core/java/android/view/accessibility/AccessibilityEvent.java b/core/java/android/view/accessibility/AccessibilityEvent.java
index a6b8eb3..3eca854 100644
--- a/core/java/android/view/accessibility/AccessibilityEvent.java
+++ b/core/java/android/view/accessibility/AccessibilityEvent.java
@@ -17,6 +17,7 @@
package android.view.accessibility;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -755,10 +756,12 @@
private static final SynchronizedPool<AccessibilityEvent> sPool =
new SynchronizedPool<>(MAX_POOL_SIZE);
+ @UnsupportedAppUsage
private @EventType int mEventType;
private CharSequence mPackageName;
private long mEventTime;
int mMovementGranularity;
+ @UnsupportedAppUsage
int mAction;
int mContentChangeTypes;
int mWindowChangeTypes;
diff --git a/core/java/android/view/accessibility/AccessibilityInteractionClient.java b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
index d60c481..4db6f4f 100644
--- a/core/java/android/view/accessibility/AccessibilityInteractionClient.java
+++ b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
@@ -17,6 +17,7 @@
package android.view.accessibility;
import android.accessibilityservice.IAccessibilityServiceConnection;
+import android.annotation.UnsupportedAppUsage;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
@@ -112,6 +113,7 @@
/**
* @return The client for the current thread.
*/
+ @UnsupportedAppUsage
public static AccessibilityInteractionClient getInstance() {
final long threadId = Thread.currentThread().getId();
return getInstanceForThread(threadId);
@@ -190,6 +192,7 @@
*
* @param message The message.
*/
+ @UnsupportedAppUsage
public void setSameThreadMessage(Message message) {
synchronized (mInstanceLock) {
mSameThreadMessage = message;
@@ -625,6 +628,7 @@
return false;
}
+ @UnsupportedAppUsage
public void clearCache() {
sAccessibilityCache.clear();
}
diff --git a/core/java/android/view/accessibility/AccessibilityManager.java b/core/java/android/view/accessibility/AccessibilityManager.java
index cbb23f1..c59c491 100644
--- a/core/java/android/view/accessibility/AccessibilityManager.java
+++ b/core/java/android/view/accessibility/AccessibilityManager.java
@@ -25,6 +25,7 @@
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -88,6 +89,7 @@
public static final int DALTONIZER_DISABLED = -1;
/** @hide */
+ @UnsupportedAppUsage
public static final int DALTONIZER_SIMULATE_MONOCHROMACY = 0;
/** @hide */
@@ -112,30 +114,39 @@
public static final String ACTION_CHOOSE_ACCESSIBILITY_BUTTON =
"com.android.internal.intent.action.CHOOSE_ACCESSIBILITY_BUTTON";
+ @UnsupportedAppUsage
static final Object sInstanceSync = new Object();
+ @UnsupportedAppUsage
private static AccessibilityManager sInstance;
+ @UnsupportedAppUsage
private final Object mLock = new Object();
+ @UnsupportedAppUsage
private IAccessibilityManager mService;
+ @UnsupportedAppUsage
final int mUserId;
+ @UnsupportedAppUsage
final Handler mHandler;
final Handler.Callback mCallback;
+ @UnsupportedAppUsage
boolean mIsEnabled;
int mRelevantEventTypes = AccessibilityEvent.TYPES_ALL_MASK;
boolean mIsTouchExplorationEnabled;
+ @UnsupportedAppUsage
boolean mIsHighTextContrastEnabled;
AccessibilityPolicy mAccessibilityPolicy;
+ @UnsupportedAppUsage
private final ArrayMap<AccessibilityStateChangeListener, Handler>
mAccessibilityStateChangeListeners = new ArrayMap<>();
@@ -318,6 +329,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static AccessibilityManager getInstance(Context context) {
synchronized (sInstanceSync) {
if (sInstance == null) {
@@ -430,6 +442,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isHighTextContrastEnabled() {
synchronized (mLock) {
IAccessibilityManager service = getServiceLocked();
@@ -916,6 +929,7 @@
*
* @param stateFlags The state flags.
*/
+ @UnsupportedAppUsage
private void setStateLocked(int stateFlags) {
final boolean enabled = (stateFlags & STATE_FLAG_ACCESSIBILITY_ENABLED) != 0;
final boolean touchExplorationEnabled =
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index f2429bd..a3fa2ce 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -25,6 +25,7 @@
import android.accessibilityservice.AccessibilityServiceInfo;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Parcel;
@@ -652,6 +653,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getAccessibilityViewId(long accessibilityNodeId) {
return (int) accessibilityNodeId;
}
@@ -665,6 +667,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getVirtualDescendantId(long accessibilityNodeId) {
return (int) ((accessibilityNodeId & VIRTUAL_DESCENDANT_ID_MASK)
>> VIRTUAL_DESCENDANT_ID_SHIFT);
@@ -692,10 +695,12 @@
private static final AccessibilityNodeInfo DEFAULT = new AccessibilityNodeInfo();
+ @UnsupportedAppUsage
private boolean mSealed;
// Data.
private int mWindowId = AccessibilityWindowInfo.UNDEFINED_WINDOW_ID;
+ @UnsupportedAppUsage
private long mSourceNodeId = UNDEFINED_NODE_ID;
private long mParentNodeId = UNDEFINED_NODE_ID;
private long mLabelForId = UNDEFINED_NODE_ID;
@@ -721,6 +726,7 @@
private String mViewIdResourceName;
private ArrayList<String> mExtraDataKeys;
+ @UnsupportedAppUsage
private LongArray mChildNodeIds;
private ArrayList<AccessibilityAction> mActions;
@@ -855,6 +861,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean refresh(Bundle arguments, boolean bypassCache) {
enforceSealed();
if (!canPerformRequestOverConnection(mSourceNodeId)) {
@@ -1159,7 +1166,13 @@
}
private boolean hasActionWithId(int actionId) {
- return getActionList().stream().anyMatch(action -> action.getId() == actionId);
+ List<AccessibilityAction> actions = getActionList();
+ for (int i = 0; i < actions.size(); i++) {
+ if (actions.get(i).getId() == actionId) {
+ return true;
+ }
+ }
+ return false;
}
/**
@@ -1761,7 +1774,7 @@
* @return True if the node is focusable.
*/
public boolean isFocusable() {
- return hasActionWithId(ACTION_FOCUS);
+ return hasActionWithId(ACTION_FOCUS) || hasActionWithId(ACTION_CLEAR_FOCUS);
}
/**
@@ -3015,6 +3028,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getSourceNodeId() {
return mSourceNodeId;
}
@@ -3026,6 +3040,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSealed(boolean sealed) {
mSealed = sealed;
}
@@ -3037,6 +3052,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isSealed() {
return mSealed;
}
diff --git a/core/java/android/view/accessibility/AccessibilityRecord.java b/core/java/android/view/accessibility/AccessibilityRecord.java
index 0a709f8..b382a18 100644
--- a/core/java/android/view/accessibility/AccessibilityRecord.java
+++ b/core/java/android/view/accessibility/AccessibilityRecord.java
@@ -19,6 +19,7 @@
import static com.android.internal.util.CollectionUtils.isEmpty;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.view.View;
@@ -82,6 +83,7 @@
private AccessibilityRecord mNext;
private boolean mIsInPool;
+ @UnsupportedAppUsage
boolean mSealed;
int mBooleanProperties = 0;
int mCurrentItemIndex = UNDEFINED;
@@ -98,6 +100,7 @@
int mAddedCount= UNDEFINED;
int mRemovedCount = UNDEFINED;
+ @UnsupportedAppUsage
long mSourceNodeId = AccessibilityNodeInfo.UNDEFINED_NODE_ID;
int mSourceWindowId = AccessibilityWindowInfo.UNDEFINED_WINDOW_ID;
@@ -625,7 +628,7 @@
}
/**
- * Sets the text before a change.
+ * Gets the text before a change.
*
* @return The text before the change.
*/
@@ -696,6 +699,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getSourceNodeId() {
return mSourceNodeId;
}
diff --git a/core/java/android/view/accessibility/CaptioningManager.java b/core/java/android/view/accessibility/CaptioningManager.java
index d6455e7..c42e9fe 100644
--- a/core/java/android/view/accessibility/CaptioningManager.java
+++ b/core/java/android/view/accessibility/CaptioningManager.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
@@ -286,6 +287,7 @@
public static final CaptionStyle DEFAULT;
/** @hide */
+ @UnsupportedAppUsage
public static final CaptionStyle[] PRESETS;
/** @hide */
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 32b2f63..2cd4b2b 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -81,11 +81,16 @@
import sun.misc.Cleaner;
/**
- * The {@link AutofillManager} provides ways for apps and custom views to integrate with the
- * Autofill Framework lifecycle.
+ * <p>The {@link AutofillManager} class provides ways for apps and custom views to
+ * integrate with the Autofill Framework lifecycle.
+ *
+ * <p>To learn about using Autofill in your app, read
+ * the <a href="/guide/topics/text/autofill">Autofill Framework</a> guides.
+ *
+ * <h3 id="autofill-lifecycle">Autofill lifecycle</h3>
*
* <p>The autofill lifecycle starts with the creation of an autofill context associated with an
- * activity context; the autofill context is created when one of the following methods is called for
+ * activity context. The autofill context is created when one of the following methods is called for
* the first time in an activity context, and the current user has an enabled autofill service:
*
* <ul>
@@ -94,7 +99,7 @@
* <li>{@link #requestAutofill(View)}
* </ul>
*
- * <p>Tipically, the context is automatically created when the first view of the activity is
+ * <p>Typically, the context is automatically created when the first view of the activity is
* focused because {@code View.onFocusChanged()} indirectly calls
* {@link #notifyViewEntered(View)}. App developers can call {@link #requestAutofill(View)} to
* explicitly create it (for example, a custom view developer could offer a contextual menu action
@@ -138,7 +143,9 @@
* shows an autofill save UI if the value of savable views have changed. If the user selects the
* option to Save, the current value of the views is then sent to the autofill service.
*
- * <p>It is safe to call into its methods from any thread.
+ * <h3 id="additional-notes">Additional notes</h3>
+ *
+ * <p>It is safe to call <code>AutofillManager</code> methods from any thread.
*/
@SystemService(Context.AUTOFILL_MANAGER_SERVICE)
@RequiresFeature(PackageManager.FEATURE_AUTOFILL)
@@ -2152,7 +2159,11 @@
pw.print(pfx); pw.print("sessionId: "); pw.println(mSessionId);
pw.print(pfx); pw.print("state: "); pw.println(getStateAsStringLocked());
pw.print(pfx); pw.print("context: "); pw.println(mContext);
- pw.print(pfx); pw.print("client: "); pw.println(getClient());
+ final AutofillClient client = getClient();
+ if (client != null) {
+ pw.print(pfx); pw.print("client: "); pw.print(client);
+ pw.print(" ("); pw.print(client.autofillClientGetActivityToken()); pw.println(')');
+ }
pw.print(pfx); pw.print("enabled: "); pw.println(mEnabled);
pw.print(pfx); pw.print("hasService: "); pw.println(mService != null);
pw.print(pfx); pw.print("hasCallback: "); pw.println(mCallback != null);
@@ -2172,8 +2183,24 @@
pw.print(pfx); pw.print("entered ids: "); pw.println(mEnteredIds);
pw.print(pfx); pw.print("save trigger id: "); pw.println(mSaveTriggerId);
pw.print(pfx); pw.print("save on finish(): "); pw.println(mSaveOnFinish);
- pw.print(pfx); pw.print("compat mode enabled: "); pw.println(
- isCompatibilityModeEnabledLocked());
+ pw.print(pfx); pw.print("compat mode enabled: ");
+ synchronized (mLock) {
+ if (mCompatibilityBridge != null) {
+ final String pfx2 = pfx + " ";
+ pw.println("true");
+ pw.print(pfx2); pw.print("windowId: ");
+ pw.println(mCompatibilityBridge.mFocusedWindowId);
+ pw.print(pfx2); pw.print("nodeId: ");
+ pw.println(mCompatibilityBridge.mFocusedNodeId);
+ pw.print(pfx2); pw.print("virtualId: ");
+ pw.println(AccessibilityNodeInfo
+ .getVirtualDescendantId(mCompatibilityBridge.mFocusedNodeId));
+ pw.print(pfx2); pw.print("focusedBounds: ");
+ pw.println(mCompatibilityBridge.mFocusedBounds);
+ } else {
+ pw.println("false");
+ }
+ }
pw.print(pfx); pw.print("debug: "); pw.print(sDebug);
pw.print(" verbose: "); pw.println(sVerbose);
}
@@ -2307,7 +2334,15 @@
@Override
public AccessibilityEvent onAccessibilityEvent(AccessibilityEvent event,
boolean accessibilityEnabled, int relevantEventTypes) {
- switch (event.getEventType()) {
+ final int type = event.getEventType();
+ if (sVerbose) {
+ // NOTE: this is waaay spammy, but that's life.
+ Log.v(TAG, "onAccessibilityEvent(" + AccessibilityEvent.eventTypeToString(type)
+ + "): virtualId="
+ + AccessibilityNodeInfo.getVirtualDescendantId(event.getSourceNodeId())
+ + ", client=" + getClient());
+ }
+ switch (type) {
case AccessibilityEvent.TYPE_VIEW_FOCUSED: {
synchronized (mLock) {
if (mFocusedWindowId == event.getWindowId()
diff --git a/core/java/android/view/inputmethod/InputMethodInfo.java b/core/java/android/view/inputmethod/InputMethodInfo.java
index 372362f..04028ae 100644
--- a/core/java/android/view/inputmethod/InputMethodInfo.java
+++ b/core/java/android/view/inputmethod/InputMethodInfo.java
@@ -17,6 +17,7 @@
package android.view.inputmethod;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -94,6 +95,7 @@
/**
* An array-like container of the subtypes.
*/
+ @UnsupportedAppUsage
private final InputMethodSubtypeArray mSubtypes;
private final boolean mIsAuxIme;
@@ -445,6 +447,7 @@
* Return whether or not this ime is a default ime or not.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isDefault(Context context) {
if (mForceDefault) {
return true;
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index bb93af5..7762ecf 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -24,6 +24,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Rect;
@@ -223,6 +224,7 @@
static final String PENDING_EVENT_COUNTER = "aq:imm";
+ @UnsupportedAppUsage
static InputMethodManager sInstance;
/**
@@ -270,11 +272,13 @@
/** @hide */
public static final int SHOW_IM_PICKER_MODE_EXCLUDE_AUXILIARY_SUBTYPES = 2;
+ @UnsupportedAppUsage
final IInputMethodManager mService;
final Looper mMainLooper;
// For scheduling work on the main thread. This also serves as our
// global lock.
+ @UnsupportedAppUsage
final H mH;
// Our generic input connection if the current target does not have its own.
@@ -302,16 +306,19 @@
* This is the root view of the overall window that currently has input
* method focus.
*/
+ @UnsupportedAppUsage
View mCurRootView;
/**
* This is the view that should currently be served by an input method,
* regardless of the state of setting that up.
*/
+ @UnsupportedAppUsage
View mServedView;
/**
* This is then next view that will be served by the input method, when
* we get around to updating things.
*/
+ @UnsupportedAppUsage
View mNextServedView;
/**
* This is set when we are in the process of connecting, to determine
@@ -327,6 +334,7 @@
/**
* The InputConnection that was last retrieved from the served view.
*/
+ @UnsupportedAppUsage
ControlledInputConnectionWrapper mServedInputConnectionWrapper;
/**
* The completions that were last provided by the served view.
@@ -334,7 +342,9 @@
CompletionInfo[] mCompletions;
// Cursor position on the screen.
+ @UnsupportedAppUsage
Rect mTmpCursorRect = new Rect();
+ @UnsupportedAppUsage
Rect mCursorRect = new Rect();
int mCursorSelStart;
int mCursorSelEnd;
@@ -377,10 +387,12 @@
/**
* ID of the method we are bound to.
*/
+ @UnsupportedAppUsage
String mCurId;
/**
* The actual instance of the method to make calls on it.
*/
+ @UnsupportedAppUsage
IInputMethodSession mCurMethod;
InputChannel mCurChannel;
ImeInputEventSender mCurSender;
@@ -677,6 +689,7 @@
* doesn't already exist.
* @hide
*/
+ @UnsupportedAppUsage
public static InputMethodManager getInstance() {
synchronized (InputMethodManager.class) {
if (sInstance == null) {
@@ -695,16 +708,19 @@
* if it exists.
* @hide
*/
+ @UnsupportedAppUsage
public static InputMethodManager peekInstance() {
return sInstance;
}
/** @hide */
+ @UnsupportedAppUsage
public IInputMethodClient getClient() {
return mClient;
}
/** @hide */
+ @UnsupportedAppUsage
public IInputContext getInputContext() {
return mIInputContext;
}
@@ -816,6 +832,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void registerSuggestionSpansForNotification(SuggestionSpan[] spans) {
try {
mService.registerSuggestionSpansForNotification(spans);
@@ -825,6 +842,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void notifySuggestionPicked(SuggestionSpan span, String originalString, int index) {
try {
mService.notifySuggestionPicked(span, originalString, index);
@@ -930,6 +948,7 @@
/**
* Disconnect any existing input connection, clearing the served view.
*/
+ @UnsupportedAppUsage
void finishInputLocked() {
mNextServedView = null;
if (mServedView != null) {
@@ -1094,6 +1113,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void showSoftInputUnchecked(int flags, ResultReceiver resultReceiver) {
try {
Log.w(TAG, "showSoftInputUnchecked() is a hidden method, which will be removed "
@@ -1414,6 +1434,7 @@
* input method started before.
* @hide
*/
+ @UnsupportedAppUsage
public void windowDismissed(IBinder appWindowToken) {
checkFocus();
synchronized (mH) {
@@ -1428,6 +1449,7 @@
* Call this when a view receives focus.
* @hide
*/
+ @UnsupportedAppUsage
public void focusIn(View view) {
synchronized (mH) {
focusInLocked(view);
@@ -1458,6 +1480,7 @@
* Call this when a view loses focus.
* @hide
*/
+ @UnsupportedAppUsage
public void focusOut(View view) {
synchronized (mH) {
if (DEBUG) Log.v(TAG, "focusOut: view=" + dumpViewInfo(view)
@@ -1502,6 +1525,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void checkFocus() {
if (checkFocusNoStartInput(false)) {
startInputInner(InputMethodClient.START_INPUT_REASON_CHECK_FOCUS, null, 0, 0, 0);
@@ -1549,6 +1573,7 @@
return true;
}
+ @UnsupportedAppUsage
void closeCurrentInput() {
try {
mService.hideSoftInput(mClient, HIDE_NOT_ALWAYS, null);
@@ -1616,6 +1641,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void onPreWindowFocus(View rootView, boolean hasWindowFocus) {
synchronized (mH) {
if (rootView == null) {
@@ -1719,6 +1745,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isCursorAnchorInfoEnabled() {
synchronized (mH) {
final boolean isImmediate = (mRequestUpdateCursorAnchorInfoMonitorMode &
@@ -1734,6 +1761,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setUpdateCursorAnchorInfoMode(int flags) {
synchronized (mH) {
mRequestUpdateCursorAnchorInfoMonitorMode = flags;
@@ -2243,6 +2271,7 @@
* Notify that a user took some action with this input method.
* @hide
*/
+ @UnsupportedAppUsage
public void notifyUserAction() {
synchronized (mH) {
if (mLastSentUserActionNotificationSequenceNumber ==
@@ -2311,6 +2340,7 @@
* @return The current height of the input method window.
* @hide
*/
+ @UnsupportedAppUsage
public int getInputMethodWindowVisibleHeight() {
synchronized (mH) {
try {
diff --git a/core/java/android/view/inputmethod/InputMethodSubtypeArray.java b/core/java/android/view/inputmethod/InputMethodSubtypeArray.java
index 6a748ce..8dd0dcd 100644
--- a/core/java/android/view/inputmethod/InputMethodSubtypeArray.java
+++ b/core/java/android/view/inputmethod/InputMethodSubtypeArray.java
@@ -16,6 +16,7 @@
package android.view.inputmethod;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.util.Slog;
@@ -49,6 +50,7 @@
* @param subtypes A list of {@link InputMethodSubtype} from which
* {@link InputMethodSubtypeArray} will be created.
*/
+ @UnsupportedAppUsage
public InputMethodSubtypeArray(final List<InputMethodSubtype> subtypes) {
if (subtypes == null) {
mCount = 0;
diff --git a/core/java/android/view/textclassifier/TextClassificationManager.java b/core/java/android/view/textclassifier/TextClassificationManager.java
index 201218ba..ed86206 100644
--- a/core/java/android/view/textclassifier/TextClassificationManager.java
+++ b/core/java/android/view/textclassifier/TextClassificationManager.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.database.ContentObserver;
import android.os.ServiceManager;
@@ -108,6 +109,7 @@
* @see TextClassifier#SYSTEM
* @hide
*/
+ @UnsupportedAppUsage
public TextClassifier getTextClassifier(@TextClassifierType int type) {
switch (type) {
case TextClassifier.LOCAL:
diff --git a/core/java/android/view/textclassifier/TextClassifier.java b/core/java/android/view/textclassifier/TextClassifier.java
index 1505863..9692579 100644
--- a/core/java/android/view/textclassifier/TextClassifier.java
+++ b/core/java/android/view/textclassifier/TextClassifier.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringDef;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import android.os.LocaleList;
import android.os.Looper;
@@ -213,6 +214,7 @@
// TODO: Remove once apps can build against the latest sdk.
/** @hide */
+ @UnsupportedAppUsage
default TextSelection suggestSelection(
@NonNull CharSequence text,
@IntRange(from = 0) int selectionStartIndex,
@@ -292,6 +294,7 @@
// TODO: Remove once apps can build against the latest sdk.
/** @hide */
+ @UnsupportedAppUsage
default TextClassification classifyText(
@NonNull CharSequence text,
@IntRange(from = 0) int startIndex,
@@ -333,6 +336,7 @@
// TODO: Remove once apps can build against the latest sdk.
/** @hide */
+ @UnsupportedAppUsage
default TextLinks generateLinks(
@NonNull CharSequence text, @Nullable TextLinks.Options options) {
if (options == null) {
diff --git a/core/java/android/view/textclassifier/TextLinks.java b/core/java/android/view/textclassifier/TextLinks.java
index e7faf14..1cac3ed 100644
--- a/core/java/android/view/textclassifier/TextLinks.java
+++ b/core/java/android/view/textclassifier/TextLinks.java
@@ -20,6 +20,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.LocaleList;
import android.os.Parcel;
@@ -652,6 +653,7 @@
private String mCallingPackageName;
+ @UnsupportedAppUsage
public Options() {
this(null, null);
}
diff --git a/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java b/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java
index f7d75cd..b530ddf 100644
--- a/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java
+++ b/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.metrics.LogMaker;
import android.util.Log;
@@ -99,6 +100,7 @@
private boolean mSmartSelectionTriggered;
private String mModelName;
+ @UnsupportedAppUsage
public SmartSelectionEventTracker(@NonNull Context context, @WidgetType int widgetType) {
mWidgetType = widgetType;
mWidgetVersion = null;
@@ -117,6 +119,7 @@
*
* @param event the selection event
*/
+ @UnsupportedAppUsage
public void logEvent(@NonNull SelectionEvent event) {
Preconditions.checkNotNull(event);
@@ -440,6 +443,7 @@
*
* @param start the word index of the selected word
*/
+ @UnsupportedAppUsage
public static SelectionEvent selectionStarted(int start) {
return new SelectionEvent(
start, start + 1, EventType.SELECTION_STARTED,
@@ -453,6 +457,7 @@
* @param start the start word (inclusive) index of the selection
* @param end the end word (exclusive) index of the selection
*/
+ @UnsupportedAppUsage
public static SelectionEvent selectionModified(int start, int end) {
return new SelectionEvent(
start, end, EventType.SELECTION_MODIFIED,
@@ -468,6 +473,7 @@
* @param classification the TextClassification object returned by the TextClassifier that
* classified the selected text
*/
+ @UnsupportedAppUsage
public static SelectionEvent selectionModified(
int start, int end, @NonNull TextClassification classification) {
final String entityType = classification.getEntityCount() > 0
@@ -487,6 +493,7 @@
* @param selection the TextSelection object returned by the TextClassifier for the
* specified selection
*/
+ @UnsupportedAppUsage
public static SelectionEvent selectionModified(
int start, int end, @NonNull TextSelection selection) {
final boolean smartSelection = getSourceClassifier(selection.getId())
@@ -515,6 +522,7 @@
* @param end the end word (exclusive) index of the selection
* @param actionType the action that was performed on the selection
*/
+ @UnsupportedAppUsage
public static SelectionEvent selectionAction(
int start, int end, @ActionType int actionType) {
return new SelectionEvent(
@@ -532,6 +540,7 @@
* @param classification the TextClassification object returned by the TextClassifier that
* classified the selected text
*/
+ @UnsupportedAppUsage
public static SelectionEvent selectionAction(
int start, int end, @ActionType int actionType,
@NonNull TextClassification classification) {
diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java
index 886f5c8..9733701 100644
--- a/core/java/android/view/textservice/SpellCheckerSession.java
+++ b/core/java/android/view/textservice/SpellCheckerSession.java
@@ -16,6 +16,7 @@
package android.view.textservice;
+import android.annotation.UnsupportedAppUsage;
import android.os.Binder;
import android.os.Handler;
import android.os.HandlerThread;
@@ -97,6 +98,7 @@
private final InternalListener mInternalListener;
private final ITextServicesManager mTextServicesManager;
private final SpellCheckerInfo mSpellCheckerInfo;
+ @UnsupportedAppUsage
private final SpellCheckerSessionListener mSpellCheckerSessionListener;
private final SpellCheckerSessionListenerImpl mSpellCheckerSessionListenerImpl;
diff --git a/core/java/android/view/textservice/TextServicesManager.java b/core/java/android/view/textservice/TextServicesManager.java
index 6644a85..4c6862c 100644
--- a/core/java/android/view/textservice/TextServicesManager.java
+++ b/core/java/android/view/textservice/TextServicesManager.java
@@ -17,6 +17,7 @@
package android.view.textservice;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
@@ -85,6 +86,7 @@
* Retrieve the global TextServicesManager instance, creating it if it doesn't already exist.
* @hide
*/
+ @UnsupportedAppUsage
public static TextServicesManager getInstance() {
synchronized (TextServicesManager.class) {
if (sInstance == null) {
@@ -192,6 +194,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public SpellCheckerInfo[] getEnabledSpellCheckers() {
try {
final SpellCheckerInfo[] retval = mService.getEnabledSpellCheckers();
@@ -207,6 +210,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public SpellCheckerInfo getCurrentSpellChecker() {
try {
// Passing null as a locale for ICS
@@ -219,6 +223,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
boolean allowImplicitlySelectedSubtype) {
try {
@@ -231,6 +236,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isSpellCheckerEnabled() {
try {
return mService.isSpellCheckerEnabled();
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index fc76029..563e00e 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import java.io.File;
import java.io.IOException;
@@ -50,22 +51,37 @@
@Deprecated
public static class CacheResult {
// these fields are saved to the database
+ @UnsupportedAppUsage
int httpStatusCode;
+ @UnsupportedAppUsage
long contentLength;
+ @UnsupportedAppUsage
long expires;
+ @UnsupportedAppUsage
String expiresString;
+ @UnsupportedAppUsage
String localPath;
+ @UnsupportedAppUsage
String lastModified;
+ @UnsupportedAppUsage
String etag;
+ @UnsupportedAppUsage
String mimeType;
+ @UnsupportedAppUsage
String location;
+ @UnsupportedAppUsage
String encoding;
+ @UnsupportedAppUsage
String contentdisposition;
+ @UnsupportedAppUsage
String crossDomain;
// these fields are NOT saved to the database
+ @UnsupportedAppUsage
InputStream inStream;
+ @UnsupportedAppUsage
OutputStream outStream;
+ @UnsupportedAppUsage
File outFile;
/**
@@ -73,6 +89,7 @@
*
* @return the status code of this cache entry
*/
+ @UnsupportedAppUsage
public int getHttpStatusCode() {
return httpStatusCode;
}
@@ -82,6 +99,7 @@
*
* @return the content length of this cache entry
*/
+ @UnsupportedAppUsage
public long getContentLength() {
return contentLength;
}
@@ -93,6 +111,7 @@
*
* @return the path of the file used to store this cache entry
*/
+ @UnsupportedAppUsage
public String getLocalPath() {
return localPath;
}
@@ -103,6 +122,7 @@
*
* @return the expiry date of this cache entry
*/
+ @UnsupportedAppUsage
public long getExpires() {
return expires;
}
@@ -113,6 +133,7 @@
* @return the expiry date of this cache entry
*
*/
+ @UnsupportedAppUsage
public String getExpiresString() {
return expiresString;
}
@@ -123,6 +144,7 @@
*
* @return the date at which this cache entry was last modified
*/
+ @UnsupportedAppUsage
public String getLastModified() {
return lastModified;
}
@@ -132,6 +154,7 @@
*
* @return the entity tag of this cache entry
*/
+ @UnsupportedAppUsage
public String getETag() {
return etag;
}
@@ -141,6 +164,7 @@
*
* @return the MIME type of this cache entry
*/
+ @UnsupportedAppUsage
public String getMimeType() {
return mimeType;
}
@@ -151,6 +175,7 @@
*
* @return the HTTP 'Location' header for this cache entry
*/
+ @UnsupportedAppUsage
public String getLocation() {
return location;
}
@@ -160,6 +185,7 @@
*
* @return the encoding of this cache entry
*/
+ @UnsupportedAppUsage
public String getEncoding() {
return encoding;
}
@@ -171,6 +197,7 @@
* @return the HTTP 'Content-Disposition' header for this cache entry
*
*/
+ @UnsupportedAppUsage
public String getContentDisposition() {
return contentdisposition;
}
@@ -182,6 +209,7 @@
*
* @return an input stream to the content of this cache entry
*/
+ @UnsupportedAppUsage
public InputStream getInputStream() {
return inStream;
}
@@ -194,6 +222,7 @@
* @return an output stream to the content of this cache entry
*/
// Note that this is always null for objects returned by getCacheFile()!
+ @UnsupportedAppUsage
public OutputStream getOutputStream() {
return outStream;
}
@@ -204,6 +233,7 @@
*
* @param stream an input stream to the content of this cache entry
*/
+ @UnsupportedAppUsage
public void setInputStream(InputStream stream) {
this.inStream = stream;
}
@@ -213,6 +243,7 @@
*
* @param encoding the encoding of this cache entry
*/
+ @UnsupportedAppUsage
public void setEncoding(String encoding) {
this.encoding = encoding;
}
@@ -235,6 +266,7 @@
*/
@Deprecated
@Nullable
+ @UnsupportedAppUsage
public static File getCacheFileBaseDir() {
return null;
}
@@ -246,6 +278,7 @@
* @deprecated This method no longer has any effect and always returns {@code false}.
*/
@Deprecated
+ @UnsupportedAppUsage
public static boolean cacheDisabled() {
return false;
}
@@ -259,6 +292,7 @@
* @deprecated This method no longer has any effect and always returns {@code false}.
*/
@Deprecated
+ @UnsupportedAppUsage
public static boolean startCacheTransaction() {
return false;
}
@@ -271,6 +305,7 @@
* @deprecated This method no longer has any effect and always returns {@code false}.
*/
@Deprecated
+ @UnsupportedAppUsage
public static boolean endCacheTransaction() {
return false;
}
@@ -290,6 +325,7 @@
*/
@Deprecated
@Nullable
+ @UnsupportedAppUsage
public static CacheResult getCacheFile(String url,
Map<String, String> headers) {
return null;
@@ -304,10 +340,12 @@
* @deprecated Access to the HTTP cache will be removed in a future release.
*/
@Deprecated
+ @UnsupportedAppUsage
public static void saveCacheFile(String url, CacheResult cacheResult) {
saveCacheFile(url, 0, cacheResult);
}
+ @UnsupportedAppUsage
static void saveCacheFile(String url, long postIdentifier,
CacheResult cacheRet) {
try {
diff --git a/core/java/android/webkit/ConsoleMessage.java b/core/java/android/webkit/ConsoleMessage.java
index a9c351a..6051956 100644
--- a/core/java/android/webkit/ConsoleMessage.java
+++ b/core/java/android/webkit/ConsoleMessage.java
@@ -16,6 +16,8 @@
package android.webkit;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Public class representing a JavaScript console message from WebCore. This could be a issued
* by a call to one of the <code>console</code> logging functions (e.g.
@@ -34,9 +36,13 @@
DEBUG
};
+ @UnsupportedAppUsage
private MessageLevel mLevel;
+ @UnsupportedAppUsage
private String mMessage;
+ @UnsupportedAppUsage
private String mSourceId;
+ @UnsupportedAppUsage
private int mLineNumber;
public ConsoleMessage(String message, String sourceId, int lineNumber, MessageLevel msgLevel) {
diff --git a/core/java/android/webkit/JsResult.java b/core/java/android/webkit/JsResult.java
index d36ab418..5bf6aab 100644
--- a/core/java/android/webkit/JsResult.java
+++ b/core/java/android/webkit/JsResult.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
/**
* An instance of this class is passed as a parameter in various {@link WebChromeClient} action
@@ -34,6 +35,7 @@
public void onJsResultComplete(JsResult result);
}
// This is the caller of the prompt and is the object that is waiting.
+ @UnsupportedAppUsage
private final ResultReceiver mReceiver;
// This is a basic result of a confirm or prompt dialog.
private boolean mResult;
diff --git a/core/java/android/webkit/PluginData.java b/core/java/android/webkit/PluginData.java
index 88fc9b7..8aeeb1c 100644
--- a/core/java/android/webkit/PluginData.java
+++ b/core/java/android/webkit/PluginData.java
@@ -16,6 +16,7 @@
package android.webkit;
+import android.annotation.UnsupportedAppUsage;
import java.io.InputStream;
import java.util.Map;
@@ -69,6 +70,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public PluginData(
InputStream stream,
long length,
@@ -90,6 +92,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public InputStream getInputStream() {
return mStream;
}
@@ -104,6 +107,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public long getContentLength() {
return mContentLength;
}
@@ -121,6 +125,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public Map<String, String[]> getHeaders() {
return mHeaders;
}
@@ -135,6 +140,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public int getStatusCode() {
return mStatusCode;
}
diff --git a/core/java/android/webkit/URLUtil.java b/core/java/android/webkit/URLUtil.java
index ed122a6..5d704cb0 100644
--- a/core/java/android/webkit/URLUtil.java
+++ b/core/java/android/webkit/URLUtil.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.net.ParseException;
import android.net.Uri;
import android.net.WebAddress;
@@ -139,6 +140,7 @@
/**
* @return {@code true} if the url is correctly URL encoded
*/
+ @UnsupportedAppUsage
static boolean verifyURLEncoding(String url) {
int count = url.length();
if (count == 0) {
@@ -181,6 +183,7 @@
* @return {@code true} if the url is a resource file.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isResourceUrl(String url) {
return (null != url) && url.startsWith(RESOURCE_BASE);
}
@@ -398,6 +401,7 @@
* Unfortunately some servers do not quote the value so to maintain
* consistent behaviour with other browsers, we allow unquoted values too.
*/
+ @UnsupportedAppUsage
static String parseContentDisposition(String contentDisposition) {
try {
Matcher m = CONTENT_DISPOSITION_PATTERN.matcher(contentDisposition);
diff --git a/core/java/android/webkit/UrlInterceptHandler.java b/core/java/android/webkit/UrlInterceptHandler.java
index 0a6e51f..f23aae6 100644
--- a/core/java/android/webkit/UrlInterceptHandler.java
+++ b/core/java/android/webkit/UrlInterceptHandler.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.webkit.CacheManager.CacheResult;
import android.webkit.PluginData;
@@ -44,6 +45,7 @@
*/
@Deprecated
@Nullable
+ @UnsupportedAppUsage
CacheResult service(String url, @Nullable Map<String, String> headers);
/**
@@ -60,5 +62,6 @@
*/
@Deprecated
@Nullable
+ @UnsupportedAppUsage
PluginData getPluginData(String url, @Nullable Map<String, String> headers);
}
diff --git a/core/java/android/webkit/UrlInterceptRegistry.java b/core/java/android/webkit/UrlInterceptRegistry.java
index 700d6d9..eeb28d7 100644
--- a/core/java/android/webkit/UrlInterceptRegistry.java
+++ b/core/java/android/webkit/UrlInterceptRegistry.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.webkit.CacheManager.CacheResult;
import android.webkit.PluginData;
import android.webkit.UrlInterceptHandler;
@@ -55,6 +56,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public static synchronized void setUrlInterceptDisabled(boolean disabled) {
mDisabled = disabled;
}
@@ -85,6 +87,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public static synchronized boolean registerHandler(
UrlInterceptHandler handler) {
if (!getHandlers().contains(handler)) {
@@ -106,6 +109,7 @@
* deprecated, so is this class.
*/
@Deprecated
+ @UnsupportedAppUsage
public static synchronized boolean unregisterHandler(
UrlInterceptHandler handler) {
return getHandlers().remove(handler);
@@ -152,6 +156,7 @@
*/
@Deprecated
@Nullable
+ @UnsupportedAppUsage
public static synchronized PluginData getPluginData(
String url, Map<String, String> headers) {
if (urlInterceptDisabled()) {
diff --git a/core/java/android/webkit/WebResourceResponse.java b/core/java/android/webkit/WebResourceResponse.java
index 7bc7b07..aae3056 100644
--- a/core/java/android/webkit/WebResourceResponse.java
+++ b/core/java/android/webkit/WebResourceResponse.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import java.io.InputStream;
import java.io.StringBufferInputStream;
@@ -29,9 +30,11 @@
* response when the WebView requests a particular resource.
*/
public class WebResourceResponse {
+ @UnsupportedAppUsage
private boolean mImmutable;
private String mMimeType;
private String mEncoding;
+ @UnsupportedAppUsage
private int mStatusCode;
private String mReasonPhrase;
private Map<String, String> mResponseHeaders;
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index a085395..c30edd3 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import java.lang.annotation.ElementType;
@@ -92,6 +93,7 @@
TextSize(int size) {
value = size;
}
+ @UnsupportedAppUsage
int value;
}
@@ -579,6 +581,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public void setUseDoubleTree(boolean use) {
// Specified to do nothing, so no need for derived classes to override.
}
@@ -591,6 +594,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean getUseDoubleTree() {
// Returns false unconditionally, so no need for derived classes to override.
return false;
@@ -1004,6 +1008,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/
@Deprecated
+ @UnsupportedAppUsage
public void setPluginsPath(String pluginsPath) {
// Specified to do nothing, so no need for derived classes to override.
}
@@ -1201,6 +1206,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/
@Deprecated
+ @UnsupportedAppUsage
public String getPluginsPath() {
// Unconditionally returns empty string, so no need for derived classes to override.
return "";
diff --git a/core/java/android/webkit/WebSyncManager.java b/core/java/android/webkit/WebSyncManager.java
index 03b94e7..3fa1b01 100644
--- a/core/java/android/webkit/WebSyncManager.java
+++ b/core/java/android/webkit/WebSyncManager.java
@@ -16,6 +16,7 @@
package android.webkit;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
/**
@@ -65,5 +66,6 @@
protected void onSyncInit() {
}
+ @UnsupportedAppUsage
abstract void syncFromRamToFlash();
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 9573f48..f343a52 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.content.Intent;
@@ -107,6 +108,7 @@
// Throwing an exception for incorrect thread usage if the
// build target is JB MR2 or newer. Defaults to false, and is
// set in the WebView constructor.
+ @UnsupportedAppUsage
private static volatile boolean sEnforceThreadChecking = false;
/**
@@ -389,6 +391,7 @@
* @hide This is used internally by dumprendertree, as it requires the JavaScript interfaces to
* be added synchronously, before a subsequent loadUrl call takes effect.
*/
+ @UnsupportedAppUsage
protected WebView(Context context, AttributeSet attrs, int defStyleAttr,
Map<String, Object> javaScriptInterfaces, boolean privateBrowsing) {
this(context, attrs, defStyleAttr, 0, javaScriptInterfaces, privateBrowsing);
@@ -398,6 +401,7 @@
* @hide
*/
@SuppressWarnings("deprecation") // for super() call into deprecated base class constructor.
+ @UnsupportedAppUsage
protected WebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes,
Map<String, Object> javaScriptInterfaces, boolean privateBrowsing) {
super(context, attrs, defStyleAttr, defStyleRes);
@@ -475,6 +479,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public int getVisibleTitleHeight() {
checkThread();
return mProvider.getVisibleTitleHeight();
@@ -579,6 +584,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public static void enablePlatformNotifications() {
// noop
}
@@ -591,6 +597,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public static void disablePlatformNotifications() {
// noop
}
@@ -600,6 +607,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void freeMemoryForTests() {
getFactory().getStatics().freeMemoryForTests();
}
@@ -644,6 +652,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean savePicture(Bundle b, final File dest) {
checkThread();
return mProvider.savePicture(b, dest);
@@ -661,6 +670,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean restorePicture(Bundle b, File src) {
checkThread();
return mProvider.restorePicture(b, src);
@@ -1275,6 +1285,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getTouchIconUrl() {
return mProvider.getTouchIconUrl();
}
@@ -1307,6 +1318,7 @@
* @hide
*/
@ViewDebug.ExportedProperty(category = "webview")
+ @UnsupportedAppUsage
public int getContentWidth() {
return mProvider.getContentWidth();
}
@@ -1357,6 +1369,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isPaused() {
return mProvider.isPaused();
}
@@ -1866,6 +1879,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static synchronized PluginList getPluginList() {
return new PluginList();
}
@@ -1933,6 +1947,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public void refreshPlugins(boolean reloadOpenPages) {
checkThread();
}
@@ -1945,6 +1960,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public void emulateShiftHeld() {
checkThread();
}
@@ -2005,6 +2021,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
*/
@Deprecated
+ @UnsupportedAppUsage
public View getZoomControls() {
checkThread();
return mProvider.getZoomControls();
@@ -2080,6 +2097,7 @@
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/
@Deprecated
+ @UnsupportedAppUsage
public void debugDump() {
checkThread();
}
@@ -2365,6 +2383,7 @@
}
// Only used by android.webkit.FindActionModeCallback.
+ @UnsupportedAppUsage
void notifyFindDialogDismissed() {
checkThread();
mProvider.notifyFindDialogDismissed();
@@ -2374,6 +2393,7 @@
// Private internal stuff
//-------------------------------------------------------------------------
+ @UnsupportedAppUsage
private WebViewProvider mProvider;
/**
@@ -2417,12 +2437,15 @@
}
}
+ @UnsupportedAppUsage
private static WebViewFactoryProvider getFactory() {
return WebViewFactory.getProvider();
}
+ @UnsupportedAppUsage
private final Looper mWebViewThread = Looper.myLooper();
+ @UnsupportedAppUsage
private void checkThread() {
// Ignore mWebViewThread == null because this can be called during in the super class
// constructor, before this class's own constructor has even started.
@@ -2703,6 +2726,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected void onDrawVerticalScrollBar(Canvas canvas, Drawable scrollBar,
int l, int t, int r, int b) {
mProvider.getViewDelegate().onDrawVerticalScrollBar(canvas, scrollBar, l, t, r, b);
@@ -2774,6 +2798,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected boolean setFrame(int left, int top, int right, int bottom) {
return mProvider.getViewDelegate().setFrame(left, top, right, bottom);
}
diff --git a/core/java/android/webkit/WebViewDelegate.java b/core/java/android/webkit/WebViewDelegate.java
index f067091..ba66571 100644
--- a/core/java/android/webkit/WebViewDelegate.java
+++ b/core/java/android/webkit/WebViewDelegate.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.app.Application;
import android.app.ResourcesManager;
@@ -45,6 +46,7 @@
@SystemApi
public final class WebViewDelegate {
+ @UnsupportedAppUsage
/* package */ WebViewDelegate() { }
/**
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index e0ccda9..e9a9e8f 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.AppGlobals;
import android.app.Application;
@@ -59,8 +60,10 @@
// Cache the factory both for efficiency, and ensure any one process gets all webviews from the
// same provider.
+ @UnsupportedAppUsage
private static WebViewFactoryProvider sProviderInstance;
private static final Object sProviderLock = new Object();
+ @UnsupportedAppUsage
private static PackageInfo sPackageInfo;
private static Boolean sWebViewSupported;
private static boolean sWebViewDisabled;
@@ -222,6 +225,7 @@
return loadNativeRet;
}
+ @UnsupportedAppUsage
static WebViewFactoryProvider getProvider() {
synchronized (sProviderLock) {
// For now the main purpose of this function (and the factory abstraction) is to keep
@@ -359,6 +363,7 @@
}
}
+ @UnsupportedAppUsage
private static Context getWebViewContextAndSetProvider() throws MissingWebViewPackageException {
Application initialApplication = AppGlobals.getInitialApplication();
try {
@@ -428,6 +433,7 @@
}
}
+ @UnsupportedAppUsage
private static Class<WebViewFactoryProvider> getProviderClass() {
Context webViewContext = null;
Application initialApplication = AppGlobals.getInitialApplication();
@@ -509,6 +515,7 @@
private static String WEBVIEW_UPDATE_SERVICE_NAME = "webviewupdate";
/** @hide */
+ @UnsupportedAppUsage
public static IWebViewUpdateService getUpdateService() {
if (isWebViewSupported()) {
return getUpdateServiceUnchecked();
diff --git a/core/java/android/webkit/WebViewProviderInfo.java b/core/java/android/webkit/WebViewProviderInfo.java
index b0e9f01..1704757 100644
--- a/core/java/android/webkit/WebViewProviderInfo.java
+++ b/core/java/android/webkit/WebViewProviderInfo.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.Signature;
import android.os.Parcel;
import android.os.Parcelable;
@@ -56,6 +57,7 @@
}
};
+ @UnsupportedAppUsage
private WebViewProviderInfo(Parcel in) {
packageName = in.readString();
description = in.readString();
diff --git a/core/java/android/webkit/WebViewProviderResponse.java b/core/java/android/webkit/WebViewProviderResponse.java
index c0aeb59..0edcb6f 100644
--- a/core/java/android/webkit/WebViewProviderResponse.java
+++ b/core/java/android/webkit/WebViewProviderResponse.java
@@ -16,6 +16,7 @@
package android.webkit;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.PackageInfo;
import android.os.Parcel;
import android.os.Parcelable;
@@ -56,6 +57,7 @@
out.writeInt(status);
}
+ @UnsupportedAppUsage
public final PackageInfo packageInfo;
public final int status;
}
diff --git a/core/java/android/webkit/WebViewUpdateService.java b/core/java/android/webkit/WebViewUpdateService.java
index 629891c..12d3221 100644
--- a/core/java/android/webkit/WebViewUpdateService.java
+++ b/core/java/android/webkit/WebViewUpdateService.java
@@ -17,6 +17,7 @@
package android.webkit;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.RemoteException;
/**
@@ -25,6 +26,7 @@
@SystemApi
public final class WebViewUpdateService {
+ @UnsupportedAppUsage
private WebViewUpdateService () {}
/**
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index ec5fdc9..07096e8 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -20,6 +20,7 @@
import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -248,6 +249,7 @@
/**
* Controls CHOICE_MODE_MULTIPLE_MODAL. null when inactive.
*/
+ @UnsupportedAppUsage
ActionMode mChoiceActionMode;
/**
@@ -276,16 +278,19 @@
/**
* Controls how the next layout will happen
*/
+ @UnsupportedAppUsage
int mLayoutMode = LAYOUT_NORMAL;
/**
* Should be used by subclasses to listen to changes in the dataset
*/
+ @UnsupportedAppUsage
AdapterDataSetObserver mDataSetObserver;
/**
* The adapter containing the data to be displayed by this view
*/
+ @UnsupportedAppUsage
ListAdapter mAdapter;
/**
@@ -311,22 +316,26 @@
/**
* The drawable used to draw the selector
*/
+ @UnsupportedAppUsage
Drawable mSelector;
/**
* The current position of the selector in the list.
*/
+ @UnsupportedAppUsage
int mSelectorPosition = INVALID_POSITION;
/**
* Defines the selector's location and dimension at drawing time
*/
+ @UnsupportedAppUsage
Rect mSelectorRect = new Rect();
/**
* The data set used to store unused views that should be reused during the next layout
* to avoid creating new ones
*/
+ @UnsupportedAppUsage
final RecycleBin mRecycler = new RecycleBin();
/**
@@ -337,6 +346,7 @@
/**
* The selection's top padding
*/
+ @UnsupportedAppUsage
int mSelectionTopPadding = 0;
/**
@@ -347,6 +357,7 @@
/**
* The selection's bottom padding
*/
+ @UnsupportedAppUsage
int mSelectionBottomPadding = 0;
/**
@@ -379,6 +390,7 @@
/**
* The position of the view that received the down motion event
*/
+ @UnsupportedAppUsage
int mMotionPosition;
/**
@@ -399,12 +411,14 @@
/**
* The Y value associated with the the down motion event
*/
+ @UnsupportedAppUsage
int mMotionY;
/**
* One of TOUCH_MODE_REST, TOUCH_MODE_DOWN, TOUCH_MODE_TAP, TOUCH_MODE_SCROLL, or
* TOUCH_MODE_DONE_WAITING
*/
+ @UnsupportedAppUsage
int mTouchMode = TOUCH_MODE_REST;
/**
@@ -420,16 +434,19 @@
/**
* Determines speed during touch scrolling
*/
+ @UnsupportedAppUsage
private VelocityTracker mVelocityTracker;
/**
* Handles one frame of a fling
*/
+ @UnsupportedAppUsage
private FlingRunnable mFlingRunnable;
/**
* Handles scrolling between positions within the list.
*/
+ @UnsupportedAppUsage
AbsPositionScroller mPositionScroller;
/**
@@ -463,11 +480,13 @@
/**
* Optional callback to notify client when scroll position has changed
*/
+ @UnsupportedAppUsage
private OnScrollListener mOnScrollListener;
/**
* Keeps track of our accessory window
*/
+ @UnsupportedAppUsage
PopupWindow mPopup;
/**
@@ -501,6 +520,7 @@
*/
int mResurrectToPosition = INVALID_POSITION;
+ @UnsupportedAppUsage
private ContextMenuInfo mContextMenuInfo = null;
/**
@@ -547,11 +567,13 @@
/**
* The last CheckForLongPress runnable we posted, if any
*/
+ @UnsupportedAppUsage
private CheckForLongPress mPendingCheckForLongPress;
/**
* The last CheckForTap runnable we posted, if any
*/
+ @UnsupportedAppUsage
private CheckForTap mPendingCheckForTap;
/**
@@ -590,6 +612,7 @@
/**
* The select child's view (from the adapter's getView) is enabled.
*/
+ @UnsupportedAppUsage
private boolean mIsChildViewEnabled;
/**
@@ -606,6 +629,7 @@
/**
* Helper object that renders and controls the fast scroll thumb.
*/
+ @UnsupportedAppUsage
private FastScroller mFastScroll;
/**
@@ -616,6 +640,7 @@
private boolean mGlobalLayoutListenerAddedFilter;
+ @UnsupportedAppUsage
private int mTouchSlop;
private float mDensityScale;
@@ -627,6 +652,7 @@
private Runnable mClearScrollingCache;
Runnable mPositionScrollAfterLayout;
private int mMinimumVelocity;
+ @UnsupportedAppUsage
private int mMaximumVelocity;
private float mVelocityScale = 1.0f;
@@ -651,6 +677,7 @@
* ID of the active pointer. This is used to retain consistency during
* drags/flings if multiple pointers are used.
*/
+ @UnsupportedAppUsage
private int mActivePointerId = INVALID_POINTER;
/**
@@ -662,11 +689,13 @@
/**
* Maximum distance to overscroll by during edge effects
*/
+ @UnsupportedAppUsage
int mOverscrollDistance;
/**
* Maximum distance to overfling during edge effects
*/
+ @UnsupportedAppUsage
int mOverflingDistance;
// These two EdgeGlows are always set and used together.
@@ -675,11 +704,13 @@
/**
* Tracks the state of the top edge glow.
*/
+ @UnsupportedAppUsage
private EdgeEffect mEdgeGlowTop;
/**
* Tracks the state of the bottom edge glow.
*/
+ @UnsupportedAppUsage
private EdgeEffect mEdgeGlowBottom;
/**
@@ -781,7 +812,7 @@
* @param firstVisibleItem the index of the first visible cell (ignore if
* visibleItemCount == 0)
* @param visibleItemCount the number of visible cells
- * @param totalItemCount the number of items in the list adaptor
+ * @param totalItemCount the number of items in the list adapter
*/
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
int totalItemCount);
@@ -1418,6 +1449,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
protected boolean isVerticalScrollBarHidden() {
return isFastScrollEnabled();
}
@@ -1469,6 +1501,7 @@
/**
* Notify our scroll listener (if there is one) of a change in scroll state
*/
+ @UnsupportedAppUsage
void invokeOnItemScrollListener() {
if (mFastScroll != null) {
mFastScroll.onScroll(mFirstPosition, getChildCount(), mItemCount);
@@ -1691,7 +1724,9 @@
static class SavedState extends BaseSavedState {
long selectedId;
+ @UnsupportedAppUsage
long firstId;
+ @UnsupportedAppUsage
int viewTop;
int position;
int height;
@@ -2228,6 +2263,7 @@
}
}
+ @UnsupportedAppUsage
private boolean canScrollUp() {
boolean canScrollUp;
// 0th element is not visible
@@ -2244,6 +2280,7 @@
return canScrollUp;
}
+ @UnsupportedAppUsage
private boolean canScrollDown() {
boolean canScrollDown;
int count = getChildCount();
@@ -2571,6 +2608,7 @@
positionSelector(position, sel, false, -1, -1);
}
+ @UnsupportedAppUsage
private void positionSelector(int position, View sel, boolean manageHotspot, float x, float y) {
final boolean positionChanged = position != mSelectorPosition;
if (position != INVALID_POSITION) {
@@ -2857,6 +2895,7 @@
mScrollDown = down;
}
+ @UnsupportedAppUsage
void updateSelectorState() {
final Drawable selector = mSelector;
if (selector != null && selector.isStateful()) {
@@ -3219,6 +3258,7 @@
return false;
}
+ @UnsupportedAppUsage
boolean performLongPress(final View child,
final int longPressPosition, final long longPressId) {
return performLongPress(
@@ -3229,6 +3269,7 @@
CheckForLongPress.INVALID_COORD);
}
+ @UnsupportedAppUsage
boolean performLongPress(final View child,
final int longPressPosition, final long longPressId, float x, float y) {
// CHOICE_MODE_MULTIPLE_MODAL takes over long press.
@@ -4555,6 +4596,7 @@
*
* @param newState The new scroll state.
*/
+ @UnsupportedAppUsage
void reportScrollStateChange(int newState) {
if (newState != mLastScrollState) {
if (mOnScrollListener != null) {
@@ -4574,6 +4616,7 @@
/**
* Tracks the decay of a fling scroll
*/
+ @UnsupportedAppUsage
private final OverScroller mScroller;
/**
@@ -4618,6 +4661,7 @@
mScroller = new OverScroller(getContext());
}
+ @UnsupportedAppUsage
void start(int initialVelocity) {
int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0;
mLastFlingY = initialY;
@@ -4695,6 +4739,7 @@
postOnAnimation(this);
}
+ @UnsupportedAppUsage
void endFling() {
mTouchMode = TOUCH_MODE_REST;
@@ -4949,6 +4994,7 @@
smoothScrollBy(distance, duration, false, false);
}
+ @UnsupportedAppUsage
void smoothScrollBy(int distance, int duration, boolean linear,
boolean suppressEndFlingStateChangeCall) {
if (mFlingRunnable == null) {
@@ -5091,6 +5137,7 @@
* @param incrementalDeltaY Change in deltaY from the previous event.
* @return true if we're already at the beginning/end of the list and have nothing to do.
*/
+ @UnsupportedAppUsage
boolean trackMotionScroll(int deltaY, int incrementalDeltaY) {
final int childCount = getChildCount();
if (childCount == 0) {
@@ -5326,6 +5373,7 @@
* @param y Where the user touched
* @return The position of the first (or only) item in the row containing y
*/
+ @UnsupportedAppUsage
abstract int findMotionRow(int y);
/**
@@ -5358,6 +5406,7 @@
* If there is a selection returns false.
* Otherwise resurrects the selection and returns true if resurrected.
*/
+ @UnsupportedAppUsage
boolean resurrectSelectionIfNeeded() {
if (mSelectedPosition < 0 && resurrectSelection()) {
updateSelectorState();
@@ -6522,6 +6571,7 @@
@ViewDebug.IntToString(from = ITEM_VIEW_TYPE_IGNORE, to = "ITEM_VIEW_TYPE_IGNORE"),
@ViewDebug.IntToString(from = ITEM_VIEW_TYPE_HEADER_OR_FOOTER, to = "ITEM_VIEW_TYPE_HEADER_OR_FOOTER")
})
+ @UnsupportedAppUsage
int viewType;
/**
@@ -6549,6 +6599,7 @@
* scrap heap.
* @hide
*/
+ @UnsupportedAppUsage
int scrappedFromPosition;
/**
@@ -6617,6 +6668,7 @@
* @see android.widget.AbsListView.RecyclerListener
*/
class RecycleBin {
+ @UnsupportedAppUsage
private RecyclerListener mRecyclerListener;
/**
@@ -6698,6 +6750,7 @@
/**
* Clears the scrap heap.
*/
+ @UnsupportedAppUsage
void clear() {
if (mViewTypeCount == 1) {
final ArrayList<View> scrap = mCurrentScrap;
diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java
index 61a5873..a85c585 100644
--- a/core/java/android/widget/AbsSeekBar.java
+++ b/core/java/android/widget/AbsSeekBar.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -43,6 +44,7 @@
public abstract class AbsSeekBar extends ProgressBar {
private final Rect mTempRect = new Rect();
+ @UnsupportedAppUsage
private Drawable mThumb;
private ColorStateList mThumbTintList = null;
private PorterDuff.Mode mThumbTintMode = null;
@@ -56,17 +58,20 @@
private boolean mHasTickMarkTintMode = false;
private int mThumbOffset;
+ @UnsupportedAppUsage
private boolean mSplitTrack;
/**
* On touch, this offset plus the scaled value from the position of the
* touch will form the progress value. Usually 0.
*/
+ @UnsupportedAppUsage
float mTouchProgressOffset;
/**
* Whether this is user seekable.
*/
+ @UnsupportedAppUsage
boolean mIsUserSeekable = true;
/**
@@ -76,10 +81,12 @@
private int mKeyProgressIncrement = 1;
private static final int NO_ALPHA = 0xFF;
+ @UnsupportedAppUsage
private float mDisabledAlpha;
private int mScaledTouchSlop;
private float mTouchDownX;
+ @UnsupportedAppUsage
private boolean mIsDragging;
public AbsSeekBar(Context context) {
@@ -729,6 +736,7 @@
/**
* Draw the thumb.
*/
+ @UnsupportedAppUsage
void drawThumb(Canvas canvas) {
if (mThumb != null) {
final int saveCount = canvas.save();
@@ -834,6 +842,7 @@
}
}
+ @UnsupportedAppUsage
private void trackTouchEvent(MotionEvent event) {
final int x = Math.round(event.getX());
final int y = Math.round(event.getY());
diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java
index 46269c6..eb20a76 100644
--- a/core/java/android/widget/ActionMenuPresenter.java
+++ b/core/java/android/widget/ActionMenuPresenter.java
@@ -22,6 +22,7 @@
import android.animation.PropertyValuesHolder;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -586,6 +587,7 @@
* Dismiss all popup menus - overflow and submenus.
* @return true if popups were dismissed, false otherwise. (This can be because none were open.)
*/
+ @UnsupportedAppUsage
public boolean dismissPopupMenus() {
boolean result = hideOverflowMenu();
result |= hideSubMenus();
@@ -608,6 +610,7 @@
/**
* @return true if the overflow menu is currently showing
*/
+ @UnsupportedAppUsage
public boolean isOverflowMenuShowing() {
return mOverflowPopup != null && mOverflowPopup.isShowing();
}
@@ -766,6 +769,7 @@
}
@Override
+ @UnsupportedAppUsage
public Parcelable onSaveInstanceState() {
SavedState state = new SavedState();
state.openSubMenuId = mOpenSubMenuId;
@@ -773,6 +777,7 @@
}
@Override
+ @UnsupportedAppUsage
public void onRestoreInstanceState(Parcelable state) {
SavedState saved = (SavedState) state;
if (saved.openSubMenuId > 0) {
diff --git a/core/java/android/widget/ActionMenuView.java b/core/java/android/widget/ActionMenuView.java
index c4bbdb0..7e58622 100644
--- a/core/java/android/widget/ActionMenuView.java
+++ b/core/java/android/widget/ActionMenuView.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
@@ -564,6 +565,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isOverflowReserved() {
return mReserveOverflow;
}
@@ -655,6 +657,7 @@
* Must be called before the first call to getMenu()
* @hide
*/
+ @UnsupportedAppUsage
public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) {
mActionMenuPresenterCallback = pcb;
mMenuBuilderCallback = mcb;
@@ -664,6 +667,7 @@
* Returns the current menu or null if one has not yet been configured.
* @hide Internal use only for action bar integration
*/
+ @UnsupportedAppUsage
public MenuBuilder peekMenu() {
return mMenu;
}
@@ -697,6 +701,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isOverflowMenuShowPending() {
return mPresenter != null && mPresenter.isOverflowMenuShowPending();
}
@@ -714,6 +719,7 @@
* @hide Private LinearLayout (superclass) API. Un-hide if LinearLayout API is made public.
*/
@Override
+ @UnsupportedAppUsage
protected boolean hasDividerBeforeChildAt(int childIndex) {
if (childIndex == 0) {
return false;
@@ -736,6 +742,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setExpandedActionViewsExclusive(boolean exclusive) {
mPresenter.setExpandedActionViewsExclusive(exclusive);
}
@@ -783,6 +790,7 @@
/** @hide */
public interface ActionMenuChildView {
+ @UnsupportedAppUsage
public boolean needsDividerBefore();
public boolean needsDividerAfter();
}
@@ -790,25 +798,31 @@
public static class LayoutParams extends LinearLayout.LayoutParams {
/** @hide */
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
public boolean isOverflowButton;
/** @hide */
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
public int cellsUsed;
/** @hide */
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
public int extraPixels;
/** @hide */
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
public boolean expandable;
/** @hide */
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
public boolean preventEdgeOffset;
/** @hide */
+ @UnsupportedAppUsage
public boolean expanded;
public LayoutParams(Context c, AttributeSet attrs) {
diff --git a/core/java/android/widget/ActivityChooserModel.java b/core/java/android/widget/ActivityChooserModel.java
index 75c857c..f5bf759 100644
--- a/core/java/android/widget/ActivityChooserModel.java
+++ b/core/java/android/widget/ActivityChooserModel.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
@@ -339,6 +340,7 @@
*
* @return The model.
*/
+ @UnsupportedAppUsage
public static ActivityChooserModel get(Context context, String historyFileName) {
synchronized (sRegistryLock) {
ActivityChooserModel dataModel = sDataModelRegistry.get(historyFileName);
@@ -376,6 +378,7 @@
*
* @param intent The intent.
*/
+ @UnsupportedAppUsage
public void setIntent(Intent intent) {
synchronized (mInstanceLock) {
if (mIntent == intent) {
@@ -405,6 +408,7 @@
*
* @see #setIntent(Intent)
*/
+ @UnsupportedAppUsage
public int getActivityCount() {
synchronized (mInstanceLock) {
ensureConsistentState();
@@ -420,6 +424,7 @@
* @see ActivityResolveInfo
* @see #setIntent(Intent)
*/
+ @UnsupportedAppUsage
public ResolveInfo getActivity(int index) {
synchronized (mInstanceLock) {
ensureConsistentState();
@@ -467,6 +472,7 @@
* @see HistoricalRecord
* @see OnChooseActivityListener
*/
+ @UnsupportedAppUsage
public Intent chooseActivity(int index) {
synchronized (mInstanceLock) {
if (mIntent == null) {
@@ -507,6 +513,7 @@
*
* @param listener The listener.
*/
+ @UnsupportedAppUsage
public void setOnChooseActivityListener(OnChooseActivityListener listener) {
synchronized (mInstanceLock) {
mActivityChoserModelPolicy = listener;
diff --git a/core/java/android/widget/ActivityChooserView.java b/core/java/android/widget/ActivityChooserView.java
index 121a8c5..58715ee 100644
--- a/core/java/android/widget/ActivityChooserView.java
+++ b/core/java/android/widget/ActivityChooserView.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -323,6 +324,7 @@
*
* @param drawable The drawable.
*/
+ @UnsupportedAppUsage
public void setExpandActivityOverflowButtonDrawable(Drawable drawable) {
mExpandActivityOverflowButtonImage.setImageDrawable(drawable);
}
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java
index 4e77f0b..dd6c923 100644
--- a/core/java/android/widget/AdapterView.java
+++ b/core/java/android/widget/AdapterView.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.database.DataSetObserver;
import android.os.Parcelable;
@@ -68,6 +69,7 @@
* The position of the first child displayed
*/
@ViewDebug.ExportedProperty(category = "scrolling")
+ @UnsupportedAppUsage
int mFirstPosition = 0;
/**
@@ -79,6 +81,7 @@
/**
* Position from which to start looking for mSyncRowId
*/
+ @UnsupportedAppUsage
int mSyncPosition;
/**
@@ -94,6 +97,7 @@
/**
* True if we need to sync to mSyncRowId
*/
+ @UnsupportedAppUsage
boolean mNeedSync = false;
/**
@@ -131,11 +135,13 @@
/**
* The listener that receives notifications when an item is selected.
*/
+ @UnsupportedAppUsage
OnItemSelectedListener mOnItemSelectedListener;
/**
* The listener that receives notifications when an item is clicked.
*/
+ @UnsupportedAppUsage
OnItemClickListener mOnItemClickListener;
/**
@@ -146,6 +152,7 @@
/**
* True if the data has changed since the last layout
*/
+ @UnsupportedAppUsage
boolean mDataChanged;
/**
@@ -153,17 +160,20 @@
* during the next layout.
*/
@ViewDebug.ExportedProperty(category = "list")
+ @UnsupportedAppUsage
int mNextSelectedPosition = INVALID_POSITION;
/**
* The item id of the item to select during the next layout.
*/
+ @UnsupportedAppUsage
long mNextSelectedRowId = INVALID_ROW_ID;
/**
* The position within the adapter's data set of the currently selected item.
*/
@ViewDebug.ExportedProperty(category = "list")
+ @UnsupportedAppUsage
int mSelectedPosition = INVALID_POSITION;
/**
@@ -201,6 +211,7 @@
/**
* The last selected position we used when notifying
*/
+ @UnsupportedAppUsage
int mOldSelectedPosition = INVALID_POSITION;
/**
@@ -900,6 +911,7 @@
}
}
+ @UnsupportedAppUsage
void selectionChanged() {
// We're about to post or run the selection notifier, so we don't need
// a pending notifier.
@@ -1217,6 +1229,7 @@
* Utility to keep mSelectedPosition and mSelectedRowId in sync
* @param position Our current position
*/
+ @UnsupportedAppUsage
void setSelectedPositionInt(int position) {
mSelectedPosition = position;
mSelectedRowId = getItemIdAtPosition(position);
@@ -1227,6 +1240,7 @@
* @param position Intended value for mSelectedPosition the next time we go
* through layout
*/
+ @UnsupportedAppUsage
void setNextSelectedPositionInt(int position) {
mNextSelectedPosition = position;
mNextSelectedRowId = getItemIdAtPosition(position);
diff --git a/core/java/android/widget/AnalogClock.java b/core/java/android/widget/AnalogClock.java
index bde5f7f..795b034 100644
--- a/core/java/android/widget/AnalogClock.java
+++ b/core/java/android/widget/AnalogClock.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -46,8 +47,11 @@
public class AnalogClock extends View {
private Time mCalendar;
+ @UnsupportedAppUsage
private Drawable mHourHand;
+ @UnsupportedAppUsage
private Drawable mMinuteHand;
+ @UnsupportedAppUsage
private Drawable mDial;
private int mDialWidth;
diff --git a/core/java/android/widget/AppSecurityPermissions.java b/core/java/android/widget/AppSecurityPermissions.java
index e6f948f..b754d84 100644
--- a/core/java/android/widget/AppSecurityPermissions.java
+++ b/core/java/android/widget/AppSecurityPermissions.java
@@ -16,6 +16,7 @@
*/
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -257,6 +258,7 @@
mNewPermPrefix = mContext.getText(R.string.perms_new_perm_prefix);
}
+ @UnsupportedAppUsage
public AppSecurityPermissions(Context context, String packageName) {
this(context);
mPackageName = packageName;
@@ -418,6 +420,7 @@
}
}
+ @UnsupportedAppUsage
public int getPermissionCount() {
return getPermissionCount(WHICH_ALL);
}
@@ -438,6 +441,7 @@
return N;
}
+ @UnsupportedAppUsage
public View getPermissionsView() {
return getPermissionsView(WHICH_ALL, false);
}
diff --git a/core/java/android/widget/ArrayAdapter.java b/core/java/android/widget/ArrayAdapter.java
index f18f217..c3c2c0d 100644
--- a/core/java/android/widget/ArrayAdapter.java
+++ b/core/java/android/widget/ArrayAdapter.java
@@ -21,6 +21,7 @@
import android.annotation.LayoutRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.util.Log;
@@ -77,6 +78,7 @@
* used by the filter (see {@link #getFilter()} to make a synchronized copy of
* the original array of data.
*/
+ @UnsupportedAppUsage
private final Object mLock = new Object();
private final LayoutInflater mInflater;
@@ -99,6 +101,7 @@
* Contains the list of objects that represent the data of this ArrayAdapter.
* The content of this list is referred to as "the array" in the documentation.
*/
+ @UnsupportedAppUsage
private List<T> mObjects;
/**
@@ -121,6 +124,7 @@
// A copy of the original mObjects array, initialized from and then used instead as soon as
// the mFilter ArrayFilter is used. mObjects will then only contain the filtered values.
+ @UnsupportedAppUsage
private ArrayList<T> mOriginalValues;
private ArrayFilter mFilter;
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index 49741d4..71d13a9 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.DrawableRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources.Theme;
import android.content.res.TypedArray;
@@ -102,10 +103,13 @@
/** Context used to inflate the popup window or dialog. */
private final Context mPopupContext;
+ @UnsupportedAppUsage
private final ListPopupWindow mPopup;
+ @UnsupportedAppUsage
private final PassThroughClickListener mPassThroughClickListener;
private CharSequence mHintText;
+ @UnsupportedAppUsage
private TextView mHintView;
private int mHintResource;
@@ -132,6 +136,7 @@
// Set to false when the list is hidden to prevent asynchronous updates to popup the list again.
private boolean mPopupCanBeUpdated = true;
+ @UnsupportedAppUsage
private PopupDataSetObserver mObserver;
/**
@@ -528,6 +533,7 @@
*
* @hide Pending API council approval
*/
+ @UnsupportedAppUsage
public void setDropDownAnimationStyle(int animationStyle) {
mPopup.setAnimationStyle(animationStyle);
}
@@ -566,6 +572,7 @@
*
* @hide Pending API council approval
*/
+ @UnsupportedAppUsage
public void setDropDownAlwaysVisible(boolean dropDownAlwaysVisible) {
mPopup.setDropDownAlwaysVisible(dropDownAlwaysVisible);
}
@@ -587,6 +594,7 @@
*
* @hide Pending API council approval
*/
+ @UnsupportedAppUsage
public void setDropDownDismissedOnCompletion(boolean dropDownDismissedOnCompletion) {
mDropDownDismissedOnCompletion = dropDownDismissedOnCompletion;
}
@@ -866,6 +874,7 @@
}
}
+ @UnsupportedAppUsage
void doBeforeTextChanged() {
if (mBlockCompletion) return;
@@ -875,6 +884,7 @@
if (DEBUG) Log.v(TAG, "before text changed: open=" + mOpenBefore);
}
+ @UnsupportedAppUsage
void doAfterTextChanged() {
if (mBlockCompletion) return;
@@ -1171,6 +1181,7 @@
*
* @hide internal used only by SearchDialog
*/
+ @UnsupportedAppUsage
public void showDropDownAfterLayout() {
mPopup.postShow();
}
@@ -1181,6 +1192,7 @@
* the background.
* @hide internal used only here and SearchDialog
*/
+ @UnsupportedAppUsage
public void ensureImeVisible(boolean visible) {
mPopup.setInputMethodMode(visible
? ListPopupWindow.INPUT_METHOD_NEEDED : ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
@@ -1192,6 +1204,7 @@
/**
* @hide internal used only here and SearchDialog
*/
+ @UnsupportedAppUsage
public boolean isInputMethodNotNeeded() {
return mPopup.getInputMethodMode() == ListPopupWindow.INPUT_METHOD_NOT_NEEDED;
}
@@ -1225,6 +1238,7 @@
*
* @hide used only by SearchDialog
*/
+ @UnsupportedAppUsage
public void setForceIgnoreOutsideTouch(boolean forceIgnoreOutsideTouch) {
mPopup.setForceIgnoreOutsideTouch(forceIgnoreOutsideTouch);
}
diff --git a/core/java/android/widget/BaseAdapter.java b/core/java/android/widget/BaseAdapter.java
index 5838cc1..7b9365b 100644
--- a/core/java/android/widget/BaseAdapter.java
+++ b/core/java/android/widget/BaseAdapter.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.database.DataSetObservable;
import android.database.DataSetObserver;
import android.view.View;
@@ -29,6 +30,7 @@
* specialized {@link SpinnerAdapter} interface).
*/
public abstract class BaseAdapter implements ListAdapter, SpinnerAdapter {
+ @UnsupportedAppUsage
private final DataSetObservable mDataSetObservable = new DataSetObservable();
private CharSequence[] mAutofillOptions;
diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java
index db50e34..2ff815d 100644
--- a/core/java/android/widget/CalendarView.java
+++ b/core/java/android/widget/CalendarView.java
@@ -23,6 +23,7 @@
import android.annotation.Nullable;
import android.annotation.StyleRes;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.content.res.Configuration;
@@ -72,6 +73,7 @@
private static final int MODE_HOLO = 0;
private static final int MODE_MATERIAL = 1;
+ @UnsupportedAppUsage
private final CalendarViewDelegate mDelegate;
/**
diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java
index 92bfd56..1472b01 100644
--- a/core/java/android/widget/CheckedTextView.java
+++ b/core/java/android/widget/CheckedTextView.java
@@ -19,6 +19,7 @@
import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -53,6 +54,7 @@
private boolean mChecked;
private int mCheckMarkResource;
+ @UnsupportedAppUsage
private Drawable mCheckMarkDrawable;
private ColorStateList mCheckMarkTintList = null;
private PorterDuff.Mode mCheckMarkTintMode = null;
@@ -61,6 +63,7 @@
private int mBasePadding;
private int mCheckMarkWidth;
+ @UnsupportedAppUsage
private int mCheckMarkGravity = Gravity.END;
private boolean mNeedRequestlayout;
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index 0762b15..8d09489 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -19,6 +19,7 @@
import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -59,14 +60,17 @@
private static final String LOG_TAG = CompoundButton.class.getSimpleName();
private boolean mChecked;
+ @UnsupportedAppUsage
private boolean mBroadcasting;
+ @UnsupportedAppUsage
private Drawable mButtonDrawable;
private ColorStateList mButtonTintList = null;
private PorterDuff.Mode mButtonTintMode = null;
private boolean mHasButtonTint = false;
private boolean mHasButtonTintMode = false;
+ @UnsupportedAppUsage
private OnCheckedChangeListener mOnCheckedChangeListener;
private OnCheckedChangeListener mOnCheckedChangeWidgetListener;
diff --git a/core/java/android/widget/CursorAdapter.java b/core/java/android/widget/CursorAdapter.java
index 9fb98db..cc8b550 100644
--- a/core/java/android/widget/CursorAdapter.java
+++ b/core/java/android/widget/CursorAdapter.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import android.content.Context;
import android.content.res.Resources;
@@ -43,6 +44,7 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected boolean mDataValid;
/**
* This field should be made private, so it is hidden from the SDK.
@@ -53,11 +55,13 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected Cursor mCursor;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected Context mContext;
/**
* Context used for {@link #getDropDownView(int, View, ViewGroup)}.
@@ -68,16 +72,19 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected int mRowIDColumn;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected ChangeObserver mChangeObserver;
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected DataSetObserver mDataSetObserver;
/**
* This field should be made private, so it is hidden from the SDK.
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java
index b2b93fa..df53795 100644
--- a/core/java/android/widget/DatePicker.java
+++ b/core/java/android/widget/DatePicker.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.content.res.Configuration;
@@ -114,6 +115,7 @@
@Retention(RetentionPolicy.SOURCE)
public @interface DatePickerMode {}
+ @UnsupportedAppUsage
private final DatePickerDelegate mDelegate;
@DatePickerMode
@@ -329,6 +331,7 @@
* @param callback the callback, may be null
* @hide
*/
+ @UnsupportedAppUsage
public void setValidationCallback(@Nullable ValidationCallback callback) {
mDelegate.setValidationCallback(callback);
}
diff --git a/core/java/android/widget/DatePickerSpinnerDelegate.java b/core/java/android/widget/DatePickerSpinnerDelegate.java
index dba74b1..f88a4e2 100644
--- a/core/java/android/widget/DatePickerSpinnerDelegate.java
+++ b/core/java/android/widget/DatePickerSpinnerDelegate.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -502,6 +503,7 @@
|| mCurrentDate.get(Calendar.DAY_OF_MONTH) != dayOfMonth);
}
+ @UnsupportedAppUsage
private void setDate(int year, int month, int dayOfMonth) {
mCurrentDate.set(year, month, dayOfMonth);
resetAutofilledValue();
@@ -512,6 +514,7 @@
}
}
+ @UnsupportedAppUsage
private void updateSpinners() {
// set the spinner ranges respecting the min and max dates
if (mCurrentDate.equals(mMinDate)) {
@@ -564,6 +567,7 @@
/**
* Updates the calendar view with the current date.
*/
+ @UnsupportedAppUsage
private void updateCalendarView() {
mCalendarView.setDate(mCurrentDate.getTimeInMillis(), false, false);
}
@@ -572,6 +576,7 @@
/**
* Notifies the listener, if such, for a change in the selected date.
*/
+ @UnsupportedAppUsage
private void notifyDateChanged() {
mDelegator.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
if (mOnDateChangedListener != null) {
@@ -627,6 +632,7 @@
}
}
+ @UnsupportedAppUsage
private void updateInputState() {
// Make sure that if the user changes the value and the IME is active
// for one of the inputs if this widget, the IME is closed. If the user
diff --git a/core/java/android/widget/DateTimeView.java b/core/java/android/widget/DateTimeView.java
index 2b1e900..bf2762a 100644
--- a/core/java/android/widget/DateTimeView.java
+++ b/core/java/android/widget/DateTimeView.java
@@ -22,6 +22,7 @@
import static android.text.format.DateUtils.YEAR_IN_MILLIS;
import static android.text.format.Time.getJulianDay;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -76,6 +77,7 @@
this(context, null);
}
+ @UnsupportedAppUsage
public DateTimeView(Context context, AttributeSet attrs) {
super(context, attrs);
final TypedArray a = context.obtainStyledAttributes(attrs,
@@ -124,6 +126,7 @@
}
@android.view.RemotableViewMethod
+ @UnsupportedAppUsage
public void setTime(long time) {
Time t = new Time();
t.set(time);
@@ -149,6 +152,7 @@
}
}
+ @UnsupportedAppUsage
void update() {
if (mTime == null || getVisibility() == GONE) {
return;
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index f9f5901..7e42862 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.ColorInt;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -79,6 +80,7 @@
private static final float RADIUS_FACTOR = 0.6f;
private float mGlowAlpha;
+ @UnsupportedAppUsage
private float mGlowScaleY;
private float mGlowAlphaStart;
@@ -106,6 +108,7 @@
private float mPullDistance;
private final Rect mBounds = new Rect();
+ @UnsupportedAppUsage
private final Paint mPaint = new Paint();
private float mRadius;
private float mBaseGlowScale;
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 058736a..47ce90b 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -21,6 +21,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.app.RemoteAction;
@@ -201,7 +202,9 @@
SelectionModifierCursorController mSelectionModifierCursorController;
// Action mode used when text is selected or when actions on an insertion cursor are triggered.
private ActionMode mTextActionMode;
+ @UnsupportedAppUsage
private boolean mInsertionControllerEnabled;
+ @UnsupportedAppUsage
private boolean mSelectionControllerEnabled;
private final boolean mHapticTextHandleEnabled;
@@ -268,6 +271,7 @@
boolean mDiscardNextActionUp;
boolean mIgnoreActionUpEvent;
+ @UnsupportedAppUsage
private long mShowCursor;
private boolean mRenderCursorRegardlessTiming;
private Blink mBlink;
@@ -289,6 +293,7 @@
private boolean mShowErrorAfterAttach;
boolean mInBatchEditControllers;
+ @UnsupportedAppUsage
boolean mShowSoftInputOnFocus = true;
private boolean mPreserveSelection;
private boolean mRestartActionModeOnNextRefresh;
@@ -304,8 +309,11 @@
Drawable mDrawableForCursor = null;
+ @UnsupportedAppUsage
private Drawable mSelectHandleLeft;
+ @UnsupportedAppUsage
private Drawable mSelectHandleRight;
+ @UnsupportedAppUsage
private Drawable mSelectHandleCenter;
// Global listener that detects changes in the global position of the TextView
@@ -318,6 +326,7 @@
Callback mCustomInsertionActionModeCallback;
// Set when this TextView gained focus with some text selected. Will start selection mode.
+ @UnsupportedAppUsage
boolean mCreatedWithASelection;
// Indicates the current tap state (first tap, double tap, or triple click).
@@ -2024,6 +2033,7 @@
}
}
+ @UnsupportedAppUsage
void invalidateTextDisplayList() {
if (mTextRenderNodes != null) {
for (int i = 0; i < mTextRenderNodes.length; i++) {
@@ -6299,6 +6309,7 @@
static class InputContentType {
int imeOptions = EditorInfo.IME_NULL;
+ @UnsupportedAppUsage
String privateImeOptions;
CharSequence imeActionLabel;
int imeActionId;
diff --git a/core/java/android/widget/ExpandableListView.java b/core/java/android/widget/ExpandableListView.java
index 8d9848d..33d1539 100644
--- a/core/java/android/widget/ExpandableListView.java
+++ b/core/java/android/widget/ExpandableListView.java
@@ -18,6 +18,7 @@
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -127,15 +128,18 @@
private static final long PACKED_POSITION_INT_MASK_GROUP = 0x7FFFFFFF;
/** Serves as the glue/translator between a ListView and an ExpandableListView */
+ @UnsupportedAppUsage
private ExpandableListConnector mConnector;
/** Gives us Views through group+child positions */
private ExpandableListAdapter mAdapter;
/** Left bound for drawing the indicator. */
+ @UnsupportedAppUsage
private int mIndicatorLeft;
/** Right bound for drawing the indicator. */
+ @UnsupportedAppUsage
private int mIndicatorRight;
/** Start bound for drawing the indicator. */
@@ -180,6 +184,7 @@
private static final int INDICATOR_UNDEFINED = -2;
/** The indicator drawn next to a group. */
+ @UnsupportedAppUsage
private Drawable mGroupIndicator;
/** The indicator drawn next to a child. */
@@ -200,6 +205,7 @@
{R.attr.state_expanded, R.attr.state_empty};
/** States for the group where the 0th bit is expanded and 1st bit is empty. */
+ @UnsupportedAppUsage
private static final int[][] GROUP_STATE_SETS = {
EMPTY_STATE_SET, // 00
GROUP_EXPANDED_STATE_SET, // 01
@@ -212,6 +218,7 @@
{R.attr.state_last};
/** Drawable to be used as a divider when it is adjacent to any children */
+ @UnsupportedAppUsage
private Drawable mChildDivider;
// Bounds of the indicator to be drawn
@@ -793,6 +800,7 @@
void onGroupCollapse(int groupPosition);
}
+ @UnsupportedAppUsage
private OnGroupCollapseListener mOnGroupCollapseListener;
public void setOnGroupCollapseListener(
@@ -811,6 +819,7 @@
void onGroupExpand(int groupPosition);
}
+ @UnsupportedAppUsage
private OnGroupExpandListener mOnGroupExpandListener;
public void setOnGroupExpandListener(
@@ -837,6 +846,7 @@
long id);
}
+ @UnsupportedAppUsage
private OnGroupClickListener mOnGroupClickListener;
public void setOnGroupClickListener(OnGroupClickListener onGroupClickListener) {
@@ -864,6 +874,7 @@
int childPosition, long id);
}
+ @UnsupportedAppUsage
private OnChildClickListener mOnChildClickListener;
public void setOnChildClickListener(OnChildClickListener onChildClickListener) {
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index 198bf27..2c09185 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -23,6 +23,7 @@
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -98,13 +99,16 @@
private final Rect mTempBounds = new Rect();
private final Rect mTempMargins = new Rect();
+ @UnsupportedAppUsage
private final Rect mContainerRect = new Rect();
private final AbsListView mList;
private final ViewGroupOverlay mOverlay;
private final TextView mPrimaryText;
private final TextView mSecondaryText;
+ @UnsupportedAppUsage
private final ImageView mThumbImage;
+ @UnsupportedAppUsage
private final ImageView mTrackImage;
private final View mPreviewImage;
/**
@@ -114,6 +118,7 @@
private final int[] mPreviewResId = new int[2];
/** The minimum touch target size in pixels. */
+ @UnsupportedAppUsage
private final int mMinimumTouchTarget;
/**
@@ -133,7 +138,9 @@
/** Theme-specified text color. Used only if text appearance is not set. */
private ColorStateList mTextColor;
+ @UnsupportedAppUsage
private Drawable mThumbDrawable;
+ @UnsupportedAppUsage
private Drawable mTrackDrawable;
private int mTextAppearance;
private int mThumbPosition;
@@ -161,6 +168,7 @@
private int mFirstVisibleItem;
/** The number of headers at the top of the view. */
+ @UnsupportedAppUsage
private int mHeaderCount;
/** The index of the current section. */
@@ -170,6 +178,7 @@
private int mScrollbarPosition = -1;
/** Whether the list is long enough to need a fast scroller. */
+ @UnsupportedAppUsage
private boolean mLongList;
private Object[] mSections;
@@ -245,6 +254,7 @@
}
};
+ @UnsupportedAppUsage
public FastScroller(AbsListView listView, int styleResId) {
mList = listView;
mOldItemCount = listView.getCount();
@@ -392,6 +402,7 @@
/**
* Removes this FastScroller overlay from the host view.
*/
+ @UnsupportedAppUsage
public void remove() {
mOverlay.remove(mTrackImage);
mOverlay.remove(mThumbImage);
@@ -507,6 +518,7 @@
return mWidth;
}
+ @UnsupportedAppUsage
public void onSizeChanged(int w, int h, int oldw, int oldh) {
updateLayout();
}
@@ -816,6 +828,7 @@
mThumbRange = max - min;
}
+ @UnsupportedAppUsage
private void setState(int state) {
mList.removeCallbacks(mDeferHide);
@@ -1380,6 +1393,7 @@
cancelFling();
}
+ @UnsupportedAppUsage
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (!isEnabled()) {
return false;
@@ -1449,6 +1463,7 @@
return null;
}
+ @UnsupportedAppUsage
public boolean onTouchEvent(MotionEvent me) {
if (!isEnabled()) {
return false;
diff --git a/core/java/android/widget/Filter.java b/core/java/android/widget/Filter.java
index d901540..16f4ee2 100644
--- a/core/java/android/widget/Filter.java
+++ b/core/java/android/widget/Filter.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
@@ -65,6 +66,7 @@
* @param delayer The delayer.
* @hide
*/
+ @UnsupportedAppUsage
public void setDelayer(Delayer delayer) {
synchronized (mLock) {
mDelayer = delayer;
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index dc8ee01..865f520 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
@@ -58,18 +59,23 @@
private static final int DEFAULT_CHILD_GRAVITY = Gravity.TOP | Gravity.START;
@ViewDebug.ExportedProperty(category = "measurement")
+ @UnsupportedAppUsage
boolean mMeasureAllChildren = false;
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
private int mForegroundPaddingLeft = 0;
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
private int mForegroundPaddingTop = 0;
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
private int mForegroundPaddingRight = 0;
@ViewDebug.ExportedProperty(category = "padding")
+ @UnsupportedAppUsage
private int mForegroundPaddingBottom = 0;
private final ArrayList<View> mMatchParentChildren = new ArrayList<>(1);
diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java
index 7655f3d..ea1bfc2 100644
--- a/core/java/android/widget/Gallery.java
+++ b/core/java/android/widget/Gallery.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.content.res.TypedArray;
@@ -75,6 +76,7 @@
/**
* Horizontal spacing between items.
*/
+ @UnsupportedAppUsage
private int mSpacing = 0;
/**
@@ -103,21 +105,25 @@
/**
* Helper for detecting touch gestures.
*/
+ @UnsupportedAppUsage
private GestureDetector mGestureDetector;
/**
* The position of the item that received the user's down touch.
*/
+ @UnsupportedAppUsage
private int mDownTouchPosition;
/**
* The view of the item that received the user's down touch.
*/
+ @UnsupportedAppUsage
private View mDownTouchView;
/**
* Executes the delta scrolls from a fling or scroll movement.
*/
+ @UnsupportedAppUsage
private FlingRunnable mFlingRunnable = new FlingRunnable();
/**
@@ -143,6 +149,7 @@
/**
* The currently selected item's child.
*/
+ @UnsupportedAppUsage
private View mSelectedChild;
/**
@@ -380,6 +387,7 @@
*
* @param deltaX Change in X from the previous event.
*/
+ @UnsupportedAppUsage
void trackMotionScroll(int deltaX) {
if (getChildCount() == 0) {
@@ -472,6 +480,7 @@
/**
* @return The center of this Gallery.
*/
+ @UnsupportedAppUsage
private int getCenterOfGallery() {
return (getWidth() - mPaddingLeft - mPaddingRight) / 2 + mPaddingLeft;
}
@@ -479,6 +488,7 @@
/**
* @return The center of the given view.
*/
+ @UnsupportedAppUsage
private static int getCenterOfView(View view) {
return view.getLeft() + view.getWidth() / 2;
}
@@ -696,6 +706,7 @@
updateSelectedItemMetadata();
}
+ @UnsupportedAppUsage
private void fillToGalleryLeft() {
if (mIsRtl) {
fillToGalleryLeftRtl();
@@ -767,6 +778,7 @@
}
}
+ @UnsupportedAppUsage
private void fillToGalleryRight() {
if (mIsRtl) {
fillToGalleryRightRtl();
@@ -851,6 +863,7 @@
* building from left to right)?
* @return A view that has been added to the gallery
*/
+ @UnsupportedAppUsage
private View makeAndAddView(int position, int offset, int x, boolean fromLeft) {
View child;
@@ -1289,6 +1302,7 @@
return super.onKeyUp(keyCode, event);
}
+ @UnsupportedAppUsage
boolean moveDirection(int direction) {
direction = isLayoutRtl() ? -direction : direction;
int targetPosition = mSelectedPosition + direction;
@@ -1468,6 +1482,7 @@
removeCallbacks(this);
}
+ @UnsupportedAppUsage
public void startUsingVelocity(int initialVelocity) {
if (initialVelocity == 0) return;
diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java
index 4b76c18..13c086c 100644
--- a/core/java/android/widget/GridLayout.java
+++ b/core/java/android/widget/GridLayout.java
@@ -31,6 +31,7 @@
import static java.lang.Math.min;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -2797,6 +2798,7 @@
}
}
+ @UnsupportedAppUsage
static final Alignment UNDEFINED_ALIGNMENT = new Alignment() {
@Override
int getGravityOffset(View view, int cellDelta) {
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index 1ec9b2f..9ccd321 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -106,14 +107,21 @@
*/
public static final int AUTO_FIT = -1;
+ @UnsupportedAppUsage
private int mNumColumns = AUTO_FIT;
+ @UnsupportedAppUsage
private int mHorizontalSpacing = 0;
+ @UnsupportedAppUsage
private int mRequestedHorizontalSpacing;
+ @UnsupportedAppUsage
private int mVerticalSpacing = 0;
private int mStretchMode = STRETCH_COLUMN_WIDTH;
+ @UnsupportedAppUsage
private int mColumnWidth;
+ @UnsupportedAppUsage
private int mRequestedColumnWidth;
+ @UnsupportedAppUsage
private int mRequestedNumColumns;
private View mReferenceView = null;
@@ -300,6 +308,7 @@
* @return The view that is currently selected, if it happens to be in the
* range that we draw.
*/
+ @UnsupportedAppUsage
private View fillDown(int pos, int nextTop) {
View selectedView = null;
@@ -399,6 +408,7 @@
*
* @return The view that is currently selected
*/
+ @UnsupportedAppUsage
private View fillUp(int pos, int nextBottom) {
View selectedView = null;
@@ -965,6 +975,7 @@
return sel;
}
+ @UnsupportedAppUsage
private boolean determineColumns(int availableSpace) {
final int requestedHorizontalSpacing = mRequestedHorizontalSpacing;
final int stretchMode = mStretchMode;
@@ -1884,6 +1895,7 @@
* Goes to the next or previous item according to the order set by the
* adapter.
*/
+ @UnsupportedAppUsage
boolean sequenceScroll(int direction) {
int selectedPosition = mSelectedPosition;
int numColumns = mNumColumns;
diff --git a/core/java/android/widget/HeaderViewListAdapter.java b/core/java/android/widget/HeaderViewListAdapter.java
index f9d8f92..10d50b8 100644
--- a/core/java/android/widget/HeaderViewListAdapter.java
+++ b/core/java/android/widget/HeaderViewListAdapter.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.database.DataSetObserver;
import android.view.View;
import android.view.ViewGroup;
@@ -31,11 +32,14 @@
*/
public class HeaderViewListAdapter implements WrapperListAdapter, Filterable {
+ @UnsupportedAppUsage
private final ListAdapter mAdapter;
// These two ArrayList are assumed to NOT be null.
// They are indeed created when declared in ListView and then shared.
+ @UnsupportedAppUsage
ArrayList<ListView.FixedViewInfo> mHeaderViewInfos;
+ @UnsupportedAppUsage
ArrayList<ListView.FixedViewInfo> mFooterViewInfos;
// Used as a placeholder in case the provided info views are indeed null.
diff --git a/core/java/android/widget/HorizontalScrollView.java b/core/java/android/widget/HorizontalScrollView.java
index 0bf2460..bf9dffd 100644
--- a/core/java/android/widget/HorizontalScrollView.java
+++ b/core/java/android/widget/HorizontalScrollView.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -76,13 +77,17 @@
private long mLastScroll;
private final Rect mTempRect = new Rect();
+ @UnsupportedAppUsage
private OverScroller mScroller;
+ @UnsupportedAppUsage
private EdgeEffect mEdgeGlowLeft;
+ @UnsupportedAppUsage
private EdgeEffect mEdgeGlowRight;
/**
* Position of the last motion event.
*/
+ @UnsupportedAppUsage
private int mLastMotionX;
/**
@@ -96,6 +101,7 @@
* layout is dirty. This prevents the scroll from being wrong if the child has not been
* laid out before requesting focus.
*/
+ @UnsupportedAppUsage
private View mChildToScrollTo = null;
/**
@@ -103,11 +109,13 @@
* not the same as 'is being flinged', which can be checked by
* mScroller.isFinished() (flinging begins when the user lifts his finger).
*/
+ @UnsupportedAppUsage
private boolean mIsBeingDragged = false;
/**
* Determines speed during touch scrolling
*/
+ @UnsupportedAppUsage
private VelocityTracker mVelocityTracker;
/**
@@ -126,7 +134,9 @@
private int mMinimumVelocity;
private int mMaximumVelocity;
+ @UnsupportedAppUsage
private int mOverscrollDistance;
+ @UnsupportedAppUsage
private int mOverflingDistance;
private float mHorizontalScrollFactor;
@@ -437,6 +447,7 @@
}
}
+ @UnsupportedAppUsage
private void recycleVelocityTracker() {
if (mVelocityTracker != null) {
mVelocityTracker.recycle();
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java
index 51e481d..0fef9a5 100644
--- a/core/java/android/widget/ImageView.java
+++ b/core/java/android/widget/ImageView.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -96,13 +97,18 @@
private static final String LOG_TAG = "ImageView";
// settable by the client
+ @UnsupportedAppUsage
private Uri mUri;
+ @UnsupportedAppUsage
private int mResource = 0;
private Matrix mMatrix;
private ScaleType mScaleType;
private boolean mHaveFrame = false;
+ @UnsupportedAppUsage
private boolean mAdjustViewBounds = false;
+ @UnsupportedAppUsage
private int mMaxWidth = Integer.MAX_VALUE;
+ @UnsupportedAppUsage
private int mMaxHeight = Integer.MAX_VALUE;
// these are applied to the drawable
@@ -110,11 +116,14 @@
private boolean mHasColorFilter = false;
private Xfermode mXfermode;
private boolean mHasXfermode = false;
+ @UnsupportedAppUsage
private int mAlpha = 255;
private boolean mHasAlpha = false;
private final int mViewAlphaScale = 256;
+ @UnsupportedAppUsage
private Drawable mDrawable = null;
+ @UnsupportedAppUsage
private BitmapDrawable mRecycleableBitmapDrawable = null;
private ColorStateList mDrawableTintList = null;
private PorterDuff.Mode mDrawableTintMode = null;
@@ -124,14 +133,18 @@
private int[] mState = null;
private boolean mMergeState = false;
private int mLevel = 0;
+ @UnsupportedAppUsage
private int mDrawableWidth;
+ @UnsupportedAppUsage
private int mDrawableHeight;
+ @UnsupportedAppUsage
private Matrix mDrawMatrix = null;
// Avoid allocations...
private final RectF mTempSrc = new RectF();
private final RectF mTempDst = new RectF();
+ @UnsupportedAppUsage
private boolean mCropToPadding;
private int mBaseline = -1;
@@ -485,6 +498,7 @@
}
/** @hide **/
+ @UnsupportedAppUsage
public Runnable setImageResourceAsync(@DrawableRes int resId) {
Drawable d = null;
if (resId != 0) {
@@ -540,6 +554,7 @@
}
/** @hide **/
+ @UnsupportedAppUsage
public Runnable setImageURIAsync(@Nullable Uri uri) {
if (mResource != 0 || (mUri != uri && (uri == null || mUri == null || !uri.equals(mUri)))) {
Drawable d = uri == null ? null : getDrawableFromUri(uri);
@@ -899,6 +914,7 @@
}
}
+ @UnsupportedAppUsage
private void resolveUri() {
if (mDrawable != null) {
return;
@@ -974,6 +990,7 @@
}
}
+ @UnsupportedAppUsage
private void updateDrawable(Drawable d) {
if (d != mRecycleableBitmapDrawable && mRecycleableBitmapDrawable != null) {
mRecycleableBitmapDrawable.setBitmap(null);
@@ -1018,6 +1035,7 @@
}
}
+ @UnsupportedAppUsage
private void resizeFromDrawable() {
final Drawable d = mDrawable;
if (d != null) {
@@ -1049,6 +1067,7 @@
Matrix.ScaleToFit.END
};
+ @UnsupportedAppUsage
private static Matrix.ScaleToFit scaleTypeToScaleToFit(ScaleType st) {
// ScaleToFit enum to their corresponding Matrix.ScaleToFit values
return sS2FArray[st.nativeInt - 1];
@@ -1313,6 +1332,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void animateTransform(Matrix matrix) {
if (mDrawable == null) {
return;
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index 40f9652..452e903 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -188,27 +189,35 @@
@ViewDebug.FlagToString(mask = Gravity.RELATIVE_LAYOUT_DIRECTION,
equals = Gravity.RELATIVE_LAYOUT_DIRECTION, name = "RELATIVE")
}, formatToHexString = true)
+ @UnsupportedAppUsage
private int mGravity = Gravity.START | Gravity.TOP;
@ViewDebug.ExportedProperty(category = "measurement")
+ @UnsupportedAppUsage
private int mTotalLength;
@ViewDebug.ExportedProperty(category = "layout")
private float mWeightSum;
@ViewDebug.ExportedProperty(category = "layout")
+ @UnsupportedAppUsage
private boolean mUseLargestChild;
+ @UnsupportedAppUsage
private int[] mMaxAscent;
+ @UnsupportedAppUsage
private int[] mMaxDescent;
private static final int VERTICAL_GRAVITY_COUNT = 4;
private static final int INDEX_CENTER_VERTICAL = 0;
+ @UnsupportedAppUsage
private static final int INDEX_TOP = 1;
+ @UnsupportedAppUsage
private static final int INDEX_BOTTOM = 2;
private static final int INDEX_FILL = 3;
+ @UnsupportedAppUsage
private Drawable mDivider;
private int mDividerWidth;
private int mDividerHeight;
@@ -2062,6 +2071,7 @@
/** @hide */
@Override
+ @UnsupportedAppUsage
protected void encodeProperties(@NonNull ViewHierarchyEncoder encoder) {
super.encodeProperties(encoder);
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index adf366a..f9564b4 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
@@ -67,6 +68,7 @@
private Context mContext;
private ListAdapter mAdapter;
+ @UnsupportedAppUsage
private DropDownListView mDropDownList;
private int mDropDownHeight = ViewGroup.LayoutParams.WRAP_CONTENT;
@@ -115,6 +117,7 @@
private boolean mModal;
+ @UnsupportedAppUsage
PopupWindow mPopup;
/**
@@ -310,6 +313,7 @@
*
* @hide Used only by AutoCompleteTextView to handle some internal special cases.
*/
+ @UnsupportedAppUsage
public void setForceIgnoreOutsideTouch(boolean forceIgnoreOutsideTouch) {
mForceIgnoreOutsideTouch = forceIgnoreOutsideTouch;
}
@@ -325,6 +329,7 @@
*
* @hide Only used by AutoCompleteTextView under special conditions.
*/
+ @UnsupportedAppUsage
public void setDropDownAlwaysVisible(boolean dropDownAlwaysVisible) {
mDropDownAlwaysVisible = dropDownAlwaysVisible;
}
@@ -334,6 +339,7 @@
*
* @hide Only used by AutoCompleteTextView under special conditions.
*/
+ @UnsupportedAppUsage
public boolean isDropDownAlwaysVisible() {
return mDropDownAlwaysVisible;
}
@@ -898,6 +904,7 @@
*
* @param max Max number of items that can be visible and still allow the list to expand.
*/
+ @UnsupportedAppUsage
void setListItemExpandMax(int max) {
mListItemExpandMaximum = max;
}
@@ -1093,6 +1100,7 @@
*
* @return the content's height or -1 if content already exists
*/
+ @UnsupportedAppUsage
private int buildDropDown() {
ViewGroup dropDownView;
int otherHeights = 0;
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index fc9e8e7..ee04bcf 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -19,6 +19,7 @@
import android.annotation.IdRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -181,10 +182,14 @@
public boolean isSelectable;
}
+ @UnsupportedAppUsage
ArrayList<FixedViewInfo> mHeaderViewInfos = Lists.newArrayList();
+ @UnsupportedAppUsage
ArrayList<FixedViewInfo> mFooterViewInfos = Lists.newArrayList();
+ @UnsupportedAppUsage
Drawable mDivider;
+ @UnsupportedAppUsage
int mDividerHeight;
Drawable mOverScrollHeader;
@@ -196,6 +201,7 @@
private boolean mHeaderDividersEnabled;
private boolean mFooterDividersEnabled;
+ @UnsupportedAppUsage
private boolean mAreAllItemsSelectable = true;
private boolean mItemsCanFocus = false;
@@ -772,6 +778,7 @@
* @return The view that is currently selected, if it happens to be in the
* range that we draw.
*/
+ @UnsupportedAppUsage
private View fillDown(int pos, int nextTop) {
View selectedView = null;
@@ -806,6 +813,7 @@
*
* @return The view that is currently selected
*/
+ @UnsupportedAppUsage
private View fillUp(int pos, int nextBottom) {
View selectedView = null;
@@ -1382,6 +1390,7 @@
* startPosition is 0).
* @return The height of this ListView with the given children.
*/
+ @UnsupportedAppUsage
final int measureHeightOfChildren(int widthMeasureSpec, int startPosition, int endPosition,
int maxHeight, int disallowPartialChildPosition) {
final ListAdapter adapter = mAdapter;
@@ -1477,6 +1486,7 @@
* @return The selected view, or null if the selected view is outside the
* visible area.
*/
+ @UnsupportedAppUsage
private View fillSpecific(int position, int top) {
boolean tempIsSelected = position == mSelectedPosition;
View temp = makeAndAddView(position, top, true, mListPadding.left, tempIsSelected);
@@ -1523,6 +1533,7 @@
*
* @param childCount Number of children
*/
+ @UnsupportedAppUsage
private void correctTooHigh(int childCount) {
// First see if the last item is visible. If it is not, it is OK for the
// top of the list to be pushed up.
@@ -1572,6 +1583,7 @@
*
* @param childCount Number of children
*/
+ @UnsupportedAppUsage
private void correctTooLow(int childCount) {
// First see if the first item is visible. If it is not, it is OK for the
// bottom of the list to be pushed down.
@@ -1967,6 +1979,7 @@
}
@Override
+ @UnsupportedAppUsage
boolean trackMotionScroll(int deltaY, int incrementalDeltaY) {
final boolean result = super.trackMotionScroll(deltaY, incrementalDeltaY);
removeUnusedFixedViews(mHeaderViewInfos);
@@ -2000,6 +2013,7 @@
* @param child a direct child of this list.
* @return Whether child is a header or footer view.
*/
+ @UnsupportedAppUsage
private boolean isDirectChildHeaderOrFooter(View child) {
final ArrayList<FixedViewInfo> headers = mHeaderViewInfos;
final int numHeaders = headers.size();
@@ -2034,6 +2048,7 @@
* otherwise
* @return the view that was added
*/
+ @UnsupportedAppUsage
private View makeAndAddView(int position, int y, boolean flow, int childrenLeft,
boolean selected) {
if (!mDataChanged) {
@@ -2195,6 +2210,7 @@
* @param position the position of the item to select
*/
@Override
+ @UnsupportedAppUsage
void setSelectionInt(int position) {
setNextSelectedPositionInt(position);
boolean awakeScrollbars = false;
@@ -2229,6 +2245,7 @@
* down. Returns {@link #INVALID_POSITION} if nothing can be found.
*/
@Override
+ @UnsupportedAppUsage
int lookForSelectablePosition(int position, boolean lookDown) {
final ListAdapter adapter = mAdapter;
if (adapter == null || isInTouchMode()) {
@@ -2636,6 +2653,7 @@
*
* @return whether selection was moved
*/
+ @UnsupportedAppUsage
boolean arrowScroll(int direction) {
try {
mInLayout = true;
@@ -3235,6 +3253,7 @@
*
* @param amount The amount (positive or negative) to scroll.
*/
+ @UnsupportedAppUsage
private void scrollListItemsBy(int amount) {
offsetChildrenTopAndBottom(amount);
@@ -4001,6 +4020,7 @@
}
@Override
+ @UnsupportedAppUsage
int getHeightForPosition(int position) {
final int height = super.getHeightForPosition(position);
if (shouldAdjustHeightForDivider(position)) {
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java
index 8e04f1c..82d77c5 100644
--- a/core/java/android/widget/MediaController.java
+++ b/core/java/android/widget/MediaController.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.PixelFormat;
@@ -68,16 +69,29 @@
*/
public class MediaController extends FrameLayout {
+ @UnsupportedAppUsage
private MediaPlayerControl mPlayer;
+ @UnsupportedAppUsage
private final Context mContext;
+ @UnsupportedAppUsage
private View mAnchor;
+ @UnsupportedAppUsage
private View mRoot;
+ @UnsupportedAppUsage
private WindowManager mWindowManager;
+ @UnsupportedAppUsage
private Window mWindow;
+ @UnsupportedAppUsage
private View mDecor;
+ @UnsupportedAppUsage
private WindowManager.LayoutParams mDecorLayoutParams;
+ @UnsupportedAppUsage
private ProgressBar mProgress;
- private TextView mEndTime, mCurrentTime;
+ @UnsupportedAppUsage
+ private TextView mEndTime;
+ @UnsupportedAppUsage
+ private TextView mCurrentTime;
+ @UnsupportedAppUsage
private boolean mShowing;
private boolean mDragging;
private static final int sDefaultTimeout = 3000;
@@ -87,10 +101,15 @@
private View.OnClickListener mNextListener, mPrevListener;
StringBuilder mFormatBuilder;
Formatter mFormatter;
+ @UnsupportedAppUsage
private ImageButton mPauseButton;
+ @UnsupportedAppUsage
private ImageButton mFfwdButton;
+ @UnsupportedAppUsage
private ImageButton mRewButton;
+ @UnsupportedAppUsage
private ImageButton mNextButton;
+ @UnsupportedAppUsage
private ImageButton mPrevButton;
private CharSequence mPlayDescription;
private CharSequence mPauseDescription;
@@ -535,6 +554,7 @@
}
};
+ @UnsupportedAppUsage
private void updatePausePlay() {
if (mRoot == null || mPauseButton == null)
return;
@@ -568,6 +588,7 @@
// The second scenario involves the user operating the scroll ball, in this
// case there WON'T BE onStartTrackingTouch/onStopTrackingTouch notifications,
// we will simply apply the updated position without suspending regular updates.
+ @UnsupportedAppUsage
private final OnSeekBarChangeListener mSeekListener = new OnSeekBarChangeListener() {
@Override
public void onStartTrackingTouch(SeekBar bar) {
@@ -641,6 +662,7 @@
return MediaController.class.getName();
}
+ @UnsupportedAppUsage
private final View.OnClickListener mRewListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -653,6 +675,7 @@
}
};
+ @UnsupportedAppUsage
private final View.OnClickListener mFfwdListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index d98b865..b6ed22c 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -19,6 +19,7 @@
import android.annotation.CallSuper;
import android.annotation.IntDef;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -98,6 +99,7 @@
/**
* The number of items show in the selector wheel.
*/
+ @UnsupportedAppUsage
private static final int SELECTOR_WHEEL_ITEM_COUNT = 3;
/**
@@ -108,6 +110,7 @@
/**
* The index of the middle selector item.
*/
+ @UnsupportedAppUsage
private static final int SELECTOR_MIDDLE_ITEM_INDEX = SELECTOR_WHEEL_ITEM_COUNT / 2;
/**
@@ -204,6 +207,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static final Formatter getTwoDigitFormatter() {
return sTwoDigitFormatter;
}
@@ -221,6 +225,7 @@
/**
* The text for showing the current value.
*/
+ @UnsupportedAppUsage
private final EditText mInputText;
/**
@@ -231,6 +236,7 @@
/**
* The min height of this widget.
*/
+ @UnsupportedAppUsage
private final int mMinHeight;
/**
@@ -241,6 +247,7 @@
/**
* The max width of this widget.
*/
+ @UnsupportedAppUsage
private final int mMinWidth;
/**
@@ -256,6 +263,7 @@
/**
* The height of the text.
*/
+ @UnsupportedAppUsage
private final int mTextSize;
/**
@@ -276,6 +284,7 @@
/**
* Upper value of the range of numbers allowed for the NumberPicker
*/
+ @UnsupportedAppUsage
private int mMaxValue;
/**
@@ -286,6 +295,7 @@
/**
* Listener to be notified upon current value change.
*/
+ @UnsupportedAppUsage
private OnValueChangeListener mOnValueChangeListener;
/**
@@ -311,11 +321,13 @@
/**
* The selector indices whose value are show by the selector.
*/
+ @UnsupportedAppUsage
private final int[] mSelectorIndices = new int[SELECTOR_WHEEL_ITEM_COUNT];
/**
* The {@link Paint} for drawing the selector.
*/
+ @UnsupportedAppUsage
private final Paint mSelectorWheelPaint;
/**
@@ -341,6 +353,7 @@
/**
* The {@link Scroller} responsible for flinging the selector.
*/
+ @UnsupportedAppUsage
private final Scroller mFlingScroller;
/**
@@ -402,6 +415,7 @@
/**
* @see ViewConfiguration#getScaledMaximumFlingVelocity()
*/
+ @UnsupportedAppUsage
private int mMaximumFlingVelocity;
/**
@@ -422,11 +436,13 @@
/**
* Divider for showing item to be selected while scrolling
*/
+ @UnsupportedAppUsage
private final Drawable mSelectionDivider;
/**
* The height of the selection divider.
*/
+ @UnsupportedAppUsage
private final int mSelectionDividerHeight;
/**
@@ -1715,6 +1731,7 @@
* Resets the selector indices and clear the cached string representation of
* these indices.
*/
+ @UnsupportedAppUsage
private void initializeSelectorWheelIndices() {
mSelectorIndexToStringCache.clear();
int[] selectorIndices = mSelectorIndices;
@@ -1766,6 +1783,7 @@
*
* @param increment True to increment, false to decrement.
*/
+ @UnsupportedAppUsage
private void changeValueByOne(boolean increment) {
if (mHasSelectorWheel) {
hideSoftInput();
diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java
index 9938789..e7a96be 100644
--- a/core/java/android/widget/OverScroller.java
+++ b/core/java/android/widget/OverScroller.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.hardware.SensorManager;
import android.util.Log;
@@ -32,8 +33,10 @@
private int mMode;
private final SplineOverScroller mScrollerX;
+ @UnsupportedAppUsage
private final SplineOverScroller mScrollerY;
+ @UnsupportedAppUsage
private Interpolator mInterpolator;
private final boolean mFlywheel;
@@ -68,6 +71,7 @@
* @param flywheel If true, successive fling motions will keep on increasing scroll speed.
* @hide
*/
+ @UnsupportedAppUsage
public OverScroller(Context context, Interpolator interpolator, boolean flywheel) {
if (interpolator == null) {
mInterpolator = new Scroller.ViscousFluidInterpolator();
@@ -116,6 +120,7 @@
this(context, interpolator, flywheel);
}
+ @UnsupportedAppUsage
void setInterpolator(Interpolator interpolator) {
if (interpolator == null) {
mInterpolator = new Scroller.ViscousFluidInterpolator();
@@ -250,6 +255,7 @@
* to begin a new animation.
*/
@Deprecated
+ @UnsupportedAppUsage
public void extendDuration(int extend) {
mScrollerX.extendDuration(extend);
mScrollerY.extendDuration(extend);
@@ -530,6 +536,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isScrollingInDirection(float xvel, float yvel) {
final int dx = mScrollerX.mFinal - mScrollerX.mStart;
final int dy = mScrollerY.mFinal - mScrollerY.mStart;
@@ -551,6 +558,7 @@
private int mVelocity;
// Current velocity
+ @UnsupportedAppUsage
private float mCurrVelocity;
// Constant current deceleration
diff --git a/core/java/android/widget/PopupMenu.java b/core/java/android/widget/PopupMenu.java
index 59bbc3b..d82e56c 100644
--- a/core/java/android/widget/PopupMenu.java
+++ b/core/java/android/widget/PopupMenu.java
@@ -18,6 +18,7 @@
import android.annotation.MenuRes;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.view.Gravity;
import android.view.Menu;
@@ -39,9 +40,11 @@
* it.
*/
public class PopupMenu {
+ @UnsupportedAppUsage
private final Context mContext;
private final MenuBuilder mMenu;
private final View mAnchor;
+ @UnsupportedAppUsage
private final MenuPopupHelper mPopup;
private OnMenuItemClickListener mMenuItemClickListener;
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 9553cf5..0da47fd 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -24,6 +24,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.PixelFormat;
@@ -141,7 +142,9 @@
private final int[] mTmpAppLocation = new int[2];
private final Rect mTempRect = new Rect();
+ @UnsupportedAppUsage
private Context mContext;
+ @UnsupportedAppUsage
private WindowManager mWindowManager;
/**
@@ -150,17 +153,22 @@
*/
private WeakReference<View> mParentRootView;
+ @UnsupportedAppUsage
private boolean mIsShowing;
private boolean mIsTransitioningToDismiss;
+ @UnsupportedAppUsage
private boolean mIsDropdown;
/** View that handles event dispatch and content transitions. */
+ @UnsupportedAppUsage
private PopupDecorView mDecorView;
/** View that holds the background and may animate during a transition. */
+ @UnsupportedAppUsage
private View mBackgroundView;
/** The contents of the popup. May be identical to the background view. */
+ @UnsupportedAppUsage
private View mContentView;
private boolean mFocusable;
@@ -171,39 +179,52 @@
private boolean mOutsideTouchable = false;
private boolean mClippingEnabled = true;
private int mSplitTouchEnabled = -1;
+ @UnsupportedAppUsage
private boolean mLayoutInScreen;
private boolean mClipToScreen;
private boolean mAllowScrollingAnchorParent = true;
private boolean mLayoutInsetDecor = false;
+ @UnsupportedAppUsage
private boolean mNotTouchModal;
private boolean mAttachedInDecor = true;
private boolean mAttachedInDecorSet = false;
+ @UnsupportedAppUsage
private OnTouchListener mTouchInterceptor;
+ @UnsupportedAppUsage
private int mWidthMode;
private int mWidth = LayoutParams.WRAP_CONTENT;
+ @UnsupportedAppUsage
private int mLastWidth;
+ @UnsupportedAppUsage
private int mHeightMode;
private int mHeight = LayoutParams.WRAP_CONTENT;
+ @UnsupportedAppUsage
private int mLastHeight;
private float mElevation;
private Drawable mBackground;
+ @UnsupportedAppUsage
private Drawable mAboveAnchorBackgroundDrawable;
+ @UnsupportedAppUsage
private Drawable mBelowAnchorBackgroundDrawable;
private Transition mEnterTransition;
private Transition mExitTransition;
private Rect mEpicenterBounds;
+ @UnsupportedAppUsage
private boolean mAboveAnchor;
+ @UnsupportedAppUsage
private int mWindowLayoutType = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+ @UnsupportedAppUsage
private OnDismissListener mOnDismissListener;
private boolean mIgnoreCheekPress = false;
+ @UnsupportedAppUsage
private int mAnimationStyle = ANIMATION_STYLE_DEFAULT;
private int mGravity = Gravity.NO_GRAVITY;
@@ -238,10 +259,12 @@
}
};
+ @UnsupportedAppUsage
private WeakReference<View> mAnchor;
private WeakReference<View> mAnchorRoot;
private boolean mIsAnchorRootAttached;
+ @UnsupportedAppUsage
private final OnScrollChangedListener mOnScrollChangedListener = this::alignToAnchor;
private final View.OnLayoutChangeListener mOnLayoutChangeListener =
@@ -250,6 +273,7 @@
private int mAnchorXoff;
private int mAnchorYoff;
private int mAnchoredGravity;
+ @UnsupportedAppUsage
private boolean mOverlapAnchor;
private boolean mPopupViewInitialLayoutDirectionInherited;
@@ -466,6 +490,7 @@
* @see #getTransitionEpicenter()
* @hide
*/
+ @UnsupportedAppUsage
public void setEpicenterBounds(Rect bounds) {
mEpicenterBounds = bounds;
}
@@ -845,6 +870,7 @@
* @param enabled True to clip to the screen.
* @hide
*/
+ @UnsupportedAppUsage
public void setClipToScreenEnabled(boolean enabled) {
mClipToScreen = enabled;
}
@@ -855,6 +881,7 @@
*
* @param enabled True to scroll the anchor's parent when more room is desired by the popup.
*/
+ @UnsupportedAppUsage
void setAllowScrollingAnchorParent(boolean enabled) {
mAllowScrollingAnchorParent = enabled;
}
@@ -914,6 +941,7 @@
* @param enabled true if the popup should always be positioned in screen coordinates
* @hide
*/
+ @UnsupportedAppUsage
public void setLayoutInScreenEnabled(boolean enabled) {
mLayoutInScreen = enabled;
}
@@ -960,6 +988,7 @@
* the way that decor views behave for full-screen windows.
* @hide
*/
+ @UnsupportedAppUsage
public void setLayoutInsetDecor(boolean enabled) {
mLayoutInsetDecor = enabled;
}
@@ -996,6 +1025,7 @@
* other windows behind it.
* @hide
*/
+ @UnsupportedAppUsage
public void setTouchModal(boolean touchModal) {
mNotTouchModal = !touchModal;
}
@@ -1181,6 +1211,7 @@
* @hide Internal use only. Applications should use
* {@link #showAtLocation(View, int, int, int)} instead.
*/
+ @UnsupportedAppUsage
public void showAtLocation(IBinder token, int gravity, int x, int y) {
if (isShowing() || mContentView == null) {
return;
@@ -1285,6 +1316,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
protected final void updateAboveAnchor(boolean aboveAnchor) {
if (aboveAnchor != mAboveAnchor) {
mAboveAnchor = aboveAnchor;
@@ -1328,6 +1360,7 @@
*
* @param p the layout parameters of the popup's content view
*/
+ @UnsupportedAppUsage
private void preparePopup(WindowManager.LayoutParams p) {
if (mContentView == null || mContext == null || mWindowManager == null) {
throw new IllegalStateException("You must specify a valid content view by "
@@ -1421,6 +1454,7 @@
*
* @param p the layout parameters of the popup's content view
*/
+ @UnsupportedAppUsage
private void invokePopup(WindowManager.LayoutParams p) {
if (mContext != null) {
p.packageName = mContext.getPackageName();
@@ -1464,6 +1498,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
protected final WindowManager.LayoutParams createPopupLayoutParams(IBinder token) {
final WindowManager.LayoutParams p = new WindowManager.LayoutParams();
@@ -1552,6 +1587,7 @@
return curFlags;
}
+ @UnsupportedAppUsage
private int computeAnimationResource() {
if (mAnimationStyle == ANIMATION_STYLE_DEFAULT) {
if (mIsDropdown) {
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index e7c3a47..1fc72f5 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -20,6 +20,7 @@
import android.annotation.InterpolatorRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -167,9 +168,12 @@
/** Duration of smooth progress animations. */
private static final int PROGRESS_ANIM_DURATION = 80;
+ @UnsupportedAppUsage
int mMinWidth;
int mMaxWidth;
+ @UnsupportedAppUsage
int mMinHeight;
+ @UnsupportedAppUsage
int mMaxHeight;
private int mProgress;
@@ -180,8 +184,11 @@
private boolean mMaxInitialized;
private int mBehavior;
+ @UnsupportedAppUsage
private int mDuration;
+ @UnsupportedAppUsage
private boolean mIndeterminate;
+ @UnsupportedAppUsage
private boolean mOnlyIndeterminate;
private Transformation mTransformation;
private AlphaAnimation mAnimation;
@@ -189,6 +196,7 @@
private Drawable mIndeterminateDrawable;
private Drawable mProgressDrawable;
+ @UnsupportedAppUsage
private Drawable mCurrentDrawable;
private ProgressTintInfo mProgressTintInfo;
@@ -206,6 +214,7 @@
/** Value used to track progress animation, in the range [0...1]. */
private float mVisualProgress;
+ @UnsupportedAppUsage
boolean mMirrorForRtl = false;
private boolean mAggregatedIsVisible;
@@ -424,6 +433,7 @@
* Converts a drawable to a tiled version of itself. It will recursively
* traverse layer and state list drawables.
*/
+ @UnsupportedAppUsage
private Drawable tileify(Drawable drawable, boolean clip) {
// TODO: This is a terrible idea that potentially destroys any drawable
// that extends any of these classes. We *really* need to remove this.
@@ -1347,6 +1357,7 @@
// Stub method.
}
+ @UnsupportedAppUsage
private synchronized void refreshProgress(int id, int progress, boolean fromUser,
boolean animate) {
if (mUiThreadId == Thread.currentThread().getId()) {
@@ -1401,6 +1412,7 @@
}
@android.view.RemotableViewMethod
+ @UnsupportedAppUsage
synchronized boolean setProgressInternal(int progress, boolean fromUser, boolean animate) {
if (mIndeterminate) {
// Not applicable.
@@ -1599,6 +1611,7 @@
/**
* <p>Start the indeterminate progress animation.</p>
*/
+ @UnsupportedAppUsage
void startAnimation() {
if (getVisibility() != VISIBLE || getWindowVisibility() != VISIBLE) {
return;
@@ -1638,6 +1651,7 @@
/**
* <p>Stop the indeterminate progress animation.</p>
*/
+ @UnsupportedAppUsage
void stopAnimation() {
mHasAnimation = false;
if (mIndeterminateDrawable instanceof Animatable) {
diff --git a/core/java/android/widget/QuickContactBadge.java b/core/java/android/widget/QuickContactBadge.java
index 8f6b0d5..c1a217c 100644
--- a/core/java/android/widget/QuickContactBadge.java
+++ b/core/java/android/widget/QuickContactBadge.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.AsyncQueryHandler;
import android.content.ContentResolver;
import android.content.Context;
@@ -46,6 +47,7 @@
private Uri mContactUri;
private String mContactEmail;
private String mContactPhone;
+ @UnsupportedAppUsage
private Drawable mOverlay;
private QueryHandler mQueryHandler;
private Drawable mDefaultAvatar;
diff --git a/core/java/android/widget/RadioGroup.java b/core/java/android/widget/RadioGroup.java
index c987147..327a5c1 100644
--- a/core/java/android/widget/RadioGroup.java
+++ b/core/java/android/widget/RadioGroup.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.IdRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
@@ -60,9 +61,11 @@
// holds the checked id; the selection is empty by default
private int mCheckedId = -1;
// tracks children radio buttons checked state
+ @UnsupportedAppUsage
private CompoundButton.OnCheckedChangeListener mChildOnCheckedChangeListener;
// when true, mOnCheckedChangeListener discards events
private boolean mProtectFromCheckedChange = false;
+ @UnsupportedAppUsage
private OnCheckedChangeListener mOnCheckedChangeListener;
private PassThroughHierarchyChangeListener mPassThroughListener;
diff --git a/core/java/android/widget/RatingBar.java b/core/java/android/widget/RatingBar.java
index 70b70bc..d343d49 100644
--- a/core/java/android/widget/RatingBar.java
+++ b/core/java/android/widget/RatingBar.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.shapes.RectShape;
@@ -79,6 +80,7 @@
private int mProgressOnStartTracking;
+ @UnsupportedAppUsage
private OnRatingBarChangeListener mOnRatingBarChangeListener;
public RatingBar(Context context, AttributeSet attrs, int defStyleAttr) {
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index bbdf15c..74051e2 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -19,6 +19,7 @@
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
@@ -203,6 +204,7 @@
private View mBaselineView = null;
+ @UnsupportedAppUsage
private int mGravity = Gravity.START | Gravity.TOP;
private final Rect mContentBounds = new Rect();
private final Rect mSelfBounds = new Rect();
@@ -1247,7 +1249,14 @@
private int[] mRules = new int[VERB_COUNT];
private int[] mInitialRules = new int[VERB_COUNT];
- private int mLeft, mTop, mRight, mBottom;
+ @UnsupportedAppUsage
+ private int mLeft;
+ @UnsupportedAppUsage
+ private int mTop;
+ @UnsupportedAppUsage
+ private int mRight;
+ @UnsupportedAppUsage
+ private int mBottom;
/**
* Whether this view had any relative rules modified following the most
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 22c840b..8fa8ef8 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -22,6 +22,7 @@
import android.annotation.DimenRes;
import android.annotation.NonNull;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityOptions;
import android.app.ActivityThread;
import android.app.Application;
@@ -159,22 +160,26 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public ApplicationInfo mApplication;
/**
* The resource ID of the layout file. (Added to the parcel)
*/
+ @UnsupportedAppUsage
private final int mLayoutId;
/**
* An array of actions to perform on the view tree once it has been
* inflated
*/
+ @UnsupportedAppUsage
private ArrayList<Action> mActions;
/**
* Maps bitmaps to unique indicies to avoid Bitmap duplication.
*/
+ @UnsupportedAppUsage
private BitmapCache mBitmapCache;
/**
@@ -208,6 +213,7 @@
* RemoteViews.
*/
private RemoteViews mLandscape = null;
+ @UnsupportedAppUsage
private RemoteViews mPortrait = null;
/**
@@ -360,6 +366,7 @@
private int mEnterAnimationId;
+ @UnsupportedAppUsage
public boolean onClickHandler(View view, PendingIntent pendingIntent,
Intent fillInIntent) {
return onClickHandler(view, pendingIntent, fillInIntent, WINDOWING_MODE_UNDEFINED);
@@ -422,6 +429,7 @@
// Do nothing
}
+ @UnsupportedAppUsage
public int mergeBehavior() {
return MERGE_REPLACE;
}
@@ -457,6 +465,7 @@
// Nothing to visit by default
}
+ @UnsupportedAppUsage
int viewId;
}
@@ -489,6 +498,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void mergeRemoteViews(RemoteViews newRv) {
if (newRv == null) return;
// We first copy the new RemoteViews, as the process of merging modifies the way the actions
@@ -764,6 +774,7 @@
return SET_PENDING_INTENT_TEMPLATE_TAG;
}
+ @UnsupportedAppUsage
PendingIntent pendingIntentTemplate;
}
@@ -963,6 +974,7 @@
return SET_ON_CLICK_PENDING_INTENT_TAG;
}
+ @UnsupportedAppUsage
PendingIntent pendingIntent;
}
@@ -1154,6 +1166,7 @@
private static class BitmapCache {
+ @UnsupportedAppUsage
ArrayList<Bitmap> mBitmaps;
int mBitmapMemory = -1;
@@ -1205,7 +1218,9 @@
private class BitmapReflectionAction extends Action {
int bitmapId;
+ @UnsupportedAppUsage
Bitmap bitmap;
+ @UnsupportedAppUsage
String methodName;
BitmapReflectionAction(int viewId, String methodName, Bitmap bitmap) {
@@ -1271,8 +1286,10 @@
static final int COLOR_STATE_LIST = 15;
static final int ICON = 16;
+ @UnsupportedAppUsage
String methodName;
int type;
+ @UnsupportedAppUsage
Object value;
ReflectionAction(int viewId, String methodName, int type, Object value) {
@@ -1565,6 +1582,7 @@
* ViewGroup methods that are related to adding Views.
*/
private class ViewGroupActionAdd extends Action {
+ @UnsupportedAppUsage
private RemoteViews mNestedViews;
private int mIndex;
@@ -2421,6 +2439,7 @@
* setting on click extras and setting on click pending intents. The former is enabled,
* and the latter disabled when this flag is true.
*/
+ @UnsupportedAppUsage
void setIsWidgetCollectionChild(boolean isWidgetCollectionChild) {
mIsWidgetCollectionChild = isWidgetCollectionChild;
}
@@ -2447,6 +2466,7 @@
* Returns an estimate of the bitmap heap memory usage for this RemoteViews.
*/
/** @hide */
+ @UnsupportedAppUsage
public int estimateMemoryUsage() {
return mBitmapCache.getBitmapMemory();
}
@@ -2494,6 +2514,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void addView(int viewId, RemoteViews nestedView, int index) {
addAction(new ViewGroupActionAdd(viewId, nestedView, index));
}
@@ -2941,6 +2962,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setRemoteAdapter(int viewId, ArrayList<RemoteViews> list, int viewTypeCount) {
addAction(new SetRemoteViewsAdapterList(viewId, list, viewTypeCount));
}
diff --git a/core/java/android/widget/RemoteViewsAdapter.java b/core/java/android/widget/RemoteViewsAdapter.java
index e5ae0ca..d17c7c5 100644
--- a/core/java/android/widget/RemoteViewsAdapter.java
+++ b/core/java/android/widget/RemoteViewsAdapter.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import android.app.IServiceConnection;
import android.appwidget.AppWidgetHostView;
@@ -99,6 +100,7 @@
private final Executor mAsyncViewLoadExecutor;
private OnClickHandler mRemoteViewsOnClickHandler;
+ @UnsupportedAppUsage
private final FixedSizeRemoteViewsCache mCache;
private int mVisibleWindowLowerBound;
private int mVisibleWindowUpperBound;
@@ -107,6 +109,7 @@
// loaded.
private RemoteViewsFrameLayoutRefSet mRequestedViews;
+ @UnsupportedAppUsage
private final HandlerThread mWorkerThread;
// items may be interrupted within the normally processed queues
private final Handler mMainHandler;
@@ -869,14 +872,17 @@
}
}
+ @UnsupportedAppUsage
public boolean isDataReady() {
return mDataReady;
}
+ @UnsupportedAppUsage
public void setRemoteViewsOnClickHandler(OnClickHandler handler) {
mRemoteViewsOnClickHandler = handler;
}
+ @UnsupportedAppUsage
public void saveRemoteViewsCache() {
final RemoteViewsCacheKey key = new RemoteViewsCacheKey(
new Intent.FilterComparison(mIntent), mAppWidgetId);
@@ -1021,6 +1027,7 @@
}
}
+ @UnsupportedAppUsage
public Intent getRemoteViewsServiceIntent() {
return mIntent;
}
@@ -1067,6 +1074,7 @@
* views are currently being displayed. This allows for certain optimizations and preloading
* which wouldn't otherwise be possible.
*/
+ @UnsupportedAppUsage
public void setVisibleRangeHint(int lowerBound, int upperBound) {
mVisibleWindowLowerBound = lowerBound;
mVisibleWindowUpperBound = upperBound;
diff --git a/core/java/android/widget/ScrollBarDrawable.java b/core/java/android/widget/ScrollBarDrawable.java
index 2ae38c9..e91f87e 100644
--- a/core/java/android/widget/ScrollBarDrawable.java
+++ b/core/java/android/widget/ScrollBarDrawable.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PixelFormat;
@@ -35,6 +36,7 @@
public class ScrollBarDrawable extends Drawable implements Drawable.Callback {
private Drawable mVerticalTrack;
private Drawable mHorizontalTrack;
+ @UnsupportedAppUsage
private Drawable mVerticalThumb;
private Drawable mHorizontalThumb;
@@ -224,6 +226,7 @@
}
}
+ @UnsupportedAppUsage
public void setVerticalThumbDrawable(Drawable thumb) {
if (mVerticalThumb != null) {
mVerticalThumb.setCallback(null);
@@ -242,6 +245,7 @@
mVerticalTrack = track;
}
+ @UnsupportedAppUsage
public void setHorizontalThumbDrawable(Drawable thumb) {
if (mHorizontalThumb != null) {
mHorizontalThumb.setCallback(null);
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 97d32f1..4658d73 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -81,16 +82,21 @@
private static final String TAG = "ScrollView";
+ @UnsupportedAppUsage
private long mLastScroll;
private final Rect mTempRect = new Rect();
+ @UnsupportedAppUsage
private OverScroller mScroller;
+ @UnsupportedAppUsage
private EdgeEffect mEdgeGlowTop;
+ @UnsupportedAppUsage
private EdgeEffect mEdgeGlowBottom;
/**
* Position of the last motion event.
*/
+ @UnsupportedAppUsage
private int mLastMotionY;
/**
@@ -104,6 +110,7 @@
* layout is dirty. This prevents the scroll from being wrong if the child has not been
* laid out before requesting focus.
*/
+ @UnsupportedAppUsage
private View mChildToScrollTo = null;
/**
@@ -111,11 +118,13 @@
* not the same as 'is being flinged', which can be checked by
* mScroller.isFinished() (flinging begins when the user lifts his finger).
*/
+ @UnsupportedAppUsage
private boolean mIsBeingDragged = false;
/**
* Determines speed during touch scrolling
*/
+ @UnsupportedAppUsage
private VelocityTracker mVelocityTracker;
/**
@@ -131,10 +140,13 @@
private boolean mSmoothScrollingEnabled = true;
private int mTouchSlop;
+ @UnsupportedAppUsage
private int mMinimumVelocity;
private int mMaximumVelocity;
+ @UnsupportedAppUsage
private int mOverscrollDistance;
+ @UnsupportedAppUsage
private int mOverflingDistance;
private float mVerticalScrollFactor;
@@ -159,6 +171,7 @@
* These are no-ops on user builds.
*/
private StrictMode.Span mScrollStrictSpan = null; // aka "drag"
+ @UnsupportedAppUsage
private StrictMode.Span mFlingStrictSpan = null;
/**
@@ -294,6 +307,7 @@
/**
* @return Returns true this ScrollView can be scrolled
*/
+ @UnsupportedAppUsage
private boolean canScroll() {
View child = getChildAt(0);
if (child != null) {
@@ -1644,6 +1658,7 @@
}
}
+ @UnsupportedAppUsage
private void endDrag() {
mIsBeingDragged = false;
diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java
index 357c9c3..229eaf0 100644
--- a/core/java/android/widget/Scroller.java
+++ b/core/java/android/widget/Scroller.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.hardware.SensorManager;
import android.os.Build;
@@ -60,6 +61,7 @@
* }</pre>
*/
public class Scroller {
+ @UnsupportedAppUsage
private final Interpolator mInterpolator;
private int mMode;
@@ -77,6 +79,7 @@
private int mCurrX;
private int mCurrY;
private long mStartTime;
+ @UnsupportedAppUsage
private int mDuration;
private float mDurationReciprocal;
private float mDeltaX;
@@ -94,7 +97,9 @@
private static final int SCROLL_MODE = 0;
private static final int FLING_MODE = 1;
+ @UnsupportedAppUsage
private static float DECELERATION_RATE = (float) (Math.log(0.78) / Math.log(0.9));
+ @UnsupportedAppUsage
private static final float INFLEXION = 0.35f; // Tension lines cross at (INFLEXION, 1)
private static final float START_TENSION = 0.5f;
private static final float END_TENSION = 1.0f;
@@ -105,10 +110,12 @@
private static final float[] SPLINE_POSITION = new float[NB_SAMPLES + 1];
private static final float[] SPLINE_TIME = new float[NB_SAMPLES + 1];
+ @UnsupportedAppUsage
private float mDeceleration;
private final float mPpi;
// A context-specific coefficient adjusted to physical values.
+ @UnsupportedAppUsage
private float mPhysicalCoeff;
static {
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 225497b..5b5950d 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -19,6 +19,7 @@
import static android.widget.SuggestionsAdapter.getColumnString;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.app.SearchManager;
import android.app.SearchableInfo;
@@ -105,13 +106,20 @@
*/
private static final String IME_OPTION_NO_MICROPHONE = "nm";
+ @UnsupportedAppUsage
private final SearchAutoComplete mSearchSrcTextView;
+ @UnsupportedAppUsage
private final View mSearchEditFrame;
+ @UnsupportedAppUsage
private final View mSearchPlate;
+ @UnsupportedAppUsage
private final View mSubmitArea;
+ @UnsupportedAppUsage
private final ImageView mSearchButton;
private final ImageView mGoButton;
+ @UnsupportedAppUsage
private final ImageView mCloseButton;
+ @UnsupportedAppUsage
private final ImageView mVoiceButton;
private final View mDropDownAnchor;
@@ -125,6 +133,7 @@
private final ImageView mCollapsedIcon;
/** Drawable used as an EditText hint. */
+ @UnsupportedAppUsage
private final Drawable mSearchHintIcon;
// Resources used by SuggestionsAdapter to display suggestions.
@@ -137,24 +146,33 @@
private final CharSequence mDefaultQueryHint;
+ @UnsupportedAppUsage
private OnQueryTextListener mOnQueryChangeListener;
private OnCloseListener mOnCloseListener;
private OnFocusChangeListener mOnQueryTextFocusChangeListener;
private OnSuggestionListener mOnSuggestionListener;
private OnClickListener mOnSearchClickListener;
+ @UnsupportedAppUsage
private boolean mIconifiedByDefault;
+ @UnsupportedAppUsage
private boolean mIconified;
+ @UnsupportedAppUsage
private CursorAdapter mSuggestionsAdapter;
private boolean mSubmitButtonEnabled;
private CharSequence mQueryHint;
private boolean mQueryRefinement;
+ @UnsupportedAppUsage
private boolean mClearingFocus;
private int mMaxWidth;
+ @UnsupportedAppUsage
private boolean mVoiceButtonEnabled;
private CharSequence mOldQueryText;
+ @UnsupportedAppUsage
private CharSequence mUserQuery;
+ @UnsupportedAppUsage
private boolean mExpandedInActionView;
+ @UnsupportedAppUsage
private int mCollapsedImeOptions;
private SearchableInfo mSearchable;
@@ -853,6 +871,7 @@
.getDimensionPixelSize(R.dimen.search_view_preferred_height);
}
+ @UnsupportedAppUsage
private void updateViewsVisibility(final boolean collapsed) {
mIconified = collapsed;
// Visibility of views that are visible when collapsed
@@ -898,6 +917,7 @@
return (mSubmitButtonEnabled || mVoiceButtonEnabled) && !isIconified();
}
+ @UnsupportedAppUsage
private void updateSubmitButton(boolean hasText) {
int visibility = GONE;
if (mSubmitButtonEnabled && isSubmitAreaEnabled() && hasFocus()
@@ -907,6 +927,7 @@
mGoButton.setVisibility(visibility);
}
+ @UnsupportedAppUsage
private void updateSubmitArea() {
int visibility = GONE;
if (isSubmitAreaEnabled()
@@ -962,6 +983,7 @@
setQuery(queryText);
}
+ @UnsupportedAppUsage
private final OnClickListener mOnClickListener = new OnClickListener() {
public void onClick(View v) {
@@ -1270,6 +1292,7 @@
mSearchSrcTextView.dismissDropDown();
}
+ @UnsupportedAppUsage
private void onCloseClicked() {
CharSequence text = mSearchSrcTextView.getText();
if (TextUtils.isEmpty(text)) {
@@ -1467,6 +1490,7 @@
return false;
}
+ @UnsupportedAppUsage
private final OnItemClickListener mOnItemClickListener = new OnItemClickListener() {
/**
@@ -1566,6 +1590,7 @@
/**
* Sets the text in the query box, without updating the suggestions.
*/
+ @UnsupportedAppUsage
private void setQuery(CharSequence query) {
mSearchSrcTextView.setText(query, true);
// Move the cursor to the end
@@ -1892,6 +1917,7 @@
mThreshold = getThreshold();
}
+ @UnsupportedAppUsage
public SearchAutoComplete(Context context, AttributeSet attrs) {
super(context, attrs);
mThreshold = getThreshold();
diff --git a/core/java/android/widget/SeekBar.java b/core/java/android/widget/SeekBar.java
index f9aced0..e8cf1e8 100644
--- a/core/java/android/widget/SeekBar.java
+++ b/core/java/android/widget/SeekBar.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.AttributeSet;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -69,6 +70,7 @@
void onStopTrackingTouch(SeekBar seekBar);
}
+ @UnsupportedAppUsage
private OnSeekBarChangeListener mOnSeekBarChangeListener;
public SeekBar(Context context) {
@@ -88,6 +90,7 @@
}
@Override
+ @UnsupportedAppUsage
void onProgressRefresh(float scale, boolean fromUser, int progress) {
super.onProgressRefresh(scale, fromUser, progress);
diff --git a/core/java/android/widget/SimpleAdapter.java b/core/java/android/widget/SimpleAdapter.java
index 9190117..a27354d 100644
--- a/core/java/android/widget/SimpleAdapter.java
+++ b/core/java/android/widget/SimpleAdapter.java
@@ -18,6 +18,7 @@
import android.annotation.IdRes;
import android.annotation.LayoutRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.net.Uri;
@@ -58,6 +59,7 @@
private String[] mFrom;
private ViewBinder mViewBinder;
+ @UnsupportedAppUsage
private List<? extends Map<String, ?>> mData;
private int mResource;
diff --git a/core/java/android/widget/SimpleCursorAdapter.java b/core/java/android/widget/SimpleCursorAdapter.java
index 3dd0a95..b670e6c 100644
--- a/core/java/android/widget/SimpleCursorAdapter.java
+++ b/core/java/android/widget/SimpleCursorAdapter.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
@@ -51,12 +52,14 @@
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected int[] mFrom;
/**
* A list of View ids representing the views to which the data must be bound.
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected int[] mTo;
private int mStringConversionColumn = -1;
diff --git a/core/java/android/widget/SlidingDrawer.java b/core/java/android/widget/SlidingDrawer.java
index 9f48397..8011c3a 100644
--- a/core/java/android/widget/SlidingDrawer.java
+++ b/core/java/android/widget/SlidingDrawer.java
@@ -17,6 +17,7 @@
package android.widget;
import android.R;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
@@ -104,14 +105,17 @@
private final Rect mFrame = new Rect();
private final Rect mInvalidate = new Rect();
+ @UnsupportedAppUsage
private boolean mTracking;
private boolean mLocked;
+ @UnsupportedAppUsage
private VelocityTracker mVelocityTracker;
private boolean mVertical;
private boolean mExpanded;
private int mBottomOffset;
+ @UnsupportedAppUsage
private int mTopOffset;
private int mHandleHeight;
private int mHandleWidth;
@@ -125,6 +129,7 @@
private float mAnimationPosition;
private long mAnimationLastTime;
private long mCurrentAnimationTime;
+ @UnsupportedAppUsage
private int mTouchDelta;
private boolean mAnimating;
private boolean mAllowSingleTap;
@@ -555,6 +560,7 @@
stopTracking(notifyScrollListener);
}
+ @UnsupportedAppUsage
private void prepareTracking(int position) {
mTracking = true;
mVelocityTracker = VelocityTracker.obtain();
@@ -646,6 +652,7 @@
}
}
+ @UnsupportedAppUsage
private void prepareContent() {
if (mAnimating) {
return;
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index ddf0e74..1705ba8 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -19,6 +19,7 @@
import android.annotation.DrawableRes;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.app.AlertDialog;
import android.content.Context;
@@ -93,11 +94,13 @@
private final Context mPopupContext;
/** Forwarding listener used to implement drag-to-open. */
+ @UnsupportedAppUsage
private ForwardingListener mForwardingListener;
/** Temporary holder for setAdapter() calls from the super constructor. */
private SpinnerAdapter mTempAdapter;
+ @UnsupportedAppUsage
private SpinnerPopup mPopup;
int mDropDownWidth;
@@ -584,6 +587,7 @@
/**
* @hide internal use only
*/
+ @UnsupportedAppUsage
public void setOnItemClickListenerInt(OnItemClickListener l) {
super.setOnItemClickListener(l);
}
@@ -1069,6 +1073,7 @@
/**
* @return true if the popup is showing, false otherwise.
*/
+ @UnsupportedAppUsage
public boolean isShowing();
/**
@@ -1099,6 +1104,7 @@
}
}
+ @UnsupportedAppUsage
public boolean isShowing() {
return mPopup != null ? mPopup.isShowing() : false;
}
diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java
index 604575f..8bfc151 100644
--- a/core/java/android/widget/Switch.java
+++ b/core/java/android/widget/Switch.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
@@ -93,12 +94,14 @@
private static final int SERIF = 2;
private static final int MONOSPACE = 3;
+ @UnsupportedAppUsage
private Drawable mThumbDrawable;
private ColorStateList mThumbTintList = null;
private PorterDuff.Mode mThumbTintMode = null;
private boolean mHasThumbTint = false;
private boolean mHasThumbTintMode = false;
+ @UnsupportedAppUsage
private Drawable mTrackDrawable;
private ColorStateList mTrackTintList = null;
private PorterDuff.Mode mTrackTintMode = null;
@@ -106,6 +109,7 @@
private boolean mHasTrackTintMode = false;
private int mThumbTextPadding;
+ @UnsupportedAppUsage
private int mSwitchMinWidth;
private int mSwitchPadding;
private boolean mSplitTrack;
@@ -127,18 +131,21 @@
* Width required to draw the switch track and thumb. Includes padding and
* optical bounds for both the track and thumb.
*/
+ @UnsupportedAppUsage
private int mSwitchWidth;
/**
* Height required to draw the switch track and thumb. Includes padding and
* optical bounds for both the track and thumb.
*/
+ @UnsupportedAppUsage
private int mSwitchHeight;
/**
* Width of the thumb's content region. Does not include padding or
* optical bounds.
*/
+ @UnsupportedAppUsage
private int mThumbWidth;
/** Left bound for drawing the switch track and thumb. */
@@ -155,7 +162,9 @@
private TextPaint mTextPaint;
private ColorStateList mTextColors;
+ @UnsupportedAppUsage
private Layout mOnLayout;
+ @UnsupportedAppUsage
private Layout mOffLayout;
private TransformationMethod2 mSwitchTransformationMethod;
private ObjectAnimator mPositionAnimator;
@@ -1050,6 +1059,7 @@
mPositionAnimator.start();
}
+ @UnsupportedAppUsage
private void cancelPositionAnimator() {
if (mPositionAnimator != null) {
mPositionAnimator.cancel();
@@ -1065,6 +1075,7 @@
*
* @param position new position between [0,1]
*/
+ @UnsupportedAppUsage
private void setThumbPosition(float position) {
mThumbPosition = position;
invalidate();
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 8696d0d..b1fcbc3 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.LocalActivityManager;
import android.content.Context;
import android.content.Intent;
@@ -54,11 +55,13 @@
private static final int TABWIDGET_LOCATION_BOTTOM = 3;
private TabWidget mTabWidget;
private FrameLayout mTabContent;
+ @UnsupportedAppUsage
private List<TabSpec> mTabSpecs = new ArrayList<TabSpec>(2);
/**
* This field should be made private, so it is hidden from the SDK.
* {@hide}
*/
+ @UnsupportedAppUsage
protected int mCurrentTab = -1;
private View mCurrentView = null;
/**
@@ -66,6 +69,7 @@
* {@hide}
*/
protected LocalActivityManager mLocalActivityManager = null;
+ @UnsupportedAppUsage
private OnTabChangeListener mOnTabChangeListener;
private OnKeyListener mTabKeyListener;
@@ -504,7 +508,9 @@
private final @NonNull String mTag;
+ @UnsupportedAppUsage
private IndicatorStrategy mIndicatorStrategy;
+ @UnsupportedAppUsage
private ContentStrategy mContentStrategy;
/**
@@ -767,6 +773,7 @@
mIntent = intent;
}
+ @UnsupportedAppUsage
public View getContentView() {
if (mLocalActivityManager == null) {
throw new IllegalStateException("Did you forget to call 'public void setup(LocalActivityManager activityGroup)'?");
@@ -796,6 +803,7 @@
return mLaunchedView;
}
+ @UnsupportedAppUsage
public void tabClosed() {
if (mLaunchedView != null) {
mLaunchedView.setVisibility(View.GONE);
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index f8b6837..a90741b4 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -18,6 +18,7 @@
import android.annotation.DrawableRes;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -59,6 +60,7 @@
private OnTabSelectionChanged mSelectionChangedListener;
// This value will be set to 0 as soon as the first tab is added to TabHost.
+ @UnsupportedAppUsage
private int mSelectedTab = -1;
@Nullable
@@ -67,6 +69,7 @@
@Nullable
private Drawable mRightStrip;
+ @UnsupportedAppUsage
private boolean mDrawBottomStrips = true;
private boolean mStripMoved;
@@ -541,6 +544,7 @@
* Provides a way for {@link TabHost} to be notified that the user clicked
* on a tab indicator.
*/
+ @UnsupportedAppUsage
void setTabSelectionListener(OnTabSelectionChanged listener) {
mSelectionChangedListener = listener;
}
diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java
index d8a9cca..4865808 100644
--- a/core/java/android/widget/TextClock.java
+++ b/core/java/android/widget/TextClock.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
@@ -485,6 +486,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CharSequence getFormat() {
return mFormat;
}
@@ -623,6 +625,7 @@
/**
* Update the displayed time if this view and its ancestors and window is visible
*/
+ @UnsupportedAppUsage
private void onTimeChanged() {
// mShouldRunTicker always equals the last value passed into onVisibilityAggregated
if (mShouldRunTicker) {
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index ea54696..31b1d99 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -34,6 +34,7 @@
import android.annotation.Size;
import android.annotation.StringRes;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.app.Activity;
import android.app.PendingIntent;
@@ -365,6 +366,7 @@
*/
private static final int MARQUEE_FADE_SWITCH_SHOW_FADE = 2;
+ @UnsupportedAppUsage
private static final int LINES = 1;
private static final int EMS = LINES;
private static final int PIXELS = 2;
@@ -414,14 +416,23 @@
private ColorStateList mHintTextColor;
private ColorStateList mLinkTextColor;
@ViewDebug.ExportedProperty(category = "text")
+ @UnsupportedAppUsage
private int mCurTextColor;
+ @UnsupportedAppUsage
private int mCurHintTextColor;
private boolean mFreezesText;
+ @UnsupportedAppUsage
private Editable.Factory mEditableFactory = Editable.Factory.getInstance();
+ @UnsupportedAppUsage
private Spannable.Factory mSpannableFactory = Spannable.Factory.getInstance();
- private float mShadowRadius, mShadowDx, mShadowDy;
+ @UnsupportedAppUsage
+ private float mShadowRadius;
+ @UnsupportedAppUsage
+ private float mShadowDx;
+ @UnsupportedAppUsage
+ private float mShadowDy;
private int mShadowColor;
private boolean mPreDrawRegistered;
@@ -622,11 +633,15 @@
}
}
+ @UnsupportedAppUsage
Drawables mDrawables;
+ @UnsupportedAppUsage
private CharWrapper mCharWrapper;
+ @UnsupportedAppUsage
private Marquee mMarquee;
+ @UnsupportedAppUsage
private boolean mRestartMarquee;
private int mMarqueeRepeatLimit = 3;
@@ -638,37 +653,49 @@
* extensively in the same layout. This mode indicates how the marquee
* is currently being shown, if applicable. (mEllipsize will == MARQUEE)
*/
+ @UnsupportedAppUsage
private int mMarqueeFadeMode = MARQUEE_FADE_NORMAL;
/**
* When mMarqueeFadeMode is not MARQUEE_FADE_NORMAL, this stores
* the layout that should be used when the mode switches.
*/
+ @UnsupportedAppUsage
private Layout mSavedMarqueeModeLayout;
// Do not update following mText/mSpannable/mPrecomputed except for setTextInternal()
@ViewDebug.ExportedProperty(category = "text")
+ @UnsupportedAppUsage
private @Nullable CharSequence mText;
private @Nullable Spannable mSpannable;
private @Nullable PrecomputedText mPrecomputed;
+ @UnsupportedAppUsage
private CharSequence mTransformed;
+ @UnsupportedAppUsage
private BufferType mBufferType = BufferType.NORMAL;
private CharSequence mHint;
+ @UnsupportedAppUsage
private Layout mHintLayout;
private MovementMethod mMovement;
private TransformationMethod mTransformation;
+ @UnsupportedAppUsage
private boolean mAllowTransformationLengthChange;
+ @UnsupportedAppUsage
private ChangeWatcher mChangeWatcher;
+ @UnsupportedAppUsage
private ArrayList<TextWatcher> mListeners;
// display attributes
+ @UnsupportedAppUsage
private final TextPaint mTextPaint;
+ @UnsupportedAppUsage
private boolean mUserSetTextScaleX;
+ @UnsupportedAppUsage
private Layout mLayout;
private boolean mLocalesChanged = false;
@@ -680,34 +707,51 @@
/* package */ boolean mUseFallbackLineSpacing;
@ViewDebug.ExportedProperty(category = "text")
+ @UnsupportedAppUsage
private int mGravity = Gravity.TOP | Gravity.START;
+ @UnsupportedAppUsage
private boolean mHorizontallyScrolling;
private int mAutoLinkMask;
private boolean mLinksClickable = true;
+ @UnsupportedAppUsage
private float mSpacingMult = 1.0f;
+ @UnsupportedAppUsage
private float mSpacingAdd = 0.0f;
private int mBreakStrategy;
private int mHyphenationFrequency;
private int mJustificationMode;
+ @UnsupportedAppUsage
private int mMaximum = Integer.MAX_VALUE;
+ @UnsupportedAppUsage
private int mMaxMode = LINES;
+ @UnsupportedAppUsage
private int mMinimum = 0;
+ @UnsupportedAppUsage
private int mMinMode = LINES;
+ @UnsupportedAppUsage
private int mOldMaximum = mMaximum;
+ @UnsupportedAppUsage
private int mOldMaxMode = mMaxMode;
+ @UnsupportedAppUsage
private int mMaxWidth = Integer.MAX_VALUE;
+ @UnsupportedAppUsage
private int mMaxWidthMode = PIXELS;
+ @UnsupportedAppUsage
private int mMinWidth = 0;
+ @UnsupportedAppUsage
private int mMinWidthMode = PIXELS;
+ @UnsupportedAppUsage
private boolean mSingleLine;
+ @UnsupportedAppUsage
private int mDesiredHeightAtMeasure = -1;
+ @UnsupportedAppUsage
private boolean mIncludePad = true;
private int mDeferScroll = -1;
@@ -717,9 +761,16 @@
private Scroller mScroller;
private TextPaint mTempTextPaint;
- private BoringLayout.Metrics mBoring, mHintBoring;
- private BoringLayout mSavedLayout, mSavedHintLayout;
+ @UnsupportedAppUsage
+ private BoringLayout.Metrics mBoring;
+ @UnsupportedAppUsage
+ private BoringLayout.Metrics mHintBoring;
+ @UnsupportedAppUsage
+ private BoringLayout mSavedLayout;
+ @UnsupportedAppUsage
+ private BoringLayout mSavedHintLayout;
+ @UnsupportedAppUsage
private TextDirectionHeuristic mTextDir;
private InputFilter[] mFilters = NO_FILTERS;
@@ -728,21 +779,28 @@
// It is possible to have a selection even when mEditor is null (programmatically set, like when
// a link is pressed). These highlight-related fields do not go in mEditor.
+ @UnsupportedAppUsage
int mHighlightColor = 0x6633B5E5;
private Path mHighlightPath;
+ @UnsupportedAppUsage
private final Paint mHighlightPaint;
+ @UnsupportedAppUsage
private boolean mHighlightPathBogus = true;
// Although these fields are specific to editable text, they are not added to Editor because
// they are defined by the TextView's style and are theme-dependent.
+ @UnsupportedAppUsage
int mCursorDrawableRes;
// These six fields, could be moved to Editor, since we know their default values and we
// could condition the creation of the Editor to a non standard value. This is however
// brittle since the hardcoded values here (such as
// com.android.internal.R.drawable.text_select_handle_left) would have to be updated if the
// default style is modified.
+ @UnsupportedAppUsage
int mTextSelectHandleLeftRes;
+ @UnsupportedAppUsage
int mTextSelectHandleRightRes;
+ @UnsupportedAppUsage
int mTextSelectHandleRes;
int mTextEditSuggestionItemLayout;
int mTextEditSuggestionContainerLayout;
@@ -752,6 +810,7 @@
* {@link EditText} specific data, created on demand when one of the Editor fields is used.
* See {@link #createEditorIfNeeded()}.
*/
+ @UnsupportedAppUsage
private Editor mEditor;
private static final int DEVICE_PROVISIONED_UNKNOWN = 0;
@@ -2231,6 +2290,7 @@
* @return the {@link android.text.Layout} that is currently being used to
* display the hint text. This can be null.
*/
+ @UnsupportedAppUsage
final Layout getHintLayout() {
return mHintLayout;
}
@@ -3880,6 +3940,7 @@
shouldRequestLayout);
}
+ @UnsupportedAppUsage
private void setRawTextSize(float size, boolean shouldRequestLayout) {
if (size != mTextPaint.getTextSize()) {
mTextPaint.setTextSize(size);
@@ -4106,9 +4167,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 +4202,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;
@@ -4751,6 +4833,7 @@
* @attr ref android.R.styleable#TextView_scrollHorizontally
* @hide
*/
+ @UnsupportedAppUsage
public boolean getHorizontallyScrolling() {
return mHorizontallyScrolling;
}
@@ -5612,6 +5695,7 @@
}
}
+ @UnsupportedAppUsage
private void setText(CharSequence text, BufferType type,
boolean notifyBefore, int oldlen) {
mTextSetFromXmlOrResourceId = false;
@@ -5957,6 +6041,7 @@
return mHint;
}
+ @UnsupportedAppUsage
boolean isSingleLine() {
return mSingleLine;
}
@@ -6125,6 +6210,7 @@
return locales.get(0);
}
+ @UnsupportedAppUsage
private void setInputType(int type, boolean direct) {
final int cls = type & EditorInfo.TYPE_MASK_CLASS;
KeyListener input;
@@ -6601,6 +6687,7 @@
return getMeasuredHeight() - padding + opticalInsets.top + opticalInsets.bottom;
}
+ @UnsupportedAppUsage
int getVerticalOffset(boolean forceNormal) {
int voffset = 0;
final int gravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;
@@ -7068,6 +7155,7 @@
return drawableState;
}
+ @UnsupportedAppUsage
private Path getUpdatedHighlightPath() {
Path highlight = null;
Paint highlightPaint = mHighlightPaint;
@@ -8110,6 +8198,7 @@
/** @hide */
@VisibleForTesting
+ @UnsupportedAppUsage
public void nullLayouts() {
if (mLayout instanceof BoringLayout && mSavedLayout == null) {
mSavedLayout = (BoringLayout) mLayout;
@@ -8130,6 +8219,7 @@
* Make a new Layout based on the already-measured size of the view,
* on the assumption that it was measured correctly at some point.
*/
+ @UnsupportedAppUsage
private void assumeLayout() {
int width = mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight();
@@ -8147,6 +8237,7 @@
physicalWidth, false);
}
+ @UnsupportedAppUsage
private Layout.Alignment getLayoutAlignment() {
Layout.Alignment alignment;
switch (getTextAlignment()) {
@@ -8205,6 +8296,7 @@
* {@hide}
*/
@VisibleForTesting
+ @UnsupportedAppUsage
public void makeNewLayout(int wantWidth, int hintWidth,
BoringLayout.Metrics boring,
BoringLayout.Metrics hintBoring,
@@ -8429,6 +8521,7 @@
return result;
}
+ @UnsupportedAppUsage
private boolean compressText(float width) {
if (isHardwareAccelerated()) return false;
@@ -8897,6 +8990,7 @@
* Check whether entirely new text requires a new view layout
* or merely a new text layout.
*/
+ @UnsupportedAppUsage
private void checkForRelayout() {
// If we have a fixed width, we can just swap in a new text layout
// if the text height stays the same or if the view height is fixed.
@@ -8971,6 +9065,7 @@
/**
* Returns true if anything changed.
*/
+ @UnsupportedAppUsage
private boolean bringTextIntoView() {
Layout layout = isShowingHint() ? mHintLayout : mLayout;
int line = 0;
@@ -9339,6 +9434,7 @@
return getCompoundPaddingLeft() - mScrollX;
}
+ @UnsupportedAppUsage
int viewportToContentVerticalOffset() {
int offset = getExtendedPaddingTop() - mScrollY;
if ((mGravity & Gravity.VERTICAL_GRAVITY_MASK) != Gravity.TOP) {
@@ -9624,6 +9720,7 @@
&& mSavedMarqueeModeLayout.getLineWidth(0) > width));
}
+ @UnsupportedAppUsage
private void startMarquee() {
// Do not ellipsize EditText
if (getKeyListener() != null) return;
@@ -9666,6 +9763,7 @@
}
}
+ @UnsupportedAppUsage
private void startStopMarquee(boolean start) {
if (mEllipsize == TextUtils.TruncateAt.MARQUEE) {
if (start) {
@@ -10210,6 +10308,7 @@
* @return True iff this TextView contains a text that can be edited, or if this is
* a selectable TextView.
*/
+ @UnsupportedAppUsage
boolean isTextEditable() {
return mText instanceof Editable && onCheckIsTextEditor() && isEnabled();
}
@@ -10472,6 +10571,7 @@
|| (isTextSelectable() && mText instanceof Spannable && isEnabled());
}
+ @UnsupportedAppUsage
private Locale getTextServicesLocale(boolean allowNullLocale) {
// Start fetching the text services locale asynchronously.
updateTextServicesLocaleAsync();
@@ -10551,6 +10651,7 @@
});
}
+ @UnsupportedAppUsage
private void updateTextServicesLocaleLocked() {
final TextServicesManager textServicesManager = (TextServicesManager)
mContext.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
@@ -11229,6 +11330,7 @@
* be {@code null} if no text is set
*/
@Nullable
+ @UnsupportedAppUsage
private CharSequence getTextForAccessibility() {
// If the text is empty, we must be showing the hint text.
if (TextUtils.isEmpty(mText)) {
@@ -11366,6 +11468,7 @@
return false;
}
+ @UnsupportedAppUsage
CharSequence getTransformedText(int start, int end) {
return removeSuggestionSpans(mTransformed.subSequence(start, end));
}
@@ -11667,6 +11770,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected void stopTextActionMode() {
if (mEditor != null) {
mEditor.stopTextActionMode();
@@ -11730,6 +11834,7 @@
return mDeviceProvisionedState == DEVICE_PROVISIONED_YES;
}
+ @UnsupportedAppUsage
boolean canPaste() {
return (mText instanceof Editable
&& mEditor != null && mEditor.mKeyListener != null
@@ -11869,6 +11974,7 @@
return x;
}
+ @UnsupportedAppUsage
int getLineAtCoordinate(float y) {
y -= getTotalPaddingTop();
// Clamp the position to inside of the view.
@@ -11945,6 +12051,7 @@
* @return the current {@link TextDirectionHeuristic}.
* @hide
*/
+ @UnsupportedAppUsage
protected TextDirectionHeuristic getTextDirectionHeuristic() {
if (hasPasswordTransformationMethod()) {
// passwords fields should be LTR
@@ -12056,6 +12163,7 @@
* Deletes the range of text [start, end[.
* @hide
*/
+ @UnsupportedAppUsage
protected void deleteText_internal(int start, int end) {
((Editable) mText).delete(start, end);
}
@@ -12096,6 +12204,7 @@
* Also note that for performance reasons, the mEditor is created when needed, but not
* reset when no more edit-specific fields are needed.
*/
+ @UnsupportedAppUsage
private void createEditorIfNeeded() {
if (mEditor == null) {
mEditor = new Editor(this);
@@ -12106,6 +12215,7 @@
* @hide
*/
@Override
+ @UnsupportedAppUsage
public CharSequence getIterableTextForAccessibility() {
return mText;
}
@@ -12215,6 +12325,7 @@
public static class SavedState extends BaseSavedState {
int selStart = -1;
int selEnd = -1;
+ @UnsupportedAppUsage
CharSequence text;
boolean frozenWithFocus;
CharSequence error;
diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java
index cfec3f2..6a5c8cc 100644
--- a/core/java/android/widget/TimePicker.java
+++ b/core/java/android/widget/TimePicker.java
@@ -20,6 +20,7 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.content.res.TypedArray;
@@ -84,6 +85,7 @@
@Retention(RetentionPolicy.SOURCE)
public @interface TimePickerMode {}
+ @UnsupportedAppUsage
private final TimePickerDelegate mDelegate;
@TimePickerMode
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java
index d74a60e..3fbc819 100644
--- a/core/java/android/widget/Toast.java
+++ b/core/java/android/widget/Toast.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
+import android.annotation.UnsupportedAppUsage;
import android.app.INotificationManager;
import android.app.ITransientNotification;
import android.content.Context;
@@ -93,7 +94,9 @@
public static final int LENGTH_LONG = 1;
final Context mContext;
+ @UnsupportedAppUsage
final TN mTN;
+ @UnsupportedAppUsage
int mDuration;
View mNextView;
@@ -133,9 +136,10 @@
String pkg = mContext.getOpPackageName();
TN tn = mTN;
tn.mNextView = mNextView;
+ final int displayId = mContext.getDisplay().getDisplayId();
try {
- service.enqueueToast(pkg, tn, mDuration);
+ service.enqueueToast(pkg, tn, mDuration, displayId);
} catch (RemoteException e) {
// Empty
}
@@ -252,6 +256,7 @@
* Gets the LayoutParams for the Toast window.
* @hide
*/
+ @UnsupportedAppUsage
public WindowManager.LayoutParams getWindowParams() {
return mTN.mParams;
}
@@ -335,8 +340,10 @@
// the proper ordering of these system-wide.
// =======================================================================================
+ @UnsupportedAppUsage
private static INotificationManager sService;
+ @UnsupportedAppUsage
static private INotificationManager getService() {
if (sService != null) {
return sService;
@@ -346,6 +353,7 @@
}
private static class TN extends ITransientNotification.Stub {
+ @UnsupportedAppUsage
private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
private static final int SHOW = 0;
@@ -353,13 +361,18 @@
private static final int CANCEL = 2;
final Handler mHandler;
+ @UnsupportedAppUsage
int mGravity;
- int mX, mY;
+ int mX;
+ @UnsupportedAppUsage
+ int mY;
float mHorizontalMargin;
float mVerticalMargin;
+ @UnsupportedAppUsage
View mView;
+ @UnsupportedAppUsage
View mNextView;
int mDuration;
@@ -430,6 +443,7 @@
* schedule handleShow into the right thread
*/
@Override
+ @UnsupportedAppUsage
public void show(IBinder windowToken) {
if (localLOGV) Log.v(TAG, "SHOW: " + this);
mHandler.obtainMessage(SHOW, windowToken).sendToTarget();
@@ -520,6 +534,7 @@
accessibilityManager.sendAccessibilityEvent(event);
}
+ @UnsupportedAppUsage
public void handleHide() {
if (localLOGV) Log.v(TAG, "HANDLE HIDE: " + this + " mView=" + mView);
if (mView != null) {
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index 79c1902..1bbd7e8 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -24,6 +24,7 @@
import android.annotation.StringRes;
import android.annotation.StyleRes;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActionBar;
import android.content.Context;
import android.content.res.TypedArray;
@@ -133,8 +134,10 @@
private static final String TAG = "Toolbar";
private ActionMenuView mMenuView;
+ @UnsupportedAppUsage
private TextView mTitleTextView;
private TextView mSubtitleTextView;
+ @UnsupportedAppUsage
private ImageButton mNavButtonView;
private ImageView mLogoView;
@@ -157,9 +160,13 @@
private int mMaxButtonHeight;
+ @UnsupportedAppUsage
private int mTitleMarginStart;
+ @UnsupportedAppUsage
private int mTitleMarginEnd;
+ @UnsupportedAppUsage
private int mTitleMarginTop;
+ @UnsupportedAppUsage
private int mTitleMarginBottom;
private RtlSpacingHelper mContentInsets;
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 58a2b0f..14881eb 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -17,6 +17,7 @@
package android.widget;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -84,6 +85,7 @@
// all possible internal states
private static final int STATE_ERROR = -1;
+ @UnsupportedAppUsage
private static final int STATE_IDLE = 0;
private static final int STATE_PREPARING = 1;
private static final int STATE_PREPARED = 2;
@@ -94,7 +96,9 @@
private final Vector<Pair<InputStream, MediaFormat>> mPendingSubtitleTracks = new Vector<>();
// settable by the client
+ @UnsupportedAppUsage
private Uri mUri;
+ @UnsupportedAppUsage
private Map<String, String> mHeaders;
// mCurrentState is a VideoView object's current state.
@@ -102,20 +106,28 @@
// For instance, regardless the VideoView object's current state,
// calling pause() intends to bring the object to a target state
// of STATE_PAUSED.
+ @UnsupportedAppUsage
private int mCurrentState = STATE_IDLE;
+ @UnsupportedAppUsage
private int mTargetState = STATE_IDLE;
// All the stuff we need for playing and showing a video
+ @UnsupportedAppUsage
private SurfaceHolder mSurfaceHolder = null;
+ @UnsupportedAppUsage
private MediaPlayer mMediaPlayer = null;
private int mAudioSession;
+ @UnsupportedAppUsage
private int mVideoWidth;
+ @UnsupportedAppUsage
private int mVideoHeight;
private int mSurfaceWidth;
private int mSurfaceHeight;
+ @UnsupportedAppUsage
private MediaController mMediaController;
private OnCompletionListener mOnCompletionListener;
private MediaPlayer.OnPreparedListener mOnPreparedListener;
+ @UnsupportedAppUsage
private int mCurrentBufferPercentage;
private OnErrorListener mOnErrorListener;
private OnInfoListener mOnInfoListener;
@@ -462,6 +474,7 @@
}
};
+ @UnsupportedAppUsage
MediaPlayer.OnPreparedListener mPreparedListener = new MediaPlayer.OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
mCurrentState = STATE_PREPARED;
@@ -551,6 +564,7 @@
}
};
+ @UnsupportedAppUsage
private MediaPlayer.OnErrorListener mErrorListener =
new MediaPlayer.OnErrorListener() {
public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
@@ -655,6 +669,7 @@
mOnInfoListener = l;
}
+ @UnsupportedAppUsage
SurfaceHolder.Callback mSHCallback = new SurfaceHolder.Callback()
{
public void surfaceChanged(SurfaceHolder holder, int format,
@@ -690,6 +705,7 @@
/*
* release the media player in any state
*/
+ @UnsupportedAppUsage
private void release(boolean cleartargetstate) {
if (mMediaPlayer != null) {
mMediaPlayer.reset();
diff --git a/core/java/android/widget/VideoView2.java b/core/java/android/widget/VideoView2.java
index 388eae2..0724294a 100644
--- a/core/java/android/widget/VideoView2.java
+++ b/core/java/android/widget/VideoView2.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.media.AudioAttributes;
import android.media.AudioManager;
@@ -202,6 +203,7 @@
* @throws IllegalStateException if interal MediaSession is not created yet.
* @hide TODO: remove
*/
+ @UnsupportedAppUsage
public MediaController getMediaController() {
return mProvider.getMediaController_impl();
}
@@ -285,6 +287,7 @@
*
* @hide TODO remove
*/
+ @UnsupportedAppUsage
public void setVideoPath(String path) {
mProvider.setVideoPath_impl(path);
}
@@ -380,6 +383,7 @@
* @hide
*/
@VisibleForTesting
+ @UnsupportedAppUsage
public void setOnViewTypeChangedListener(OnViewTypeChangedListener l) {
mProvider.setOnViewTypeChangedListener_impl(l);
}
@@ -410,6 +414,7 @@
* <li>{@link #VIEW_TYPE_TEXTUREVIEW}
* </ul>
*/
+ @UnsupportedAppUsage
void onViewTypeChanged(View view, @ViewType int viewType);
}
diff --git a/core/java/android/widget/ViewAnimator.java b/core/java/android/widget/ViewAnimator.java
index 1580f51..598a407 100644
--- a/core/java/android/widget/ViewAnimator.java
+++ b/core/java/android/widget/ViewAnimator.java
@@ -18,6 +18,7 @@
import android.annotation.AnimRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
@@ -36,7 +37,9 @@
*/
public class ViewAnimator extends FrameLayout {
+ @UnsupportedAppUsage
int mWhichChild = 0;
+ @UnsupportedAppUsage
boolean mFirstTime = true;
boolean mAnimateFirstTime = true;
@@ -147,6 +150,7 @@
* @param animate Whether or not to use the in and out animations, defaults
* to true.
*/
+ @UnsupportedAppUsage
void showOnly(int childIndex, boolean animate) {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
diff --git a/core/java/android/widget/ViewFlipper.java b/core/java/android/widget/ViewFlipper.java
index e769d71..5e72b2e 100644
--- a/core/java/android/widget/ViewFlipper.java
+++ b/core/java/android/widget/ViewFlipper.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -47,6 +48,7 @@
private boolean mRunning = false;
private boolean mStarted = false;
private boolean mVisible = false;
+ @UnsupportedAppUsage
private boolean mUserPresent = true;
public ViewFlipper(Context context) {
@@ -168,6 +170,7 @@
* addition to queuing future flips. If omitted, defaults to
* true.
*/
+ @UnsupportedAppUsage
private void updateRunning(boolean flipNow) {
boolean running = mVisible && mStarted && mUserPresent;
if (running != mRunning) {
diff --git a/core/java/android/widget/ZoomControls.java b/core/java/android/widget/ZoomControls.java
index 66c052b..dd6a27b8f 100644
--- a/core/java/android/widget/ZoomControls.java
+++ b/core/java/android/widget/ZoomControls.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.Widget;
import android.content.Context;
import android.util.AttributeSet;
@@ -33,7 +34,9 @@
@Widget
public class ZoomControls extends LinearLayout {
+ @UnsupportedAppUsage
private final ZoomButton mZoomIn;
+ @UnsupportedAppUsage
private final ZoomButton mZoomOut;
public ZoomControls(Context context) {
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index 7321721..d7031ea 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -21,6 +21,7 @@
import com.android.internal.R;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -71,9 +72,11 @@
private final DialogInterface mDialogInterface;
protected final Window mWindow;
+ @UnsupportedAppUsage
private CharSequence mTitle;
protected CharSequence mMessage;
protected ListView mListView;
+ @UnsupportedAppUsage
private View mView;
private int mViewLayoutResId;
@@ -107,8 +110,10 @@
private MovementMethod mMessageMovementMethod;
@Layout.HyphenationFrequency
private Integer mMessageHyphenationFrequency;
+ @UnsupportedAppUsage
private View mCustomTitleView;
+ @UnsupportedAppUsage
private boolean mForceInverseBackground;
private ListAdapter mAdapter;
@@ -198,6 +203,7 @@
}
}
+ @UnsupportedAppUsage
protected AlertController(Context context, DialogInterface di, Window window) {
mContext = context;
mDialogInterface = di;
@@ -258,6 +264,7 @@
installContent();
}
+ @UnsupportedAppUsage
public void installContent() {
int contentView = selectContentView();
mWindow.setContentView(contentView);
@@ -275,6 +282,7 @@
return mAlertDialogLayout;
}
+ @UnsupportedAppUsage
public void setTitle(CharSequence title) {
mTitle = title;
if (mTitleView != null) {
@@ -285,10 +293,12 @@
/**
* @see AlertDialog.Builder#setCustomTitle(View)
*/
+ @UnsupportedAppUsage
public void setCustomTitle(View customTitleView) {
mCustomTitleView = customTitleView;
}
+ @UnsupportedAppUsage
public void setMessage(CharSequence message) {
mMessage = message;
if (mMessageView != null) {
@@ -323,6 +333,7 @@
/**
* Set the view to display in the dialog.
*/
+ @UnsupportedAppUsage
public void setView(View view) {
mView = view;
mViewLayoutResId = 0;
@@ -362,6 +373,7 @@
* @param listener The {@link DialogInterface.OnClickListener} to use.
* @param msg The {@link Message} to be sent when clicked.
*/
+ @UnsupportedAppUsage
public void setButton(int whichButton, CharSequence text,
DialogInterface.OnClickListener listener, Message msg) {
@@ -397,6 +409,7 @@
* @param resId the resource identifier of the drawable to use as the icon,
* or 0 for no icon
*/
+ @UnsupportedAppUsage
public void setIcon(int resId) {
mIcon = null;
mIconId = resId;
@@ -416,6 +429,7 @@
*
* @param icon the drawable to use as the icon or null for no icon
*/
+ @UnsupportedAppUsage
public void setIcon(Drawable icon) {
mIcon = icon;
mIconId = 0;
@@ -446,10 +460,12 @@
mForceInverseBackground = forceInverseBackground;
}
+ @UnsupportedAppUsage
public ListView getListView() {
return mListView;
}
+ @UnsupportedAppUsage
public Button getButton(int whichButton) {
switch (whichButton) {
case DialogInterface.BUTTON_POSITIVE:
@@ -464,11 +480,13 @@
}
@SuppressWarnings({"UnusedDeclaration"})
+ @UnsupportedAppUsage
public boolean onKeyDown(int keyCode, KeyEvent event) {
return mScrollView != null && mScrollView.executeKeyEvent(event);
}
@SuppressWarnings({"UnusedDeclaration"})
+ @UnsupportedAppUsage
public boolean onKeyUp(int keyCode, KeyEvent event) {
return mScrollView != null && mScrollView.executeKeyEvent(event);
}
@@ -932,10 +950,12 @@
boolean mRecycleOnMeasure = true;
+ @UnsupportedAppUsage
public RecycleListView(Context context) {
this(context, null);
}
+ @UnsupportedAppUsage
public RecycleListView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -964,44 +984,74 @@
}
public static class AlertParams {
+ @UnsupportedAppUsage
public final Context mContext;
+ @UnsupportedAppUsage
public final LayoutInflater mInflater;
+ @UnsupportedAppUsage
public int mIconId = 0;
+ @UnsupportedAppUsage
public Drawable mIcon;
public int mIconAttrId = 0;
+ @UnsupportedAppUsage
public CharSequence mTitle;
+ @UnsupportedAppUsage
public View mCustomTitleView;
+ @UnsupportedAppUsage
public CharSequence mMessage;
+ @UnsupportedAppUsage
public CharSequence mPositiveButtonText;
+ @UnsupportedAppUsage
public DialogInterface.OnClickListener mPositiveButtonListener;
+ @UnsupportedAppUsage
public CharSequence mNegativeButtonText;
+ @UnsupportedAppUsage
public DialogInterface.OnClickListener mNegativeButtonListener;
+ @UnsupportedAppUsage
public CharSequence mNeutralButtonText;
+ @UnsupportedAppUsage
public DialogInterface.OnClickListener mNeutralButtonListener;
+ @UnsupportedAppUsage
public boolean mCancelable;
+ @UnsupportedAppUsage
public DialogInterface.OnCancelListener mOnCancelListener;
+ @UnsupportedAppUsage
public DialogInterface.OnDismissListener mOnDismissListener;
+ @UnsupportedAppUsage
public DialogInterface.OnKeyListener mOnKeyListener;
+ @UnsupportedAppUsage
public CharSequence[] mItems;
+ @UnsupportedAppUsage
public ListAdapter mAdapter;
+ @UnsupportedAppUsage
public DialogInterface.OnClickListener mOnClickListener;
public int mViewLayoutResId;
+ @UnsupportedAppUsage
public View mView;
public int mViewSpacingLeft;
public int mViewSpacingTop;
public int mViewSpacingRight;
public int mViewSpacingBottom;
public boolean mViewSpacingSpecified = false;
+ @UnsupportedAppUsage
public boolean[] mCheckedItems;
+ @UnsupportedAppUsage
public boolean mIsMultiChoice;
+ @UnsupportedAppUsage
public boolean mIsSingleChoice;
+ @UnsupportedAppUsage
public int mCheckedItem = -1;
+ @UnsupportedAppUsage
public DialogInterface.OnMultiChoiceClickListener mOnCheckboxClickListener;
+ @UnsupportedAppUsage
public Cursor mCursor;
+ @UnsupportedAppUsage
public String mLabelColumn;
+ @UnsupportedAppUsage
public String mIsCheckedColumn;
public boolean mForceInverseBackground;
+ @UnsupportedAppUsage
public AdapterView.OnItemSelectedListener mOnItemSelectedListener;
public OnPrepareListViewListener mOnPrepareListViewListener;
public boolean mRecycleOnMeasure = true;
@@ -1019,12 +1069,14 @@
void onPrepareListView(ListView listView);
}
+ @UnsupportedAppUsage
public AlertParams(Context context) {
mContext = context;
mCancelable = true;
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
+ @UnsupportedAppUsage
public void apply(AlertController dialog) {
if (mCustomTitleView != null) {
dialog.setCustomTitle(mCustomTitleView);
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/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java
index 1b3faf5..119f30d 100644
--- a/core/java/com/android/internal/app/WindowDecorActionBar.java
+++ b/core/java/com/android/internal/app/WindowDecorActionBar.java
@@ -33,6 +33,7 @@
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActionBar;
import android.app.Activity;
import android.app.Dialog;
@@ -79,6 +80,7 @@
private ActionBarOverlayLayout mOverlayLayout;
private ActionBarContainer mContainerView;
private DecorToolbar mDecorToolbar;
+ @UnsupportedAppUsage
private ActionBarContextView mContextView;
private ActionBarContainer mSplitView;
private View mContentView;
diff --git a/core/java/com/android/internal/app/procstats/AssociationState.java b/core/java/com/android/internal/app/procstats/AssociationState.java
index f63c43f..115ba18 100644
--- a/core/java/com/android/internal/app/procstats/AssociationState.java
+++ b/core/java/com/android/internal/app/procstats/AssociationState.java
@@ -20,9 +20,12 @@
import android.os.Parcel;
import android.os.SystemClock;
import android.os.UserHandle;
+import android.service.procstats.ProcessStatsAssociationStateProto;
+import android.service.procstats.ProcessStatsStateProto;
import android.util.ArrayMap;
import android.util.Slog;
import android.util.TimeUtils;
+import android.util.proto.ProtoOutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -656,6 +659,55 @@
}
}
+ public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
+ final long token = proto.start(fieldId);
+
+ proto.write(ProcessStatsAssociationStateProto.COMPONENT_NAME, mName);
+ final int NSRC = mSources.size();
+ for (int isrc = 0; isrc < NSRC; isrc++) {
+ final SourceKey key = mSources.keyAt(isrc);
+ final SourceState src = mSources.valueAt(isrc);
+ final long sourceToken = proto.start(ProcessStatsAssociationStateProto.SOURCES);
+ proto.write(ProcessStatsAssociationStateProto.Source.PROCESS, key.mProcess);
+ proto.write(ProcessStatsAssociationStateProto.Source.UID, key.mUid);
+ proto.write(ProcessStatsAssociationStateProto.Source.TOTAL_COUNT, src.mCount);
+ long duration = src.mDuration;
+ if (src.mNesting > 0) {
+ duration += now - src.mStartUptime;
+ }
+ proto.write(ProcessStatsAssociationStateProto.Source.TOTAL_DURATION_MS, duration);
+ if (src.mActiveCount != 0) {
+ proto.write(ProcessStatsAssociationStateProto.Source.ACTIVE_COUNT,
+ src.mActiveCount);
+ }
+ final long timeNow = src.mActiveStartUptime != 0 ? (now-src.mActiveStartUptime) : 0;
+ if (src.mDurations != null) {
+ final int N = src.mDurations.getKeyCount();
+ for (int i=0; i<N; i++) {
+ final int dkey = src.mDurations.getKeyAt(i);
+ duration = src.mDurations.getValue(dkey);
+ if (dkey == src.mActiveProcState) {
+ duration += timeNow;
+ }
+ final int procState = SparseMappingTable.getIdFromKey(dkey);
+ DumpUtils.printProcStateDurationProto(proto,
+ ProcessStatsAssociationStateProto.Source.ACTIVE_STATES,
+ procState, duration);
+ }
+ } else {
+ duration = src.mActiveDuration + timeNow;
+ if (duration != 0) {
+ DumpUtils.printProcStateDurationProto(proto,
+ ProcessStatsAssociationStateProto.Source.ACTIVE_STATES,
+ src.mActiveProcState, duration);
+ }
+ }
+ proto.end(sourceToken);
+ }
+
+ proto.end(token);
+ }
+
public String toString() {
return "AssociationState{" + Integer.toHexString(System.identityHashCode(this))
+ " " + mName + " pkg=" + mPackageState.mPackageName + " proc="
diff --git a/core/java/com/android/internal/app/procstats/DumpUtils.java b/core/java/com/android/internal/app/procstats/DumpUtils.java
index e6073e5..701391d 100644
--- a/core/java/com/android/internal/app/procstats/DumpUtils.java
+++ b/core/java/com/android/internal/app/procstats/DumpUtils.java
@@ -16,32 +16,15 @@
package com.android.internal.app.procstats;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.SystemClock;
-import android.os.SystemProperties;
import android.os.UserHandle;
-import android.service.procstats.ProcessStatsProto;
-import android.text.format.DateFormat;
-import android.util.ArrayMap;
-import android.util.ArraySet;
-import android.util.DebugUtils;
-import android.util.Log;
-import android.util.Slog;
-import android.util.SparseArray;
+import android.service.procstats.ProcessStatsStateProto;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
import static com.android.internal.app.procstats.ProcessStats.*;
-import java.io.IOException;
-import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Objects;
/**
* Utilities for dumping.
@@ -124,20 +107,20 @@
STATE_TAGS[STATE_CACHED_EMPTY] = "e";
STATE_PROTO_ENUMS = new int[STATE_COUNT];
- STATE_PROTO_ENUMS[STATE_PERSISTENT] = ProcessStatsProto.State.PERSISTENT;
- STATE_PROTO_ENUMS[STATE_TOP] = ProcessStatsProto.State.TOP;
- STATE_PROTO_ENUMS[STATE_IMPORTANT_FOREGROUND] = ProcessStatsProto.State.IMPORTANT_FOREGROUND;
- STATE_PROTO_ENUMS[STATE_IMPORTANT_BACKGROUND] = ProcessStatsProto.State.IMPORTANT_BACKGROUND;
- STATE_PROTO_ENUMS[STATE_BACKUP] = ProcessStatsProto.State.BACKUP;
- STATE_PROTO_ENUMS[STATE_SERVICE] = ProcessStatsProto.State.SERVICE;
- STATE_PROTO_ENUMS[STATE_SERVICE_RESTARTING] = ProcessStatsProto.State.SERVICE_RESTARTING;
- STATE_PROTO_ENUMS[STATE_RECEIVER] = ProcessStatsProto.State.RECEIVER;
- STATE_PROTO_ENUMS[STATE_HEAVY_WEIGHT] = ProcessStatsProto.State.HEAVY_WEIGHT;
- STATE_PROTO_ENUMS[STATE_HOME] = ProcessStatsProto.State.HOME;
- STATE_PROTO_ENUMS[STATE_LAST_ACTIVITY] = ProcessStatsProto.State.LAST_ACTIVITY;
- STATE_PROTO_ENUMS[STATE_CACHED_ACTIVITY] = ProcessStatsProto.State.CACHED_ACTIVITY;
- STATE_PROTO_ENUMS[STATE_CACHED_ACTIVITY_CLIENT] = ProcessStatsProto.State.CACHED_ACTIVITY_CLIENT;
- STATE_PROTO_ENUMS[STATE_CACHED_EMPTY] = ProcessStatsProto.State.CACHED_EMPTY;
+ STATE_PROTO_ENUMS[STATE_PERSISTENT] = ProcessStatsStateProto.PERSISTENT;
+ STATE_PROTO_ENUMS[STATE_TOP] = ProcessStatsStateProto.TOP;
+ STATE_PROTO_ENUMS[STATE_IMPORTANT_FOREGROUND] = ProcessStatsStateProto.IMPORTANT_FOREGROUND;
+ STATE_PROTO_ENUMS[STATE_IMPORTANT_BACKGROUND] = ProcessStatsStateProto.IMPORTANT_BACKGROUND;
+ STATE_PROTO_ENUMS[STATE_BACKUP] = ProcessStatsStateProto.BACKUP;
+ STATE_PROTO_ENUMS[STATE_SERVICE] = ProcessStatsStateProto.SERVICE;
+ STATE_PROTO_ENUMS[STATE_SERVICE_RESTARTING] = ProcessStatsStateProto.SERVICE_RESTARTING;
+ STATE_PROTO_ENUMS[STATE_RECEIVER] = ProcessStatsStateProto.RECEIVER;
+ STATE_PROTO_ENUMS[STATE_HEAVY_WEIGHT] = ProcessStatsStateProto.HEAVY_WEIGHT;
+ STATE_PROTO_ENUMS[STATE_HOME] = ProcessStatsStateProto.HOME;
+ STATE_PROTO_ENUMS[STATE_LAST_ACTIVITY] = ProcessStatsStateProto.LAST_ACTIVITY;
+ STATE_PROTO_ENUMS[STATE_CACHED_ACTIVITY] = ProcessStatsStateProto.CACHED_ACTIVITY;
+ STATE_PROTO_ENUMS[STATE_CACHED_ACTIVITY_CLIENT] = ProcessStatsStateProto.CACHED_ACTIVITY_CLIENT;
+ STATE_PROTO_ENUMS[STATE_CACHED_EMPTY] = ProcessStatsStateProto.CACHED_EMPTY;
}
public static final String[] ADJ_SCREEN_NAMES_CSV = new String[] {
@@ -155,8 +138,8 @@
};
static final int[] ADJ_SCREEN_PROTO_ENUMS = new int[] {
- ProcessStatsProto.State.OFF,
- ProcessStatsProto.State.ON
+ ProcessStatsStateProto.OFF,
+ ProcessStatsStateProto.ON
};
static final String[] ADJ_MEM_TAGS = new String[] {
@@ -164,10 +147,10 @@
};
static final int[] ADJ_MEM_PROTO_ENUMS = new int[] {
- ProcessStatsProto.State.NORMAL,
- ProcessStatsProto.State.MODERATE,
- ProcessStatsProto.State.LOW,
- ProcessStatsProto.State.CRITICAL
+ ProcessStatsStateProto.NORMAL,
+ ProcessStatsStateProto.MODERATE,
+ ProcessStatsStateProto.LOW,
+ ProcessStatsStateProto.CRITICAL
};
static final String CSV_SEP = "\t";
@@ -281,6 +264,23 @@
printArrayEntry(pw, ADJ_MEM_TAGS, state, 1);
}
+ public static void printProcStateAdjTagProto(ProtoOutputStream proto, long screenId, long memId,
+ int state) {
+ state = printProto(proto, screenId, ADJ_SCREEN_PROTO_ENUMS,
+ state, ADJ_SCREEN_MOD * STATE_COUNT);
+ printProto(proto, memId, ADJ_MEM_PROTO_ENUMS, state, STATE_COUNT);
+ }
+
+ public static void printProcStateDurationProto(ProtoOutputStream proto, long fieldId,
+ int procState, long duration) {
+ final long stateToken = proto.start(fieldId);
+ DumpUtils.printProto(proto, ProcessStatsStateProto.PROCESS_STATE,
+ DumpUtils.STATE_PROTO_ENUMS, procState, 1);
+ proto.write(ProcessStatsStateProto.DURATION_MS, duration);
+ proto.end(stateToken);
+
+ }
+
public static void printProcStateTagAndValue(PrintWriter pw, int state, long value) {
pw.print(',');
printProcStateTag(pw, state);
diff --git a/core/java/com/android/internal/app/procstats/ProcessState.java b/core/java/com/android/internal/app/procstats/ProcessState.java
index 943c8bd..d7f4736 100644
--- a/core/java/com/android/internal/app/procstats/ProcessState.java
+++ b/core/java/com/android/internal/app/procstats/ProcessState.java
@@ -20,6 +20,7 @@
import android.os.SystemClock;
import android.os.UserHandle;
import android.service.procstats.ProcessStatsProto;
+import android.service.procstats.ProcessStatsStateProto;
import android.util.ArrayMap;
import android.util.DebugUtils;
import android.util.Log;
@@ -1377,14 +1378,14 @@
}
final long stateToken = proto.start(ProcessStatsProto.STATES);
DumpUtils.printProcStateTagProto(proto,
- ProcessStatsProto.State.SCREEN_STATE,
- ProcessStatsProto.State.MEMORY_STATE,
- ProcessStatsProto.State.PROCESS_STATE,
+ ProcessStatsStateProto.SCREEN_STATE,
+ ProcessStatsStateProto.MEMORY_STATE,
+ ProcessStatsStateProto.PROCESS_STATE,
type);
long duration = durationByState.get(type);
durationByState.delete(type); // remove the key since it is already being dumped.
- proto.write(ProcessStatsProto.State.DURATION_MS, duration);
+ proto.write(ProcessStatsStateProto.DURATION_MS, duration);
mPssTable.writeStatsToProtoForKey(proto, key);
@@ -1394,18 +1395,18 @@
for (int i = 0; i < durationByState.size(); i++) {
final long stateToken = proto.start(ProcessStatsProto.STATES);
DumpUtils.printProcStateTagProto(proto,
- ProcessStatsProto.State.SCREEN_STATE,
- ProcessStatsProto.State.MEMORY_STATE,
- ProcessStatsProto.State.PROCESS_STATE,
+ ProcessStatsStateProto.SCREEN_STATE,
+ ProcessStatsStateProto.MEMORY_STATE,
+ ProcessStatsStateProto.PROCESS_STATE,
durationByState.keyAt(i));
- proto.write(ProcessStatsProto.State.DURATION_MS, durationByState.valueAt(i));
+ proto.write(ProcessStatsStateProto.DURATION_MS, durationByState.valueAt(i));
proto.end(stateToken);
}
final long totalRunningDuration = getTotalRunningDuration(now);
if (totalRunningDuration > 0) {
final long stateToken = proto.start(ProcessStatsProto.TOTAL_RUNNING_STATE);
- proto.write(ProcessStatsProto.State.DURATION_MS, totalRunningDuration);
+ proto.write(ProcessStatsStateProto.DURATION_MS, totalRunningDuration);
if (mTotalRunningPss[PSS_SAMPLE_COUNT] != 0) {
PssTable.writeStatsToProto(proto, mTotalRunningPss, 0);
}
diff --git a/core/java/com/android/internal/app/procstats/ProcessStats.java b/core/java/com/android/internal/app/procstats/ProcessStats.java
index d088354..b6624a2 100644
--- a/core/java/com/android/internal/app/procstats/ProcessStats.java
+++ b/core/java/com/android/internal/app/procstats/ProcessStats.java
@@ -23,6 +23,7 @@
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
+import android.service.procstats.ProcessStatsPackageProto;
import android.service.procstats.ProcessStatsSectionProto;
import android.text.format.DateFormat;
import android.util.ArrayMap;
@@ -47,8 +48,8 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.Objects;
-import java.util.regex.Pattern;
import java.util.regex.Matcher;
+import java.util.regex.Pattern;
public final class ProcessStats implements Parcelable {
public static final String TAG = "ProcessStats";
@@ -2013,10 +2014,8 @@
}
public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
- final ArrayMap<String, SparseArray<LongSparseArray<PackageState>>> pkgMap =
- mPackages.getMap();
-
final long token = proto.start(fieldId);
+
proto.write(ProcessStatsSectionProto.START_REALTIME_MS, mTimePeriodStartRealtime);
proto.write(ProcessStatsSectionProto.END_REALTIME_MS,
mRunning ? SystemClock.elapsedRealtime() : mTimePeriodEndRealtime);
@@ -2041,16 +2040,31 @@
proto.write(ProcessStatsSectionProto.STATUS, ProcessStatsSectionProto.STATUS_PARTIAL);
}
- ArrayMap<String, SparseArray<ProcessState>> procMap = mProcesses.getMap();
+ final ArrayMap<String, SparseArray<ProcessState>> procMap = mProcesses.getMap();
for (int ip=0; ip<procMap.size(); ip++) {
- String procName = procMap.keyAt(ip);
- SparseArray<ProcessState> uids = procMap.valueAt(ip);
+ final String procName = procMap.keyAt(ip);
+ final SparseArray<ProcessState> uids = procMap.valueAt(ip);
for (int iu=0; iu<uids.size(); iu++) {
final int uid = uids.keyAt(iu);
final ProcessState procState = uids.valueAt(iu);
- procState.writeToProto(proto, ProcessStatsSectionProto.PROCESS_STATS, procName, uid, now);
+ procState.writeToProto(proto, ProcessStatsSectionProto.PROCESS_STATS, procName,
+ uid, now);
}
}
+
+ final ArrayMap<String, SparseArray<LongSparseArray<PackageState>>> pkgMap =
+ mPackages.getMap();
+ for (int ip = 0; ip < pkgMap.size(); ip++) {
+ final SparseArray<LongSparseArray<PackageState>> uids = pkgMap.valueAt(ip);
+ for (int iu = 0; iu < uids.size(); iu++) {
+ final LongSparseArray<PackageState> vers = uids.valueAt(iu);
+ for (int iv = 0; iv < vers.size(); iv++) {
+ final PackageState pkgState = vers.valueAt(iv);
+ pkgState.writeToProto(proto, ProcessStatsSectionProto.PACKAGE_STATS, now);
+ }
+ }
+ }
+
proto.end(token);
}
@@ -2095,6 +2109,33 @@
if (DEBUG) Slog.d(TAG, "GETASC: creating " + as + " in " + proc.getName());
return as;
}
+
+ public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
+ final long token = proto.start(fieldId);
+
+ proto.write(ProcessStatsPackageProto.PACKAGE, mPackageName);
+ proto.write(ProcessStatsPackageProto.UID, mUid);
+ proto.write(ProcessStatsPackageProto.VERSION, mVersionCode);
+
+ for (int ip = 0; ip < mProcesses.size(); ip++) {
+ final String procName = mProcesses.keyAt(ip);
+ final ProcessState procState = mProcesses.valueAt(ip);
+ procState.writeToProto(proto, ProcessStatsPackageProto.PROCESS_STATS, procName,
+ mUid, now);
+ }
+
+ for (int is = 0; is < mServices.size(); is++) {
+ final ServiceState serviceState = mServices.valueAt(is);
+ serviceState.writeToProto(proto, ProcessStatsPackageProto.PROCESS_STATS, now);
+ }
+
+ for (int ia=0; ia<mAssociations.size(); ia++) {
+ final AssociationState ascState = mAssociations.valueAt(ia);
+ ascState.writeToProto(proto, ProcessStatsPackageProto.ASSOCIATION_STATS, now);
+ }
+
+ proto.end(token);
+ }
}
public static final class ProcessDataCollection {
diff --git a/core/java/com/android/internal/app/procstats/PssTable.java b/core/java/com/android/internal/app/procstats/PssTable.java
index f858e55..fc93c3a 100644
--- a/core/java/com/android/internal/app/procstats/PssTable.java
+++ b/core/java/com/android/internal/app/procstats/PssTable.java
@@ -28,7 +28,7 @@
import static com.android.internal.app.procstats.ProcessStats.PSS_USS_MAXIMUM;
import static com.android.internal.app.procstats.ProcessStats.PSS_COUNT;
-import android.service.procstats.ProcessStatsProto;
+import android.service.procstats.ProcessStatsStateProto;
import android.util.proto.ProtoOutputStream;
import android.util.proto.ProtoUtils;
@@ -153,16 +153,16 @@
public static void writeStatsToProto(ProtoOutputStream proto, final long[] stats,
final int statsIndex) {
- proto.write(ProcessStatsProto.State.SAMPLE_SIZE, stats[statsIndex + PSS_SAMPLE_COUNT]);
- ProtoUtils.toAggStatsProto(proto, ProcessStatsProto.State.PSS,
+ proto.write(ProcessStatsStateProto.SAMPLE_SIZE, stats[statsIndex + PSS_SAMPLE_COUNT]);
+ ProtoUtils.toAggStatsProto(proto, ProcessStatsStateProto.PSS,
stats[statsIndex + PSS_MINIMUM],
stats[statsIndex + PSS_AVERAGE],
stats[statsIndex + PSS_MAXIMUM]);
- ProtoUtils.toAggStatsProto(proto, ProcessStatsProto.State.USS,
+ ProtoUtils.toAggStatsProto(proto, ProcessStatsStateProto.USS,
stats[statsIndex + PSS_USS_MINIMUM],
stats[statsIndex + PSS_USS_AVERAGE],
stats[statsIndex + PSS_USS_MAXIMUM]);
- ProtoUtils.toAggStatsProto(proto, ProcessStatsProto.State.RSS,
+ ProtoUtils.toAggStatsProto(proto, ProcessStatsStateProto.RSS,
stats[statsIndex + PSS_RSS_MINIMUM],
stats[statsIndex + PSS_RSS_AVERAGE],
stats[statsIndex + PSS_RSS_MAXIMUM]);
diff --git a/core/java/com/android/internal/app/procstats/ServiceState.java b/core/java/com/android/internal/app/procstats/ServiceState.java
index 04e61e0..16975a4 100644
--- a/core/java/com/android/internal/app/procstats/ServiceState.java
+++ b/core/java/com/android/internal/app/procstats/ServiceState.java
@@ -19,9 +19,16 @@
import android.os.Parcel;
import android.os.SystemClock;
+import android.service.procstats.ProcessStatsProto;
+import android.service.procstats.ProcessStatsServiceStateProto;
+import android.service.procstats.ProcessStatsStateProto;
import android.util.Slog;
+import android.util.SparseLongArray;
import android.util.TimeUtils;
+import android.util.proto.ProtoOutputStream;
+import android.util.proto.ProtoUtils;
+import static com.android.internal.app.procstats.ProcessStats.PSS_SAMPLE_COUNT;
import static com.android.internal.app.procstats.ProcessStats.STATE_NOTHING;
import java.io.PrintWriter;
@@ -550,6 +557,66 @@
pw.println();
}
+ public void writeToProto(ProtoOutputStream proto, long fieldId, long now) {
+ final long token = proto.start(fieldId);
+ proto.write(ProcessStatsServiceStateProto.SERVICE_NAME, mName);
+ writeTypeToProto(proto, ProcessStatsServiceStateProto.RUNNING_OP,
+ ServiceState.SERVICE_RUN, mRunCount, mRunState, mRunStartTime, now);
+ writeTypeToProto(proto, ProcessStatsServiceStateProto.STARTED_OP,
+ ServiceState.SERVICE_STARTED, mStartedCount, mStartedState, mStartedStartTime, now);
+ writeTypeToProto(proto, ProcessStatsServiceStateProto.FOREGROUND_OP,
+ ServiceState.SERVICE_FOREGROUND, mForegroundCount, mForegroundState,
+ mForegroundStartTime, now);
+ writeTypeToProto(proto, ProcessStatsServiceStateProto.BOUND_OP,
+ ServiceState.SERVICE_BOUND, mBoundCount, mBoundState, mBoundStartTime, now);
+ writeTypeToProto(proto, ProcessStatsServiceStateProto.EXECUTING_OP,
+ ServiceState.SERVICE_EXEC, mExecCount, mExecState, mExecStartTime, now);
+ proto.end(token);
+ }
+
+ public void writeTypeToProto(ProtoOutputStream proto, long fieldId, int serviceType,
+ int opCount, int curState, long curStartTime, long now) {
+ if (opCount <= 0) {
+ return;
+ }
+ final long token = proto.start(fieldId);
+
+ proto.write(ProcessStatsServiceStateProto.OperationInfo.COUNT, opCount);
+ boolean didCurState = false;
+ final int N = mDurations.getKeyCount();
+ for (int i=0; i<N; i++) {
+ final int key = mDurations.getKeyAt(i);
+ long time = mDurations.getValue(key);
+ int type = SparseMappingTable.getIdFromKey(key);
+ int memFactor = type / ServiceState.SERVICE_COUNT;
+ type %= ServiceState.SERVICE_COUNT;
+ if (type != serviceType) {
+ continue;
+ }
+ if (curState == memFactor) {
+ didCurState = true;
+ time += now - curStartTime;
+ }
+ final long stateToken = proto.start(ProcessStatsServiceStateProto.OperationInfo.STATES);
+ DumpUtils.printProcStateAdjTagProto(proto,
+ ProcessStatsStateProto.SCREEN_STATE,
+ ProcessStatsStateProto.MEMORY_STATE,
+ type);
+ proto.write(ProcessStatsStateProto.DURATION_MS, time);
+ proto.end(stateToken);
+ }
+ if (!didCurState && curState != STATE_NOTHING) {
+ final long stateToken = proto.start(ProcessStatsServiceStateProto.OperationInfo.STATES);
+ DumpUtils.printProcStateAdjTagProto(proto,
+ ProcessStatsStateProto.SCREEN_STATE,
+ ProcessStatsStateProto.MEMORY_STATE,
+ curState);
+ proto.write(ProcessStatsStateProto.DURATION_MS, now - curStartTime);
+ proto.end(stateToken);
+ }
+
+ proto.end(token);
+ }
public String toString() {
return "ServiceState{" + Integer.toHexString(System.identityHashCode(this))
diff --git a/core/java/com/android/internal/content/PackageMonitor.java b/core/java/com/android/internal/content/PackageMonitor.java
index 3f8fd9b..c928f3f 100644
--- a/core/java/com/android/internal/content/PackageMonitor.java
+++ b/core/java/com/android/internal/content/PackageMonitor.java
@@ -16,6 +16,7 @@
package com.android.internal.content;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
@@ -70,10 +71,12 @@
String[] mTempArray = new String[1];
+ @UnsupportedAppUsage
public void register(Context context, Looper thread, boolean externalStorage) {
register(context, thread, null, externalStorage);
}
+ @UnsupportedAppUsage
public void register(Context context, Looper thread, UserHandle user,
boolean externalStorage) {
register(context, user, externalStorage,
@@ -107,6 +110,7 @@
return mRegisteredHandler;
}
+ @UnsupportedAppUsage
public void unregister() {
if (mRegisteredContext == null) {
throw new IllegalStateException("Not registered");
@@ -134,6 +138,7 @@
/**
* Called when a package is really removed (and not replaced).
*/
+ @UnsupportedAppUsage
public void onPackageRemoved(String packageName, int uid) {
}
@@ -167,6 +172,7 @@
* default implementation returns true if this is a change to the entire
* package.
*/
+ @UnsupportedAppUsage
public boolean onPackageChanged(String packageName, int uid, String[] components) {
if (components != null) {
for (String name : components) {
@@ -246,6 +252,7 @@
return mAppearingPackages != null;
}
+ @UnsupportedAppUsage
public int isPackageDisappearing(String packageName) {
if (mDisappearingPackages != null) {
for (int i=mDisappearingPackages.length-1; i>=0; i--) {
@@ -265,6 +272,7 @@
return mChangeType == PACKAGE_UPDATING;
}
+ @UnsupportedAppUsage
public boolean isPackageModified(String packageName) {
if (mModifiedPackages != null) {
for (int i=mModifiedPackages.length-1; i>=0; i--) {
diff --git a/core/java/com/android/internal/content/ReferrerIntent.java b/core/java/com/android/internal/content/ReferrerIntent.java
index 76dcc9b..6d05f7e 100644
--- a/core/java/com/android/internal/content/ReferrerIntent.java
+++ b/core/java/com/android/internal/content/ReferrerIntent.java
@@ -16,6 +16,7 @@
package com.android.internal.content;
+import android.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.os.Parcel;
@@ -25,8 +26,10 @@
* Subclass of Intent that also contains referrer (as a package name) information.
*/
public class ReferrerIntent extends Intent {
+ @UnsupportedAppUsage
public final String mReferrer;
+ @UnsupportedAppUsage
public ReferrerIntent(Intent baseIntent, String referrer) {
super(baseIntent);
mReferrer = referrer;
diff --git a/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java b/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java
index 07bb453..8728367 100644
--- a/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java
+++ b/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java
@@ -36,17 +36,10 @@
public boolean enabled(int user) {
return pulseOnNotificationEnabled(user)
- || pulseOnPickupEnabled(user)
- || pulseOnDoubleTapEnabled(user)
|| pulseOnLongPressEnabled(user)
|| alwaysOnEnabled(user);
}
- public boolean available() {
- return pulseOnNotificationAvailable() || pulseOnPickupAvailable()
- || pulseOnDoubleTapAvailable();
- }
-
public boolean pulseOnNotificationEnabled(int user) {
return boolSettingDefaultOn(Settings.Secure.DOZE_ENABLED, user) && pulseOnNotificationAvailable();
}
@@ -55,36 +48,33 @@
return ambientDisplayAvailable();
}
- public boolean pulseOnPickupEnabled(int user) {
- boolean settingEnabled = boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_PICK_UP, user);
- return (settingEnabled || alwaysOnEnabled(user)) && pulseOnPickupAvailable();
+ public boolean pickupGestureEnabled(int user) {
+ return boolSettingDefaultOn(Settings.Secure.DOZE_PICK_UP_GESTURE, user)
+ && dozePickupSensorAvailable();
}
- public boolean pulseOnPickupAvailable() {
- return dozePulsePickupSensorAvailable() && ambientDisplayAvailable();
- }
-
- public boolean dozePulsePickupSensorAvailable() {
+ public boolean dozePickupSensorAvailable() {
return mContext.getResources().getBoolean(R.bool.config_dozePulsePickup);
}
- public boolean pulseOnPickupCanBeModified(int user) {
- return !alwaysOnEnabled(user);
- }
-
- public boolean pulseOnDoubleTapEnabled(int user) {
- return boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, user)
- && pulseOnDoubleTapAvailable();
- }
-
- public boolean pulseOnDoubleTapAvailable() {
- return doubleTapSensorAvailable() && ambientDisplayAvailable();
+ public boolean doubleTapGestureEnabled(int user) {
+ return boolSettingDefaultOn(Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, user)
+ && doubleTapSensorAvailable();
}
public boolean doubleTapSensorAvailable() {
return !TextUtils.isEmpty(doubleTapSensorType());
}
+ public boolean reachGestureEnabled(int user) {
+ return boolSettingDefaultOn(Settings.Secure.DOZE_REACH_GESTURE, user)
+ && reachGestureAvailable();
+ }
+
+ public boolean reachGestureAvailable() {
+ return !TextUtils.isEmpty(reachSensorType());
+ }
+
public String doubleTapSensorType() {
return mContext.getResources().getString(R.string.config_dozeDoubleTapSensorType);
}
@@ -93,6 +83,10 @@
return mContext.getResources().getString(R.string.config_dozeLongPressSensorType);
}
+ public String reachSensorType() {
+ return mContext.getResources().getString(R.string.config_dozeReachSensorType);
+ }
+
public boolean pulseOnLongPressEnabled(int user) {
return pulseOnLongPressAvailable() && boolSettingDefaultOff(
Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, user);
diff --git a/core/java/com/android/internal/logging/MetricsLogger.java b/core/java/com/android/internal/logging/MetricsLogger.java
index a482929..e99e39e 100644
--- a/core/java/com/android/internal/logging/MetricsLogger.java
+++ b/core/java/com/android/internal/logging/MetricsLogger.java
@@ -15,6 +15,7 @@
*/
package com.android.internal.logging;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.metrics.LogMaker;
import android.os.Build;
@@ -47,6 +48,7 @@
public static final int VIEW_UNKNOWN = MetricsEvent.VIEW_UNKNOWN;
public static final int LOGTAG = EventLogTags.SYSUI_MULTI_ACTION;
+ @UnsupportedAppUsage
public void write(LogMaker content) {
if (content.getType() == MetricsEvent.TYPE_UNKNOWN) {
content.setType(MetricsEvent.TYPE_ACTION);
diff --git a/core/java/com/android/internal/net/LegacyVpnInfo.java b/core/java/com/android/internal/net/LegacyVpnInfo.java
index d6f6d0b..9ee9710 100644
--- a/core/java/com/android/internal/net/LegacyVpnInfo.java
+++ b/core/java/com/android/internal/net/LegacyVpnInfo.java
@@ -16,6 +16,7 @@
package com.android.internal.net;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.net.NetworkInfo;
import android.os.Parcel;
@@ -38,7 +39,9 @@
public static final int STATE_TIMEOUT = 4;
public static final int STATE_FAILED = 5;
+ @UnsupportedAppUsage
public String key;
+ @UnsupportedAppUsage
public int state = -1;
public PendingIntent intent;
@@ -54,6 +57,7 @@
out.writeParcelable(intent, flags);
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<LegacyVpnInfo> CREATOR =
new Parcelable.Creator<LegacyVpnInfo>() {
@Override
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..fd03b3f 100644
--- a/core/java/com/android/internal/net/VpnConfig.java
+++ b/core/java/com/android/internal/net/VpnConfig.java
@@ -16,6 +16,7 @@
package com.android.internal.net;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@@ -35,6 +36,7 @@
import java.net.Inet4Address;
import java.net.InetAddress;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/**
@@ -195,4 +197,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/net/VpnProfile.java b/core/java/com/android/internal/net/VpnProfile.java
index b46bfef..bc4b5fe 100644
--- a/core/java/com/android/internal/net/VpnProfile.java
+++ b/core/java/com/android/internal/net/VpnProfile.java
@@ -16,6 +16,7 @@
package com.android.internal.net;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -45,10 +46,15 @@
public static final int TYPE_MAX = 5;
// Entity fields.
+ @UnsupportedAppUsage
public final String key; // -1
+ @UnsupportedAppUsage
public String name = ""; // 0
+ @UnsupportedAppUsage
public int type = TYPE_PPTP; // 1
+ @UnsupportedAppUsage
public String server = ""; // 2
+ @UnsupportedAppUsage
public String username = ""; // 3
public String password = ""; // 4
public String dnsServers = ""; // 5
@@ -63,12 +69,14 @@
public String ipsecServerCert = "";// 14
// Helper fields.
+ @UnsupportedAppUsage
public boolean saveLogin = false;
public VpnProfile(String key) {
this.key = key;
}
+ @UnsupportedAppUsage
public VpnProfile(Parcel in) {
key = in.readString();
name = in.readString();
@@ -110,6 +118,7 @@
out.writeInt(saveLogin ? 1 : 0);
}
+ @UnsupportedAppUsage
public static VpnProfile decode(String key, byte[] value) {
try {
if (key == null) {
diff --git a/core/java/com/android/internal/os/AtomicFile.java b/core/java/com/android/internal/os/AtomicFile.java
index 5a83f33..e177fe3 100644
--- a/core/java/com/android/internal/os/AtomicFile.java
+++ b/core/java/com/android/internal/os/AtomicFile.java
@@ -16,6 +16,7 @@
package com.android.internal.os;
+import android.annotation.UnsupportedAppUsage;
import android.os.FileUtils;
import android.util.Log;
@@ -44,15 +45,18 @@
private final File mBaseName;
private final File mBackupName;
+ @UnsupportedAppUsage
public AtomicFile(File baseName) {
mBaseName = baseName;
mBackupName = new File(baseName.getPath() + ".bak");
}
+ @UnsupportedAppUsage
public File getBaseFile() {
return mBaseName;
}
+ @UnsupportedAppUsage
public FileOutputStream startWrite() throws IOException {
// Rename the current file so it may be used as a backup during the next read
if (mBaseName.exists()) {
@@ -86,6 +90,7 @@
return str;
}
+ @UnsupportedAppUsage
public void finishWrite(FileOutputStream str) {
if (str != null) {
FileUtils.sync(str);
@@ -98,6 +103,7 @@
}
}
+ @UnsupportedAppUsage
public void failWrite(FileOutputStream str) {
if (str != null) {
FileUtils.sync(str);
@@ -111,6 +117,7 @@
}
}
+ @UnsupportedAppUsage
public FileOutputStream openAppend() throws IOException {
try {
return new FileOutputStream(mBaseName, true);
@@ -119,6 +126,7 @@
}
}
+ @UnsupportedAppUsage
public void truncate() throws IOException {
try {
FileOutputStream fos = new FileOutputStream(mBaseName);
@@ -139,6 +147,7 @@
mBackupName.delete();
}
+ @UnsupportedAppUsage
public FileInputStream openRead() throws FileNotFoundException {
if (mBackupName.exists()) {
mBaseName.delete();
@@ -147,6 +156,7 @@
return new FileInputStream(mBaseName);
}
+ @UnsupportedAppUsage
public byte[] readFully() throws IOException {
FileInputStream stream = openRead();
try {
diff --git a/core/java/com/android/internal/os/BatterySipper.java b/core/java/com/android/internal/os/BatterySipper.java
index 5abc6d4..0baf73c 100644
--- a/core/java/com/android/internal/os/BatterySipper.java
+++ b/core/java/com/android/internal/os/BatterySipper.java
@@ -15,6 +15,7 @@
*/
package com.android.internal.os;
+import android.annotation.UnsupportedAppUsage;
import android.os.BatteryStats.Uid;
import java.util.List;
@@ -23,8 +24,11 @@
* Contains power usage of an application, system service, or hardware type.
*/
public class BatterySipper implements Comparable<BatterySipper> {
+ @UnsupportedAppUsage
public int userId;
+ @UnsupportedAppUsage
public Uid uidObj;
+ @UnsupportedAppUsage
public DrainType drainType;
/**
@@ -53,6 +57,7 @@
/**
* Total power before smearing
*/
+ @UnsupportedAppUsage
public double totalPowerMah;
/**
@@ -65,6 +70,7 @@
/**
* Generic usage time in milliseconds.
*/
+ @UnsupportedAppUsage
public long usageTimeMs;
/**
@@ -76,12 +82,17 @@
public long audioTimeMs;
public long bluetoothRunningTimeMs;
public long cameraTimeMs;
+ @UnsupportedAppUsage
public long cpuFgTimeMs;
+ @UnsupportedAppUsage
public long cpuTimeMs;
public long flashlightTimeMs;
+ @UnsupportedAppUsage
public long gpsTimeMs;
public long videoTimeMs;
+ @UnsupportedAppUsage
public long wakeLockTimeMs;
+ @UnsupportedAppUsage
public long wifiRunningTimeMs;
public long mobileRxPackets;
@@ -99,7 +110,9 @@
public long btTxBytes;
public double percent;
public double noCoveragePercent;
+ @UnsupportedAppUsage
public String[] mPackages;
+ @UnsupportedAppUsage
public String packageWithHighestDrain;
// Measured in mAh (milli-ampere per hour).
@@ -107,6 +120,7 @@
public double audioPowerMah;
public double bluetoothPowerMah;
public double cameraPowerMah;
+ @UnsupportedAppUsage
public double cpuPowerMah;
public double flashlightPowerMah;
public double gpsPowerMah;
@@ -118,6 +132,7 @@
public enum DrainType {
AMBIENT_DISPLAY,
+ @UnsupportedAppUsage
APP,
BLUETOOTH,
CAMERA,
@@ -133,6 +148,7 @@
WIFI,
}
+ @UnsupportedAppUsage
public BatterySipper(DrainType drainType, Uid uid, double value) {
this.totalPowerMah = value;
this.drainType = drainType;
@@ -162,10 +178,12 @@
/**
* Gets a list of packages associated with the current user
*/
+ @UnsupportedAppUsage
public String[] getPackages() {
return mPackages;
}
+ @UnsupportedAppUsage
public int getUid() {
// Bail out if the current sipper is not an App sipper.
if (uidObj == null) {
@@ -177,6 +195,7 @@
/**
* Add stats from other to this BatterySipper.
*/
+ @UnsupportedAppUsage
public void add(BatterySipper other) {
totalPowerMah += other.totalPowerMah;
usageTimeMs += other.usageTimeMs;
diff --git a/core/java/com/android/internal/os/BatteryStatsHelper.java b/core/java/com/android/internal/os/BatteryStatsHelper.java
index a6b29c5..ead98e7 100644
--- a/core/java/com/android/internal/os/BatteryStatsHelper.java
+++ b/core/java/com/android/internal/os/BatteryStatsHelper.java
@@ -16,6 +16,7 @@
package com.android.internal.os;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -31,6 +32,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;
@@ -74,9 +76,11 @@
final private boolean mCollectBatteryBroadcast;
final private boolean mWifiOnly;
+ @UnsupportedAppUsage
private IBatteryStats mBatteryInfo;
private BatteryStats mStats;
private Intent mBatteryBroadcast;
+ @UnsupportedAppUsage
private PowerProfile mPowerProfile;
private String[] mSystemPackageArray;
@@ -86,6 +90,7 @@
/**
* List of apps using power.
*/
+ @UnsupportedAppUsage
private final List<BatterySipper> mUsageList = new ArrayList<>();
/**
@@ -165,14 +170,17 @@
profile.getAveragePower(PowerProfile.POWER_BLUETOOTH_CONTROLLER_TX) != 0;
}
+ @UnsupportedAppUsage
public BatteryStatsHelper(Context context) {
this(context, true);
}
+ @UnsupportedAppUsage
public BatteryStatsHelper(Context context, boolean collectBatteryBroadcast) {
this(context, collectBatteryBroadcast, checkWifiOnly(context));
}
+ @UnsupportedAppUsage
public BatteryStatsHelper(Context context, boolean collectBatteryBroadcast, boolean wifiOnly) {
mContext = context;
mCollectBatteryBroadcast = collectBatteryBroadcast;
@@ -240,6 +248,7 @@
ServiceManager.getService(BatteryStats.SERVICE_NAME)));
}
+ @UnsupportedAppUsage
public static void dropFile(Context context, String fname) {
makeFilePath(context, fname).delete();
}
@@ -249,10 +258,12 @@
}
/** Clears the current stats and forces recreating for future use. */
+ @UnsupportedAppUsage
public void clearStats() {
mStats = null;
}
+ @UnsupportedAppUsage
public BatteryStats getStats() {
if (mStats == null) {
load();
@@ -260,6 +271,7 @@
return mStats;
}
+ @UnsupportedAppUsage
public Intent getBatteryBroadcast() {
if (mBatteryBroadcast == null && mCollectBatteryBroadcast) {
load();
@@ -276,6 +288,7 @@
mStats = stats;
}
+ @UnsupportedAppUsage
public void create(Bundle icicle) {
if (icicle != null) {
mStats = sStatsXfer;
@@ -286,6 +299,7 @@
mPowerProfile = new PowerProfile(mContext);
}
+ @UnsupportedAppUsage
public void storeState() {
sStatsXfer = mStats;
sBatteryBroadcastXfer = mBatteryBroadcast;
@@ -322,6 +336,7 @@
/**
* Refreshes the power usage list.
*/
+ @UnsupportedAppUsage
public void refreshStats(int statsType, int asUser) {
SparseArray<UserHandle> users = new SparseArray<>(1);
users.put(asUser, new UserHandle(asUser));
@@ -331,6 +346,7 @@
/**
* Refreshes the power usage list.
*/
+ @UnsupportedAppUsage
public void refreshStats(int statsType, List<UserHandle> asUsers) {
final int n = asUsers.size();
SparseArray<UserHandle> users = new SparseArray<>(n);
@@ -344,6 +360,7 @@
/**
* Refreshes the power usage list.
*/
+ @UnsupportedAppUsage
public void refreshStats(int statsType, SparseArray<UserHandle> asUsers) {
refreshStats(statsType, asUsers, SystemClock.elapsedRealtime() * 1000,
SystemClock.uptimeMillis() * 1000);
@@ -782,6 +799,7 @@
return bs;
}
+ @UnsupportedAppUsage
public List<BatterySipper> getUsageList() {
return mUsageList;
}
@@ -798,6 +816,7 @@
return mStatsType;
}
+ @UnsupportedAppUsage
public double getMaxPower() {
return mMaxPower;
}
@@ -806,6 +825,7 @@
return mMaxRealPower;
}
+ @UnsupportedAppUsage
public double getTotalPower() {
return mTotalPower;
}
@@ -1016,6 +1036,7 @@
mServicepackageArray = array;
}
+ @UnsupportedAppUsage
private void load() {
if (mBatteryInfo == null) {
return;
@@ -1031,6 +1052,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 76f9a8d..c65dd6f 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.bluetooth.BluetoothActivityEnergyInfo;
import android.bluetooth.UidTraffic;
@@ -36,7 +37,6 @@
import android.os.BatteryManager;
import android.os.BatteryStats;
import android.os.Build;
-import android.os.FileUtils;
import android.os.Handler;
import android.os.IBatteryPropertiesRegistrar;
import android.os.Looper;
@@ -109,7 +109,9 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -601,8 +603,11 @@
// In order to do this, we must refresh each timer whenever the number of active timers
// changes.
@VisibleForTesting
+ @UnsupportedAppUsage
protected ArrayList<StopwatchTimer> mPartialTimers = new ArrayList<>();
+ @UnsupportedAppUsage
final ArrayList<StopwatchTimer> mFullTimers = new ArrayList<>();
+ @UnsupportedAppUsage
final ArrayList<StopwatchTimer> mWindowTimers = new ArrayList<>();
final ArrayList<StopwatchTimer> mDrawTimers = new ArrayList<>();
final SparseArray<ArrayList<StopwatchTimer>> mSensorTimers = new SparseArray<>();
@@ -623,11 +628,11 @@
// These are the objects that will want to do something when the device
// is unplugged from power.
- protected final TimeBase mOnBatteryTimeBase = new TimeBase();
+ protected final TimeBase mOnBatteryTimeBase = new TimeBase(true);
// These are the objects that will want to do something when the device
// is unplugged from power *and* the screen is off or doze.
- protected final TimeBase mOnBatteryScreenOffTimeBase = new TimeBase();
+ protected final TimeBase mOnBatteryScreenOffTimeBase = new TimeBase(true);
// Set to true when we want to distribute CPU across wakelocks for the next
// CPU update, even if we aren't currently running wake locks.
@@ -981,6 +986,7 @@
*/
private final HashMap<String, SamplingTimer> mKernelWakelockStats = new HashMap<>();
+ @UnsupportedAppUsage
public Map<String, ? extends Timer> getKernelWakelockStats() {
return mKernelWakelockStats;
}
@@ -1054,15 +1060,29 @@
mClocks = clocks;
}
+ /**
+ * TimeBase observer.
+ */
public interface TimeBaseObs {
void onTimeStarted(long elapsedRealtime, long baseUptime, long baseRealtime);
void onTimeStopped(long elapsedRealtime, long baseUptime, long baseRealtime);
+
+ /**
+ * Reset the observer's state, returns true if the timer/counter is inactive
+ * so it can be destroyed.
+ * @param detachIfReset detach if true, no-op if false.
+ * @return Returns true if the timer/counter is inactive and can be destroyed.
+ */
+ boolean reset(boolean detachIfReset);
+ /**
+ * Detach the observer from TimeBase.
+ */
+ void detach();
}
// methods are protected not private to be VisibleForTesting
public static class TimeBase {
- protected final ArrayList<TimeBaseObs> mObservers = new ArrayList<>();
-
+ protected final Collection<TimeBaseObs> mObservers;
protected long mUptime;
protected long mRealtime;
@@ -1103,15 +1123,29 @@
sb.append("mUnpluggedRealtime="); formatTimeMs(sb, mUnpluggedRealtime / 1000);
pw.println(sb.toString());
}
+ /**
+ * The mObservers of TimeBase in BatteryStatsImpl object can contain up to 20k entries.
+ * The mObservers of TimeBase in BatteryStatsImpl.Uid object only contains a few or tens of
+ * entries.
+ * mObservers must have good performance on add(), remove(), also be memory efficient.
+ * This is why we provide isLongList parameter for long and short list user cases.
+ * @param isLongList If true, use HashSet for mObservers list.
+ * If false, use ArrayList for mObservers list.
+ */
+ public TimeBase(boolean isLongList) {
+ mObservers = isLongList ? new HashSet<>() : new ArrayList<>();
+ }
+
+ public TimeBase() {
+ this(false);
+ }
public void add(TimeBaseObs observer) {
mObservers.add(observer);
}
public void remove(TimeBaseObs observer) {
- if (!mObservers.remove(observer)) {
- Slog.wtf(TAG, "Removed unknown observer: " + observer);
- }
+ mObservers.remove(observer);
}
public boolean hasObserver(TimeBaseObs observer) {
@@ -1204,19 +1238,24 @@
mRealtimeStart = realtime;
long batteryUptime = mUnpluggedUptime = getUptime(uptime);
long batteryRealtime = mUnpluggedRealtime = getRealtime(realtime);
-
- for (int i = mObservers.size() - 1; i >= 0; i--) {
- mObservers.get(i).onTimeStarted(realtime, batteryUptime, batteryRealtime);
+ // 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);
}
} else {
mPastUptime += uptime - mUptimeStart;
mPastRealtime += realtime - mRealtimeStart;
-
long batteryUptime = getUptime(uptime);
long batteryRealtime = getRealtime(realtime);
-
- for (int i = mObservers.size() - 1; i >= 0; i--) {
- mObservers.get(i).onTimeStopped(realtime, batteryUptime, batteryRealtime);
+ // 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);
}
}
return true;
@@ -1264,6 +1303,7 @@
* State for keeping track of counting information.
*/
public static class Counter extends BatteryStats.Counter implements TimeBaseObs {
+ @UnsupportedAppUsage
final AtomicInteger mCount = new AtomicInteger();
final TimeBase mTimeBase;
int mLoadedCount;
@@ -1364,15 +1404,18 @@
/**
* Clear state of this counter.
*/
- void reset(boolean detachIfReset) {
+ @Override
+ public boolean reset(boolean detachIfReset) {
mCount.set(0);
mLoadedCount = mPluggedCount = mUnpluggedCount = 0;
if (detachIfReset) {
detach();
}
+ return true;
}
- void detach() {
+ @Override
+ public void detach() {
mTimeBase.remove(this);
}
@@ -1468,15 +1511,18 @@
/**
* Clear state of this counter.
*/
- public void reset(boolean detachIfReset) {
+ @Override
+ public boolean reset(boolean detachIfReset) {
fillArray(mCounts, 0);
fillArray(mLoadedCounts, 0);
fillArray(mUnpluggedCounts, 0);
if (detachIfReset) {
detach();
}
+ return true;
}
+ @Override
public void detach() {
mTimeBase.remove(this);
}
@@ -1639,14 +1685,17 @@
/**
* Clear state of this counter.
*/
- public void reset(boolean detachIfReset) {
+ @Override
+ public boolean reset(boolean detachIfReset) {
mCount = 0;
mLoadedCount = mUnpluggedCount = 0;
if (detachIfReset) {
detach();
}
+ return true;
}
+ @Override
public void detach() {
mTimeBase.remove(this);
}
@@ -1747,6 +1796,7 @@
* Clear state of this timer. Returns true if the timer is inactive
* so can be completely dropped.
*/
+ @Override
public boolean reset(boolean detachIfReset) {
mTotalTime = mLoadedTime = mLastTime = mTimeBeforeMark = 0;
mCount = mLoadedCount = mLastCount = 0;
@@ -1756,6 +1806,7 @@
return true;
}
+ @Override
public void detach() {
mTimeBase.remove(this);
}
@@ -1808,6 +1859,7 @@
* @param out the Parcel to be written to.
* @param timer a Timer, or null.
*/
+ @UnsupportedAppUsage
public static void writeTimerToParcel(Parcel out, Timer timer, long elapsedRealtimeUs) {
if (timer == null) {
out.writeInt(0); // indicates null
@@ -1819,6 +1871,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getTotalTimeLocked(long elapsedRealtimeUs, int which) {
long val = computeRunTimeLocked(mTimeBase.getRealtime(elapsedRealtimeUs));
if (which == STATS_SINCE_UNPLUGGED) {
@@ -1831,6 +1884,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getCountLocked(int which) {
int val = computeCurrentCountLocked();
if (which == STATS_SINCE_UNPLUGGED) {
@@ -2606,6 +2660,7 @@
}
@Override
+ @UnsupportedAppUsage
public void detach() {
super.detach();
if (mTimerPool != null) {
@@ -4886,6 +4941,7 @@
}
}
+ @UnsupportedAppUsage
public void noteScreenBrightnessLocked(int brightness) {
// Bin the brightness.
int bin = brightness / (256/NUM_SCREEN_BRIGHTNESS_BINS);
@@ -4909,6 +4965,7 @@
}
}
+ @UnsupportedAppUsage
public void noteUserActivityLocked(int uid, int event) {
if (mOnBatteryInternal) {
uid = mapUid(uid);
@@ -5143,6 +5200,7 @@
}
}
+ @UnsupportedAppUsage
public void notePhoneOnLocked() {
if (!mPhoneOn) {
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -5156,6 +5214,7 @@
}
}
+ @UnsupportedAppUsage
public void notePhoneOffLocked() {
if (mPhoneOn) {
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -5325,12 +5384,14 @@
updateAllPhoneStateLocked(state, simState, mPhoneSignalStrengthBinRaw);
}
+ @UnsupportedAppUsage
public void notePhoneSignalStrengthLocked(SignalStrength signalStrength) {
// Bin the strength.
int bin = signalStrength.getLevel();
updateAllPhoneStateLocked(mPhoneServiceStateRaw, mPhoneSimStateRaw, bin);
}
+ @UnsupportedAppUsage
public void notePhoneDataConnectionStateLocked(int dataType, boolean hasData) {
// BatteryStats uses 0 to represent no network type.
// Telephony does not have a concept of no network type, and uses 0 to represent unknown.
@@ -5389,6 +5450,7 @@
}
}
+ @UnsupportedAppUsage
public void noteAudioOnLocked(int uid) {
uid = mapUid(uid);
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -5404,6 +5466,7 @@
getUidStatsLocked(uid).noteAudioTurnedOnLocked(elapsedRealtime);
}
+ @UnsupportedAppUsage
public void noteAudioOffLocked(int uid) {
if (mAudioOnNesting == 0) {
return;
@@ -5421,6 +5484,7 @@
getUidStatsLocked(uid).noteAudioTurnedOffLocked(elapsedRealtime);
}
+ @UnsupportedAppUsage
public void noteVideoOnLocked(int uid) {
uid = mapUid(uid);
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -5436,6 +5500,7 @@
getUidStatsLocked(uid).noteVideoTurnedOnLocked(elapsedRealtime);
}
+ @UnsupportedAppUsage
public void noteVideoOffLocked(int uid) {
if (mVideoOnNesting == 0) {
return;
@@ -5911,6 +5976,7 @@
int mWifiFullLockNesting = 0;
+ @UnsupportedAppUsage
public void noteFullWifiLockAcquiredLocked(int uid) {
final long elapsedRealtime = mClocks.elapsedRealtime();
final long uptime = mClocks.uptimeMillis();
@@ -5924,6 +5990,7 @@
getUidStatsLocked(uid).noteFullWifiLockAcquiredLocked(elapsedRealtime);
}
+ @UnsupportedAppUsage
public void noteFullWifiLockReleasedLocked(int uid) {
final long elapsedRealtime = mClocks.elapsedRealtime();
final long uptime = mClocks.uptimeMillis();
@@ -5979,6 +6046,7 @@
int mWifiMulticastNesting = 0;
+ @UnsupportedAppUsage
public void noteWifiMulticastEnabledLocked(int uid) {
uid = mapUid(uid);
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -5999,6 +6067,7 @@
getUidStatsLocked(uid).noteWifiMulticastEnabledLocked(elapsedRealtime);
}
+ @UnsupportedAppUsage
public void noteWifiMulticastDisabledLocked(int uid) {
uid = mapUid(uid);
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -6195,6 +6264,7 @@
}
}
+ @UnsupportedAppUsage
@Override public long getScreenOnTime(long elapsedRealtimeUs, int which) {
return mScreenOnTimer.getTotalTimeLocked(elapsedRealtimeUs, which);
}
@@ -6211,6 +6281,7 @@
return mScreenDozeTimer.getCountLocked(which);
}
+ @UnsupportedAppUsage
@Override public long getScreenBrightnessTime(int brightnessBin,
long elapsedRealtimeUs, int which) {
return mScreenBrightnessTimer[brightnessBin].getTotalTimeLocked(
@@ -6320,6 +6391,7 @@
return (long) energyUsedMaMs;
}
+ @UnsupportedAppUsage
@Override public long getPhoneOnTime(long elapsedRealtimeUs, int which) {
return mPhoneOnTimer.getTotalTimeLocked(elapsedRealtimeUs, which);
}
@@ -6328,12 +6400,14 @@
return mPhoneOnTimer.getCountLocked(which);
}
+ @UnsupportedAppUsage
@Override public long getPhoneSignalStrengthTime(int strengthBin,
long elapsedRealtimeUs, int which) {
return mPhoneSignalStrengthsTimer[strengthBin].getTotalTimeLocked(
elapsedRealtimeUs, which);
}
+ @UnsupportedAppUsage
@Override public long getPhoneSignalScanningTime(
long elapsedRealtimeUs, int which) {
return mPhoneSignalScanningTimer.getTotalTimeLocked(
@@ -6344,6 +6418,7 @@
return mPhoneSignalScanningTimer;
}
+ @UnsupportedAppUsage
@Override public int getPhoneSignalStrengthCount(int strengthBin, int which) {
return mPhoneSignalStrengthsTimer[strengthBin].getCountLocked(which);
}
@@ -6352,12 +6427,14 @@
return mPhoneSignalStrengthsTimer[strengthBin];
}
+ @UnsupportedAppUsage
@Override public long getPhoneDataConnectionTime(int dataType,
long elapsedRealtimeUs, int which) {
return mPhoneDataConnectionsTimer[dataType].getTotalTimeLocked(
elapsedRealtimeUs, which);
}
+ @UnsupportedAppUsage
@Override public int getPhoneDataConnectionCount(int dataType, int which) {
return mPhoneDataConnectionsTimer[dataType].getCountLocked(which);
}
@@ -6366,6 +6443,7 @@
return mPhoneDataConnectionsTimer[dataType];
}
+ @UnsupportedAppUsage
@Override public long getMobileRadioActiveTime(long elapsedRealtimeUs, int which) {
return mMobileRadioActiveTimer.getTotalTimeLocked(elapsedRealtimeUs, which);
}
@@ -6396,6 +6474,7 @@
return mWifiMulticastWakelockTimer.getCountLocked(which);
}
+ @UnsupportedAppUsage
@Override public long getWifiOnTime(long elapsedRealtimeUs, int which) {
return mWifiOnTimer.getTotalTimeLocked(elapsedRealtimeUs, which);
}
@@ -6404,6 +6483,7 @@
return mWifiActiveTimer.getTotalTimeLocked(elapsedRealtimeUs, which);
}
+ @UnsupportedAppUsage
@Override public long getGlobalWifiRunningTime(long elapsedRealtimeUs, int which) {
return mGlobalWifiRunningTimer.getTotalTimeLocked(elapsedRealtimeUs, which);
}
@@ -6501,6 +6581,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getNetworkActivityBytes(int type, int which) {
if (type >= 0 && type < mNetworkByteActivityCounters.length) {
return mNetworkByteActivityCounters[type].getCountLocked(which);
@@ -6543,42 +6624,74 @@
return mOnBattery;
}
+ @UnsupportedAppUsage
@Override public SparseArray<? extends BatteryStats.Uid> getUidStats() {
return mUidStats;
}
- private static void detachTimerIfNotNull(BatteryStatsImpl.Timer timer) {
- if (timer != null) {
- timer.detach();
- }
- }
-
- private static boolean resetTimerIfNotNull(BatteryStatsImpl.Timer timer,
- boolean detachIfReset) {
- if (timer != null) {
- return timer.reset(detachIfReset);
+ private static <T extends TimeBaseObs> boolean resetIfNotNull(T t, boolean detachIfReset) {
+ if (t != null) {
+ return t.reset(detachIfReset);
}
return true;
}
- private static boolean resetTimerIfNotNull(DualTimer timer, boolean detachIfReset) {
- if (timer != null) {
- return timer.reset(detachIfReset);
+ private static <T extends TimeBaseObs> boolean resetIfNotNull(T[] t, boolean detachIfReset) {
+ if (t != null) {
+ boolean ret = true;
+ for (int i = 0; i < t.length; i++) {
+ ret &= resetIfNotNull(t[i], detachIfReset);
+ }
+ return ret;
}
return true;
}
- private static void detachLongCounterIfNotNull(LongSamplingCounter counter) {
- if (counter != null) {
- counter.detach();
+ private static <T extends TimeBaseObs> boolean resetIfNotNull(T[][] t, boolean detachIfReset) {
+ if (t != null) {
+ boolean ret = true;
+ for (int i = 0; i < t.length; i++) {
+ ret &= resetIfNotNull(t[i], detachIfReset);
+ }
+ return ret;
}
+ return true;
}
- private static void resetLongCounterIfNotNull(LongSamplingCounter counter,
+ private static boolean resetIfNotNull(ControllerActivityCounterImpl counter,
boolean detachIfReset) {
if (counter != null) {
counter.reset(detachIfReset);
}
+ return true;
+ }
+
+ private static <T extends TimeBaseObs> void detachIfNotNull(T t) {
+ if (t != null) {
+ t.detach();
+ }
+ }
+
+ private static <T extends TimeBaseObs> void detachIfNotNull(T[] t) {
+ if (t != null) {
+ for (int i = 0; i < t.length; i++) {
+ detachIfNotNull(t[i]);
+ }
+ }
+ }
+
+ private static <T extends TimeBaseObs> void detachIfNotNull(T[][] t) {
+ if (t != null) {
+ for (int i = 0; i < t.length; i++) {
+ detachIfNotNull(t[i]);
+ }
+ }
+ }
+
+ private static void detachIfNotNull(ControllerActivityCounterImpl counter) {
+ if (counter != null) {
+ counter.detach();
+ }
}
/**
@@ -6758,11 +6871,12 @@
mBsi = bsi;
mUid = uid;
- mOnBatteryBackgroundTimeBase = new TimeBase();
+ /* Observer list of TimeBase object in Uid is short */
+ mOnBatteryBackgroundTimeBase = new TimeBase(false);
mOnBatteryBackgroundTimeBase.init(mBsi.mClocks.uptimeMillis() * 1000,
mBsi.mClocks.elapsedRealtime() * 1000);
-
- mOnBatteryScreenOffBackgroundTimeBase = new TimeBase();
+ /* Observer list of TimeBase object in Uid is short */
+ mOnBatteryScreenOffBackgroundTimeBase = new TimeBase(false);
mOnBatteryScreenOffBackgroundTimeBase.init(mBsi.mClocks.uptimeMillis() * 1000,
mBsi.mClocks.elapsedRealtime() * 1000);
@@ -6901,6 +7015,7 @@
}
if (mProcStateTimeMs[procState] == null
|| mProcStateTimeMs[procState].getSize() != cpuTimesMs.length) {
+ detachIfNotNull(mProcStateTimeMs[procState]);
mProcStateTimeMs[procState] = new LongSamplingCounterArray(
mBsi.mOnBatteryTimeBase);
}
@@ -6914,6 +7029,7 @@
}
if (mProcStateScreenOffTimeMs[procState] == null
|| mProcStateScreenOffTimeMs[procState].getSize() != cpuTimesMs.length) {
+ detachIfNotNull(mProcStateScreenOffTimeMs[procState]);
mProcStateScreenOffTimeMs[procState] = new LongSamplingCounterArray(
mBsi.mOnBatteryScreenOffTimeBase);
}
@@ -6926,6 +7042,7 @@
}
@Override
+ @UnsupportedAppUsage
public ArrayMap<String, ? extends BatteryStats.Uid.Wakelock> getWakelockStats() {
return mWakelockStats.getMap();
}
@@ -6951,11 +7068,13 @@
}
@Override
+ @UnsupportedAppUsage
public SparseArray<? extends BatteryStats.Uid.Sensor> getSensorStats() {
return mSensorStats;
}
@Override
+ @UnsupportedAppUsage
public ArrayMap<String, ? extends BatteryStats.Uid.Proc> getProcessStats() {
return mProcessStats;
}
@@ -6966,6 +7085,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getUid() {
return mUid;
}
@@ -7353,6 +7473,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getWifiRunningTime(long elapsedRealtimeUs, int which) {
if (mWifiRunningTimer == null) {
return 0;
@@ -7369,6 +7490,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getWifiScanTime(long elapsedRealtimeUs, int which) {
if (mWifiScanTimer == null) {
return 0;
@@ -7518,6 +7640,7 @@
void makeProcessState(int i, Parcel in) {
if (i < 0 || i >= NUM_PROCESS_STATE) return;
+ detachIfNotNull(mProcessStateTimer[i]);
if (in == null) {
mProcessStateTimer[i] = new StopwatchTimer(mBsi.mClocks, this, PROCESS_STATE, null,
mBsi.mOnBatteryTimeBase);
@@ -7581,6 +7704,7 @@
collected = new ArrayList<StopwatchTimer>();
mBsi.mWifiBatchedScanTimers.put(i, collected);
}
+ detachIfNotNull(mWifiBatchedScanTimer[i]);
if (in == null) {
mWifiBatchedScanTimer[i] = new StopwatchTimer(mBsi.mClocks, this, WIFI_BATCHED_SCAN,
collected, mBsi.mOnBatteryTimeBase);
@@ -7592,6 +7716,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);
@@ -7760,13 +7885,17 @@
}
void initNetworkActivityLocked() {
+ detachIfNotNull(mNetworkByteActivityCounters);
mNetworkByteActivityCounters = new LongSamplingCounter[NUM_NETWORK_ACTIVITY_TYPES];
+ detachIfNotNull(mNetworkPacketActivityCounters);
mNetworkPacketActivityCounters = new LongSamplingCounter[NUM_NETWORK_ACTIVITY_TYPES];
for (int i = 0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
mNetworkByteActivityCounters[i] = new LongSamplingCounter(mBsi.mOnBatteryTimeBase);
mNetworkPacketActivityCounters[i] = new LongSamplingCounter(mBsi.mOnBatteryTimeBase);
}
+ detachIfNotNull(mMobileRadioActiveTime);
mMobileRadioActiveTime = new LongSamplingCounter(mBsi.mOnBatteryTimeBase);
+ detachIfNotNull(mMobileRadioActiveCount);
mMobileRadioActiveCount = new LongSamplingCounter(mBsi.mOnBatteryTimeBase);
}
@@ -7806,27 +7935,22 @@
active |= mWifiMulticastEnabled;
}
- active |= !resetTimerIfNotNull(mAudioTurnedOnTimer, false);
- active |= !resetTimerIfNotNull(mVideoTurnedOnTimer, false);
- active |= !resetTimerIfNotNull(mFlashlightTurnedOnTimer, false);
- active |= !resetTimerIfNotNull(mCameraTurnedOnTimer, false);
- active |= !resetTimerIfNotNull(mForegroundActivityTimer, false);
- active |= !resetTimerIfNotNull(mForegroundServiceTimer, false);
- active |= !resetTimerIfNotNull(mAggregatedPartialWakelockTimer, false);
- active |= !resetTimerIfNotNull(mBluetoothScanTimer, false);
- active |= !resetTimerIfNotNull(mBluetoothUnoptimizedScanTimer, false);
- if (mBluetoothScanResultCounter != null) {
- mBluetoothScanResultCounter.reset(false);
- }
- if (mBluetoothScanResultBgCounter != null) {
- mBluetoothScanResultBgCounter.reset(false);
- }
+ active |= !resetIfNotNull(mAudioTurnedOnTimer, false);
+ active |= !resetIfNotNull(mVideoTurnedOnTimer, false);
+ active |= !resetIfNotNull(mFlashlightTurnedOnTimer, false);
+ active |= !resetIfNotNull(mCameraTurnedOnTimer, false);
+ active |= !resetIfNotNull(mForegroundActivityTimer, false);
+ active |= !resetIfNotNull(mForegroundServiceTimer, false);
+ active |= !resetIfNotNull(mAggregatedPartialWakelockTimer, false);
+ active |= !resetIfNotNull(mBluetoothScanTimer, false);
+ active |= !resetIfNotNull(mBluetoothUnoptimizedScanTimer, false);
+
+ resetIfNotNull(mBluetoothScanResultCounter, false);
+ resetIfNotNull(mBluetoothScanResultBgCounter, false);
if (mProcessStateTimer != null) {
for (int i = 0; i < NUM_PROCESS_STATE; i++) {
- if (mProcessStateTimer[i] != null) {
- active |= !mProcessStateTimer[i].reset(false);
- }
+ active |= !resetIfNotNull(mProcessStateTimer[i], false);
}
active |= (mProcessState != ActivityManager.PROCESS_STATE_NONEXISTENT);
}
@@ -7839,75 +7963,37 @@
}
}
- if (mUserActivityCounters != null) {
- for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
- mUserActivityCounters[i].reset(false);
- }
- }
+ resetIfNotNull(mUserActivityCounters, false);
- if (mNetworkByteActivityCounters != null) {
- for (int i = 0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
- mNetworkByteActivityCounters[i].reset(false);
- mNetworkPacketActivityCounters[i].reset(false);
- }
- mMobileRadioActiveTime.reset(false);
- mMobileRadioActiveCount.reset(false);
- }
+ resetIfNotNull(mNetworkByteActivityCounters, false);
+ resetIfNotNull(mNetworkPacketActivityCounters, false);
+ resetIfNotNull(mMobileRadioActiveTime, false);
+ resetIfNotNull(mMobileRadioActiveCount, false);
- if (mWifiControllerActivity != null) {
- mWifiControllerActivity.reset(false);
- }
+ resetIfNotNull(mWifiControllerActivity, false);
+ resetIfNotNull(mBluetoothControllerActivity, false);
+ resetIfNotNull(mModemControllerActivity, false);
- if (mBluetoothControllerActivity != null) {
- mBluetoothControllerActivity.reset(false);
- }
+ resetIfNotNull(mUserCpuTime, false);
+ resetIfNotNull(mSystemCpuTime, false);
- if (mModemControllerActivity != null) {
- mModemControllerActivity.reset(false);
- }
+ resetIfNotNull(mCpuClusterSpeedTimesUs, false);
- mUserCpuTime.reset(false);
- mSystemCpuTime.reset(false);
+ resetIfNotNull(mCpuFreqTimeMs, false);
+ resetIfNotNull(mScreenOffCpuFreqTimeMs, false);
- if (mCpuClusterSpeedTimesUs != null) {
- for (LongSamplingCounter[] speeds : mCpuClusterSpeedTimesUs) {
- if (speeds != null) {
- for (LongSamplingCounter speed : speeds) {
- if (speed != null) {
- speed.reset(false);
- }
- }
- }
- }
- }
- if (mCpuFreqTimeMs != null) {
- mCpuFreqTimeMs.reset(false);
- }
- if (mScreenOffCpuFreqTimeMs != null) {
- mScreenOffCpuFreqTimeMs.reset(false);
- }
+ resetIfNotNull(mCpuActiveTimeMs, false);
+ resetIfNotNull(mCpuClusterTimesMs, false);
- mCpuActiveTimeMs.reset(false);
- mCpuClusterTimesMs.reset(false);
+ resetIfNotNull(mProcStateTimeMs, false);
- if (mProcStateTimeMs != null) {
- for (LongSamplingCounterArray counters : mProcStateTimeMs) {
- if (counters != null) {
- counters.reset(false);
- }
- }
- }
- if (mProcStateScreenOffTimeMs != null) {
- for (LongSamplingCounterArray counters : mProcStateScreenOffTimeMs) {
- if (counters != null) {
- counters.reset(false);
- }
- }
- }
+ resetIfNotNull(mProcStateScreenOffTimeMs, false);
- resetLongCounterIfNotNull(mMobileRadioApWakeupCount, false);
- resetLongCounterIfNotNull(mWifiRadioApWakeupCount, false);
+ resetIfNotNull(mMobileRadioApWakeupCount, false);
+
+ resetIfNotNull(mWifiRadioApWakeupCount, false);
+
final ArrayMap<String, Wakelock> wakeStats = mWakelockStats.getMap();
for (int iw=wakeStats.size()-1; iw>=0; iw--) {
@@ -7943,16 +8029,12 @@
mJobStats.cleanup();
mJobCompletions.clear();
- mJobsDeferredEventCount.reset(false);
- mJobsDeferredCount.reset(false);
- mJobsFreshnessTimeMs.reset(false);
- for (int ij = 0; ij < JOB_FRESHNESS_BUCKETS.length; ij++) {
- if (mJobsFreshnessBuckets[ij] != null) {
- mJobsFreshnessBuckets[ij].reset(false);
- }
- }
+ resetIfNotNull(mJobsDeferredEventCount, false);
+ resetIfNotNull(mJobsDeferredCount, false);
+ resetIfNotNull(mJobsFreshnessTimeMs, false);
+ resetIfNotNull(mJobsFreshnessBuckets, false);
- for (int ise=mSensorStats.size()-1; ise>=0; ise--) {
+ for (int ise = mSensorStats.size() - 1; ise >= 0; ise--) {
Sensor s = mSensorStats.valueAt(ise);
if (s.reset()) {
mSensorStats.removeAt(ise);
@@ -7961,173 +8043,135 @@
}
}
- for (int ip=mProcessStats.size()-1; ip>=0; ip--) {
+ for (int ip = mProcessStats.size() - 1; ip >= 0; ip--) {
Proc proc = mProcessStats.valueAt(ip);
proc.detach();
}
mProcessStats.clear();
- if (mPids.size() > 0) {
- for (int i=mPids.size()-1; i>=0; i--) {
- Pid pid = mPids.valueAt(i);
- if (pid.mWakeNesting > 0) {
- active = true;
- } else {
- mPids.removeAt(i);
- }
+
+ for (int i = mPids.size() - 1; i >= 0; i--) {
+ Pid pid = mPids.valueAt(i);
+ if (pid.mWakeNesting > 0) {
+ active = true;
+ } else {
+ mPids.removeAt(i);
}
}
- if (mPackageStats.size() > 0) {
- Iterator<Map.Entry<String, Pkg>> it = mPackageStats.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry<String, Pkg> pkgEntry = it.next();
- Pkg p = pkgEntry.getValue();
- p.detach();
- if (p.mServiceStats.size() > 0) {
- Iterator<Map.Entry<String, Pkg.Serv>> it2
- = p.mServiceStats.entrySet().iterator();
- while (it2.hasNext()) {
- Map.Entry<String, Pkg.Serv> servEntry = it2.next();
- servEntry.getValue().detach();
- }
- }
- }
- mPackageStats.clear();
+
+
+ for(int i = mPackageStats.size() - 1; i >= 0; i--) {
+ Pkg p = mPackageStats.valueAt(i);
+ p.detach();
}
+ mPackageStats.clear();
mLastStepUserTime = mLastStepSystemTime = 0;
mCurStepUserTime = mCurStepSystemTime = 0;
- if (!active) {
- if (mWifiRunningTimer != null) {
- mWifiRunningTimer.detach();
- }
- if (mFullWifiLockTimer != null) {
- mFullWifiLockTimer.detach();
- }
- if (mWifiScanTimer != null) {
- mWifiScanTimer.detach();
- }
- for (int i = 0; i < NUM_WIFI_BATCHED_SCAN_BINS; i++) {
- if (mWifiBatchedScanTimer[i] != null) {
- mWifiBatchedScanTimer[i].detach();
- }
- }
- if (mWifiMulticastTimer != null) {
- mWifiMulticastTimer.detach();
- }
- if (mAudioTurnedOnTimer != null) {
- mAudioTurnedOnTimer.detach();
- mAudioTurnedOnTimer = null;
- }
- if (mVideoTurnedOnTimer != null) {
- mVideoTurnedOnTimer.detach();
- mVideoTurnedOnTimer = null;
- }
- if (mFlashlightTurnedOnTimer != null) {
- mFlashlightTurnedOnTimer.detach();
- mFlashlightTurnedOnTimer = null;
- }
- if (mCameraTurnedOnTimer != null) {
- mCameraTurnedOnTimer.detach();
- mCameraTurnedOnTimer = null;
- }
- if (mForegroundActivityTimer != null) {
- mForegroundActivityTimer.detach();
- mForegroundActivityTimer = null;
- }
- if (mForegroundServiceTimer != null) {
- mForegroundServiceTimer.detach();
- mForegroundServiceTimer = null;
- }
- if (mAggregatedPartialWakelockTimer != null) {
- mAggregatedPartialWakelockTimer.detach();
- mAggregatedPartialWakelockTimer = null;
- }
- if (mBluetoothScanTimer != null) {
- mBluetoothScanTimer.detach();
- mBluetoothScanTimer = null;
- }
- if (mBluetoothUnoptimizedScanTimer != null) {
- mBluetoothUnoptimizedScanTimer.detach();
- mBluetoothUnoptimizedScanTimer = null;
- }
- if (mBluetoothScanResultCounter != null) {
- mBluetoothScanResultCounter.detach();
- mBluetoothScanResultCounter = null;
- }
- if (mBluetoothScanResultBgCounter != null) {
- mBluetoothScanResultBgCounter.detach();
- mBluetoothScanResultBgCounter = null;
- }
- if (mUserActivityCounters != null) {
- for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
- mUserActivityCounters[i].detach();
- }
- }
- if (mNetworkByteActivityCounters != null) {
- for (int i = 0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {
- mNetworkByteActivityCounters[i].detach();
- mNetworkPacketActivityCounters[i].detach();
- }
- }
+ return !active;
+ }
- if (mWifiControllerActivity != null) {
- mWifiControllerActivity.detach();
- }
+ /**
+ * This method MUST be called whenever the Uid object is destructed, otherwise it is a
+ * memory leak in {@link TimeBase#mObservers} list.
+ * Typically the Uid object is destructed when it is removed from
+ * {@link BatteryStatsImpl#mUidStats}
+ */
+ void detachFromTimeBase() {
+ detachIfNotNull(mWifiRunningTimer);
+ detachIfNotNull(mFullWifiLockTimer);
+ detachIfNotNull(mWifiScanTimer);
+ detachIfNotNull(mWifiBatchedScanTimer);
+ detachIfNotNull(mWifiMulticastTimer);
+ detachIfNotNull(mAudioTurnedOnTimer);
+ detachIfNotNull(mVideoTurnedOnTimer);
+ detachIfNotNull(mFlashlightTurnedOnTimer);
- if (mBluetoothControllerActivity != null) {
- mBluetoothControllerActivity.detach();
- }
+ detachIfNotNull(mCameraTurnedOnTimer);
+ detachIfNotNull(mForegroundActivityTimer);
+ detachIfNotNull(mForegroundServiceTimer);
- if (mModemControllerActivity != null) {
- mModemControllerActivity.detach();
- }
+ detachIfNotNull(mAggregatedPartialWakelockTimer);
- mPids.clear();
+ detachIfNotNull(mBluetoothScanTimer);
+ detachIfNotNull(mBluetoothUnoptimizedScanTimer);
+ detachIfNotNull(mBluetoothScanResultCounter);
+ detachIfNotNull(mBluetoothScanResultBgCounter);
- mUserCpuTime.detach();
- mSystemCpuTime.detach();
+ detachIfNotNull(mProcessStateTimer);
- if (mCpuClusterSpeedTimesUs != null) {
- for (LongSamplingCounter[] cpuSpeeds : mCpuClusterSpeedTimesUs) {
- if (cpuSpeeds != null) {
- for (LongSamplingCounter c : cpuSpeeds) {
- if (c != null) {
- c.detach();
- }
- }
- }
- }
- }
+ detachIfNotNull(mVibratorOnTimer);
- if (mCpuFreqTimeMs != null) {
- mCpuFreqTimeMs.detach();
- }
- if (mScreenOffCpuFreqTimeMs != null) {
- mScreenOffCpuFreqTimeMs.detach();
- }
- mCpuActiveTimeMs.detach();
- mCpuClusterTimesMs.detach();
+ detachIfNotNull(mUserActivityCounters);
- if (mProcStateTimeMs != null) {
- for (LongSamplingCounterArray counters : mProcStateTimeMs) {
- if (counters != null) {
- counters.detach();
- }
- }
- }
- if (mProcStateScreenOffTimeMs != null) {
- for (LongSamplingCounterArray counters : mProcStateScreenOffTimeMs) {
- if (counters != null) {
- counters.detach();
- }
- }
- }
- detachLongCounterIfNotNull(mMobileRadioApWakeupCount);
- detachLongCounterIfNotNull(mWifiRadioApWakeupCount);
+ detachIfNotNull(mNetworkByteActivityCounters);
+ detachIfNotNull(mNetworkPacketActivityCounters);
+
+ detachIfNotNull(mMobileRadioActiveTime);
+ detachIfNotNull(mMobileRadioActiveCount);
+ detachIfNotNull(mMobileRadioApWakeupCount);
+ detachIfNotNull(mWifiRadioApWakeupCount);
+
+ detachIfNotNull(mWifiControllerActivity);
+ detachIfNotNull(mBluetoothControllerActivity);
+ detachIfNotNull(mModemControllerActivity);
+
+ mPids.clear();
+
+ detachIfNotNull(mUserCpuTime);
+ detachIfNotNull(mSystemCpuTime);
+
+ detachIfNotNull(mCpuClusterSpeedTimesUs);
+
+ detachIfNotNull(mCpuActiveTimeMs);
+ detachIfNotNull(mCpuFreqTimeMs);
+
+ detachIfNotNull(mScreenOffCpuFreqTimeMs);
+
+ detachIfNotNull(mCpuClusterTimesMs);
+
+ detachIfNotNull(mProcStateTimeMs);
+
+ detachIfNotNull(mProcStateScreenOffTimeMs);
+
+ final ArrayMap<String, Wakelock> wakeStats = mWakelockStats.getMap();
+ for (int iw = wakeStats.size() - 1; iw >= 0; iw--) {
+ Wakelock wl = wakeStats.valueAt(iw);
+ wl.detachFromTimeBase();
+ }
+ final ArrayMap<String, DualTimer> syncStats = mSyncStats.getMap();
+ for (int is = syncStats.size() - 1; is >= 0; is--) {
+ DualTimer timer = syncStats.valueAt(is);
+ detachIfNotNull(timer);
+ }
+ final ArrayMap<String, DualTimer> jobStats = mJobStats.getMap();
+ for (int ij = jobStats.size() - 1; ij >= 0; ij--) {
+ DualTimer timer = jobStats.valueAt(ij);
+ detachIfNotNull(timer);
}
- return !active;
+ detachIfNotNull(mJobsDeferredEventCount);
+ detachIfNotNull(mJobsDeferredCount);
+ detachIfNotNull(mJobsFreshnessTimeMs);
+ detachIfNotNull(mJobsFreshnessBuckets);
+
+
+ for (int ise = mSensorStats.size() - 1; ise >= 0; ise--) {
+ Sensor s = mSensorStats.valueAt(ise);
+ s.detachFromTimeBase();
+ }
+
+ for (int ip= mProcessStats.size() - 1; ip >= 0; ip--) {
+ Proc proc = mProcessStats.valueAt(ip);
+ proc.detach();
+ }
+ mProcessStats.clear();
+
+ for(int i = mPackageStats.size() - 1; i >= 0; i--) {
+ Pkg p = mPackageStats.valueAt(i);
+ p.detach();
+ }
+ mPackageStats.clear();
}
void writeJobCompletionsToParcelLocked(Parcel out) {
@@ -8850,35 +8894,24 @@
boolean reset() {
boolean wlactive = false;
- if (mTimerFull != null) {
- wlactive |= !mTimerFull.reset(false);
- }
- if (mTimerPartial != null) {
- wlactive |= !mTimerPartial.reset(false);
- }
- if (mTimerWindow != null) {
- wlactive |= !mTimerWindow.reset(false);
- }
- if (mTimerDraw != null) {
- wlactive |= !mTimerDraw.reset(false);
- }
+
+ wlactive |= !resetIfNotNull(mTimerFull,false);
+ wlactive |= !resetIfNotNull(mTimerPartial,false);
+ wlactive |= !resetIfNotNull(mTimerWindow,false);
+ wlactive |= !resetIfNotNull(mTimerDraw,false);
+
if (!wlactive) {
- if (mTimerFull != null) {
- mTimerFull.detach();
- mTimerFull = null;
- }
- if (mTimerPartial != null) {
- mTimerPartial.detach();
- mTimerPartial = null;
- }
- if (mTimerWindow != null) {
- mTimerWindow.detach();
- mTimerWindow = null;
- }
- if (mTimerDraw != null) {
- mTimerDraw.detach();
- mTimerDraw = null;
- }
+ detachIfNotNull(mTimerFull);
+ mTimerFull = null;
+
+ detachIfNotNull(mTimerPartial);
+ mTimerPartial = null;
+
+ detachIfNotNull(mTimerWindow);
+ mTimerWindow = null;
+
+ detachIfNotNull(mTimerDraw);
+ mTimerDraw = null;
}
return !wlactive;
}
@@ -8903,6 +8936,7 @@
}
@Override
+ @UnsupportedAppUsage
public Timer getWakeTime(int type) {
switch (type) {
case WAKE_TYPE_FULL: return mTimerFull;
@@ -8912,6 +8946,13 @@
default: throw new IllegalArgumentException("type = " + type);
}
}
+
+ public void detachFromTimeBase() {
+ detachIfNotNull(mTimerPartial);
+ detachIfNotNull(mTimerFull);
+ detachIfNotNull(mTimerWindow);
+ detachIfNotNull(mTimerDraw);
+ }
}
public static class Sensor extends BatteryStats.Uid.Sensor {
@@ -8965,6 +9006,7 @@
}
@Override
+ @UnsupportedAppUsage
public Timer getSensorTime() {
return mTimer;
}
@@ -8978,9 +9020,14 @@
}
@Override
+ @UnsupportedAppUsage
public int getHandle() {
return mHandle;
}
+
+ public void detachFromTimeBase() {
+ detachIfNotNull(mTimer);
+ }
}
/**
@@ -9112,7 +9159,16 @@
public void onTimeStopped(long elapsedRealtime, long baseUptime, long baseRealtime) {
}
- void detach() {
+ @Override
+ public boolean reset(boolean detachIfReset) {
+ if (detachIfReset) {
+ this.detach();
+ }
+ return true;
+ }
+
+ @Override
+ public void detach() {
mActive = false;
mBsi.mOnBatteryTimeBase.remove(this);
}
@@ -9221,6 +9277,7 @@
readExcessivePowerFromParcelLocked(in);
}
+ @UnsupportedAppUsage
public void addCpuTimeLocked(int utime, int stime) {
addCpuTimeLocked(utime, stime, mBsi.mOnBatteryTimeBase.isRunning());
}
@@ -9232,10 +9289,12 @@
}
}
+ @UnsupportedAppUsage
public void addForegroundTimeLocked(long ttime) {
mForegroundTime += ttime;
}
+ @UnsupportedAppUsage
public void incStartsLocked() {
mStarts++;
}
@@ -9254,6 +9313,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getUserTime(int which) {
long val = mUserTime;
if (which == STATS_CURRENT) {
@@ -9265,6 +9325,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getSystemTime(int which) {
long val = mSystemTime;
if (which == STATS_CURRENT) {
@@ -9276,6 +9337,7 @@
}
@Override
+ @UnsupportedAppUsage
public long getForegroundTime(int which) {
long val = mForegroundTime;
if (which == STATS_CURRENT) {
@@ -9287,6 +9349,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getStarts(int which) {
int val = mStarts;
if (which == STATS_CURRENT) {
@@ -9351,8 +9414,23 @@
public void onTimeStopped(long elapsedRealtime, long baseUptime, long baseRealtime) {
}
- void detach() {
+ @Override
+ public boolean reset(boolean detachIfReset) {
+ if (detachIfReset) {
+ this.detach();
+ }
+ return true;
+ }
+
+ @Override
+ public void detach() {
mBsi.mOnBatteryScreenOffTimeBase.remove(this);
+ for (int j = mWakeupAlarms.size() - 1; j >= 0; j--) {
+ detachIfNotNull(mWakeupAlarms.valueAt(j));
+ }
+ for (int j = mServiceStats.size() - 1; j >= 0; j--) {
+ detachIfNotNull(mServiceStats.valueAt(j));
+ }
}
void readFromParcelLocked(Parcel in) {
@@ -9533,9 +9611,18 @@
long baseRealtime) {
}
+ @Override
+ public boolean reset(boolean detachIfReset) {
+ if (detachIfReset) {
+ this.detach();
+ }
+ return true;
+ }
+
/**
* Remove this Serv as a listener from the time base.
*/
+ @Override
public void detach() {
mBsi.mOnBatteryTimeBase.remove(this);
}
@@ -9587,6 +9674,7 @@
return mStartTime + batteryUptime - mRunningSince;
}
+ @UnsupportedAppUsage
public void startLaunchedLocked() {
if (!mLaunched) {
mLaunches++;
@@ -9595,6 +9683,7 @@
}
}
+ @UnsupportedAppUsage
public void stopLaunchedLocked() {
if (mLaunched) {
long time = mBsi.getBatteryUptimeLocked() - mLaunchedSince;
@@ -9607,6 +9696,7 @@
}
}
+ @UnsupportedAppUsage
public void startRunningLocked() {
if (!mRunning) {
mStarts++;
@@ -9615,6 +9705,7 @@
}
}
+ @UnsupportedAppUsage
public void stopRunningLocked() {
if (mRunning) {
long time = mBsi.getBatteryUptimeLocked() - mRunningSince;
@@ -9627,6 +9718,7 @@
}
}
+ @UnsupportedAppUsage
public BatteryStatsImpl getBatteryStats() {
return mBsi;
}
@@ -10126,6 +10218,7 @@
mUserInfoProvider = userInfoProvider;
}
+ @UnsupportedAppUsage
public BatteryStatsImpl(Parcel p) {
this(new SystemClocks(), p);
}
@@ -10567,6 +10660,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean startIteratingHistoryLocked() {
mBatteryStatsHistory.startIteratingHistory();
mReadOverflow = false;
@@ -10607,6 +10701,7 @@
}
@Override
+ @UnsupportedAppUsage
public boolean getNextHistoryLocked(HistoryItem out) {
Parcel p = mBatteryStatsHistory.getNextParcel(out);
if (p == null) {
@@ -10640,6 +10735,7 @@
return mStartCount;
}
+ @UnsupportedAppUsage
public boolean isOnBattery() {
return mOnBattery;
}
@@ -10795,6 +10891,7 @@
for (int i=0; i<mUidStats.size(); i++) {
if (mUidStats.valueAt(i).reset(uptimeMillis * 1000, elapsedRealtimeMillis * 1000)) {
+ mUidStats.valueAt(i).detachFromTimeBase();
mUidStats.remove(mUidStats.keyAt(i));
i--;
}
@@ -12101,11 +12198,13 @@
}
final Uid u = getUidStatsLocked(uid);
if (u.mCpuFreqTimeMs == null || u.mCpuFreqTimeMs.getSize() != cpuFreqTimeMs.length) {
+ detachIfNotNull(u.mCpuFreqTimeMs);
u.mCpuFreqTimeMs = new LongSamplingCounterArray(mOnBatteryTimeBase);
}
u.mCpuFreqTimeMs.addCountLocked(cpuFreqTimeMs, onBattery);
if (u.mScreenOffCpuFreqTimeMs == null ||
u.mScreenOffCpuFreqTimeMs.getSize() != cpuFreqTimeMs.length) {
+ detachIfNotNull(u.mScreenOffCpuFreqTimeMs);
u.mScreenOffCpuFreqTimeMs = new LongSamplingCounterArray(
mOnBatteryScreenOffTimeBase);
}
@@ -12114,6 +12213,7 @@
if (perClusterTimesAvailable) {
if (u.mCpuClusterSpeedTimesUs == null ||
u.mCpuClusterSpeedTimesUs.length != numClusters) {
+ detachIfNotNull(u.mCpuClusterSpeedTimesUs);
u.mCpuClusterSpeedTimesUs = new LongSamplingCounter[numClusters][];
}
if (numWakelocks > 0 && mWakeLockAllocationsUs == null) {
@@ -12125,6 +12225,7 @@
final int speedsInCluster = mPowerProfile.getNumSpeedStepsInCpuCluster(cluster);
if (u.mCpuClusterSpeedTimesUs[cluster] == null ||
u.mCpuClusterSpeedTimesUs[cluster].length != speedsInCluster) {
+ detachIfNotNull(u.mCpuClusterSpeedTimesUs[cluster]);
u.mCpuClusterSpeedTimesUs[cluster]
= new LongSamplingCounter[speedsInCluster];
}
@@ -12162,6 +12263,7 @@
final Uid u = partialTimers.get(i).mUid;
if (u.mCpuClusterSpeedTimesUs == null ||
u.mCpuClusterSpeedTimesUs.length != numClusters) {
+ detachIfNotNull(u.mCpuClusterSpeedTimesUs);
u.mCpuClusterSpeedTimesUs = new LongSamplingCounter[numClusters][];
}
@@ -12169,6 +12271,7 @@
final int speedsInCluster = mPowerProfile.getNumSpeedStepsInCpuCluster(cluster);
if (u.mCpuClusterSpeedTimesUs[cluster] == null ||
u.mCpuClusterSpeedTimesUs[cluster].length != speedsInCluster) {
+ detachIfNotNull(u.mCpuClusterSpeedTimesUs[cluster]);
u.mCpuClusterSpeedTimesUs[cluster]
= new LongSamplingCounter[speedsInCluster];
}
@@ -12653,10 +12756,12 @@
}
}
+ @UnsupportedAppUsage
public long getAwakeTimeBattery() {
return computeBatteryUptime(getBatteryUptimeLocked(), STATS_CURRENT);
}
+ @UnsupportedAppUsage
public long getAwakeTimePlugged() {
return (mClocks.uptimeMillis() * 1000) - getAwakeTimeBattery();
}
@@ -12682,11 +12787,13 @@
}
@Override
+ @UnsupportedAppUsage
public long computeBatteryUptime(long curTime, int which) {
return mOnBatteryTimeBase.computeUptime(curTime, which);
}
@Override
+ @UnsupportedAppUsage
public long computeBatteryRealtime(long curTime, int which) {
return mOnBatteryTimeBase.computeRealtime(curTime, which);
}
@@ -12740,6 +12847,7 @@
}
@Override
+ @UnsupportedAppUsage
public long computeBatteryTimeRemaining(long curTime) {
if (!mOnBattery) {
return -1;
@@ -12938,11 +13046,13 @@
}
@Override
+ @UnsupportedAppUsage
public long getBatteryRealtime(long curTime) {
return mOnBatteryTimeBase.getRealtime(curTime);
}
@Override
+ @UnsupportedAppUsage
public int getDischargeStartLevel() {
synchronized(this) {
return getDischargeStartLevelLocked();
@@ -12954,6 +13064,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getDischargeCurrentLevel() {
synchronized(this) {
return getDischargeCurrentLevelLocked();
@@ -12987,6 +13098,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getDischargeAmount(int which) {
int dischargeAmount = which == STATS_SINCE_CHARGED
? getHighDischargeAmountSinceCharge()
@@ -12998,6 +13110,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getDischargeAmountScreenOn() {
synchronized(this) {
int val = mDischargeAmountScreenOn;
@@ -13022,6 +13135,7 @@
}
@Override
+ @UnsupportedAppUsage
public int getDischargeAmountScreenOff() {
synchronized(this) {
int val = mDischargeAmountScreenOff;
@@ -13074,6 +13188,7 @@
/**
* Retrieve the statistics object for a particular uid, creating if needed.
*/
+ @UnsupportedAppUsage
public Uid getUidStatsLocked(int uid) {
Uid u = mUidStats.get(uid);
if (u == null) {
@@ -13106,13 +13221,24 @@
mUidStats.put(lastUidForUser, null);
final int firstIndex = mUidStats.indexOfKey(firstUidForUser);
final int lastIndex = mUidStats.indexOfKey(lastUidForUser);
+ for (int i = firstIndex; i <= lastIndex; i++) {
+ final Uid uid = mUidStats.valueAt(i);
+ if (uid != null) {
+ uid.detachFromTimeBase();
+ }
+ }
mUidStats.removeAtRange(firstIndex, lastIndex - firstIndex + 1);
}
/**
* Remove the statistics object for a particular uid.
*/
+ @UnsupportedAppUsage
public void removeUidStatsLocked(int uid) {
+ final Uid u = mUidStats.get(uid);
+ if (u != null) {
+ u.detachFromTimeBase();
+ }
mUidStats.remove(uid);
mPendingRemovedUids.add(new UidToRemove(uid, mClocks.elapsedRealtime()));
}
@@ -13121,6 +13247,7 @@
* Retrieve the statistics object for a particular process, creating
* if needed.
*/
+ @UnsupportedAppUsage
public Uid.Proc getProcessStatsLocked(int uid, String name) {
uid = mapUid(uid);
Uid u = getUidStatsLocked(uid);
@@ -13131,6 +13258,7 @@
* Retrieve the statistics object for a particular process, creating
* if needed.
*/
+ @UnsupportedAppUsage
public Uid.Pkg getPackageStatsLocked(int uid, String pkg) {
uid = mapUid(uid);
Uid u = getUidStatsLocked(uid);
@@ -13141,6 +13269,7 @@
* Retrieve the statistics object for a particular service, creating
* if needed.
*/
+ @UnsupportedAppUsage
public Uid.Pkg.Serv getServiceStatsLocked(int uid, String pkg, String name) {
uid = mapUid(uid);
Uid u = getUidStatsLocked(uid);
@@ -13472,6 +13601,7 @@
}
}
+ @UnsupportedAppUsage
public void readLocked() {
if (mDailyFile != null) {
readDailyStatsLocked();
@@ -13978,7 +14108,7 @@
if (mPowerProfile != null && mPowerProfile.getNumCpuClusters() != numClusters) {
throw new ParcelFormatException("Incompatible cpu cluster arrangement");
}
-
+ detachIfNotNull(u.mCpuClusterSpeedTimesUs);
u.mCpuClusterSpeedTimesUs = new LongSamplingCounter[numClusters][];
for (int cluster = 0; cluster < numClusters; cluster++) {
if (in.readInt() != 0) {
@@ -14002,11 +14132,14 @@
}
}
} else {
+ detachIfNotNull(u.mCpuClusterSpeedTimesUs);
u.mCpuClusterSpeedTimesUs = null;
}
+ detachIfNotNull(u.mCpuFreqTimeMs);
u.mCpuFreqTimeMs = LongSamplingCounterArray.readSummaryFromParcelLocked(
in, mOnBatteryTimeBase);
+ detachIfNotNull(u.mScreenOffCpuFreqTimeMs);
u.mScreenOffCpuFreqTimeMs = LongSamplingCounterArray.readSummaryFromParcelLocked(
in, mOnBatteryScreenOffTimeBase);
@@ -14015,6 +14148,7 @@
int length = in.readInt();
if (length == Uid.NUM_PROCESS_STATE) {
+ detachIfNotNull(u.mProcStateTimeMs);
u.mProcStateTimeMs = new LongSamplingCounterArray[length];
for (int procState = 0; procState < length; ++procState) {
u.mProcStateTimeMs[procState]
@@ -14022,10 +14156,12 @@
in, mOnBatteryTimeBase);
}
} else {
+ detachIfNotNull(u.mProcStateTimeMs);
u.mProcStateTimeMs = null;
}
length = in.readInt();
if (length == Uid.NUM_PROCESS_STATE) {
+ detachIfNotNull(u.mProcStateScreenOffTimeMs);
u.mProcStateScreenOffTimeMs = new LongSamplingCounterArray[length];
for (int procState = 0; procState < length; ++procState) {
u.mProcStateScreenOffTimeMs[procState]
@@ -14033,20 +14169,25 @@
in, mOnBatteryScreenOffTimeBase);
}
} else {
+ detachIfNotNull(u.mProcStateScreenOffTimeMs);
u.mProcStateScreenOffTimeMs = null;
}
if (in.readInt() != 0) {
+ detachIfNotNull(u.mMobileRadioApWakeupCount);
u.mMobileRadioApWakeupCount = new LongSamplingCounter(mOnBatteryTimeBase);
u.mMobileRadioApWakeupCount.readSummaryFromParcelLocked(in);
} else {
+ detachIfNotNull(u.mMobileRadioApWakeupCount);
u.mMobileRadioApWakeupCount = null;
}
if (in.readInt() != 0) {
+ detachIfNotNull(u.mWifiRadioApWakeupCount);
u.mWifiRadioApWakeupCount = new LongSamplingCounter(mOnBatteryTimeBase);
u.mWifiRadioApWakeupCount.readSummaryFromParcelLocked(in);
} else {
+ detachIfNotNull(u.mWifiRadioApWakeupCount);
u.mWifiRadioApWakeupCount = null;
}
@@ -14082,6 +14223,7 @@
u.mJobsDeferredEventCount.readSummaryFromParcelLocked(in);
u.mJobsDeferredCount.readSummaryFromParcelLocked(in);
u.mJobsFreshnessTimeMs.readSummaryFromParcelLocked(in);
+ detachIfNotNull(u.mJobsFreshnessBuckets);
for (int i = 0; i < JOB_FRESHNESS_BUCKETS.length; i++) {
if (in.readInt() != 0) {
u.mJobsFreshnessBuckets[i] = new Counter(u.mBsi.mOnBatteryTimeBase);
@@ -14122,6 +14264,7 @@
}
for (int ip = 0; ip < NP; ip++) {
String pkgName = in.readString();
+ detachIfNotNull(u.mPackageStats.get(pkgName));
Uid.Pkg p = u.getPackageStatsLocked(pkgName);
final int NWA = in.readInt();
if (NWA > 10000) {
@@ -15082,6 +15225,7 @@
}
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<BatteryStatsImpl> CREATOR =
new Parcelable.Creator<BatteryStatsImpl>() {
public BatteryStatsImpl createFromParcel(Parcel in) {
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/internal/os/FuseAppLoop.java b/core/java/com/android/internal/os/FuseAppLoop.java
index 67fbe5e..d08930b 100644
--- a/core/java/com/android/internal/os/FuseAppLoop.java
+++ b/core/java/com/android/internal/os/FuseAppLoop.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.ProxyFileDescriptorCallback;
import android.os.Handler;
import android.os.Message;
@@ -226,6 +227,7 @@
// Called by JNI.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private void onCommand(int command, long unique, long inode, long offset, int size,
byte[] data) {
synchronized (mLock) {
@@ -254,6 +256,7 @@
// Called by JNI.
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private byte[] onOpen(long unique, long inode) {
synchronized (mLock) {
try {
diff --git a/core/java/com/android/internal/os/HandlerCaller.java b/core/java/com/android/internal/os/HandlerCaller.java
index ae7c5f2..c8bfa1b 100644
--- a/core/java/com/android/internal/os/HandlerCaller.java
+++ b/core/java/com/android/internal/os/HandlerCaller.java
@@ -16,11 +16,18 @@
package com.android.internal.os;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+/**
+ * @deprecated Use {@link com.android.internal.util.function.pooled.PooledLambda#obtainMessage}
+ * to achieve the same effect of storing multiple values in a message with the added typesafety
+ * and code continuity benefits.
+ */
+@Deprecated
public class HandlerCaller {
final Looper mMainLooper;
final Handler mH;
@@ -82,6 +89,7 @@
mH.removeMessages(what, obj);
}
+ @UnsupportedAppUsage
public void sendMessage(Message msg) {
mH.sendMessage(msg);
}
@@ -106,6 +114,7 @@
return args;
}
+ @UnsupportedAppUsage
public Message obtainMessage(int what) {
return mH.obtainMessage(what);
}
@@ -121,6 +130,7 @@
return mH.obtainMessage(what, arg1 ? 1 : 0, 0, args);
}
+ @UnsupportedAppUsage
public Message obtainMessageO(int what, Object arg1) {
return mH.obtainMessage(what, 0, 0, arg1);
}
@@ -133,6 +143,7 @@
return mH.obtainMessage(what, arg1, arg2);
}
+ @UnsupportedAppUsage
public Message obtainMessageIO(int what, int arg1, Object arg2) {
return mH.obtainMessage(what, arg1, 0, arg2);
}
@@ -149,6 +160,7 @@
return mH.obtainMessage(what, arg1, arg2, args);
}
+ @UnsupportedAppUsage
public Message obtainMessageIOO(int what, int arg1, Object arg2, Object arg3) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = arg2;
@@ -183,6 +195,7 @@
return mH.obtainMessage(what, arg1, arg2, args);
}
+ @UnsupportedAppUsage
public Message obtainMessageOO(int what, Object arg1, Object arg2) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = arg1;
@@ -190,6 +203,7 @@
return mH.obtainMessage(what, 0, 0, args);
}
+ @UnsupportedAppUsage
public Message obtainMessageOOO(int what, Object arg1, Object arg2, Object arg3) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = arg1;
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 246a50f..997b722 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -17,6 +17,7 @@
package com.android.internal.os;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
@@ -57,22 +58,27 @@
* + core_power.cluster1 * num running cores in cluster 1
*/
public static final String POWER_CPU_SUSPEND = "cpu.suspend";
+ @UnsupportedAppUsage
public static final String POWER_CPU_IDLE = "cpu.idle";
+ @UnsupportedAppUsage
public static final String POWER_CPU_ACTIVE = "cpu.active";
/**
* Power consumption when WiFi driver is scanning for networks.
*/
+ @UnsupportedAppUsage
public static final String POWER_WIFI_SCAN = "wifi.scan";
/**
* Power consumption when WiFi driver is on.
*/
+ @UnsupportedAppUsage
public static final String POWER_WIFI_ON = "wifi.on";
/**
* Power consumption when WiFi driver is transmitting/receiving.
*/
+ @UnsupportedAppUsage
public static final String POWER_WIFI_ACTIVE = "wifi.active";
//
@@ -101,6 +107,7 @@
/**
* Power consumption when GPS is on.
*/
+ @UnsupportedAppUsage
public static final String POWER_GPS_ON = "gps.on";
/**
@@ -115,6 +122,7 @@
* @deprecated
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String POWER_BLUETOOTH_ON = "bluetooth.on";
/**
@@ -131,6 +139,7 @@
* @deprecated
*/
@Deprecated
+ @UnsupportedAppUsage
public static final String POWER_BLUETOOTH_AT_CMD = "bluetooth.at";
/**
@@ -141,27 +150,32 @@
/**
* Power consumption when screen is on, not including the backlight power.
*/
+ @UnsupportedAppUsage
public static final String POWER_SCREEN_ON = "screen.on";
/**
* Power consumption when cell radio is on but not on a call.
*/
+ @UnsupportedAppUsage
public static final String POWER_RADIO_ON = "radio.on";
/**
* Power consumption when cell radio is hunting for a signal.
*/
+ @UnsupportedAppUsage
public static final String POWER_RADIO_SCANNING = "radio.scanning";
/**
* Power consumption when talking on the phone.
*/
+ @UnsupportedAppUsage
public static final String POWER_RADIO_ACTIVE = "radio.active";
/**
* Power consumption at full backlight brightness. If the backlight is at
* 50% brightness, then this should be multiplied by 0.5
*/
+ @UnsupportedAppUsage
public static final String POWER_SCREEN_FULL = "screen.full";
/**
@@ -224,6 +238,7 @@
private static final Object sLock = new Object();
@VisibleForTesting
+ @UnsupportedAppUsage
public PowerProfile(Context context) {
this(context, false);
}
@@ -371,6 +386,7 @@
}
}
+ @UnsupportedAppUsage
public int getNumCpuClusters() {
return mCpuClusters.length;
}
@@ -379,6 +395,7 @@
return mCpuClusters[cluster].numCpus;
}
+ @UnsupportedAppUsage
public int getNumSpeedStepsInCpuCluster(int cluster) {
if (cluster < 0 || cluster >= mCpuClusters.length) {
return 0; // index out of bound
@@ -442,6 +459,7 @@
* @param type the subsystem type
* @return the average current in milliAmps.
*/
+ @UnsupportedAppUsage
public double getAveragePower(String type) {
return getAveragePowerOrDefault(type, 0);
}
@@ -455,6 +473,7 @@
* If there is no data for multiple levels, the level is ignored.
* @return the average current in milliAmps.
*/
+ @UnsupportedAppUsage
public double getAveragePower(String type, int level) {
if (sPowerItemMap.containsKey(type)) {
return sPowerItemMap.get(type);
@@ -478,6 +497,7 @@
*
* @return the battery capacity in mAh
*/
+ @UnsupportedAppUsage
public double getBatteryCapacity() {
return getAveragePower(POWER_BATTERY_CAPACITY);
}
diff --git a/core/java/com/android/internal/os/SomeArgs.java b/core/java/com/android/internal/os/SomeArgs.java
index d9aa325..b9d53c1 100644
--- a/core/java/com/android/internal/os/SomeArgs.java
+++ b/core/java/com/android/internal/os/SomeArgs.java
@@ -16,6 +16,8 @@
package com.android.internal.os;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Helper class for passing more arguments though a message
* and avoiding allocation of a custom class for wrapping the
@@ -40,8 +42,11 @@
static final int WAIT_FINISHED = 2;
int mWaitState = WAIT_NONE;
+ @UnsupportedAppUsage
public Object arg1;
+ @UnsupportedAppUsage
public Object arg2;
+ @UnsupportedAppUsage
public Object arg3;
public Object arg4;
public Object arg5;
@@ -50,7 +55,9 @@
public Object arg8;
public Object arg9;
public int argi1;
+ @UnsupportedAppUsage
public int argi2;
+ @UnsupportedAppUsage
public int argi3;
public int argi4;
public int argi5;
@@ -60,6 +67,7 @@
/* do nothing - reduce visibility */
}
+ @UnsupportedAppUsage
public static SomeArgs obtain() {
synchronized (sPoolLock) {
if (sPoolSize > 0) {
@@ -85,6 +93,7 @@
}
}
+ @UnsupportedAppUsage
public void recycle() {
if (mInPool) {
throw new IllegalStateException("Already recycled.");
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index ac7dc8e2..8751517 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -19,15 +19,54 @@
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
-import static android.view.WindowManager.LayoutParams.*;
+import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
+import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
+import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
+import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
+import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
+import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
+import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
+import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT;
+import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
import android.annotation.NonNull;
import android.app.ActivityManager;
+import android.app.KeyguardManager;
import android.app.SearchManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.res.Configuration;
+import android.content.res.Resources.Theme;
+import android.content.res.TypedArray;
+import android.graphics.Color;
+import android.graphics.drawable.Drawable;
+import android.media.AudioManager;
+import android.media.session.MediaController;
import android.media.session.MediaSessionManager;
-import android.os.UserHandle;
-
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.provider.Settings;
import android.text.TextUtils;
+import android.transition.Scene;
+import android.transition.Transition;
+import android.transition.TransitionInflater;
+import android.transition.TransitionManager;
+import android.transition.TransitionSet;
+import android.util.AndroidRuntimeException;
+import android.util.EventLog;
+import android.util.Log;
+import android.util.SparseArray;
+import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.IRotationWatcher.Stub;
@@ -52,6 +91,13 @@
import android.view.ViewRootImpl.ActivityConfigCallback;
import android.view.Window;
import android.view.WindowManager;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
import com.android.internal.R;
import com.android.internal.view.menu.ContextMenuBuilder;
import com.android.internal.view.menu.IconMenuPresenter;
@@ -64,43 +110,6 @@
import com.android.internal.widget.DecorContentParent;
import com.android.internal.widget.SwipeDismissLayout;
-import android.app.ActivityManager;
-import android.app.KeyguardManager;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.res.Configuration;
-import android.content.res.Resources.Theme;
-import android.content.res.TypedArray;
-import android.graphics.Color;
-import android.graphics.drawable.Drawable;
-import android.media.AudioManager;
-import android.media.session.MediaController;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.provider.Settings;
-import android.transition.Scene;
-import android.transition.Transition;
-import android.transition.TransitionInflater;
-import android.transition.TransitionManager;
-import android.transition.TransitionSet;
-import android.util.AndroidRuntimeException;
-import android.util.EventLog;
-import android.util.Log;
-import android.util.SparseArray;
-import android.util.TypedValue;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -1377,7 +1386,8 @@
*/
private int getOptionsPanelGravity() {
try {
- return WindowManagerHolder.sWindowManager.getPreferredOptionsPanelGravity();
+ return WindowManagerHolder.sWindowManager.getPreferredOptionsPanelGravity(
+ getContext().getDisplay().getDisplayId());
} catch (RemoteException ex) {
Log.e(TAG, "Couldn't getOptionsPanelGravity; using default", ex);
return Gravity.CENTER | Gravity.BOTTOM;
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index a79e15a..b3af147 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -60,7 +60,7 @@
int uid, int initialPid, String message, int userId);
void onClearAllNotifications(int userId);
void onNotificationClear(String pkg, String tag, int id, int userId, String key,
- int dismissalSurface, in NotificationVisibility nv);
+ int dismissalSurface, int dismissalSentiment, in NotificationVisibility nv);
void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys,
in NotificationVisibility[] noLongerVisibleKeys);
void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded);
diff --git a/core/java/com/android/internal/util/AsyncChannel.java b/core/java/com/android/internal/util/AsyncChannel.java
index e760f25..69297b5 100644
--- a/core/java/com/android/internal/util/AsyncChannel.java
+++ b/core/java/com/android/internal/util/AsyncChannel.java
@@ -16,6 +16,7 @@
package com.android.internal.util;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -105,6 +106,7 @@
* msg.obj == the AsyncChannel
* msg.replyTo == dstMessenger if successful
*/
+ @UnsupportedAppUsage
public static final int CMD_CHANNEL_HALF_CONNECTED = BASE + 0;
/**
@@ -114,6 +116,7 @@
*
* msg.replyTo = srcMessenger.
*/
+ @UnsupportedAppUsage
public static final int CMD_CHANNEL_FULL_CONNECTION = BASE + 1;
/**
@@ -159,6 +162,7 @@
sCmdToString[CMD_CHANNEL_DISCONNECT - BASE] = "CMD_CHANNEL_DISCONNECT";
sCmdToString[CMD_CHANNEL_DISCONNECTED - BASE] = "CMD_CHANNEL_DISCONNECTED";
}
+ @UnsupportedAppUsage
protected static String cmdToString(int cmd) {
cmd -= BASE;
if ((cmd >= 0) && (cmd < sCmdToString.length)) {
@@ -169,6 +173,7 @@
}
/** Successful status always 0, !0 is an unsuccessful status */
+ @UnsupportedAppUsage
public static final int STATUS_SUCCESSFUL = 0;
/** Error attempting to bind on a connect */
@@ -204,6 +209,7 @@
/**
* AsyncChannel constructor
*/
+ @UnsupportedAppUsage
public AsyncChannel() {
}
@@ -255,6 +261,7 @@
*
* @return STATUS_SUCCESSFUL on success any other value is an error.
*/
+ @UnsupportedAppUsage
public int connectSync(Context srcContext, Handler srcHandler, Messenger dstMessenger) {
if (DBG) log("halfConnectSync srcHandler to the dstMessenger E");
@@ -370,6 +377,7 @@
* @param srcHandler
* @param dstMessenger
*/
+ @UnsupportedAppUsage
public void connect(Context srcContext, Handler srcHandler, Messenger dstMessenger) {
if (DBG) log("connect srcHandler to the dstMessenger E");
@@ -392,6 +400,7 @@
* @param srcHandler
* @param dstMessenger
*/
+ @UnsupportedAppUsage
public void connected(Context srcContext, Handler srcHandler, Messenger dstMessenger) {
if (DBG) log("connected srcHandler to the dstMessenger E");
@@ -446,6 +455,7 @@
/**
* Disconnect
*/
+ @UnsupportedAppUsage
public void disconnect() {
if ((mConnection != null) && (mSrcContext != null)) {
mSrcContext.unbindService(mConnection);
@@ -475,6 +485,7 @@
*
* @param msg
*/
+ @UnsupportedAppUsage
public void sendMessage(Message msg) {
msg.replyTo = mSrcMessenger;
try {
@@ -489,6 +500,7 @@
*
* @param what
*/
+ @UnsupportedAppUsage
public void sendMessage(int what) {
Message msg = Message.obtain();
msg.what = what;
@@ -501,6 +513,7 @@
* @param what
* @param arg1
*/
+ @UnsupportedAppUsage
public void sendMessage(int what, int arg1) {
Message msg = Message.obtain();
msg.what = what;
@@ -515,6 +528,7 @@
* @param arg1
* @param arg2
*/
+ @UnsupportedAppUsage
public void sendMessage(int what, int arg1, int arg2) {
Message msg = Message.obtain();
msg.what = what;
@@ -531,6 +545,7 @@
* @param arg2
* @param obj
*/
+ @UnsupportedAppUsage
public void sendMessage(int what, int arg1, int arg2, Object obj) {
Message msg = Message.obtain();
msg.what = what;
@@ -559,6 +574,7 @@
* @param srcMsg
* @param dstMsg
*/
+ @UnsupportedAppUsage
public void replyToMessage(Message srcMsg, Message dstMsg) {
try {
dstMsg.replyTo = mSrcMessenger;
@@ -575,6 +591,7 @@
* @param srcMsg
* @param what
*/
+ @UnsupportedAppUsage
public void replyToMessage(Message srcMsg, int what) {
Message msg = Message.obtain();
msg.what = what;
@@ -588,6 +605,7 @@
* @param what
* @param arg1
*/
+ @UnsupportedAppUsage
public void replyToMessage(Message srcMsg, int what, int arg1) {
Message msg = Message.obtain();
msg.what = what;
@@ -620,6 +638,7 @@
* @param arg2
* @param obj
*/
+ @UnsupportedAppUsage
public void replyToMessage(Message srcMsg, int what, int arg1, int arg2, Object obj) {
Message msg = Message.obtain();
msg.what = what;
@@ -636,6 +655,7 @@
* @param what
* @param obj
*/
+ @UnsupportedAppUsage
public void replyToMessage(Message srcMsg, int what, Object obj) {
Message msg = Message.obtain();
msg.what = what;
@@ -649,6 +669,7 @@
* @param msg to send
* @return reply message or null if an error.
*/
+ @UnsupportedAppUsage
public Message sendMessageSynchronously(Message msg) {
Message resultMsg = SyncMessenger.sendMessageSynchronously(mDstMessenger, msg);
return resultMsg;
@@ -690,6 +711,7 @@
* @param arg2
* @return reply message or null if an error.
*/
+ @UnsupportedAppUsage
public Message sendMessageSynchronously(int what, int arg1, int arg2) {
Message msg = Message.obtain();
msg.what = what;
diff --git a/core/java/com/android/internal/util/FastPrintWriter.java b/core/java/com/android/internal/util/FastPrintWriter.java
index cc2c4cf..981fbaa 100644
--- a/core/java/com/android/internal/util/FastPrintWriter.java
+++ b/core/java/com/android/internal/util/FastPrintWriter.java
@@ -16,6 +16,7 @@
package com.android.internal.util;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import android.util.Printer;
@@ -77,6 +78,7 @@
* @throws NullPointerException
* if {@code out} is {@code null}.
*/
+ @UnsupportedAppUsage
public FastPrintWriter(OutputStream out) {
this(out, false, 8192);
}
diff --git a/core/java/com/android/internal/util/IndentingPrintWriter.java b/core/java/com/android/internal/util/IndentingPrintWriter.java
index e453866..03a555e 100644
--- a/core/java/com/android/internal/util/IndentingPrintWriter.java
+++ b/core/java/com/android/internal/util/IndentingPrintWriter.java
@@ -16,6 +16,7 @@
package com.android.internal.util;
+import android.annotation.UnsupportedAppUsage;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
@@ -47,6 +48,7 @@
private char[] mSingleChar = new char[1];
+ @UnsupportedAppUsage
public IndentingPrintWriter(Writer writer, String singleIndent) {
this(writer, singleIndent, -1);
}
@@ -72,12 +74,14 @@
return this;
}
+ @UnsupportedAppUsage
public IndentingPrintWriter increaseIndent() {
mIndentBuilder.append(mSingleIndent);
mCurrentIndent = null;
return this;
}
+ @UnsupportedAppUsage
public IndentingPrintWriter decreaseIndent() {
mIndentBuilder.delete(0, mSingleIndent.length());
mCurrentIndent = null;
diff --git a/core/java/com/android/internal/util/JournaledFile.java b/core/java/com/android/internal/util/JournaledFile.java
index 5372fc0..258db2a 100644
--- a/core/java/com/android/internal/util/JournaledFile.java
+++ b/core/java/com/android/internal/util/JournaledFile.java
@@ -16,6 +16,8 @@
package com.android.internal.util;
+import android.annotation.UnsupportedAppUsage;
+
import java.io.File;
import java.io.IOException;
@@ -33,6 +35,7 @@
File mTemp;
boolean mWriting;
+ @UnsupportedAppUsage
public JournaledFile(File real, File temp) {
mReal = real;
mTemp = temp;
@@ -44,6 +47,7 @@
* it to the real one. If there is both a real file and a temp one, assumes that the
* temp one isn't fully written and deletes it.
*/
+ @UnsupportedAppUsage
public File chooseForRead() {
File result;
if (mReal.exists()) {
@@ -68,6 +72,7 @@
* <p>
* Call {@link #commit} to commit the changes, or {@link #rollback} to forget the changes.
*/
+ @UnsupportedAppUsage
public File chooseForWrite() {
if (mWriting) {
throw new IllegalStateException("uncommitted write already in progress");
@@ -95,6 +100,7 @@
/**
* Commit changes.
*/
+ @UnsupportedAppUsage
public void commit() {
if (!mWriting) {
throw new IllegalStateException("no file to commit");
@@ -106,6 +112,7 @@
/**
* Roll back changes.
*/
+ @UnsupportedAppUsage
public void rollback() {
if (!mWriting) {
throw new IllegalStateException("no file to roll back");
diff --git a/core/java/com/android/internal/util/XmlUtils.java b/core/java/com/android/internal/util/XmlUtils.java
index 3188d30..5da587b 100644
--- a/core/java/com/android/internal/util/XmlUtils.java
+++ b/core/java/com/android/internal/util/XmlUtils.java
@@ -16,6 +16,7 @@
package com.android.internal.util;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Bitmap.CompressFormat;
@@ -48,6 +49,7 @@
private static final String STRING_ARRAY_SEPARATOR = ":";
+ @UnsupportedAppUsage
public static void skipCurrentTag(XmlPullParser parser)
throws XmlPullParserException, IOException {
int outerDepth = parser.getDepth();
@@ -71,6 +73,7 @@
return defaultValue;
}
+ @UnsupportedAppUsage
public static final boolean
convertValueToBoolean(CharSequence value, boolean defaultValue)
{
@@ -87,6 +90,7 @@
return result;
}
+ @UnsupportedAppUsage
public static final int
convertValueToInt(CharSequence charSeq, int defaultValue)
{
@@ -183,6 +187,7 @@
* @see #writeValueXml
* @see #readMapXml
*/
+ @UnsupportedAppUsage
public static final void writeMapXml(Map val, OutputStream out)
throws XmlPullParserException, java.io.IOException {
XmlSerializer serializer = new FastXmlSerializer();
@@ -732,6 +737,7 @@
* #see #writeMapXml
*/
@SuppressWarnings("unchecked")
+ @UnsupportedAppUsage
public static final HashMap<String, ?> readMapXml(InputStream in)
throws XmlPullParserException, java.io.IOException
{
@@ -1550,6 +1556,7 @@
}
}
+ @UnsupportedAppUsage
public static final void beginDocument(XmlPullParser parser, String firstElementName) throws XmlPullParserException, IOException
{
int type;
@@ -1568,6 +1575,7 @@
}
}
+ @UnsupportedAppUsage
public static final void nextElement(XmlPullParser parser) throws XmlPullParserException, IOException
{
int type;
diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java
index 7178a0d..e3490f1 100644
--- a/core/java/com/android/internal/view/BaseIWindow.java
+++ b/core/java/com/android/internal/view/BaseIWindow.java
@@ -16,6 +16,7 @@
package com.android.internal.view;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import android.hardware.input.InputManager;
import android.os.Bundle;
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index 28291ae..189c8d5 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -21,6 +21,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -67,10 +68,12 @@
@GuardedBy("mLock")
@Nullable
+ @UnsupportedAppUsage
private InputConnection mInputConnection;
private Looper mMainLooper;
private Handler mH;
+ @UnsupportedAppUsage
private Object mLock = new Object();
@GuardedBy("mLock")
private boolean mFinished = false;
diff --git a/core/java/com/android/internal/view/InputBindResult.java b/core/java/com/android/internal/view/InputBindResult.java
index f05bd32..9d4383f 100644
--- a/core/java/com/android/internal/view/InputBindResult.java
+++ b/core/java/com/android/internal/view/InputBindResult.java
@@ -19,6 +19,7 @@
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
@@ -151,6 +152,7 @@
/**
* The input method service.
*/
+ @UnsupportedAppUsage
public final IInputMethodSession method;
/**
@@ -230,6 +232,7 @@
/**
* Used to make this class parcelable.
*/
+ @UnsupportedAppUsage
public static final Parcelable.Creator<InputBindResult> CREATOR =
new Parcelable.Creator<InputBindResult>() {
@Override
diff --git a/core/java/com/android/internal/view/menu/ActionMenuItemView.java b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
index 92e1d80..eb94db3 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuItemView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
@@ -16,6 +16,7 @@
package com.android.internal.view.menu;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -224,6 +225,7 @@
updateTextButtonVisibility();
}
+ @UnsupportedAppUsage
public boolean hasText() {
return !TextUtils.isEmpty(getText());
}
diff --git a/core/java/com/android/internal/view/menu/MenuBuilder.java b/core/java/com/android/internal/view/menu/MenuBuilder.java
index 48485e0..0e07ca7 100644
--- a/core/java/com/android/internal/view/menu/MenuBuilder.java
+++ b/core/java/com/android/internal/view/menu/MenuBuilder.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -64,6 +65,7 @@
0, /* SELECTED_ALTERNATIVE */
};
+ @UnsupportedAppUsage
private final Context mContext;
private final Resources mResources;
@@ -173,6 +175,7 @@
* @param item The menu item that is selected
* @return whether the menu item selection was handled
*/
+ @UnsupportedAppUsage
public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item);
/**
@@ -180,6 +183,7 @@
*
* @param menu the menu that has changed modes
*/
+ @UnsupportedAppUsage
public void onMenuModeChange(MenuBuilder menu);
}
@@ -190,6 +194,7 @@
public boolean invokeItem(MenuItemImpl item);
}
+ @UnsupportedAppUsage
public MenuBuilder(Context context) {
mContext = context;
mResources = context.getResources();
@@ -205,6 +210,7 @@
setShortcutsVisibleInner(true);
}
+ @UnsupportedAppUsage
public MenuBuilder setDefaultShowAsAction(int defaultShowAsAction) {
mDefaultShowAsAction = defaultShowAsAction;
return this;
@@ -217,6 +223,7 @@
*
* @param presenter The presenter to add
*/
+ @UnsupportedAppUsage
public void addMenuPresenter(MenuPresenter presenter) {
addMenuPresenter(presenter, mContext);
}
@@ -230,6 +237,7 @@
* @param presenter The presenter to add
* @param menuContext The context used to inflate menu items
*/
+ @UnsupportedAppUsage
public void addMenuPresenter(MenuPresenter presenter, Context menuContext) {
mPresenters.add(new WeakReference<MenuPresenter>(presenter));
presenter.initForMenu(menuContext, this);
@@ -242,6 +250,7 @@
*
* @param presenter The presenter to remove
*/
+ @UnsupportedAppUsage
public void removeMenuPresenter(MenuPresenter presenter) {
for (WeakReference<MenuPresenter> ref : mPresenters) {
final MenuPresenter item = ref.get();
@@ -401,6 +410,7 @@
return ACTION_VIEW_STATES_KEY;
}
+ @UnsupportedAppUsage
public void setCallback(Callback cb) {
mCallback = cb;
}
@@ -768,6 +778,7 @@
return mResources;
}
+ @UnsupportedAppUsage
public Context getContext() {
return mContext;
}
@@ -1004,6 +1015,7 @@
* {@link #startDispatchingItemsChanged()} is called. Useful when
* many menu operations are going to be performed as a batch.
*/
+ @UnsupportedAppUsage
public void stopDispatchingItemsChanged() {
if (!mPreventDispatchingItemsChanged) {
mPreventDispatchingItemsChanged = true;
@@ -1011,6 +1023,7 @@
}
}
+ @UnsupportedAppUsage
public void startDispatchingItemsChanged() {
mPreventDispatchingItemsChanged = false;
@@ -1041,6 +1054,7 @@
}
@NonNull
+ @UnsupportedAppUsage
public ArrayList<MenuItemImpl> getVisibleItems() {
if (!mIsVisibleItemsStale) return mVisibleItems;
@@ -1131,6 +1145,7 @@
return mActionItems;
}
+ @UnsupportedAppUsage
public ArrayList<MenuItemImpl> getNonActionItems() {
flagActionItems();
return mNonActionItems;
@@ -1235,10 +1250,12 @@
return this;
}
+ @UnsupportedAppUsage
public CharSequence getHeaderTitle() {
return mHeaderTitle;
}
+ @UnsupportedAppUsage
public Drawable getHeaderIcon() {
return mHeaderIcon;
}
@@ -1251,6 +1268,7 @@
* Gets the root menu (if this is a submenu, find its root menu).
* @return The root menu.
*/
+ @UnsupportedAppUsage
public MenuBuilder getRootMenu() {
return this;
}
@@ -1262,10 +1280,12 @@
*
* @param menuInfo The extra menu information to add.
*/
+ @UnsupportedAppUsage
public void setCurrentMenuInfo(ContextMenuInfo menuInfo) {
mCurrentMenuInfo = menuInfo;
}
+ @UnsupportedAppUsage
void setOptionalIconsVisible(boolean visible) {
mOptionalIconsVisible = visible;
}
@@ -1296,6 +1316,7 @@
return expanded;
}
+ @UnsupportedAppUsage
public boolean collapseItemActionView(MenuItemImpl item) {
if (mPresenters.isEmpty() || mExpandedItem != item) return false;
diff --git a/core/java/com/android/internal/view/menu/MenuItemImpl.java b/core/java/com/android/internal/view/menu/MenuItemImpl.java
index 0c5ea63..994a9c1 100644
--- a/core/java/com/android/internal/view/menu/MenuItemImpl.java
+++ b/core/java/com/android/internal/view/menu/MenuItemImpl.java
@@ -19,6 +19,7 @@
import com.android.internal.view.menu.MenuView.ItemView;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -67,6 +68,7 @@
* needed (if the Drawable isn't already obtained--only one of the two is
* needed).
*/
+ @UnsupportedAppUsage
private int mIconResId = NO_ICON;
private ColorStateList mIconTintList = null;
@@ -139,6 +141,7 @@
*
* @return true if the invocation was handled, false otherwise
*/
+ @UnsupportedAppUsage
public boolean invoke() {
if (mClickListener != null &&
mClickListener.onMenuItemClick(this)) {
@@ -565,6 +568,7 @@
return this;
}
+ @UnsupportedAppUsage
public void setExclusiveCheckable(boolean exclusive) {
mFlags = (mFlags & ~EXCLUSIVE) | (exclusive ? EXCLUSIVE : 0);
}
@@ -638,6 +642,7 @@
return mTitle != null ? mTitle.toString() : null;
}
+ @UnsupportedAppUsage
void setMenuInfo(ContextMenuInfo menuInfo) {
mMenuInfo = menuInfo;
}
@@ -657,14 +662,17 @@
return mMenu.getOptionalIconsVisible();
}
+ @UnsupportedAppUsage
public boolean isActionButton() {
return (mFlags & IS_ACTION) == IS_ACTION;
}
+ @UnsupportedAppUsage
public boolean requestsActionButton() {
return (mShowAsAction & SHOW_AS_ACTION_IF_ROOM) == SHOW_AS_ACTION_IF_ROOM;
}
+ @UnsupportedAppUsage
public boolean requiresActionButton() {
return (mShowAsAction & SHOW_AS_ACTION_ALWAYS) == SHOW_AS_ACTION_ALWAYS;
}
@@ -806,6 +814,7 @@
return false;
}
+ @UnsupportedAppUsage
public void setActionViewExpanded(boolean isExpanded) {
mIsActionViewExpanded = isExpanded;
mMenu.onItemsChanged(false);
diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
index 324f923..e6d3460 100644
--- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
@@ -22,6 +22,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
@@ -49,16 +50,19 @@
// Mutable cached popup menu properties.
private View mAnchorView;
private int mDropDownGravity = Gravity.START;
+ @UnsupportedAppUsage
private boolean mForceShowIcon;
private Callback mPresenterCallback;
private MenuPopup mPopup;
private OnDismissListener mOnDismissListener;
+ @UnsupportedAppUsage
public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menu) {
this(context, menu, null, false, com.android.internal.R.attr.popupMenuStyle, 0);
}
+ @UnsupportedAppUsage
public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menu,
@NonNull View anchorView) {
this(context, menu, anchorView, false, com.android.internal.R.attr.popupMenuStyle, 0);
@@ -92,6 +96,7 @@
*
* @param anchor the view to which the popup window should be anchored
*/
+ @UnsupportedAppUsage
public void setAnchorView(@NonNull View anchor) {
mAnchorView = anchor;
}
@@ -105,6 +110,7 @@
* @param forceShowIcon {@code true} to force icons to be shown, or
* {@code false} for icons to be optionally shown
*/
+ @UnsupportedAppUsage
public void setForceShowIcon(boolean forceShowIcon) {
mForceShowIcon = forceShowIcon;
if (mPopup != null) {
@@ -119,6 +125,7 @@
*
* @param gravity alignment of the popup relative to the anchor
*/
+ @UnsupportedAppUsage
public void setGravity(int gravity) {
mDropDownGravity = gravity;
}
@@ -130,6 +137,7 @@
return mDropDownGravity;
}
+ @UnsupportedAppUsage
public void show() {
if (!tryShow()) {
throw new IllegalStateException("MenuPopupHelper cannot be used without an anchor");
@@ -143,6 +151,7 @@
}
@NonNull
+ @UnsupportedAppUsage
public MenuPopup getPopup() {
if (mPopup == null) {
mPopup = createPopup();
@@ -156,6 +165,7 @@
* @return {@code true} if the popup was shown or was already showing prior to calling this
* method, {@code false} otherwise
*/
+ @UnsupportedAppUsage
public boolean tryShow() {
if (isShowing()) {
return true;
@@ -280,6 +290,7 @@
* Dismisses the popup, if showing.
*/
@Override
+ @UnsupportedAppUsage
public void dismiss() {
if (isShowing()) {
mPopup.dismiss();
diff --git a/core/java/com/android/internal/view/menu/MenuPresenter.java b/core/java/com/android/internal/view/menu/MenuPresenter.java
index 65bdc09..c5df8ad 100644
--- a/core/java/com/android/internal/view/menu/MenuPresenter.java
+++ b/core/java/com/android/internal/view/menu/MenuPresenter.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.view.ViewGroup;
@@ -47,6 +48,7 @@
* @return true if the Callback will handle presenting the submenu, false if
* the presenter should attempt to do so.
*/
+ @UnsupportedAppUsage
public boolean onOpenSubMenu(MenuBuilder subMenu);
}
diff --git a/core/java/com/android/internal/view/menu/MenuView.java b/core/java/com/android/internal/view/menu/MenuView.java
index 407caae..67a5530 100644
--- a/core/java/com/android/internal/view/menu/MenuView.java
+++ b/core/java/com/android/internal/view/menu/MenuView.java
@@ -19,6 +19,7 @@
import com.android.internal.view.menu.MenuBuilder;
import com.android.internal.view.menu.MenuItemImpl;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.drawable.Drawable;
/**
@@ -40,6 +41,7 @@
* Returns the default animations to be used for this menu when entering/exiting.
* @return A resource ID for the default animations to be used for this menu.
*/
+ @UnsupportedAppUsage
public int getWindowAnimations();
/**
@@ -61,6 +63,7 @@
* Gets the item data that this view is displaying.
* @return the item data, or null if there is not one
*/
+ @UnsupportedAppUsage
public MenuItemImpl getItemData();
/**
diff --git a/core/java/com/android/internal/view/menu/SubMenuBuilder.java b/core/java/com/android/internal/view/menu/SubMenuBuilder.java
index 897440e..cf6d974 100644
--- a/core/java/com/android/internal/view/menu/SubMenuBuilder.java
+++ b/core/java/com/android/internal/view/menu/SubMenuBuilder.java
@@ -16,6 +16,7 @@
package com.android.internal.view.menu;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.Menu;
@@ -67,11 +68,13 @@
}
@Override
+ @UnsupportedAppUsage
public void setCallback(Callback callback) {
mParentMenu.setCallback(callback);
}
@Override
+ @UnsupportedAppUsage
public MenuBuilder getRootMenu() {
return mParentMenu.getRootMenu();
}
diff --git a/core/java/com/android/internal/widget/CachingIconView.java b/core/java/com/android/internal/widget/CachingIconView.java
index f3b6552..35bff6d 100644
--- a/core/java/com/android/internal/widget/CachingIconView.java
+++ b/core/java/com/android/internal/widget/CachingIconView.java
@@ -18,6 +18,7 @@
import android.annotation.DrawableRes;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
@@ -44,6 +45,7 @@
private boolean mForceHidden;
private int mDesiredVisibility;
+ @UnsupportedAppUsage
public CachingIconView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
diff --git a/core/java/com/android/internal/widget/MessagingLinearLayout.java b/core/java/com/android/internal/widget/MessagingLinearLayout.java
index 64b1f24..0c8613b 100644
--- a/core/java/com/android/internal/widget/MessagingLinearLayout.java
+++ b/core/java/com/android/internal/widget/MessagingLinearLayout.java
@@ -111,14 +111,16 @@
final int childHeight = child.getMeasuredHeight();
int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin +
lp.bottomMargin + spacing);
- first = false;
int measureType = MessagingChild.MEASURED_NORMAL;
if (messagingChild != null) {
measureType = messagingChild.getMeasuredType();
linesRemaining -= messagingChild.getConsumedLines();
}
- boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED;
- boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL;
+
+ // We never measure the first item as too small, we want to at least show something.
+ boolean isTooSmall = measureType == MessagingChild.MEASURED_TOO_SMALL && !first;
+ boolean isShortened = measureType == MessagingChild.MEASURED_SHORTENED
+ || measureType == MessagingChild.MEASURED_TOO_SMALL && first;
if (newHeight <= targetHeight && !isTooSmall) {
totalHeight = newHeight;
measuredWidth = Math.max(measuredWidth,
@@ -131,6 +133,7 @@
} else {
break;
}
+ first = false;
}
setMeasuredDimension(
diff --git a/core/java/com/android/internal/widget/ScrollingTabContainerView.java b/core/java/com/android/internal/widget/ScrollingTabContainerView.java
index 311bfac..5d48ab9 100644
--- a/core/java/com/android/internal/widget/ScrollingTabContainerView.java
+++ b/core/java/com/android/internal/widget/ScrollingTabContainerView.java
@@ -20,6 +20,7 @@
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActionBar;
import android.content.Context;
import android.content.res.Configuration;
@@ -67,6 +68,7 @@
private static final int FADE_DURATION = 200;
+ @UnsupportedAppUsage
public ScrollingTabContainerView(Context context) {
super(context);
setHorizontalScrollBarEnabled(false);
@@ -134,6 +136,7 @@
return mTabSpinner != null && mTabSpinner.getParent() == this;
}
+ @UnsupportedAppUsage
public void setAllowCollapse(boolean allowCollapse) {
mAllowCollapse = allowCollapse;
}
@@ -169,6 +172,7 @@
return false;
}
+ @UnsupportedAppUsage
public void setTabSelected(int position) {
mSelectedTabIndex = position;
final int tabCount = mTabLayout.getChildCount();
@@ -220,6 +224,7 @@
mStackedTabMaxWidth = abp.getStackedTabMaxWidth();
}
+ @UnsupportedAppUsage
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
@@ -244,6 +249,7 @@
}
}
+ @UnsupportedAppUsage
public void animateToTab(final int position) {
final View tabView = mTabLayout.getChildAt(position);
if (mTabSelector != null) {
@@ -293,6 +299,7 @@
return tabView;
}
+ @UnsupportedAppUsage
public void addTab(ActionBar.Tab tab, boolean setSelected) {
TabView tabView = createTabView(mContext, tab, false);
mTabLayout.addView(tabView, new LinearLayout.LayoutParams(0,
@@ -308,6 +315,7 @@
}
}
+ @UnsupportedAppUsage
public void addTab(ActionBar.Tab tab, int position, boolean setSelected) {
final TabView tabView = createTabView(mContext, tab, false);
mTabLayout.addView(tabView, position, new LinearLayout.LayoutParams(
@@ -323,6 +331,7 @@
}
}
+ @UnsupportedAppUsage
public void updateTab(int position) {
((TabView) mTabLayout.getChildAt(position)).update();
if (mTabSpinner != null) {
@@ -333,6 +342,7 @@
}
}
+ @UnsupportedAppUsage
public void removeTabAt(int position) {
mTabLayout.removeViewAt(position);
if (mTabSpinner != null) {
@@ -343,6 +353,7 @@
}
}
+ @UnsupportedAppUsage
public void removeAllTabs() {
mTabLayout.removeAllViews();
if (mTabSpinner != null) {
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index c5be8e4..0a787b9 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -169,6 +169,10 @@
final ArrayMap<String, ArraySet<String>> mProductPrivAppPermissions = new ArrayMap<>();
final ArrayMap<String, ArraySet<String>> mProductPrivAppDenyPermissions = new ArrayMap<>();
+ final ArrayMap<String, ArraySet<String>> mProductServicesPrivAppPermissions = new ArrayMap<>();
+ final ArrayMap<String, ArraySet<String>> mProductServicesPrivAppDenyPermissions =
+ new ArrayMap<>();
+
final ArrayMap<String, ArrayMap<String, Boolean>> mOemPermissions = new ArrayMap<>();
public static SystemConfig getInstance() {
@@ -276,6 +280,14 @@
return mProductPrivAppDenyPermissions.get(packageName);
}
+ public ArraySet<String> getProductServicesPrivAppPermissions(String packageName) {
+ return mProductServicesPrivAppPermissions.get(packageName);
+ }
+
+ public ArraySet<String> getProductServicesPrivAppDenyPermissions(String packageName) {
+ return mProductServicesPrivAppDenyPermissions.get(packageName);
+ }
+
public Map<String, Boolean> getOemPermissions(String packageName) {
final Map<String, Boolean> oemPermissions = mOemPermissions.get(packageName);
if (oemPermissions != null) {
@@ -326,6 +338,17 @@
Environment.getProductDirectory(), "etc", "sysconfig"), productPermissionFlag);
readPermissions(Environment.buildPath(
Environment.getProductDirectory(), "etc", "permissions"), productPermissionFlag);
+
+ // Allow /product_services to customize system configs around libs, features, permissions
+ // and apps.
+ int productServicesPermissionFlag = ALLOW_LIBS | ALLOW_FEATURES | ALLOW_PERMISSIONS |
+ ALLOW_APP_CONFIGS | ALLOW_PRIVAPP_PERMISSIONS;
+ readPermissions(Environment.buildPath(
+ Environment.getProductServicesDirectory(), "etc", "sysconfig"),
+ productServicesPermissionFlag);
+ readPermissions(Environment.buildPath(
+ Environment.getProductServicesDirectory(), "etc", "permissions"),
+ productServicesPermissionFlag);
}
void readPermissions(File libraryDir, int permissionFlag) {
@@ -659,22 +682,27 @@
}
XmlUtils.skipCurrentTag(parser);
} else if ("privapp-permissions".equals(name) && allowPrivappPermissions) {
- // privapp permissions from system, vendor and product partitions are stored
- // separately. This is to prevent xml files in the vendor partition from
- // granting permissions to priv apps in the system partition and vice
- // versa.
+ // privapp permissions from system, vendor, product and product_services
+ // partitions are stored separately. This is to prevent xml files in the vendor
+ // partition from granting permissions to priv apps in the system partition and
+ // vice versa.
boolean vendor = permFile.toPath().startsWith(
- Environment.getVendorDirectory().toPath())
+ Environment.getVendorDirectory().toPath() + "/")
|| permFile.toPath().startsWith(
- Environment.getOdmDirectory().toPath());
+ Environment.getOdmDirectory().toPath() + "/");
boolean product = permFile.toPath().startsWith(
- Environment.getProductDirectory().toPath());
+ Environment.getProductDirectory().toPath() + "/");
+ boolean productServices = permFile.toPath().startsWith(
+ Environment.getProductServicesDirectory().toPath() + "/");
if (vendor) {
readPrivAppPermissions(parser, mVendorPrivAppPermissions,
mVendorPrivAppDenyPermissions);
} else if (product) {
readPrivAppPermissions(parser, mProductPrivAppPermissions,
mProductPrivAppDenyPermissions);
+ } else if (productServices) {
+ readPrivAppPermissions(parser, mProductServicesPrivAppPermissions,
+ mProductServicesPrivAppDenyPermissions);
} else {
readPrivAppPermissions(parser, mPrivAppPermissions,
mPrivAppDenyPermissions);
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/java/org/apache/http/conn/ssl/AbstractVerifier.java b/core/java/org/apache/http/conn/ssl/AbstractVerifier.java
index b9349b39..36d6e22 100644
--- a/core/java/org/apache/http/conn/ssl/AbstractVerifier.java
+++ b/core/java/org/apache/http/conn/ssl/AbstractVerifier.java
@@ -46,6 +46,7 @@
import java.util.logging.Logger;
import java.util.logging.Level;
+import android.annotation.UnsupportedAppUsage;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
@@ -76,6 +77,7 @@
* Looks like we're the only implementation guarding against this.
* Firefox, Curl, Sun Java 1.4, 5, 6 don't bother with this check.
*/
+ @UnsupportedAppUsage
private final static String[] BAD_COUNTRY_2LDS =
{ "ac", "co", "com", "ed", "edu", "go", "gouv", "gov", "info",
"lg", "ne", "net", "or", "org" };
diff --git a/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java b/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java
index 250932b..65be161 100644
--- a/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java
+++ b/core/java/org/apache/http/conn/ssl/SSLSocketFactory.java
@@ -36,6 +36,7 @@
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
+import android.annotation.UnsupportedAppUsage;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
@@ -174,9 +175,13 @@
return NoPreloadHolder.DEFAULT_FACTORY;
}
+ @UnsupportedAppUsage
private final SSLContext sslcontext;
+ @UnsupportedAppUsage
private final javax.net.ssl.SSLSocketFactory socketfactory;
+ @UnsupportedAppUsage
private final HostNameResolver nameResolver;
+ @UnsupportedAppUsage
private X509HostnameVerifier hostnameVerifier = BROWSER_COMPATIBLE_HOSTNAME_VERIFIER;
public SSLSocketFactory(
@@ -233,6 +238,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public SSLSocketFactory(javax.net.ssl.SSLSocketFactory socketfactory) {
super();
this.sslcontext = null;
@@ -245,6 +251,7 @@
* This constructor is used exclusively to instantiate the factory for
* {@link #getSocketFactory getSocketFactory}.
*/
+ @UnsupportedAppUsage
private SSLSocketFactory() {
super();
this.sslcontext = null;
@@ -252,6 +259,7 @@
this.nameResolver = null;
}
+ @UnsupportedAppUsage
private static KeyManager[] createKeyManagers(final KeyStore keystore, final String password)
throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException {
if (keystore == null) {
@@ -263,6 +271,7 @@
return kmfactory.getKeyManagers();
}
+ @UnsupportedAppUsage
private static TrustManager[] createTrustManagers(final KeyStore keystore)
throws KeyStoreException, NoSuchAlgorithmException {
if (keystore == null) {
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index 6316da5..bb8ee14 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -93,6 +93,7 @@
"android_os_HwBlob.cpp",
"android_os_HwParcel.cpp",
"android_os_HwRemoteBinder.cpp",
+ "android_os_NativeHandle.cpp",
"android_os_MemoryFile.cpp",
"android_os_MessageQueue.cpp",
"android_os_Parcel.cpp",
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 7fe095b..6b55ed6 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -168,6 +168,7 @@
extern int register_android_os_HwBlob(JNIEnv *env);
extern int register_android_os_HwParcel(JNIEnv *env);
extern int register_android_os_HwRemoteBinder(JNIEnv *env);
+extern int register_android_os_NativeHandle(JNIEnv *env);
extern int register_android_os_MessageQueue(JNIEnv* env);
extern int register_android_os_Parcel(JNIEnv* env);
extern int register_android_os_SELinux(JNIEnv* env);
@@ -1348,6 +1349,7 @@
REG_JNI(register_android_os_HwBlob),
REG_JNI(register_android_os_HwParcel),
REG_JNI(register_android_os_HwRemoteBinder),
+ REG_JNI(register_android_os_NativeHandle),
REG_JNI(register_android_os_VintfObject),
REG_JNI(register_android_os_VintfRuntimeInfo),
REG_JNI(register_android_nio_utils),
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index e5aea97..8083a6a 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -310,177 +310,17 @@
using namespace android;
using namespace android::bitmap;
-///////////////////////////////////////////////////////////////////////////////
-// Conversions to/from SkColor, for get/setPixels, and the create method, which
-// is basically like setPixels
-
-typedef void (*FromColorProc)(void* dst, const SkColor src[], int width,
- int x, int y);
-
-static void FromColor_F16(void* dst, const SkColor src[], int width,
- int, int) {
- uint64_t* d = (uint64_t*)dst;
-
- for (int i = 0; i < width; i++) {
- *d++ = SkColor4f::FromColor(*src++).premul().toF16();
- }
-}
-
-static void FromColor_F16_Raw(void* dst, const SkColor src[], int width,
- int, int) {
- uint64_t* d = (uint64_t*)dst;
-
- for (int i = 0; i < width; i++) {
- const SkColor4f color = SkColor4f::FromColor(*src++);
- uint16_t* scratch = reinterpret_cast<uint16_t*>(d++);
- scratch[0] = SkFloatToHalf(color.fR);
- scratch[1] = SkFloatToHalf(color.fG);
- scratch[2] = SkFloatToHalf(color.fB);
- scratch[3] = SkFloatToHalf(color.fA);
- }
-}
-
-static void FromColor_D32(void* dst, const SkColor src[], int width,
- int, int) {
- SkPMColor* d = (SkPMColor*)dst;
-
- for (int i = 0; i < width; i++) {
- *d++ = SkPreMultiplyColor(*src++);
- }
-}
-
-static void FromColor_D32_Raw(void* dst, const SkColor src[], int width,
- int, int) {
- // Needed to thwart the unreachable code detection from clang.
- static const bool sk_color_ne_zero = SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER;
-
- // SkColor's ordering may be different from SkPMColor
- if (sk_color_ne_zero) {
- memcpy(dst, src, width * sizeof(SkColor));
- return;
- }
-
- // order isn't same, repack each pixel manually
- SkPMColor* d = (SkPMColor*)dst;
- for (int i = 0; i < width; i++) {
- SkColor c = *src++;
- *d++ = SkPackARGB32NoCheck(SkColorGetA(c), SkColorGetR(c),
- SkColorGetG(c), SkColorGetB(c));
- }
-}
-
-static void FromColor_D565(void* dst, const SkColor src[], int width,
- int x, int y) {
- uint16_t* d = (uint16_t*)dst;
-
- DITHER_565_SCAN(y);
- for (int stop = x + width; x < stop; x++) {
- SkColor c = *src++;
- *d++ = SkDitherRGBTo565(SkColorGetR(c), SkColorGetG(c), SkColorGetB(c),
- DITHER_VALUE(x));
- }
-}
-
-static void FromColor_D4444(void* dst, const SkColor src[], int width,
- int x, int y) {
- SkPMColor16* d = (SkPMColor16*)dst;
-
- DITHER_4444_SCAN(y);
- for (int stop = x + width; x < stop; x++) {
- SkPMColor pmc = SkPreMultiplyColor(*src++);
- *d++ = SkDitherARGB32To4444(pmc, DITHER_VALUE(x));
-// *d++ = SkPixel32ToPixel4444(pmc);
- }
-}
-
-static void FromColor_D4444_Raw(void* dst, const SkColor src[], int width,
- int x, int y) {
- SkPMColor16* d = (SkPMColor16*)dst;
-
- DITHER_4444_SCAN(y);
- for (int stop = x + width; x < stop; x++) {
- SkColor c = *src++;
-
- // SkPMColor is used because the ordering is ARGB32, even though the target actually premultiplied
- SkPMColor pmc = SkPackARGB32NoCheck(SkColorGetA(c), SkColorGetR(c),
- SkColorGetG(c), SkColorGetB(c));
- *d++ = SkDitherARGB32To4444(pmc, DITHER_VALUE(x));
-// *d++ = SkPixel32ToPixel4444(pmc);
- }
-}
-
-static void FromColor_DA8(void* dst, const SkColor src[], int width, int x, int y) {
- uint8_t* d = (uint8_t*)dst;
-
- for (int stop = x + width; x < stop; x++) {
- *d++ = SkColorGetA(*src++);
- }
-}
-
-// can return NULL
-static FromColorProc ChooseFromColorProc(const SkBitmap& bitmap) {
- switch (bitmap.colorType()) {
- case kN32_SkColorType:
- return bitmap.alphaType() == kPremul_SkAlphaType ? FromColor_D32 : FromColor_D32_Raw;
- case kARGB_4444_SkColorType:
- return bitmap.alphaType() == kPremul_SkAlphaType ? FromColor_D4444 :
- FromColor_D4444_Raw;
- case kRGB_565_SkColorType:
- return FromColor_D565;
- case kAlpha_8_SkColorType:
- return FromColor_DA8;
- case kRGBA_F16_SkColorType:
- return bitmap.alphaType() == kPremul_SkAlphaType ? FromColor_F16 : FromColor_F16_Raw;
- default:
- break;
- }
- return NULL;
-}
-
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();
- FromColorProc proc = ChooseFromColorProc(dstBitmap);
-
- if (NULL == dst || NULL == proc) {
- return false;
- }
-
+ int x, int y, int width, int height, SkBitmap* dstBitmap) {
const jint* array = env->GetIntArrayElements(srcColors, NULL);
const SkColor* src = (const SkColor*)array + srcOffset;
- // reset to to actual choice from caller
- dst = dstBitmap.getAddr(x, y);
+ auto sRGB = SkColorSpace::MakeSRGB();
+ SkImageInfo srcInfo = SkImageInfo::Make(
+ width, height, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType, sRGB);
+ SkPixmap srcPM(srcInfo, src, srcStride * 4);
- SkColorSpace* colorSpace = dstBitmap.colorSpace();
- if (dstBitmap.colorType() == kRGBA_F16_SkColorType ||
- GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
- // now copy/convert each scanline
- for (int y = 0; y < height; y++) {
- proc(dst, src, width, x, y);
- src += srcStride;
- dst = (char*)dst + dstBitmap.rowBytes();
- }
- } else {
- auto sRGB = SkColorSpace::MakeSRGB();
- auto xform = SkColorSpaceXform::New(sRGB.get(), colorSpace);
-
- std::unique_ptr<SkColor[]> row(new SkColor[width]);
-
- // now copy/convert each scanline
- for (int y = 0; y < height; y++) {
- memcpy(row.get(), src, sizeof(SkColor) * width);
- xform->apply(SkColorSpaceXform::kBGRA_8888_ColorFormat, row.get(),
- SkColorSpaceXform::kBGRA_8888_ColorFormat, row.get(), width,
- SkAlphaType::kUnpremul_SkAlphaType);
-
- proc(dst, row.get(), width, x, y);
- src += srcStride;
- dst = (char*)dst + dstBitmap.rowBytes();
- }
- }
-
- dstBitmap.notifyPixelsChanged();
+ dstBitmap->writePixels(srcPM, x, y);
env->ReleaseIntArrayElements(srcColors, const_cast<jint*>(array), JNI_ABORT);
return true;
@@ -488,90 +328,6 @@
//////////////////// ToColor procs
-typedef void (*ToColorProc)(SkColor dst[], const void* src, int width);
-
-static void ToColor_F16_Alpha(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- uint64_t* s = (uint64_t*)src;
- do {
- *dst++ = SkPM4f::FromF16((const uint16_t*) s++).unpremul().toSkColor();
- } while (--width != 0);
-}
-
-static void ToColor_F16_Raw(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- uint64_t* s = (uint64_t*)src;
- do {
- *dst++ = Sk4f_toS32(swizzle_rb(SkHalfToFloat_finite_ftz(*s++)));
- } while (--width != 0);
-}
-
-static void ToColor_S32_Alpha(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const SkPMColor* s = (const SkPMColor*)src;
- do {
- *dst++ = SkUnPreMultiply::PMColorToColor(*s++);
- } while (--width != 0);
-}
-
-static void ToColor_S32_Raw(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const SkPMColor* s = (const SkPMColor*)src;
- do {
- SkPMColor c = *s++;
- *dst++ = SkColorSetARGB(SkGetPackedA32(c), SkGetPackedR32(c),
- SkGetPackedG32(c), SkGetPackedB32(c));
- } while (--width != 0);
-}
-
-static void ToColor_S32_Opaque(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const SkPMColor* s = (const SkPMColor*)src;
- do {
- SkPMColor c = *s++;
- *dst++ = SkColorSetRGB(SkGetPackedR32(c), SkGetPackedG32(c),
- SkGetPackedB32(c));
- } while (--width != 0);
-}
-
-static void ToColor_S4444_Alpha(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const SkPMColor16* s = (const SkPMColor16*)src;
- do {
- *dst++ = SkUnPreMultiply::PMColorToColor(SkPixel4444ToPixel32(*s++));
- } while (--width != 0);
-}
-
-static void ToColor_S4444_Raw(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const SkPMColor16* s = (const SkPMColor16*)src;
- do {
- SkPMColor c = SkPixel4444ToPixel32(*s++);
- *dst++ = SkColorSetARGB(SkGetPackedA32(c), SkGetPackedR32(c),
- SkGetPackedG32(c), SkGetPackedB32(c));
- } while (--width != 0);
-}
-
-static void ToColor_S4444_Opaque(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const SkPMColor16* s = (const SkPMColor16*)src;
- do {
- SkPMColor c = SkPixel4444ToPixel32(*s++);
- *dst++ = SkColorSetRGB(SkGetPackedR32(c), SkGetPackedG32(c),
- SkGetPackedB32(c));
- } while (--width != 0);
-}
-
-static void ToColor_S565(SkColor dst[], const void* src, int width) {
- SkASSERT(width > 0);
- const uint16_t* s = (const uint16_t*)src;
- do {
- uint16_t c = *s++;
- *dst++ = SkColorSetRGB(SkPacked16ToR32(c), SkPacked16ToG32(c),
- SkPacked16ToB32(c));
- } while (--width != 0);
-}
-
static void ToColor_SA8(SkColor dst[], const void* src, int width) {
SkASSERT(width > 0);
const uint8_t* s = (const uint8_t*)src;
@@ -581,52 +337,6 @@
} while (--width != 0);
}
-// can return NULL
-static ToColorProc ChooseToColorProc(const SkBitmap& src) {
- switch (src.colorType()) {
- case kN32_SkColorType:
- switch (src.alphaType()) {
- case kOpaque_SkAlphaType:
- return ToColor_S32_Opaque;
- case kPremul_SkAlphaType:
- return ToColor_S32_Alpha;
- case kUnpremul_SkAlphaType:
- return ToColor_S32_Raw;
- default:
- return NULL;
- }
- case kARGB_4444_SkColorType:
- switch (src.alphaType()) {
- case kOpaque_SkAlphaType:
- return ToColor_S4444_Opaque;
- case kPremul_SkAlphaType:
- return ToColor_S4444_Alpha;
- case kUnpremul_SkAlphaType:
- return ToColor_S4444_Raw;
- default:
- return NULL;
- }
- case kRGB_565_SkColorType:
- return ToColor_S565;
- case kAlpha_8_SkColorType:
- return ToColor_SA8;
- case kRGBA_F16_SkColorType:
- switch (src.alphaType()) {
- case kOpaque_SkAlphaType:
- return ToColor_F16_Raw;
- case kPremul_SkAlphaType:
- return ToColor_F16_Alpha;
- case kUnpremul_SkAlphaType:
- return ToColor_F16_Raw;
- default:
- return NULL;
- }
- default:
- break;
- }
- return NULL;
-}
-
static void ToF16_SA8(void* dst, const void* src, int width) {
SkASSERT(width > 0);
uint64_t* d = (uint64_t*)dst;
@@ -673,8 +383,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);
@@ -691,7 +401,7 @@
}
if (jColors != NULL) {
- GraphicsJNI::SetPixels(env, jColors, offset, stride, 0, 0, width, height, bitmap);
+ GraphicsJNI::SetPixels(env, jColors, offset, stride, 0, 0, width, height, &bitmap);
}
return createBitmap(env, nativeBitmap.release(), getPremulBitmapCreateFlags(isMutable));
@@ -1268,7 +978,7 @@
if (!bitmapHolder.valid()) return JNI_TRUE;
SkColorSpace* colorSpace = bitmapHolder->info().colorSpace();
- return GraphicsJNI::isColorSpaceSRGB(colorSpace);
+ return colorSpace == nullptr || colorSpace->isSRGB();
}
static jboolean Bitmap_isSRGBLinear(JNIEnv* env, jobject, jlong bitmapHandle) {
@@ -1327,29 +1037,13 @@
SkBitmap bitmap;
reinterpret_cast<BitmapWrapper*>(bitmapHandle)->getSkBitmap(&bitmap);
- ToColorProc proc = ChooseToColorProc(bitmap);
- if (NULL == proc) {
- return 0;
- }
- const void* src = bitmap.getAddr(x, y);
- if (NULL == src) {
- return 0;
- }
+ auto sRGB = SkColorSpace::MakeSRGB();
+ SkImageInfo dstInfo = SkImageInfo::Make(
+ 1, 1, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType, sRGB);
- SkColor dst[1];
- proc(dst, src, 1);
-
- SkColorSpace* colorSpace = bitmap.colorSpace();
- if (bitmap.colorType() != kRGBA_F16_SkColorType &&
- !GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
- auto sRGB = SkColorSpace::MakeSRGB();
- auto xform = SkColorSpaceXform::New(colorSpace, sRGB.get());
- xform->apply(SkColorSpaceXform::kBGRA_8888_ColorFormat, &dst[0],
- SkColorSpaceXform::kBGRA_8888_ColorFormat, &dst[0], 1,
- SkAlphaType::kUnpremul_SkAlphaType);
- }
-
- return static_cast<jint>(dst[0]);
+ SkColor dst;
+ bitmap.readPixels(dstInfo, &dst, dstInfo.minRowBytes(), x, y);
+ return static_cast<jint>(dst);
}
static void Bitmap_getPixels(JNIEnv* env, jobject, jlong bitmapHandle,
@@ -1358,42 +1052,12 @@
SkBitmap bitmap;
reinterpret_cast<BitmapWrapper*>(bitmapHandle)->getSkBitmap(&bitmap);
- ToColorProc proc = ChooseToColorProc(bitmap);
- if (NULL == proc) {
- return;
- }
- const void* src = bitmap.getAddr(x, y);
- if (NULL == src) {
- return;
- }
+ auto sRGB = SkColorSpace::MakeSRGB();
+ SkImageInfo dstInfo = SkImageInfo::Make(
+ width, height, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType, sRGB);
jint* dst = env->GetIntArrayElements(pixelArray, NULL);
- SkColor* d = (SkColor*)dst + offset;
-
- SkColorSpace* colorSpace = bitmap.colorSpace();
- if (bitmap.colorType() == kRGBA_F16_SkColorType ||
- GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
- while (--height >= 0) {
- proc(d, src, width);
- d += stride;
- src = (void*)((const char*)src + bitmap.rowBytes());
- }
- } else {
- auto sRGB = SkColorSpace::MakeSRGB();
- auto xform = SkColorSpaceXform::New(colorSpace, sRGB.get());
-
- while (--height >= 0) {
- proc(d, src, width);
-
- xform->apply(SkColorSpaceXform::kBGRA_8888_ColorFormat, d,
- SkColorSpaceXform::kBGRA_8888_ColorFormat, d, width,
- SkAlphaType::kUnpremul_SkAlphaType);
-
- d += stride;
- src = (void*)((const char*)src + bitmap.rowBytes());
- }
- }
-
+ bitmap.readPixels(dstInfo, dst + offset, stride * 4, x, y);
env->ReleaseIntArrayElements(pixelArray, dst, 0);
}
@@ -1404,27 +1068,13 @@
SkBitmap bitmap;
reinterpret_cast<BitmapWrapper*>(bitmapHandle)->getSkBitmap(&bitmap);
SkColor color = static_cast<SkColor>(colorHandle);
- if (NULL == bitmap.getPixels()) {
- return;
- }
- FromColorProc proc = ChooseFromColorProc(bitmap);
- if (NULL == proc) {
- return;
- }
+ auto sRGB = SkColorSpace::MakeSRGB();
+ SkImageInfo srcInfo = SkImageInfo::Make(
+ 1, 1, kBGRA_8888_SkColorType, kUnpremul_SkAlphaType, sRGB);
+ SkPixmap srcPM(srcInfo, &color, srcInfo.minRowBytes());
- SkColorSpace* colorSpace = bitmap.colorSpace();
- if (bitmap.colorType() != kRGBA_F16_SkColorType &&
- !GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
- auto sRGB = SkColorSpace::MakeSRGB();
- auto xform = SkColorSpaceXform::New(sRGB.get(), colorSpace);
- xform->apply(SkColorSpaceXform::kBGRA_8888_ColorFormat, &color,
- SkColorSpaceXform::kBGRA_8888_ColorFormat, &color, 1,
- SkAlphaType::kUnpremul_SkAlphaType);
- }
-
- proc(bitmap.getAddr(x, y), &color, 1, x, y);
- bitmap.notifyPixelsChanged();
+ bitmap.writePixels(srcPM, x, y);
}
static void Bitmap_setPixels(JNIEnv* env, jobject, jlong bitmapHandle,
@@ -1433,7 +1083,7 @@
SkBitmap bitmap;
reinterpret_cast<BitmapWrapper*>(bitmapHandle)->getSkBitmap(&bitmap);
GraphicsJNI::SetPixels(env, pixelArray, offset, stride,
- x, y, width, height, bitmap);
+ x, y, width, height, &bitmap);
}
static void Bitmap_copyPixelsToBuffer(JNIEnv* env, jobject,
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..cee3c46 100644
--- a/core/jni/android/graphics/GraphicsJNI.h
+++ b/core/jni/android/graphics/GraphicsJNI.h
@@ -102,12 +102,7 @@
*/
static bool SetPixels(JNIEnv* env, jintArray colors, int srcOffset,
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);
+ SkBitmap* dstBitmap);
static SkColorSpaceTransferFn getNativeTransferParameters(JNIEnv* env, jobject transferParams);
static SkMatrix44 getNativeXYZMatrix(JNIEnv* env, jfloatArray xyzD50);
diff --git a/core/jni/android/graphics/fonts/FontFamily.cpp b/core/jni/android/graphics/fonts/FontFamily.cpp
index 4597386..767e068 100644
--- a/core/jni/android/graphics/fonts/FontFamily.cpp
+++ b/core/jni/android/graphics/fonts/FontFamily.cpp
@@ -17,11 +17,13 @@
#define LOG_TAG "Minikin"
#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedUtfChars.h>
#include <core_jni_helpers.h>
#include "FontUtils.h"
#include <minikin/FontFamily.h>
+#include <minikin/LocaleList.h>
#include <memory>
@@ -54,10 +56,18 @@
}
// Regular JNI
-static jlong FontFamily_Builder_build(JNIEnv* env, jobject clazz, jlong builderPtr) {
+static jlong FontFamily_Builder_build(JNIEnv* env, jobject clazz, jlong builderPtr,
+ jstring langTags, jint variant) {
std::unique_ptr<NativeFamilyBuilder> builder(toBuilder(builderPtr));
- std::shared_ptr<minikin::FontFamily> family =
- std::make_shared<minikin::FontFamily>(std::move(builder->fonts));
+ uint32_t localeId;
+ if (langTags == nullptr) {
+ localeId = minikin::registerLocaleList("");
+ } else {
+ ScopedUtfChars str(env, langTags);
+ localeId = minikin::registerLocaleList(str.c_str());
+ }
+ std::shared_ptr<minikin::FontFamily> family = std::make_shared<minikin::FontFamily>(
+ localeId, static_cast<minikin::FamilyVariant>(variant), std::move(builder->fonts));
if (family->getCoverage().length() == 0) {
// No coverage means minikin rejected given font for some reasons.
jniThrowException(env, "java/lang/IllegalArgumentException",
@@ -77,7 +87,7 @@
static const JNINativeMethod gFontFamilyBuilderMethods[] = {
{ "nInitBuilder", "()J", (void*) FontFamily_Builder_initBuilder },
{ "nAddFont", "(JJ)V", (void*) FontFamily_Builder_addFont },
- { "nBuild", "(J)J", (void*) FontFamily_Builder_build },
+ { "nBuild", "(JLjava/lang/String;I)J", (void*) FontFamily_Builder_build },
{ "nGetReleaseNativeFamily", "()J", (void*) FontFamily_Builder_GetReleaseFunc },
};
diff --git a/core/jni/android_graphics_Canvas.cpp b/core/jni/android_graphics_Canvas.cpp
index db3bfe6..eba4c50 100644
--- a/core/jni/android_graphics_Canvas.cpp
+++ b/core/jni/android_graphics_Canvas.cpp
@@ -462,7 +462,7 @@
return;
}
- if (!GraphicsJNI::SetPixels(env, jcolors, offset, stride, 0, 0, width, height, bitmap)) {
+ if (!GraphicsJNI::SetPixels(env, jcolors, offset, stride, 0, 0, width, height, &bitmap)) {
return;
}
diff --git a/core/jni/android_hardware_camera2_DngCreator.cpp b/core/jni/android_hardware_camera2_DngCreator.cpp
index 0ba9a8c..c977437 100644
--- a/core/jni/android_hardware_camera2_DngCreator.cpp
+++ b/core/jni/android_hardware_camera2_DngCreator.cpp
@@ -1748,19 +1748,20 @@
}
}
-
- size_t listSize = builder.getSize();
- uint8_t opcodeListBuf[listSize];
- err = builder.buildOpList(opcodeListBuf);
- if (err == OK) {
- BAIL_IF_INVALID_RET_NULL_SP(writer->addEntry(TAG_OPCODELIST2, listSize, opcodeListBuf,
- TIFF_IFD_0), env, TAG_OPCODELIST2, writer);
- } else {
- ALOGE("%s: Could not build list of opcodes for distortion correction and lens shading"
- "map.", __FUNCTION__);
- jniThrowRuntimeException(env, "failed to construct opcode list for distortion"
- " correction and lens shading map");
- return nullptr;
+ if (builder.getCount() > 0) {
+ size_t listSize = builder.getSize();
+ uint8_t opcodeListBuf[listSize];
+ err = builder.buildOpList(opcodeListBuf);
+ if (err == OK) {
+ BAIL_IF_INVALID_RET_NULL_SP(writer->addEntry(TAG_OPCODELIST2, listSize,
+ opcodeListBuf, TIFF_IFD_0), env, TAG_OPCODELIST2, writer);
+ } else {
+ ALOGE("%s: Could not build list of opcodes for lens shading map and bad pixel "
+ "correction.", __FUNCTION__);
+ jniThrowRuntimeException(env, "failed to construct opcode list for lens shading "
+ "map and bad pixel correction");
+ return nullptr;
+ }
}
}
@@ -1846,18 +1847,20 @@
}
}
- size_t listSize = builder.getSize();
- uint8_t opcodeListBuf[listSize];
- err = builder.buildOpList(opcodeListBuf);
- if (err == OK) {
- BAIL_IF_INVALID_RET_NULL_SP(writer->addEntry(TAG_OPCODELIST3, listSize, opcodeListBuf,
- TIFF_IFD_0), env, TAG_OPCODELIST3, writer);
- } else {
- ALOGE("%s: Could not build list of opcodes for distortion correction and lens shading"
- "map.", __FUNCTION__);
- jniThrowRuntimeException(env, "failed to construct opcode list for distortion"
- " correction and lens shading map");
- return nullptr;
+ if (builder.getCount() > 0) {
+ size_t listSize = builder.getSize();
+ uint8_t opcodeListBuf[listSize];
+ err = builder.buildOpList(opcodeListBuf);
+ if (err == OK) {
+ BAIL_IF_INVALID_RET_NULL_SP(writer->addEntry(TAG_OPCODELIST3, listSize,
+ opcodeListBuf, TIFF_IFD_0), env, TAG_OPCODELIST3, writer);
+ } else {
+ ALOGE("%s: Could not build list of opcodes for distortion correction.",
+ __FUNCTION__);
+ jniThrowRuntimeException(env, "failed to construct opcode list for distortion"
+ " correction");
+ return nullptr;
+ }
}
}
@@ -1968,8 +1971,14 @@
tagsToMove.add(TAG_DEFAULTSCALE);
tagsToMove.add(TAG_DEFAULTCROPORIGIN);
tagsToMove.add(TAG_DEFAULTCROPSIZE);
- tagsToMove.add(TAG_OPCODELIST2);
- tagsToMove.add(TAG_OPCODELIST3);
+
+ if (nullptr != writer->getEntry(TAG_OPCODELIST2, TIFF_IFD_0).get()) {
+ tagsToMove.add(TAG_OPCODELIST2);
+ }
+
+ if (nullptr != writer->getEntry(TAG_OPCODELIST3, TIFF_IFD_0).get()) {
+ tagsToMove.add(TAG_OPCODELIST3);
+ }
if (moveEntries(writer, TIFF_IFD_0, TIFF_IFD_SUB1, tagsToMove) != OK) {
jniThrowException(env, "java/lang/IllegalStateException", "Failed to move entries");
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_HwBlob.cpp b/core/jni/android_os_HwBlob.cpp
index bb916d2..cb55618 100644
--- a/core/jni/android_os_HwBlob.cpp
+++ b/core/jni/android_os_HwBlob.cpp
@@ -21,6 +21,7 @@
#include "android_os_HwBlob.h"
#include "android_os_HwParcel.h"
+#include "android_os_NativeHandle.h"
#include <nativehelper/JNIHelp.h>
#include <android_runtime/AndroidRuntime.h>
@@ -31,6 +32,7 @@
#include "core_jni_helpers.h"
using android::AndroidRuntime;
+using android::hardware::hidl_handle;
using android::hardware::hidl_string;
#define PACKAGE_PATH "android/os"
@@ -82,6 +84,7 @@
JHwBlob::JHwBlob(JNIEnv *env, jobject thiz, size_t size)
: mBuffer(nullptr),
mSize(size),
+ mType(BlobType::GENERIC),
mOwnsBuffer(true),
mHandle(0) {
if (size > 0) {
@@ -159,6 +162,15 @@
return mSize;
}
+void JHwBlob::specializeBlobTo(BlobType type) {
+ CHECK_EQ(static_cast<int>(mType), static_cast<int>(BlobType::GENERIC));
+ mType = type;
+}
+
+JHwBlob::BlobType JHwBlob::type() const {
+ return mType;
+}
+
status_t JHwBlob::putBlob(size_t offset, const sp<JHwBlob> &blob) {
size_t index = mSubBlobs.add();
BlobInfo *info = &mSubBlobs.editItemAt(index);
@@ -172,42 +184,52 @@
}
status_t JHwBlob::writeToParcel(hardware::Parcel *parcel) const {
- size_t handle;
+ CHECK_EQ(static_cast<int>(mType), static_cast<int>(BlobType::GENERIC));
+
+ size_t handle = 0;
status_t err = parcel->writeBuffer(data(), size(), &handle);
if (err != OK) {
return err;
}
- for (size_t i = 0; i < mSubBlobs.size(); ++i) {
- const BlobInfo &info = mSubBlobs[i];
-
- err = info.mBlob->writeEmbeddedToParcel(parcel, handle, info.mOffset);
-
- if (err != OK) {
- return err;
- }
- }
-
- return OK;
+ return writeSubBlobsToParcel(parcel, handle);
}
status_t JHwBlob::writeEmbeddedToParcel(
hardware::Parcel *parcel,
size_t parentHandle,
size_t parentOffset) const {
- size_t handle;
- status_t err = parcel->writeEmbeddedBuffer(
- data(), size(), &handle, parentHandle, parentOffset);
+ size_t handle = 0;
+ status_t err = OK;
+
+ switch (mType) {
+ case BlobType::GENERIC: {
+ err = parcel->writeEmbeddedBuffer(data(), size(), &handle, parentHandle, parentOffset);
+ break;
+ }
+ case BlobType::NATIVE_HANDLE: {
+ err = parcel->writeEmbeddedNativeHandle(
+ static_cast<const native_handle *>(data()), parentHandle, parentOffset);
+
+ CHECK(mSubBlobs.empty());
+ break;
+ }
+ default: { err = INVALID_OPERATION; }
+ }
if (err != OK) {
return err;
}
+ return writeSubBlobsToParcel(parcel, handle);
+}
+
+status_t JHwBlob::writeSubBlobsToParcel(hardware::Parcel *parcel,
+ size_t parentHandle) const {
for (size_t i = 0; i < mSubBlobs.size(); ++i) {
const BlobInfo &info = mSubBlobs[i];
-
- err = info.mBlob->writeEmbeddedToParcel(parcel, handle, info.mOffset);
+ status_t err = info.mBlob->writeEmbeddedToParcel(parcel, parentHandle, info.mOffset);
if (err != OK) {
return err;
@@ -252,7 +274,7 @@
}
}
-static jlong JHwBlob_native_init(JNIEnv *env) {
+static jlong JHwBlob_native_init(JNIEnv *env, jclass /*clazz*/) {
JHwBlob::InitClass(env);
return reinterpret_cast<jlong>(&releaseNativeContext);
@@ -456,6 +478,31 @@
blob->putBlob(offset + hidl_string::kOffsetOfBuffer, subBlob);
}
+static void JHwBlob_native_putNativeHandle(JNIEnv *env, jobject thiz,
+ jlong offset, jobject jHandle) {
+ std::unique_ptr<native_handle_t, int(*)(native_handle_t*)> nativeHandle(
+ JNativeHandle::MakeCppNativeHandle(env, jHandle, nullptr /* storage */),
+ native_handle_delete);
+
+ size_t size = 0;
+ if (nativeHandle != nullptr) {
+ size = sizeof(native_handle_t) + nativeHandle->numFds * sizeof(int)
+ + nativeHandle->numInts * sizeof(int);
+ }
+
+ ScopedLocalRef<jobject> subBlobObj(env, JHwBlob::NewObject(env, size));
+ sp<JHwBlob> subBlob = JHwBlob::GetNativeContext(env, subBlobObj.get());
+ subBlob->specializeBlobTo(JHwBlob::BlobType::NATIVE_HANDLE);
+ subBlob->write(0 /* offset */, nativeHandle.get(), size);
+
+ hidl_handle cppHandle;
+ cppHandle.setTo(static_cast<native_handle_t *>(subBlob->data()), false /* shouldOwn */);
+
+ sp<JHwBlob> blob = JHwBlob::GetNativeContext(env, thiz);
+ blob->write(offset, &cppHandle, sizeof(cppHandle));
+ blob->putBlob(offset + hidl_handle::kOffsetOfNativeHandle, subBlob);
+}
+
#define DEFINE_BLOB_ARRAY_PUTTER(Suffix,Type,NewType) \
static void JHwBlob_native_put ## Suffix ## Array( \
JNIEnv *env, jobject thiz, jlong offset, Type ## Array array) { \
@@ -563,6 +610,8 @@
{ "putFloat", "(JF)V", (void *)JHwBlob_native_putFloat },
{ "putDouble", "(JD)V", (void *)JHwBlob_native_putDouble },
{ "putString", "(JLjava/lang/String;)V", (void *)JHwBlob_native_putString },
+ { "putNativeHandle", "(JL" PACKAGE_PATH "/NativeHandle;)V",
+ (void*)JHwBlob_native_putNativeHandle },
{ "putBoolArray", "(J[Z)V", (void *)JHwBlob_native_putBoolArray },
{ "putInt8Array", "(J[B)V", (void *)JHwBlob_native_putInt8Array },
diff --git a/core/jni/android_os_HwBlob.h b/core/jni/android_os_HwBlob.h
index 6b1db63..69a1b16 100644
--- a/core/jni/android_os_HwBlob.h
+++ b/core/jni/android_os_HwBlob.h
@@ -27,6 +27,11 @@
namespace android {
struct JHwBlob : public RefBase {
+ enum class BlobType {
+ GENERIC,
+ NATIVE_HANDLE,
+ };
+
static void InitClass(JNIEnv *env);
static sp<JHwBlob> SetNativeContext(
@@ -54,6 +59,9 @@
size_t size() const;
+ void specializeBlobTo(BlobType type);
+ BlobType type() const;
+
status_t putBlob(size_t offset, const sp<JHwBlob> &blob);
status_t writeToParcel(hardware::Parcel *parcel) const;
@@ -74,12 +82,15 @@
void *mBuffer;
size_t mSize;
+ BlobType mType;
bool mOwnsBuffer;
size_t mHandle;
Vector<BlobInfo> mSubBlobs;
+ status_t writeSubBlobsToParcel(hardware::Parcel *parcel, size_t parentHandle) const;
+
DISALLOW_COPY_AND_ASSIGN(JHwBlob);
};
diff --git a/core/jni/android_os_HwParcel.cpp b/core/jni/android_os_HwParcel.cpp
index 061349a..7221ca1 100644
--- a/core/jni/android_os_HwParcel.cpp
+++ b/core/jni/android_os_HwParcel.cpp
@@ -22,6 +22,7 @@
#include "android_os_HwBinder.h"
#include "android_os_HwBlob.h"
+#include "android_os_NativeHandle.h"
#include "android_os_HwRemoteBinder.h"
#include <nativehelper/JNIHelp.h>
@@ -34,6 +35,7 @@
using android::AndroidRuntime;
+using ::android::hardware::hidl_handle;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
@@ -436,6 +438,18 @@
signalExceptionForError(env, err);
}
+static void JHwParcel_native_writeNativeHandle(JNIEnv *env, jobject thiz, jobject valObj) {
+ sp<JHwParcel> impl = JHwParcel::GetNativeContext(env, thiz);
+
+ EphemeralStorage *storage = impl->getStorage();
+ native_handle_t *handle = JNativeHandle::MakeCppNativeHandle(env, valObj, storage);
+
+ hardware::Parcel *parcel = impl->getParcel();
+ status_t err = parcel->writeNativeHandleNoDup(handle);
+
+ signalExceptionForError(env, err);
+}
+
#define DEFINE_PARCEL_VECTOR_WRITER(Suffix,Type) \
static void JHwParcel_native_write ## Suffix ## Vector( \
JNIEnv *env, jobject thiz, Type ## Array valObj) { \
@@ -524,12 +538,96 @@
signalExceptionForError(env, err);
}
+template<typename T>
+static void WriteHidlVector(JNIEnv *env, jobject thiz, const hidl_vec<T> &vec) {
+ hardware::Parcel *parcel = JHwParcel::GetNativeContext(env, thiz)->getParcel();
+
+ size_t parentHandle;
+ status_t err = parcel->writeBuffer(&vec, sizeof(vec), &parentHandle);
+
+ if (err == OK) {
+ size_t childHandle;
+ err = ::android::hardware::writeEmbeddedToParcel(
+ vec,
+ parcel,
+ parentHandle,
+ 0 /* parentOffset */,
+ &childHandle);
+
+ for (size_t i = 0; (err == OK) && (i < vec.size()); ++i) {
+ err = ::android::hardware::writeEmbeddedToParcel(
+ vec[i],
+ parcel,
+ childHandle,
+ i * sizeof(T));
+ }
+ }
+
+ signalExceptionForError(env, err);
+}
+
+static void JHwParcel_native_writeStringVector(
+ JNIEnv *env, jobject thiz, jobjectArray arrayObj) {
+ if (arrayObj == nullptr) {
+ jniThrowException(env, "java/lang/NullPointerException", nullptr);
+ return;
+ }
+
+ sp<JHwParcel> impl = JHwParcel::GetNativeContext(env, thiz);
+ EphemeralStorage *storage = impl->getStorage();
+
+ void *vecPtr = storage->allocTemporaryStorage(sizeof(hidl_vec<hidl_string>));
+ hidl_vec<hidl_string> *vec = new (vecPtr) hidl_vec<hidl_string>();
+
+ jsize len = env->GetArrayLength(arrayObj);
+ hidl_string *strings = storage->allocStringArray(len);
+ vec->setToExternal(strings, len, false /* shouldOwn */);
+
+ for (jsize i = 0; i < len; ++i) {
+ ScopedLocalRef<jstring> stringObj(env, (jstring) env->GetObjectArrayElement(arrayObj, i));
+
+ const hidl_string *s = storage->allocTemporaryString(env, stringObj.get());
+ strings[i].setToExternal(s->c_str(), s->size());
+ }
+
+ WriteHidlVector(env, thiz, *vec);
+}
+
+static void JHwParcel_native_writeNativeHandleVector(
+ JNIEnv *env, jobject thiz, jobjectArray jHandleArray) {
+ if (jHandleArray == nullptr) {
+ jniThrowException(env, "java/lang/NullPointerException", nullptr);
+ return;
+ }
+
+ sp<JHwParcel> impl = JHwParcel::GetNativeContext(env, thiz);
+ EphemeralStorage *storage = impl->getStorage();
+
+ void *vecPtr = storage->allocTemporaryStorage(sizeof(hidl_vec<hidl_handle>));
+ hidl_vec<hidl_handle> *vec = new (vecPtr) hidl_vec<hidl_handle>();
+
+ jsize len = env->GetArrayLength(jHandleArray);
+ hidl_handle *handles = static_cast<hidl_handle *>(
+ storage->allocTemporaryStorage(len * sizeof(hidl_handle)));
+
+ vec->setToExternal(handles, len, false /* shouldOwn */);
+ for (jsize i = 0; i < len; i++) {
+ ScopedLocalRef<jobject> jHandle(env, env->GetObjectArrayElement(jHandleArray, i));
+
+ native_handle_t* handle = JNativeHandle::MakeCppNativeHandle(env, jHandle.get(), storage);
+
+ new (&(handles[i])) hidl_handle();
+ handles[i].setTo(handle, false /* shouldOwn */);
+ }
+
+ WriteHidlVector(env, thiz, *vec);
+}
+
static void JHwParcel_native_writeStrongBinder(
JNIEnv *env, jobject thiz, jobject binderObj) {
sp<hardware::IBinder> binder;
if (binderObj != NULL) {
- ScopedLocalRef<jclass> hwBinderKlass(
- env, FindClassOrDie(env, PACKAGE_PATH "/HwBinder"));
+ ScopedLocalRef<jclass> hwBinderKlass(env, FindClassOrDie(env, PACKAGE_PATH "/HwBinder"));
ScopedLocalRef<jclass> hwRemoteBinderKlass(
env, FindClassOrDie(env, PACKAGE_PATH "/HwRemoteBinder"));
@@ -587,6 +685,37 @@
return MakeStringObjFromHidlString(env, *s);
}
+static jobject ReadNativeHandle(JNIEnv *env, jobject thiz, jboolean embedded,
+ jlong parentHandle, jlong offset) {
+ hardware::Parcel *parcel =
+ JHwParcel::GetNativeContext(env, thiz)->getParcel();
+
+ const native_handle_t *handle = nullptr;
+ status_t err = OK;
+
+ if (embedded) {
+ err = parcel->readNullableEmbeddedNativeHandle(parentHandle, offset, &handle);
+ } else {
+ err = parcel->readNullableNativeHandleNoDup(&handle);
+ }
+
+ if (err != OK) {
+ signalExceptionForError(env, err);
+ return nullptr;
+ }
+
+ return JNativeHandle::MakeJavaNativeHandleObj(env, handle);
+}
+
+static jobject JHwParcel_native_readNativeHandle(JNIEnv *env, jobject thiz) {
+ return ReadNativeHandle(env, thiz, false /*embedded*/, 0L /*parentHandle*/, 0L /*offset*/);
+}
+
+static jobject JHwParcel_native_readEmbeddedNativeHandle(
+ JNIEnv *env, jobject thiz, jlong parentHandle, jlong offset) {
+ return ReadNativeHandle(env, thiz, true /*embedded*/, parentHandle, offset);
+}
+
#define DEFINE_PARCEL_VECTOR_READER(Suffix,Type,NewType) \
static Type ## Array JHwParcel_native_read ## Suffix ## Vector( \
JNIEnv *env, jobject thiz) { \
@@ -630,10 +759,8 @@
DEFINE_PARCEL_VECTOR_READER(Float,jfloat,Float)
DEFINE_PARCEL_VECTOR_READER(Double,jdouble,Double)
-static jbooleanArray JHwParcel_native_readBoolVector(
- JNIEnv *env, jobject thiz) {
- hardware::Parcel *parcel =
- JHwParcel::GetNativeContext(env, thiz)->getParcel();
+static jbooleanArray JHwParcel_native_readBoolVector(JNIEnv *env, jobject thiz) {
+ hardware::Parcel *parcel = JHwParcel::GetNativeContext(env, thiz)->getParcel();
size_t parentHandle;
@@ -692,101 +819,62 @@
return arrayObj;
}
-static jobjectArray JHwParcel_native_readStringVector(
- JNIEnv *env, jobject thiz) {
- typedef hidl_vec<hidl_string> string_vec;
+template<typename T>
+static const hidl_vec<T> *ReadHidlVector(JNIEnv *env, jobject thiz) {
+ const hidl_vec<T> *vec;
- hardware::Parcel *parcel =
- JHwParcel::GetNativeContext(env, thiz)->getParcel();
+ hardware::Parcel *parcel = JHwParcel::GetNativeContext(env, thiz)->getParcel();
size_t parentHandle;
-
- const string_vec *vec;
- status_t err = parcel->readBuffer(sizeof(*vec), &parentHandle,
- reinterpret_cast<const void **>(&vec));
-
- if (err != OK) {
- signalExceptionForError(env, err);
- return NULL;
- }
-
- size_t childHandle;
- err = ::android::hardware::readEmbeddedFromParcel(
- const_cast<string_vec &>(*vec),
- *parcel, parentHandle, 0 /* parentOffset */, &childHandle);
-
- for (size_t i = 0; (err == OK) && (i < vec->size()); ++i) {
- err = android::hardware::readEmbeddedFromParcel(
- const_cast<hidl_string &>((*vec)[i]),
- *parcel,
- childHandle,
- i * sizeof(hidl_string) /* parentOffset */);
- }
-
- if (err != OK) {
- signalExceptionForError(env, err);
- return NULL;
- }
-
- return MakeStringArray(env, &(*vec)[0], vec->size());
-}
-
-static void JHwParcel_native_writeStringVector(
- JNIEnv *env, jobject thiz, jobjectArray arrayObj) {
- typedef hidl_vec<hidl_string> string_vec;
-
- if (arrayObj == NULL) {
- jniThrowException(env, "java/lang/NullPointerException", NULL);
- return;
- }
-
- jsize len = env->GetArrayLength(arrayObj);
-
- sp<JHwParcel> impl = JHwParcel::GetNativeContext(env, thiz);
-
- void *vecPtr =
- impl->getStorage()->allocTemporaryStorage(sizeof(string_vec));
-
- string_vec *vec = new (vecPtr) string_vec;
-
- hidl_string *strings = impl->getStorage()->allocStringArray(len);
- vec->setToExternal(strings, len);
-
- for (jsize i = 0; i < len; ++i) {
- ScopedLocalRef<jstring> stringObj(
- env,
- (jstring)env->GetObjectArrayElement(arrayObj, i));
-
- const hidl_string *s =
- impl->getStorage()->allocTemporaryString(env, stringObj.get());
-
- strings[i].setToExternal(s->c_str(), s->size());
- }
-
- hardware::Parcel *parcel = impl->getParcel();
-
- size_t parentHandle;
- status_t err = parcel->writeBuffer(vec, sizeof(*vec), &parentHandle);
+ status_t err = parcel->readBuffer(sizeof(hidl_vec<T>),
+ &parentHandle, reinterpret_cast<const void **>(&vec));
if (err == OK) {
size_t childHandle;
- err = ::android::hardware::writeEmbeddedToParcel(
- *vec,
- parcel,
- parentHandle,
+ err = ::android::hardware::readEmbeddedFromParcel(
+ const_cast<hidl_vec<T> &>(*vec),
+ *parcel, parentHandle,
0 /* parentOffset */,
&childHandle);
- for (size_t i = 0; (err == OK) && (i < vec->size()); ++i) {
- err = ::android::hardware::writeEmbeddedToParcel(
- (*vec)[i],
- parcel,
+ for (size_t i = 0; (err == OK) && (i < vec->size()); i++) {
+ err = android::hardware::readEmbeddedFromParcel(
+ const_cast<T &>((*vec)[i]),
+ *parcel,
childHandle,
- i * sizeof(hidl_string));
+ i * sizeof(T) /* parentOffset */);
}
}
- signalExceptionForError(env, err);
+ if (err != OK) {
+ signalExceptionForError(env, err);
+ return nullptr;
+ }
+
+ return vec;
+}
+
+static jobjectArray JHwParcel_native_readStringVector(
+ JNIEnv *env, jobject thiz) {
+ const hidl_vec<hidl_string> *vec = ReadHidlVector<hidl_string>(env, thiz);
+ return MakeStringArray(env, &(*vec)[0], vec->size());
+}
+
+static jobjectArray JHwParcel_native_readNativeHandleVector(
+ JNIEnv *env, jobject thiz) {
+ const hidl_vec<hidl_handle> *vec = ReadHidlVector<hidl_handle>(env, thiz);
+
+ jsize length = vec->size();
+ jobjectArray objArray = JNativeHandle::AllocJavaNativeHandleObjArray(
+ env, length);
+
+ for (jsize i = 0; i < length; i++) {
+ jobject jHandle = JNativeHandle::MakeJavaNativeHandleObj(env, (*vec)[i].getNativeHandle());
+
+ env->SetObjectArrayElement(objArray, i, jHandle);
+ }
+
+ return objArray;
}
static jobject JHwParcel_native_readStrongBinder(JNIEnv *env, jobject thiz) {
@@ -890,6 +978,9 @@
{ "writeString", "(Ljava/lang/String;)V",
(void *)JHwParcel_native_writeString },
+ { "writeNativeHandle", "(L" PACKAGE_PATH "/NativeHandle;)V",
+ (void *)JHwParcel_native_writeNativeHandle },
+
{ "writeBoolVector", "([Z)V", (void *)JHwParcel_native_writeBoolVector },
{ "writeInt8Vector", "([B)V", (void *)JHwParcel_native_writeInt8Vector },
{ "writeInt16Vector", "([S)V", (void *)JHwParcel_native_writeInt16Vector },
@@ -903,6 +994,9 @@
{ "writeStringVector", "([Ljava/lang/String;)V",
(void *)JHwParcel_native_writeStringVector },
+ { "writeNativeHandleVector", "([L" PACKAGE_PATH "/NativeHandle;)V",
+ (void *)JHwParcel_native_writeNativeHandleVector },
+
{ "writeStrongBinder", "(L" PACKAGE_PATH "/IHwBinder;)V",
(void *)JHwParcel_native_writeStrongBinder },
@@ -920,6 +1014,12 @@
{ "readString", "()Ljava/lang/String;",
(void *)JHwParcel_native_readString },
+ { "readNativeHandle", "()L" PACKAGE_PATH "/NativeHandle;",
+ (void *)JHwParcel_native_readNativeHandle },
+
+ { "readEmbeddedNativeHandle", "(JJ)L" PACKAGE_PATH "/NativeHandle;",
+ (void *)JHwParcel_native_readEmbeddedNativeHandle },
+
{ "readBoolVectorAsArray", "()[Z",
(void *)JHwParcel_native_readBoolVector },
@@ -944,6 +1044,9 @@
{ "readStringVectorAsArray", "()[Ljava/lang/String;",
(void *)JHwParcel_native_readStringVector },
+ { "readNativeHandleAsArray", "()[L" PACKAGE_PATH "/NativeHandle;",
+ (void *)JHwParcel_native_readNativeHandleVector },
+
{ "readStrongBinder", "()L" PACKAGE_PATH "/IHwBinder;",
(void *)JHwParcel_native_readStrongBinder },
diff --git a/core/jni/android_os_NativeHandle.cpp b/core/jni/android_os_NativeHandle.cpp
new file mode 100644
index 0000000..770fdb0
--- /dev/null
+++ b/core/jni/android_os_NativeHandle.cpp
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+
+#include "android_os_NativeHandle.h"
+
+#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedLocalRef.h>
+
+#include "core_jni_helpers.h"
+
+#define PACKAGE_PATH "android/os"
+#define CLASS_NAME "NativeHandle"
+#define CLASS_PATH PACKAGE_PATH "/" CLASS_NAME
+
+namespace android {
+
+static struct {
+ jclass clazz;
+ jmethodID constructID; // NativeHandle(int[] fds, int[] ints, boolean owns)
+
+ jmethodID getFdsID; // int[] NativeHandle.getFds()
+ jmethodID getIntsID; // int[] NativeHandle.getInts()
+} gNativeHandleFields;
+
+jobject JNativeHandle::MakeJavaNativeHandleObj(
+ JNIEnv *env, const native_handle_t *handle) {
+ if (handle == nullptr) { return nullptr; }
+
+ const int numFds = handle->numFds;
+ ScopedLocalRef<jintArray> fds(env, env->NewIntArray(numFds));
+ env->SetIntArrayRegion(fds.get(), 0, numFds, &(handle->data[0]));
+
+ const int numInts = handle->numInts;
+ ScopedLocalRef<jintArray> ints(env, env->NewIntArray(numInts));
+ env->SetIntArrayRegion(ints.get(), 0, numInts, &(handle->data[numFds]));
+
+ return env->NewObject(gNativeHandleFields.clazz,
+ gNativeHandleFields.constructID, fds.get(), ints.get(), false /*own*/);
+}
+
+native_handle_t *JNativeHandle::MakeCppNativeHandle(
+ JNIEnv *env, jobject jHandle, EphemeralStorage *storage) {
+ if (jHandle == nullptr) { return nullptr; }
+
+ if (!env->IsInstanceOf(jHandle, gNativeHandleFields.clazz)) {
+ jniThrowException(env, "java/lang/ClassCastException",
+ "jHandle must be an instance of NativeHandle.");
+ return nullptr;
+ }
+
+ ScopedLocalRef<jintArray> fds(env, (jintArray) env->CallObjectMethod(
+ jHandle, gNativeHandleFields.getFdsID));
+
+ ScopedLocalRef<jintArray> ints(env, (jintArray) env->CallObjectMethod(
+ jHandle, gNativeHandleFields.getIntsID));
+
+ const int numFds = (int) env->GetArrayLength(fds.get());
+ const int numInts = (int) env->GetArrayLength(ints.get());
+
+ native_handle_t *handle = (storage == nullptr)
+ ? native_handle_create(numFds, numInts)
+ : storage->allocTemporaryNativeHandle(numFds, numInts);
+
+ if (handle != nullptr) {
+ env->GetIntArrayRegion(fds.get(), 0, numFds, &(handle->data[0]));
+ env->GetIntArrayRegion(ints.get(), 0, numInts, &(handle->data[numFds]));
+ } else {
+ jniThrowException(env, "java/lang/OutOfMemoryError",
+ "Failed to allocate memory for native_handle_t.");
+ }
+
+ return handle;
+}
+
+jobjectArray JNativeHandle::AllocJavaNativeHandleObjArray(JNIEnv *env, jsize length) {
+ return env->NewObjectArray(length, gNativeHandleFields.clazz, nullptr);
+}
+
+int register_android_os_NativeHandle(JNIEnv *env) {
+ jclass clazz = FindClassOrDie(env, CLASS_PATH);
+ gNativeHandleFields.clazz = MakeGlobalRefOrDie(env, clazz);
+
+ gNativeHandleFields.constructID = GetMethodIDOrDie(env, clazz, "<init>", "([I[IZ)V");
+ gNativeHandleFields.getFdsID = GetMethodIDOrDie(env, clazz, "getFdsAsIntArray", "()[I");
+ gNativeHandleFields.getIntsID = GetMethodIDOrDie(env, clazz, "getInts", "()[I");
+
+ return 0;
+}
+
+}
diff --git a/core/jni/android_os_NativeHandle.h b/core/jni/android_os_NativeHandle.h
new file mode 100644
index 0000000..bbe3ebc
--- /dev/null
+++ b/core/jni/android_os_NativeHandle.h
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+#ifndef ANDROID_OS_NATIVE_HANDLE_H
+#define ANDROID_OS_NATIVE_HANDLE_H
+
+#include "hwbinder/EphemeralStorage.h"
+
+#include <cutils/native_handle.h>
+#include <jni.h>
+
+namespace android {
+
+struct JNativeHandle {
+
+ /**
+ * Returns a Java NativeHandle object representing the parameterized
+ * native_handle_t instance.
+ */
+ static jobject MakeJavaNativeHandleObj(JNIEnv *env, const native_handle_t *handle);
+
+ /**
+ * Returns a heap-allocated native_handle_t instance representing the
+ * parameterized Java object. Note that if no valid EphemeralStorage*
+ * parameter is supplied (storage is nullptr), the return value must
+ * be explicitly deallocated (using native_handle_delete).
+ */
+ static native_handle_t* MakeCppNativeHandle(JNIEnv *env, jobject jHandle,
+ EphemeralStorage *storage);
+
+ /**
+ * Returns an (uninitialized) array of Java NativeHandle objects.
+ */
+ static jobjectArray AllocJavaNativeHandleObjArray(JNIEnv *env, jsize length);
+};
+
+}
+
+#endif // ANDROID_OS_NATIVE_HANDLE_H
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index bed239f..7ef06dc 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -336,8 +336,13 @@
jbyte* a2 = (jbyte*)env->GetPrimitiveArrayCritical(ret, 0);
if (a2) {
const void* data = parcel->readInplace(len);
- memcpy(a2, data, len);
+ if (data) {
+ memcpy(a2, data, len);
+ }
env->ReleasePrimitiveArrayCritical(ret, a2, 0);
+ if (!data) {
+ ret = NULL;
+ }
}
}
}
@@ -360,9 +365,14 @@
jbyte* ar = (jbyte*)env->GetPrimitiveArrayCritical((jarray)dest, 0);
if (ar) {
const void* data = parcel->readInplace(len);
- memcpy(ar, data, len);
+ if (data) {
+ memcpy(ar, data, len);
+ ret = JNI_TRUE;
+ } else {
+ ret = JNI_FALSE;
+ }
+
env->ReleasePrimitiveArrayCritical((jarray)dest, ar, 0);
- ret = JNI_TRUE;
}
}
return ret;
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_os_VintfObject.cpp b/core/jni/android_os_VintfObject.cpp
index 17ab956..e64d2af 100644
--- a/core/jni/android_os_VintfObject.cpp
+++ b/core/jni/android_os_VintfObject.cpp
@@ -96,7 +96,7 @@
return toJavaStringArray(env, cStrings);
}
-static jint verify(JNIEnv* env, jobjectArray packageInfo, android::vintf::DisabledChecks checks) {
+static jint verify(JNIEnv* env, jobjectArray packageInfo, android::vintf::CheckFlags::Type checks) {
std::vector<std::string> cPackageInfo;
if (packageInfo) {
size_t count = env->GetArrayLength(packageInfo);
@@ -116,11 +116,11 @@
}
static jint android_os_VintfObject_verify(JNIEnv* env, jclass, jobjectArray packageInfo) {
- return verify(env, packageInfo, ::android::vintf::ENABLE_ALL_CHECKS);
+ return verify(env, packageInfo, ::android::vintf::CheckFlags::ENABLE_ALL_CHECKS);
}
static jint android_os_VintfObject_verifyWithoutAvb(JNIEnv* env, jclass) {
- return verify(env, nullptr, ::android::vintf::DISABLE_AVB_CHECK);
+ return verify(env, nullptr, ::android::vintf::CheckFlags::DISABLE_AVB_CHECK);
}
static jobjectArray android_os_VintfObject_getHalNamesAndVersions(JNIEnv* env, jclass) {
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index fa9f445..830ca83 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -179,6 +179,10 @@
argv[argc++] = AssetManager::PRODUCT_OVERLAY_DIR;
}
+ if (stat(AssetManager::PRODUCT_SERVICES_OVERLAY_DIR, &st) == 0) {
+ argv[argc++] = AssetManager::PRODUCT_SERVICES_OVERLAY_DIR;
+ }
+
// Finally, invoke idmap (if any overlay directory exists)
if (argc > 5) {
execv(AssetManager::IDMAP_BIN, (char* const*)argv);
diff --git a/core/jni/android_util_MemoryIntArray.cpp b/core/jni/android_util_MemoryIntArray.cpp
index 2dfbe3e..b68f9ec 100644
--- a/core/jni/android_util_MemoryIntArray.cpp
+++ b/core/jni/android_util_MemoryIntArray.cpp
@@ -142,8 +142,6 @@
jniThrowException(env, "java/io/IOException", "ashmem unpinning failed");
return;
}
-
- close(fd);
}
static jint android_util_MemoryIntArray_get(JNIEnv* env, jobject clazz,
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/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index c5904e0..f56f7ec 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -87,13 +87,17 @@
static const char* kOverlaySubdir = "/system/vendor/overlay-subdir/";
static const char* kSystemProductOverlayDir = "/system/product/overlay/";
static const char* kProductOverlayDir = "/product/overlay";
+ static const char* kSystemProductServicesOverlayDir = "/system/product_services/overlay/";
+ static const char* kProductServicesOverlayDir = "/product_services/overlay";
static const char* kApkSuffix = ".apk";
if ((android::base::StartsWith(path, kOverlayDir)
|| android::base::StartsWith(path, kOverlaySubdir)
|| android::base::StartsWith(path, kVendorOverlayDir)
|| android::base::StartsWith(path, kSystemProductOverlayDir)
- || android::base::StartsWith(path, kProductOverlayDir))
+ || android::base::StartsWith(path, kProductOverlayDir)
+ || android::base::StartsWith(path, kSystemProductServicesOverlayDir)
+ || android::base::StartsWith(path, kProductServicesOverlayDir))
&& android::base::EndsWith(path, kApkSuffix)
&& path.find("/../") == std::string::npos) {
return true;
diff --git a/core/jni/hwbinder/EphemeralStorage.cpp b/core/jni/hwbinder/EphemeralStorage.cpp
index 3b18f2b..95bb42e 100644
--- a/core/jni/hwbinder/EphemeralStorage.cpp
+++ b/core/jni/hwbinder/EphemeralStorage.cpp
@@ -71,6 +71,17 @@
return s;
}
+native_handle_t *EphemeralStorage::allocTemporaryNativeHandle(
+ int numFds, int numInts) {
+ Item item;
+ item.mType = TYPE_NATIVE_HANDLE;
+ item.mObj = nullptr;
+ item.mPtr = native_handle_create(numFds, numInts);
+ mItems.push_back(item);
+
+ return static_cast<native_handle_t*>(item.mPtr);
+}
+
#define DEFINE_ALLOC_VECTOR_METHODS(Suffix,Type,NewType) \
const hidl_vec<Type> *EphemeralStorage::allocTemporary ## Suffix ## Vector( \
JNIEnv *env, Type ## Array arrayObj) { \
@@ -145,6 +156,13 @@
DEFINE_RELEASE_ARRAY_CASE(Float,jfloat,Float)
DEFINE_RELEASE_ARRAY_CASE(Double,jdouble,Double)
+ case TYPE_NATIVE_HANDLE:
+ {
+ int err = native_handle_delete(static_cast<native_handle_t *>(item.mPtr));
+ CHECK(err == 0);
+ break;
+ }
+
default:
CHECK(!"Should not be here");
}
diff --git a/core/jni/hwbinder/EphemeralStorage.h b/core/jni/hwbinder/EphemeralStorage.h
index f07c782..55ef741 100644
--- a/core/jni/hwbinder/EphemeralStorage.h
+++ b/core/jni/hwbinder/EphemeralStorage.h
@@ -43,6 +43,8 @@
const ::android::hardware::hidl_string *allocTemporaryString(
JNIEnv *env, jstring stringObj);
+ native_handle_t *allocTemporaryNativeHandle(int numFds, int numInts);
+
DECLARE_ALLOC_METHODS(Int8,jbyte)
DECLARE_ALLOC_METHODS(Int16,jshort)
DECLARE_ALLOC_METHODS(Int32,jint)
@@ -61,6 +63,7 @@
TYPE_Int64_ARRAY,
TYPE_Float_ARRAY,
TYPE_Double_ARRAY,
+ TYPE_NATIVE_HANDLE,
};
struct Item {
diff --git a/core/proto/android/app/alarmmanager.proto b/core/proto/android/app/alarmmanager.proto
index 53be1ee..58df922 100644
--- a/core/proto/android/app/alarmmanager.proto
+++ b/core/proto/android/app/alarmmanager.proto
@@ -53,5 +53,5 @@
// This value is UTC wall clock time in milliseconds, as returned by
// System#currentTimeMillis() for example.
optional int64 trigger_time_ms = 1;
- optional android.app.PendingIntentProto show_intent = 2;
+ optional PendingIntentProto show_intent = 2;
}
diff --git a/core/proto/android/app/notification.proto b/core/proto/android/app/notification.proto
index c7e313a..a6f13d7 100644
--- a/core/proto/android/app/notification.proto
+++ b/core/proto/android/app/notification.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
package android.app;
diff --git a/core/proto/android/app/notification_channel.proto b/core/proto/android/app/notification_channel.proto
index d3808e8..75cc18b 100644
--- a/core/proto/android/app/notification_channel.proto
+++ b/core/proto/android/app/notification_channel.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
package android.app;
@@ -29,8 +28,11 @@
message NotificationChannelProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Notification Channel ID. Provided by the app.
optional string id = 1 [ (android.privacy).dest = DEST_EXPLICIT ];
+ // User-visible Notification Channel name. Provided by the app.
optional string name = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
+ // User-visible Notification Channel description. Provided by the app.
optional string description = 3 [ (android.privacy).dest = DEST_EXPLICIT ];
optional int32 importance = 4;
optional bool can_bypass_dnd = 5;
@@ -49,6 +51,7 @@
optional bool show_badge = 13;
// Default is false.
optional bool is_deleted = 14;
+ // Provided by the app but will match a NotificationChannelGroup id.
optional string group = 15 [ (android.privacy).dest = DEST_EXPLICIT ];
optional android.media.AudioAttributesProto audio_attributes = 16;
// If this is a blockable system notification channel.
diff --git a/core/proto/android/app/notification_channel_group.proto b/core/proto/android/app/notification_channel_group.proto
index 7b270d7..4fb27b0 100644
--- a/core/proto/android/app/notification_channel_group.proto
+++ b/core/proto/android/app/notification_channel_group.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
package android.app;
@@ -29,9 +28,12 @@
message NotificationChannelGroupProto {
option (.android.msg_privacy).dest = DEST_EXPLICIT;
+ // Notification Channel Group ID. Provided by the app.
optional string id = 1;
+ // User-visible Notification Channel Group name.
optional string name = 2;
+ // User-visible Notification Channel Group description.
optional string description = 3;
optional bool is_blocked = 4;
- repeated android.app.NotificationChannelProto channels = 5;
+ repeated NotificationChannelProto channels = 5;
}
diff --git a/core/proto/android/app/notificationmanager.proto b/core/proto/android/app/notificationmanager.proto
index 183f9d3..27204cc 100644
--- a/core/proto/android/app/notificationmanager.proto
+++ b/core/proto/android/app/notificationmanager.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
package android.app;
diff --git a/core/proto/android/app/profilerinfo.proto b/core/proto/android/app/profilerinfo.proto
index 6b28318..20fa3ad 100644
--- a/core/proto/android/app/profilerinfo.proto
+++ b/core/proto/android/app/profilerinfo.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
import "frameworks/base/libs/incident/proto/android/privacy.proto";
@@ -28,10 +27,12 @@
message ProfilerInfoProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Name of profile output file.
optional string profile_file = 1;
optional int32 profile_fd = 2;
optional int32 sampling_interval = 3;
optional bool auto_stop_profiler = 4;
optional bool streaming_output = 5;
+ // Denotes an agent (and its parameters) to attach for profiling.
optional string agent = 6;
}
diff --git a/core/proto/android/app/window_configuration.proto b/core/proto/android/app/window_configuration.proto
index c9f3986..2d15552 100644
--- a/core/proto/android/app/window_configuration.proto
+++ b/core/proto/android/app/window_configuration.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
package android.app;
diff --git a/core/proto/android/content/clipdata.proto b/core/proto/android/content/clipdata.proto
index cbc00a7..4f1c308 100644
--- a/core/proto/android/content/clipdata.proto
+++ b/core/proto/android/content/clipdata.proto
@@ -27,7 +27,7 @@
message ClipDataProto {
option (.android.msg_privacy).dest = DEST_LOCAL;
- optional android.content.ClipDescriptionProto description = 1;
+ optional ClipDescriptionProto description = 1;
// Custom dump of an android.graphics.Bitmap object.
message Icon {
@@ -46,8 +46,8 @@
string html_text = 1;
string text = 2;
string uri = 3;
- android.content.IntentProto intent = 4;
- bool nothing = 5;
+ IntentProto intent = 4;
+ bool nothing = 5 [ (.android.privacy).dest = DEST_AUTOMATIC ];
}
}
repeated Item items = 3;
diff --git a/core/proto/android/content/component_name.proto b/core/proto/android/content/component_name.proto
index 4e49cf2..232d685 100644
--- a/core/proto/android/content/component_name.proto
+++ b/core/proto/android/content/component_name.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.content";
option java_multiple_files = true;
package android.content;
diff --git a/core/proto/android/content/configuration.proto b/core/proto/android/content/configuration.proto
index 5755c59..06f9735 100644
--- a/core/proto/android/content/configuration.proto
+++ b/core/proto/android/content/configuration.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.content";
option java_multiple_files = true;
package android.content;
diff --git a/core/proto/android/content/featureinfo.proto b/core/proto/android/content/featureinfo.proto
index 6878f0e..87bf404 100644
--- a/core/proto/android/content/featureinfo.proto
+++ b/core/proto/android/content/featureinfo.proto
@@ -18,7 +18,6 @@
import "frameworks/base/libs/incident/proto/android/privacy.proto";
-option java_package = "android.content.pm";
option java_multiple_files = true;
package android.content.pm;
diff --git a/core/proto/android/content/intent.proto b/core/proto/android/content/intent.proto
index 3b2c4fc..99ed687 100644
--- a/core/proto/android/content/intent.proto
+++ b/core/proto/android/content/intent.proto
@@ -17,7 +17,6 @@
syntax = "proto2";
package android.content;
-option java_package = "android.content";
option java_multiple_files = true;
import "frameworks/base/core/proto/android/content/component_name.proto";
@@ -58,8 +57,9 @@
optional string package = 6;
optional ComponentNameProto component = 7;
optional string source_bounds = 8;
- optional string clip_data = 9 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional string clip_data = 9 [ (.android.privacy).dest = DEST_LOCAL ];
optional string extras = 10 [ (.android.privacy).dest = DEST_LOCAL ];
+ // UserHandle value (similar to user_id in other protos).
optional int32 content_user_hint = 11;
optional string selector = 12;
}
@@ -70,6 +70,13 @@
repeated string actions = 1;
repeated string categories = 2;
+ // https://developer.android.com/guide/topics/manifest/data-element#scheme:
+ // The scheme part of a URI. This is the minimal essential attribute for
+ // specifying a URI; at least one scheme attribute must be set for the filter,
+ // or none of the other URI attributes are meaningful. A scheme is specified
+ // without the trailing colon (for example, http, rather than http:). If the
+ // filter has a data type set (the mimeType attribute) but no scheme, the
+ // content: and file: schemes are assumed.
repeated string data_schemes = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
repeated android.os.PatternMatcherProto data_scheme_specs = 4;
repeated AuthorityEntryProto data_authorities = 5;
diff --git a/core/proto/android/content/locale.proto b/core/proto/android/content/locale.proto
index 87b555c..86743bf 100644
--- a/core/proto/android/content/locale.proto
+++ b/core/proto/android/content/locale.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.content";
option java_multiple_files = true;
import "frameworks/base/libs/incident/proto/android/privacy.proto";
diff --git a/core/proto/android/content/package_item_info.proto b/core/proto/android/content/package_item_info.proto
index 6e99bec..ebb2fa6 100644
--- a/core/proto/android/content/package_item_info.proto
+++ b/core/proto/android/content/package_item_info.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.content.pm";
option java_multiple_files = true;
import "frameworks/base/libs/incident/proto/android/privacy.proto";
@@ -72,20 +71,43 @@
optional int32 requires_smallest_width_dp = 3;
optional int32 compatible_width_limit_dp = 4;
optional int32 largest_width_limit_dp = 5;
+ // String retrieved from the seinfo tag found in selinux policy. This value
+ // can be set through the mac_permissions.xml policy construct. This value
+ // is used for setting an SELinux security context on the process as well as
+ // its data directory.
optional string seinfo = 6;
+ // The seinfo tag generated per-user. This value may change based upon the
+ // user's configuration. For example, when an instant app is installed for a
+ // user. It is an error if this field is ever null when trying to
+ // start a new process.
optional string seinfo_user = 7;
+ // Full path to the device-protected directory assigned to the package for
+ // its persistent data.
optional string device_protected_data_dir = 8;
+ // Full path to the credential-protected directory assigned to the package
+ // for its persistent data.
optional string credential_protected_data_dir = 9;
+ // Paths to all shared libraries this application is linked against. This
+ // field is only set if the PackageManager.GET_SHARED_LIBRARY_FILES} flag
+ // was used when retrieving the structure.
repeated string shared_library_files = 10;
optional string manage_space_activity_name = 11;
optional int32 description_res = 12;
optional int32 ui_options = 13;
optional bool supports_rtl = 14;
oneof full_backup_content {
+ // An optional attribute that indicates the app supports automatic backup
+ // of app data. 0 is the default and means the app's entire data folder +
+ // managed external storage will be backed up; Any negative value
+ // indicates the app does not support full-data backup, though it may
+ // still want to participate via the traditional key/value backup API; A
+ // positive number specifies an xml resource in which the application has
+ // defined its backup include/exclude criteria. The data in this field is
+ // of the format "@xml/<number>".
string content = 15;
bool is_full_backup = 16;
}
- optional int32 networkSecurity_config_res = 17;
+ optional int32 network_security_config_res = 17;
optional int32 category = 18;
}
optional Detail detail = 17;
diff --git a/core/proto/android/media/audioattributes.proto b/core/proto/android/media/audioattributes.proto
index ef04720..d679d9c 100644
--- a/core/proto/android/media/audioattributes.proto
+++ b/core/proto/android/media/audioattributes.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.media";
option java_multiple_files = true;
package android.media;
diff --git a/core/proto/android/os/batterystats.proto b/core/proto/android/os/batterystats.proto
index 0970bd5..a4167c1 100644
--- a/core/proto/android/os/batterystats.proto
+++ b/core/proto/android/os/batterystats.proto
@@ -788,7 +788,7 @@
message UserActivity {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
- optional android.os.PowerManagerProto.UserActivityEvent name = 1;
+ optional PowerManagerProto.UserActivityEvent name = 1;
optional int32 count = 2;
};
repeated UserActivity user_activity = 23;
diff --git a/core/proto/android/os/incident.proto b/core/proto/android/os/incident.proto
index 5f6b6cc..8f28970 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -18,7 +18,6 @@
option java_multiple_files = true;
import "frameworks/base/core/proto/android/os/backtrace.proto";
-import "frameworks/base/core/proto/android/os/batterystats.proto";
import "frameworks/base/core/proto/android/os/batterytype.proto";
import "frameworks/base/core/proto/android/os/cpufreq.proto";
import "frameworks/base/core/proto/android/os/cpuinfo.proto";
diff --git a/core/proto/android/os/looper.proto b/core/proto/android/os/looper.proto
index dce65d3..b9b8cf5 100644
--- a/core/proto/android/os/looper.proto
+++ b/core/proto/android/os/looper.proto
@@ -28,5 +28,5 @@
// the thread name, usually set by developers.
optional string thread_name = 1;
optional int64 thread_id = 2;
- optional android.os.MessageQueueProto queue = 3;
+ optional MessageQueueProto queue = 3;
}
diff --git a/core/proto/android/os/message.proto b/core/proto/android/os/message.proto
index 048d031..8aaec70 100644
--- a/core/proto/android/os/message.proto
+++ b/core/proto/android/os/message.proto
@@ -23,15 +23,21 @@
message MessageProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Targeted delivery time of the message.
optional int64 when = 1;
// Name of callback class.
optional string callback = 2;
- // User-defined message code so that the recipient can identify what this
+ // App-defined message code so that the recipient can identify what this
// message is about.
optional int32 what = 3;
+ // Lower-cost alternative to using setData() if the app only needs to store a few integer values.
optional int32 arg1 = 4;
+ // Lower-cost alternative to using setData() if the app only needs to store a few integer values.
optional int32 arg2 = 5;
- // String representation of an arbitrary object to send to the recipient.
+ // String representation of an arbitrary object to send to the Handler. When
+ // using android.os.Messenger to send the message across processes, this will
+ // only be populated if it contains a Parcelable of a framework class (not one
+ // implemented by the application).
optional string obj = 6 [ (.android.privacy).dest = DEST_EXPLICIT ];
// Name of target class.
optional string target = 7;
diff --git a/core/proto/android/os/messagequeue.proto b/core/proto/android/os/messagequeue.proto
index 4bfcb81..61bbee7 100644
--- a/core/proto/android/os/messagequeue.proto
+++ b/core/proto/android/os/messagequeue.proto
@@ -25,7 +25,7 @@
message MessageQueueProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
- repeated android.os.MessageProto messages = 1;
+ repeated MessageProto messages = 1;
optional bool is_polling_locked = 2;
optional bool is_quitting = 3;
}
diff --git a/core/proto/android/os/pagetypeinfo.proto b/core/proto/android/os/pagetypeinfo.proto
index 0b8a5da..65e7139 100644
--- a/core/proto/android/os/pagetypeinfo.proto
+++ b/core/proto/android/os/pagetypeinfo.proto
@@ -49,8 +49,11 @@
optional int32 node = 1;
+ // Memory zone.
optional string zone = 2;
+ // Migration type (Unmovable, Reclaimable, Movable, Reserve, CMA, and
+ // Isolate).
optional string type = 3;
// order level starts from 0 for 4KB to page_block_order defined above, e.g. 10 for 4096KB
@@ -64,6 +67,7 @@
optional int32 node = 1;
+ // Memory zone.
optional string zone = 2;
optional int32 unmovable = 3;
diff --git a/core/proto/android/os/procrank.proto b/core/proto/android/os/procrank.proto
index ff7515e..f7edaf4 100644
--- a/core/proto/android/os/procrank.proto
+++ b/core/proto/android/os/procrank.proto
@@ -15,18 +15,17 @@
*/
syntax = "proto2";
+package android.os;
+
option java_multiple_files = true;
import "frameworks/base/libs/incident/proto/android/privacy.proto";
-package android.os;
-
-//Memory usage of running processes
+// Memory usage of running processes
message ProcrankProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
// Currently running process
- // Next Tag: 11
message Process {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -59,11 +58,12 @@
// process command
optional string cmdline = 10;
+
+ // Next Tag: 11
}
repeated Process processes = 1;
// Summary
- // Next Tag: 3
message Summary {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -83,6 +83,8 @@
optional string raw_text = 1;
}
optional Ram ram = 3;
+
+ // Next Tag: 4
}
optional Summary summary = 2;
}
diff --git a/core/proto/android/os/ps.proto b/core/proto/android/os/ps.proto
index 0ab92d7..e032b57 100644
--- a/core/proto/android/os/ps.proto
+++ b/core/proto/android/os/ps.proto
@@ -52,7 +52,7 @@
// and ps is not displaying threads.
optional string wchan = 8;
// Memory address of the process.
- optional string addr = 9;
+ optional string addr = 9 [ (android.privacy).dest = DEST_LOCAL ];
enum ProcessStateCode {
STATE_UNKNOWN = 0;
diff --git a/core/proto/android/os/system_properties.proto b/core/proto/android/os/system_properties.proto
index c5f7d0e..a41edf3 100644
--- a/core/proto/android/os/system_properties.proto
+++ b/core/proto/android/os/system_properties.proto
@@ -194,7 +194,7 @@
message Log {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
- optional string tag_WifiHAL = 1;
+ optional string tag_wifi_hal = 1;
optional string tag_stats_log = 2;
// Next Tag: 3
@@ -237,7 +237,7 @@
optional bool adb_secure = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional string arch = 2;
optional bool audio_ignore_effects = 3;
- optional bool audio_monitorRotation = 4;
+ optional bool audio_monitor_rotation = 4;
optional string baseband = 5;
optional string board_platform = 6;
@@ -249,9 +249,13 @@
repeated string boottime = 5;
optional string console = 6;
optional int32 fake_battery = 7;
+ // The name of the hardware (from the kernel command line or /proc). It
+ // SHOULD be reasonably human-readable.
optional string hardware = 8;
optional string hardware_color = 9;
optional string hardware_revision = 10;
+ // SKU is for small variants such as device color, targeted market,
+ // ram/rom size, etc.
optional string hardware_sku = 11;
optional string keymaster = 12;
optional string mode = 13;
@@ -292,27 +296,60 @@
message Build {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Date of the platform build.
optional string date = 1;
+ // UTC timstamp of build data.
optional int64 date_utc = 2;
optional string description = 3;
+ // A build ID string meant for displaying to the user.
optional string display_id = 4;
+ // A string that uniquely identifies the host the build was built on, in
+ // human-readable format. Only makes sense for internal engineering
+ // builds.
optional string host = 5;
+ // Unique id of this android platform build. An identifier chosen by the
+ // device implementer to refer to a specific release, in human-readable
+ // format. This field can be the same as
+ // android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value
+ // sufficiently meaningful for end users to distinguish between software
+ // builds.
optional string id = 6;
+ // Product name.
optional string product = 7;
optional bool system_root_image = 8;
+ // Tags of the buid, e.g. dev-keys, release-keys.
optional string tags = 9;
+ // Type of the build, e.g. eng, userdebug, user.
optional string type = 10;
+ // Name of the user (an engineer or a build bot) that built the image. For
+ // production builds, this is from the build bot but some OEMs might use a
+ // real username. Only makes sense for internal engineering builds.
optional string user = 11;
message Version {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // The base OS build the product is based on. A value representing the
+ // FINGERPRINT parameter of the build that is otherwise identical to
+ // this build except for the patches provided in the Android Public
+ // Security Bulletin.
optional string base_os = 1;
optional string codename = 2;
+ // A value chosen by the device implementer designating the specific
+ // build of the currently-executing Android system, in human-readable
+ // format. This value MUST NOT be reused for different builds made
+ // available to end users. A typical use of this field is to indicate
+ // which build number or source-control change identifier was used to
+ // generate the build.
optional string incremental = 3;
optional int32 preview_sdk = 4;
+ // The version of the currently-executing Android system, in
+ // human-readable format.
optional string release = 5;
+ // The version of the currently-executing Android system, in a format
+ // accessible to third-party application code.
optional int32 sdk = 6;
+ // A value indicating the security patch level of a build.
optional string security_patch = 7;
// Next Tag: 8
@@ -324,8 +361,11 @@
optional Build build = 11;
optional bool camera_notify_nfc = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Carrier name on the phone.
optional string carrier = 13;
+ // Is dataroaming enabled.
optional bool com_android_dataroaming = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // does it provide mobiledata.
optional bool com_android_prov_mobiledata = 15 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional string com_google_clientidbase = 16;
@@ -346,6 +386,7 @@
optional string crypto_state = 21;
optional string crypto_type = 22;
optional string dalvik_vm_native_bridge = 23;
+ // Is this build debuggable.
optional bool debuggable = 24;
optional string frp_pst = 25;
optional string gfx_driver_0 = 26;
@@ -353,8 +394,8 @@
message Hardware {
option (android.msg_privacy).dest = DEST_LOCAL;
- optional string value = 1; // value of ro.hardware itself
-
+ // value of ro.hardware itself
+ optional string value = 1;
optional string activity_recognition = 2;
optional string audio = 3;
optional string audio_policy = 4;
@@ -403,21 +444,30 @@
optional int32 oem_unlock_supported = 30;
optional int32 opengles_version = 31;
+ // The product of the device.
message Product {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Name of the product.
optional string board = 1;
+ // Brand of the product.
optional string brand = 2;
optional string cpu_abi = 3;
repeated string cpu_abilist = 4;
repeated string cpu_abilist32 = 5;
repeated string cpu_abilist64 = 6;
+ // Device name.
optional string device = 7;
+ // The first api level when the phone is launched.
optional int32 first_api_level = 8;
+ // Manufacturer of the product.
optional string manufacturer = 9;
+ // Marketing name of the phone.
optional string model = 10;
+ // Name of the product.
optional string name = 11;
+ // Vendor related information about the product.
message Vendor {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -441,6 +491,7 @@
message Telephony {
optional bool call_ring_multiple = 1;
+ // CDMA subscription number.
optional int32 default_cdma_sub = 2;
optional int32 default_network = 3;
}
@@ -456,6 +507,7 @@
}
optional Vendor vendor = 41;
+ // Vendor Native Development Kit version.
optional string vndk_version = 42;
optional int32 vts_coverage = 43;
optional string zygote = 44;
@@ -492,7 +544,7 @@
}
optional Sys sys = 24;
- optional int32 telephony_lteOnCdmaDevice = 25;
+ optional int32 telephony_lte_on_cdma_device = 25;
optional int32 tombstoned_max_tombstone_count = 26;
optional string vold_decrypt = 27;
optional int32 vold_post_fs_data_done = 28;
diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto
index 040e36a..f9f725a 100644
--- a/core/proto/android/providers/settings/global.proto
+++ b/core/proto/android/providers/settings/global.proto
@@ -394,6 +394,8 @@
// App allowed to load GPU debug layers.
optional SettingProto debug_app = 1;
+ // Ordered GPU debug layer list
+ // i.e. <layer1>:<layer2>:...:<layerN>
optional SettingProto debug_layers = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
}
optional Gpu gpu = 59;
@@ -921,6 +923,12 @@
optional SettingProto connected_mac_randomization_enabled = 25 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto max_dhcp_retry_count = 26 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto mobile_data_transition_wakelock_timeout_ms = 27 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Controls whether WiFi configurations created by a Device Owner app should
+ // be locked down (that is, be editable or removable only by the Device
+ // Owner App, not even by Settings app). This setting takes integer values.
+ // Non-zero values mean that the Device Owner-created configurations are
+ // locked down. Value of zero means they are not. Default value in the
+ // absence of actual value to this setting is 0.
optional SettingProto device_owner_configs_lockdown = 28 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto frequency_band = 29 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto p2p_device_name = 30;
diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto
index f2e8c70..6e661e1 100644
--- a/core/proto/android/providers/settings/secure.proto
+++ b/core/proto/android/providers/settings/secure.proto
@@ -144,6 +144,10 @@
optional SettingProto provisioned = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto transport = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto manager_constants = 5;
+ // Local transport parameters so we can configure it for tests.
+ // This is encoded as a key=value list, separated by commas.
+ // The following keys are supported:
+ // fake_encryption_flag (boolean)
optional SettingProto local_transport_parameters = 6;
optional SettingProto packages_to_clear_data_before_full_restore = 7;
}
diff --git a/core/proto/android/server/activitymanagerservice.proto b/core/proto/android/server/activitymanagerservice.proto
index 52c76cc..9d5f0bc 100644
--- a/core/proto/android/server/activitymanagerservice.proto
+++ b/core/proto/android/server/activitymanagerservice.proto
@@ -28,6 +28,7 @@
import "frameworks/base/core/proto/android/content/package_item_info.proto";
import "frameworks/base/core/proto/android/graphics/rect.proto";
import "frameworks/base/core/proto/android/internal/processstats.proto";
+import "frameworks/base/core/proto/android/os/bundle.proto";
import "frameworks/base/core/proto/android/os/looper.proto";
import "frameworks/base/core/proto/android/os/powermanager.proto";
import "frameworks/base/core/proto/android/server/intentresolver.proto";
@@ -163,7 +164,8 @@
optional BroadcastRecordProto current = 5;
optional bool linked_to_death = 6;
repeated BroadcastFilterProto filters = 7;
- optional string hex_hash = 8; // used to find this ReceiverList object in IntentResolver
+ // Used to find this ReceiverList object in IntentResolver
+ optional string hex_hash = 8;
}
message ProcessRecordProto {
@@ -190,7 +192,8 @@
optional .android.content.IntentFilterProto intent_filter = 1;
optional string required_permission = 2;
- optional string hex_hash = 3; // used to find the BroadcastFilter object in IntentResolver
+ // Used to find the BroadcastFilter object in IntentResolver
+ optional string hex_hash = 3;
optional int32 owning_user_id = 4;
}
@@ -411,6 +414,7 @@
message StickyAction {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+ // The action of the sticky Intent.
optional string name = 1;
repeated .android.content.IntentProto intents = 2;
}
@@ -556,7 +560,7 @@
message ConnectionRecordProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
- // used to find same record, e.g. AppBindRecord has the hex_hash
+ // Used to find same record, e.g. AppBindRecord has the hex_hash
optional string hex_hash = 1; // cross reference the object and avoid double logging.
optional int32 user_id = 2;
@@ -803,7 +807,11 @@
optional string profile_file = 6;
optional string watcher = 7;
optional string ui_automation_connection = 8;
- optional string arguments = 9 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ // Arguments as given to the ActiveInstrumentation object in Bundle
+ // toString format.
+ reserved 9; // arguments (in String format).
+ // Arguments as given to the ActiveInstrumentation object.
+ optional .android.os.BundleProto arguments = 10;
}
// Proto definition of com.android.server.am.UidRecord.java
diff --git a/core/proto/android/server/alarmmanagerservice.proto b/core/proto/android/server/alarmmanagerservice.proto
index eef78d1..b74f28d 100644
--- a/core/proto/android/server/alarmmanagerservice.proto
+++ b/core/proto/android/server/alarmmanagerservice.proto
@@ -228,6 +228,8 @@
message FilterStatsProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Tag given to AlarmManager by the app or component scheduling the alarm.
+ // As some of them are app-supplied, some tags may contain PII.
optional string tag = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
// The last time this filter when in flight, in terms of elapsed realtime.
optional int64 last_flight_time_realtime = 2;
@@ -248,6 +250,8 @@
optional int32 uid = 1;
optional string pkg = 2;
+ // Tag given to AlarmManager by the app or component scheduling the alarm.
+ // As some of them are app-supplied, some tags may contain PII.
optional string tag = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional string op = 4;
// Time when this entry was created, in terms of elapsed realtime.
@@ -263,6 +267,8 @@
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 uid = 1;
+ // Tag given to AlarmManager by the app or component scheduling the alarm.
+ // As some of them are app-supplied, some tags may contain PII.
optional string tag = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int64 when_elapsed_ms = 3;
optional .android.app.AlarmManagerProto.AlarmType alarm_type = 4;
@@ -277,6 +283,8 @@
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 uid = 1;
+ // The operation that caused the wakeup. May be an Intent action or a
+ // listener tag.
optional string action = 2;
optional int64 when = 3;
}
diff --git a/core/proto/android/server/forceappstandbytracker.proto b/core/proto/android/server/forceappstandbytracker.proto
index 8c71b0b..54f30c3 100644
--- a/core/proto/android/server/forceappstandbytracker.proto
+++ b/core/proto/android/server/forceappstandbytracker.proto
@@ -71,7 +71,7 @@
message ExemptedPackage {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
- optional int32 userId = 1;
+ optional int32 user_id = 1;
optional string package_name = 2;
}
diff --git a/core/proto/android/server/statlogger.proto b/core/proto/android/server/statlogger.proto
index 46badc4..65b1af7 100644
--- a/core/proto/android/server/statlogger.proto
+++ b/core/proto/android/server/statlogger.proto
@@ -29,7 +29,7 @@
message Event {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
- optional int32 eventId = 1;
+ optional int32 event_id = 1;
// Labels are hard-coded in Android framework code.
optional string label = 2;
optional int32 count = 3;
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index b0ea5e0..a8b23dd 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";
@@ -47,12 +48,12 @@
optional AppTransitionProto app_transition = 9;
}
-/* represents DisplayContent */
+/* represents RootWindowContainer object */
message RootWindowContainerProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional WindowContainerProto window_container = 1;
- repeated DisplayProto displays = 2;
+ repeated DisplayContentProto displays = 2;
/* window references in top down z order */
repeated IdentifierProto windows = 3;
}
@@ -134,36 +135,12 @@
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 */
-message DisplayProto {
+/* represents DisplayContent object */
+message DisplayContentProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional WindowContainerProto window_container = 1;
@@ -284,15 +261,16 @@
optional WindowContainerProto window_container = 1;
optional IdentifierProto identifier = 2;
+ // Unique identifier of a DisplayContent stack.
optional int32 display_id = 3;
+ // Unique identifier for the task stack.
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 +283,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;
@@ -332,6 +308,8 @@
optional int32 hash_code = 1;
optional int32 user_id = 2;
+ // Either a component name/string (eg: "com.android.settings/.FallbackHome")
+ // or a window title ("NavigationBar").
optional string title = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
diff --git a/core/proto/android/service/diskstats.proto b/core/proto/android/service/diskstats.proto
index f55f0e7..1012eb0 100644
--- a/core/proto/android/service/diskstats.proto
+++ b/core/proto/android/service/diskstats.proto
@@ -37,7 +37,7 @@
}
// Whether the latency test resulted in an error
optional bool has_test_error = 1;
- // If the test errored, error message is contained here, it is just IOException.
+ // If the test encountered an IOException, the error message is logged here.
optional string error_message = 2;
// 512B write latency in milliseconds, if the test was successful
optional int32 write_512b_latency_millis = 3;
diff --git a/core/proto/android/service/graphicsstats.proto b/core/proto/android/service/graphicsstats.proto
index d75f135..bb32495 100644
--- a/core/proto/android/service/graphicsstats.proto
+++ b/core/proto/android/service/graphicsstats.proto
@@ -46,10 +46,10 @@
optional int64 stats_start = 3;
optional int64 stats_end = 4;
- // The aggregated statistics for the package
+ // The aggregated statistics for the package.
optional GraphicsStatsJankSummaryProto summary = 5;
- // The frame time histogram for the package
+ // The frame time histogram for the package.
repeated GraphicsStatsHistogramBucketProto histogram = 6;
}
diff --git a/core/proto/android/service/netstats.proto b/core/proto/android/service/netstats.proto
index 29fd195..02d4483 100644
--- a/core/proto/android/service/netstats.proto
+++ b/core/proto/android/service/netstats.proto
@@ -47,6 +47,7 @@
message NetworkInterfaceProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Name of the network interface (eg: wlan).
optional string interface = 1;
optional NetworkIdentitySetProto identities = 2;
@@ -63,11 +64,15 @@
message NetworkIdentityProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
- // Constats from ConnectivityManager.TYPE_*.
+ // Constants from ConnectivityManager.TYPE_*.
optional int32 type = 1;
+ // Full subscriber ID on eng builds. The IMSI is scrubbed on user & userdebug
+ // builds to only include the info about the GSM network operator (the info
+ // that uniquely identifies the subscriber is removed).
optional string subscriber_id = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
+ // Name of the network (eg: MyWifi).
optional string network_id = 3 [ (android.privacy).dest = DEST_EXPLICIT ];
optional bool roaming = 4;
diff --git a/core/proto/android/service/notification.proto b/core/proto/android/service/notification.proto
index bcd7f29..25059be 100644
--- a/core/proto/android/service/notification.proto
+++ b/core/proto/android/service/notification.proto
@@ -59,7 +59,7 @@
}
optional State state = 2;
optional int32 flags = 3;
- optional string channelId = 4 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional string channel_id = 4 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional string sound = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional .android.media.AudioAttributesProto audio_attributes = 6;
optional bool can_vibrate = 7;
@@ -88,6 +88,8 @@
message ManagedServicesProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Hard-coded string identifying what the service config is for
+ // (eg: "notification assistant" or "notification listener").
optional string caption = 1;
message ServiceProto {
@@ -147,8 +149,11 @@
message ConditionProto {
option (android.msg_privacy).dest = DEST_EXPLICIT;
+ // The URI representing the rule being updated.
optional string id = 1;
+ // A user visible description of the rule state.
optional string summary = 2;
+ // Android generated strings that detail when ZenMode will end.
optional string line_1 = 3;
optional string line_2 = 4;
optional int32 icon = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
@@ -189,7 +194,8 @@
(android.privacy).dest = DEST_AUTOMATIC
];
- // Required for automatic ZenRules.
+ // Required for automatic ZenRules. The condition's ID, which is the URI
+ // representing the rule being updated.
optional string condition_id = 8;
optional ConditionProto condition = 9;
optional android.content.ComponentNameProto component = 10;
diff --git a/core/proto/android/service/package.proto b/core/proto/android/service/package.proto
index 88bb4a6..4ecf52c 100644
--- a/core/proto/android/service/package.proto
+++ b/core/proto/android/service/package.proto
@@ -48,7 +48,7 @@
message SharedUserProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
- optional int32 user_id = 1;
+ optional int32 uid = 1;
// Name of the shared UID. eg: android.uid.bluetooth
optional string name = 2;
}
diff --git a/core/proto/android/service/print.proto b/core/proto/android/service/print.proto
index 994814b..a449156 100644
--- a/core/proto/android/service/print.proto
+++ b/core/proto/android/service/print.proto
@@ -27,7 +27,7 @@
option (android.msg_privacy).dest = DEST_AUTOMATIC;
// Each user has a separate printer state
- repeated PrintUserStateProto userStates = 1;
+ repeated PrintUserStateProto user_states = 1;
}
message PrintUserStateProto {
@@ -74,7 +74,8 @@
// Print jobs
repeated PrintJobInfoProto print_jobs = 1;
- // Files used by these print jobs
+ // Files used by these print jobs. These are auto-generated UUIDs that are
+ // only valid while the print job is processed.
repeated string print_job_files = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
// Approved print services
@@ -125,7 +126,7 @@
// The status of the printer
optional Status status = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
- // The description of the printer
+ // The description of the printer, set by the user.
optional string description = 4;
// The capabilities of the printer
@@ -310,7 +311,7 @@
// Type of content (see PrintDocumentInfo.ContentType)
optional int32 content_type = 3;
- // The size of the the document
+ // The size of the document
optional int64 data_size = 4;
}
diff --git a/core/proto/android/service/procstats.proto b/core/proto/android/service/procstats.proto
index b2a88b7..736871f 100644
--- a/core/proto/android/service/procstats.proto
+++ b/core/proto/android/service/procstats.proto
@@ -15,14 +15,14 @@
*/
syntax = "proto2";
+package android.service.procstats;
+
option java_multiple_files = true;
option java_outer_classname = "ProcessStatsServiceProto";
import "frameworks/base/core/proto/android/util/common.proto";
import "frameworks/base/libs/incident/proto/android/privacy.proto";
-package android.service.procstats;
-
/**
* Data from ProcStatsService Dumpsys
*
@@ -42,7 +42,7 @@
* Data model from /frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
* This proto is defined based on the writeToParcel method.
*
- * Next Tag: 9
+ * Next Tag: 10
*/
message ProcessStatsSectionProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -77,9 +77,86 @@
// Stats for each process.
repeated ProcessStatsProto process_stats = 8;
+
+ // Stats for each package.
+ repeated ProcessStatsPackageProto package_stats = 9;
}
-// Next Tag: 6
+// Next Tag: 10
+message ProcessStatsStateProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ enum ScreenState {
+ SCREEN_UNKNOWN = 0;
+ OFF = 1;
+ ON = 2;
+ }
+ optional ScreenState screen_state = 1;
+
+ enum MemoryState {
+ MEMORY_UNKNOWN = 0;
+ NORMAL = 1; // normal.
+ MODERATE = 2; // moderate memory pressure.
+ LOW = 3; // low memory.
+ CRITICAL = 4; // critical memory.
+ }
+ optional MemoryState memory_state = 2;
+
+ // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
+ // and not frameworks/base/core/java/android/app/ActivityManager.java
+ enum ProcessState {
+ PROCESS_UNKNOWN = 0;
+ // Persistent system process.
+ PERSISTENT = 1;
+ // Top activity; actually any visible activity.
+ TOP = 2;
+ // Important foreground process (ime, wallpaper, etc).
+ IMPORTANT_FOREGROUND = 3;
+ // Important background process.
+ IMPORTANT_BACKGROUND = 4;
+ // Performing backup operation.
+ BACKUP = 5;
+ // Background process running a service.
+ SERVICE = 6;
+ // Process not running, but would be if there was enough RAM.
+ SERVICE_RESTARTING = 7;
+ // Process running a receiver.
+ RECEIVER = 8;
+ // Heavy-weight process (currently not used).
+ HEAVY_WEIGHT = 9;
+ // Process hosting home/launcher app when not on top.
+ HOME = 10;
+ // Process hosting the last app the user was in.
+ LAST_ACTIVITY = 11;
+ // Cached process hosting a previous activity.
+ CACHED_ACTIVITY = 12;
+ // Cached process hosting a client activity.
+ CACHED_ACTIVITY_CLIENT = 13;
+ // Cached process that is empty.
+ CACHED_EMPTY = 14;
+ }
+ optional ProcessState process_state = 3;
+
+ // Millisecond uptime duration spent in this state
+ optional int64 duration_ms = 4;
+
+ // Millisecond elapsed realtime duration spent in this state
+ optional int64 realtime_duration_ms = 9;
+
+ // # of samples taken
+ optional int32 sample_size = 5;
+
+ // PSS is memory reserved for this process
+ optional android.util.AggStats pss = 6;
+
+ // USS is memory shared between processes, divided evenly for accounting
+ optional android.util.AggStats uss = 7;
+
+ // RSS is memory resident for this process
+ optional android.util.AggStats rss = 8;
+}
+
+// Next Tag: 7
message ProcessStatsProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -104,78 +181,103 @@
}
optional Kill kill = 3;
- message State {
- option (android.msg_privacy).dest = DEST_AUTOMATIC;
-
- enum ScreenState {
- SCREEN_UNKNOWN = 0;
- OFF = 1;
- ON = 2;
- }
- optional ScreenState screen_state = 1;
-
- enum MemoryState {
- MEMORY_UNKNOWN = 0;
- NORMAL = 1; // normal.
- MODERATE = 2; // moderate memory pressure.
- LOW = 3; // low memory.
- CRITICAL = 4; // critical memory.
- }
- optional MemoryState memory_state = 2;
-
- // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java
- // and not frameworks/base/core/java/android/app/ActivityManager.java
- enum ProcessState {
- PROCESS_UNKNOWN = 0;
- // Persistent system process.
- PERSISTENT = 1;
- // Top activity; actually any visible activity.
- TOP = 2;
- // Important foreground process (ime, wallpaper, etc).
- IMPORTANT_FOREGROUND = 3;
- // Important background process.
- IMPORTANT_BACKGROUND = 4;
- // Performing backup operation.
- BACKUP = 5;
- // Background process running a service.
- SERVICE = 6;
- // Process not running, but would be if there was enough RAM.
- SERVICE_RESTARTING = 7;
- // Process running a receiver.
- RECEIVER = 8;
- // Heavy-weight process (currently not used).
- HEAVY_WEIGHT = 9;
- // Process hosting home/launcher app when not on top.
- HOME = 10;
- // Process hosting the last app the user was in.
- LAST_ACTIVITY = 11;
- // Cached process hosting a previous activity.
- CACHED_ACTIVITY = 12;
- // Cached process hosting a client activity.
- CACHED_ACTIVITY_CLIENT = 13;
- // Cached process that is empty.
- CACHED_EMPTY = 14;
- }
- optional ProcessState process_state = 3;
-
- // Millisecond duration spent in this state
- optional int64 duration_ms = 4;
-
- // # of samples taken
- optional int32 sample_size = 5;
-
- // PSS is memory reserved for this process
- optional android.util.AggStats pss = 6;
-
- // USS is memory shared between processes, divided evenly for accounting
- optional android.util.AggStats uss = 7;
-
- // RSS is memory resident for this process
- optional android.util.AggStats rss = 8;
- }
- repeated State states = 5;
+ // Time and memory spent in various states.
+ repeated ProcessStatsStateProto states = 5;
// Total time process has been running... screen_state, memory_state, and process_state
// will not be set.
- optional State total_running_state = 6;
+ optional ProcessStatsStateProto total_running_state = 6;
+}
+
+// Next Tag: 7
+message ProcessStatsServiceStateProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // Name of service component.
+ optional string service_name = 1;
+
+ // Information about a state the service can be in.
+ message OperationInfo {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // Number of times the service was in this operation.
+ optional int32 count = 1;
+
+ // Time this operation was active in various states. process_state will not be set;
+ // includes only uptime, not memory info.
+ repeated ProcessStatsStateProto states = 2;
+ }
+
+ // Information about when the service was operating as running (that is how long it was
+ // running for any reason, such as the finer-grained started, bound, and executing times
+ // also reported in this proto).
+ optional OperationInfo running_op = 2;
+
+ // Information about when the service was operating as started.
+ optional OperationInfo started_op = 3;
+
+ // Information about when the service was operating as foreground.
+ optional OperationInfo foreground_op = 4;
+
+ // Information about when the service was operating as bound.
+ optional OperationInfo bound_op = 5;
+
+ // Information about when the service was operating as executing.
+ optional OperationInfo executing_op = 6;
+}
+
+// Next Tag: 7
+message ProcessStatsAssociationStateProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // Name of the target component.
+ optional string component_name = 1;
+
+ // Information on one source in this association.
+ message Source {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // Name of source process.
+ optional string process = 1;
+
+ // Uid of the source process.
+ optional int32 uid = 2;
+
+ // Total count of the times this association appeared.
+ optional int32 total_count = 3;
+
+ // Millisecond uptime total duration this association was around.
+ optional int64 total_duration_ms = 4;
+
+ // Total count of the times this association became actively impacting its target process.
+ optional int32 active_count = 5;
+
+ // Time association was active in various states. screen_state and memory_state will not
+ // be set; includes only uptime, not memory info.
+ repeated ProcessStatsStateProto active_states = 6;
+ }
+ repeated Source sources = 3;
+}
+
+// Next Tag: 7
+message ProcessStatsPackageProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // Name of package.
+ optional string package = 1;
+
+ // Uid of the package.
+ optional int32 uid = 2;
+
+ // Version of the package.
+ optional int64 version = 3;
+
+ // Stats for each process running with the package loaded in to it.
+ repeated ProcessStatsProto process_stats = 4;
+
+ // Stats for each of the package's services.
+ repeated ProcessStatsServiceStateProto service_stats = 5;
+
+ // Stats for each association with the package.
+ repeated ProcessStatsAssociationStateProto association_stats = 6;
}
diff --git a/core/proto/android/service/usb.proto b/core/proto/android/service/usb.proto
index 9f58611..ed040f4 100644
--- a/core/proto/android/service/usb.proto
+++ b/core/proto/android/service/usb.proto
@@ -78,16 +78,24 @@
optional string manufacturer = 1;
optional string model = 2;
+ // For "classical" USB-accessories the manufacturer bakes this into the
+ // firmware of the device. If an Android phone is configured as accessory, the
+ // app that sets up the accessory side of the connection set this. Either way,
+ // these are part of the detection protocol, and so they cannot be user set or
+ // unique.
optional string description = 3;
optional string version = 4;
optional string uri = 5 [ (android.privacy).dest = DEST_EXPLICIT ];
- optional string serial = 6 [ (android.privacy).dest = DEST_EXPLICIT ];
+ // Non-resettable hardware ID.
+ optional string serial = 6 [ (android.privacy).dest = DEST_LOCAL ];
}
message UsbDebuggingManagerProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional bool connected_to_adb = 1;
+ // A workstation that connects to the phone for debugging is identified by
+ // this key.
optional string last_key_received = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
optional string user_keys = 3 [ (android.privacy).dest = DEST_LOCAL ];
optional string system_keys = 4 [ (android.privacy).dest = DEST_LOCAL ];
@@ -105,8 +113,12 @@
message UsbDeviceProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Generic USB name, not user-provided.
optional string name = 1;
+ // ID specific to the vendor, not the device.
optional int32 vendor_id = 2;
+ // ID of this product type: Each vendor gives each product a unique ID. E.g.
+ // all mice of the same model would have the same ID.
optional int32 product_id = 3;
optional int32 class = 4;
optional int32 subclass = 5;
@@ -114,14 +126,20 @@
optional string manufacturer_name = 7;
optional string product_name = 8;
optional string version = 9;
- optional string serial_number = 10 [ (android.privacy).dest = DEST_EXPLICIT ];
+ // Non-resettable hardware ID.
+ optional string serial_number = 10 [ (android.privacy).dest = DEST_LOCAL ];
repeated UsbConfigurationProto configurations = 11;
}
message UsbConfigurationProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // A single USB device can have several configurations and the app accessing
+ // the USB device can switch between them. At any time only one can be active.
+ // Each configuration can present completely different interfaces end
+ // endpoints, i.e. a completely different behavior.
optional int32 id = 1;
+ // Hardware-defined name, not set by the user.
optional string name = 2;
optional uint32 attributes = 3;
optional int32 max_power = 4;
@@ -131,6 +149,7 @@
message UsbInterfaceProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Hardware defined. This is the id used by the app to identify the interface.
optional int32 id = 1;
optional int32 alternate_settings = 2;
optional string name = 3;
@@ -145,6 +164,7 @@
optional int32 endpoint_number = 1;
optional android.service.UsbEndPointDirection direction = 2;
+ // The address of the endpoint. Needed to read and write to the endpoint.
optional int32 address = 3;
optional android.service.UsbEndPointType type = 4;
optional uint32 attributes = 5;
@@ -201,6 +221,7 @@
MODE_DEBUG_ACCESSORY = 8;
}
+ // ID of the port. A device (eg: Chromebooks) might have multiple ports.
optional string id = 1;
repeated Mode supported_modes = 2;
}
@@ -299,6 +320,7 @@
message UsbProfileGroupSettingsManagerProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // The user id of the personal profile if the device has a work profile.
optional int32 parent_user_id = 1;
repeated UsbSettingsDevicePreferenceProto device_preferences = 2;
repeated UsbSettingsAccessoryPreferenceProto accessory_preferences = 3;
@@ -314,6 +336,7 @@
message UsbDeviceFilterProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
+ // Mirrors the vendor_id of UsbDeviceProto.
optional int32 vendor_id = 1;
optional int32 product_id = 2;
optional int32 class = 3;
diff --git a/core/proto/android/view/display.proto b/core/proto/android/view/display.proto
index 30046c3..fe8fed6 100644
--- a/core/proto/android/view/display.proto
+++ b/core/proto/android/view/display.proto
@@ -22,6 +22,8 @@
message DisplayProto {
enum ColorMode {
COLOR_MODE_INVALID = -1;
+ // The default or native gamut of the display.
+ COLOR_MODE_DEFAULT = 0;
COLOR_MODE_BT601_625 = 1;
COLOR_MODE_BT601_625_UNADJUSTED = 2;
COLOR_MODE_BT601_525 = 3;
diff --git a/core/proto/android/view/displayinfo.proto b/core/proto/android/view/displayinfo.proto
index 8583955..29757fc 100644
--- a/core/proto/android/view/displayinfo.proto
+++ b/core/proto/android/view/displayinfo.proto
@@ -21,7 +21,8 @@
option java_multiple_files = true;
-/* represents DisplayInfo */
+// Represents DisplayInfo. Describes the characteristics of a particular
+// logical display.
message DisplayInfoProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -29,5 +30,7 @@
optional int32 logical_height = 2;
optional int32 app_width = 3;
optional int32 app_height = 4;
- optional string name = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ // The human-readable name of the display.
+ // Eg: "Built-in Screen"
+ optional string name = 5;
}
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/proto/android/view/remote_animation_target.proto b/core/proto/android/view/remote_animation_target.proto
index 9139f25..fb4d5bd 100644
--- a/core/proto/android/view/remote_animation_target.proto
+++ b/core/proto/android/view/remote_animation_target.proto
@@ -15,7 +15,6 @@
*/
syntax = "proto2";
-option java_package = "android.app";
option java_multiple_files = true;
package android.view;
@@ -26,7 +25,7 @@
import "frameworks/base/core/proto/android/view/surfacecontrol.proto";
import "frameworks/base/libs/incident/proto/android/privacy.proto";
-/** Proto representation for RemoteAnimationTarget.java class. */
+/** Proto representation for android.view.RemoteAnimationTarget.java class. */
message RemoteAnimationTargetProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
@@ -35,8 +34,11 @@
optional .android.view.SurfaceControlProto leash = 3;
optional bool is_translucent = 4;
optional .android.graphics.RectProto clip_rect = 5;
- optional .android.graphics.RectProto contentInsets = 6;
+ optional .android.graphics.RectProto content_insets = 6;
optional int32 prefix_order_index = 7;
+ // The source position of the app, in screen spaces coordinates. If the
+ // position of the leash is modified from the controlling app, any animation
+ // transform needs to be offset by this amount.
optional .android.graphics.PointProto position = 8;
optional .android.graphics.RectProto source_container_bounds = 9;
optional .android.app.WindowConfigurationProto window_configuration = 10;
diff --git a/core/proto/android/view/windowlayoutparams.proto b/core/proto/android/view/windowlayoutparams.proto
index 586321d..8a011e9 100644
--- a/core/proto/android/view/windowlayoutparams.proto
+++ b/core/proto/android/view/windowlayoutparams.proto
@@ -63,7 +63,7 @@
}
optional NeedsMenuState needs_menu_key = 22;
- optional .android.view.DisplayProto.ColorMode color_mode = 23;
+ optional DisplayProto.ColorMode color_mode = 23;
optional uint32 flags = 24;
optional uint32 private_flags = 26;
optional uint32 system_ui_visibility_flags = 27;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index f9d81ba..8f176e8 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -359,6 +359,7 @@
<protected-broadcast android:name="android.net.wifi.action.PASSPOINT_ICON" />
<protected-broadcast android:name="android.net.wifi.action.PASSPOINT_OSU_PROVIDERS_LIST" />
<protected-broadcast android:name="android.net.wifi.action.PASSPOINT_SUBSCRIPTION_REMEDIATION" />
+ <protected-broadcast android:name="android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW" />
<protected-broadcast android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
<protected-broadcast android:name="android.net.wifi.supplicant.STATE_CHANGE" />
<protected-broadcast android:name="android.net.wifi.p2p.STATE_CHANGED" />
@@ -764,7 +765,8 @@
<!-- ====================================================================== -->
<eat-comment />
- <!-- Used for runtime permissions related to the shared external storage. -->
+ <!-- Used for runtime permissions related to the shared external storage.
+ @deprecated replaced by new strongly-typed permission groups in Q. -->
<permission-group android:name="android.permission-group.STORAGE"
android:icon="@drawable/perm_group_storage"
android:label="@string/permgrouplab_storage"
@@ -792,13 +794,13 @@
grants your app this permission. If you don't need this permission, be sure your <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
targetSdkVersion}</a> is 4 or higher.
- <p>Protection level: dangerous
+ @deprecated replaced by new strongly-typed permission groups in Q.
-->
<permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:permissionGroup="android.permission-group.STORAGE"
android:label="@string/permlab_sdcardRead"
android:description="@string/permdesc_sdcardRead"
- android:protectionLevel="dangerous" />
+ android:protectionLevel="normal" />
<!-- Allows an application to write to external storage.
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
@@ -813,14 +815,87 @@
read/write files in your application-specific directories returned by
{@link android.content.Context#getExternalFilesDir} and
{@link android.content.Context#getExternalCacheDir}.
- <p>Protection level: dangerous
+ @deprecated replaced by new strongly-typed permission groups in Q.
-->
<permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:permissionGroup="android.permission-group.STORAGE"
android:label="@string/permlab_sdcardWrite"
android:description="@string/permdesc_sdcardWrite"
+ android:protectionLevel="normal" />
+
+ <!-- Runtime permission controlling access to the user's shared aural media
+ collection. -->
+ <permission-group android:name="android.permission-group.MEDIA_AURAL"
+ android:icon="@drawable/perm_group_aural"
+ android:label="@string/permgrouplab_aural"
+ android:description="@string/permgroupdesc_aural"
+ android:request="@string/permgrouprequest_aural"
+ android:priority="910" />
+
+ <!-- Allows an application to read the user's shared audio collection. -->
+ <permission android:name="android.permission.READ_MEDIA_AUDIO"
+ android:permissionGroup="android.permission-group.MEDIA_AURAL"
+ android:label="@string/permlab_audioRead"
+ android:description="@string/permdesc_audioRead"
android:protectionLevel="dangerous" />
+ <!-- Allows an application to modify the user's shared audio collection. -->
+ <permission android:name="android.permission.WRITE_MEDIA_AUDIO"
+ android:permissionGroup="android.permission-group.MEDIA_AURAL"
+ android:label="@string/permlab_audioWrite"
+ android:description="@string/permdesc_audioWrite"
+ android:protectionLevel="dangerous" />
+
+ <!-- Runtime permission controlling access to the user's shared visual media
+ collection, including images and videos. -->
+ <permission-group android:name="android.permission-group.MEDIA_VISUAL"
+ android:icon="@drawable/perm_group_visual"
+ android:label="@string/permgrouplab_visual"
+ android:description="@string/permgroupdesc_visual"
+ android:request="@string/permgrouprequest_visual"
+ android:priority="920" />
+
+ <!-- Allows an application to read the user's shared images collection. -->
+ <permission android:name="android.permission.READ_MEDIA_IMAGES"
+ android:permissionGroup="android.permission-group.MEDIA_VISUAL"
+ android:label="@string/permlab_imagesRead"
+ android:description="@string/permdesc_imagesRead"
+ android:protectionLevel="dangerous" />
+
+ <!-- Allows an application to modify the user's shared images collection. -->
+ <permission android:name="android.permission.WRITE_MEDIA_IMAGES"
+ android:permissionGroup="android.permission-group.MEDIA_VISUAL"
+ android:label="@string/permlab_imagesWrite"
+ android:description="@string/permdesc_imagesWrite"
+ android:protectionLevel="dangerous" />
+
+ <!-- Allows an application to read the user's shared video collection. -->
+ <permission android:name="android.permission.READ_MEDIA_VIDEO"
+ android:permissionGroup="android.permission-group.MEDIA_VISUAL"
+ android:label="@string/permlab_videoRead"
+ android:description="@string/permdesc_videoRead"
+ android:protectionLevel="dangerous" />
+
+ <!-- Allows an application to modify the user's shared video collection. -->
+ <permission android:name="android.permission.WRITE_MEDIA_VIDEO"
+ android:permissionGroup="android.permission-group.MEDIA_VISUAL"
+ android:label="@string/permlab_videoWrite"
+ android:description="@string/permdesc_videoWrite"
+ android:protectionLevel="dangerous" />
+
+ <!-- Allows an application to access any geographic locations persisted in the
+ user's shared collection. -->
+ <permission android:name="android.permission.ACCESS_MEDIA_LOCATION"
+ android:permissionGroup="android.permission-group.MEDIA_VISUAL"
+ android:label="@string/permlab_mediaLocation"
+ android:description="@string/permdesc_mediaLocation"
+ android:protectionLevel="dangerous" />
+
+ <!-- @hide @SystemApi
+ Allows an application to modify OBB files visible to other apps. -->
+ <permission android:name="android.permission.WRITE_OBB"
+ android:protectionLevel="signature|privileged" />
+
<!-- ====================================================================== -->
<!-- Permissions for accessing the device location -->
<!-- ====================================================================== -->
@@ -2076,11 +2151,11 @@
<!-- @SystemApi @TestApi @hide Allows an application to create/manage/remove stacks -->
<permission android:name="android.permission.MANAGE_ACTIVITY_STACKS"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @TestApi @hide Allows an application to embed other activities -->
<permission android:name="android.permission.ACTIVITY_EMBEDDING"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to start any activity, regardless of permission
protection or exported state.
@@ -2313,7 +2388,7 @@
<permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
android:protectionLevel="signature" />
- <!-- @SystemApi Allows an application to modify the current configuration, such
+ <!-- @SystemApi @TestApi Allows an application to modify the current configuration, such
as locale. -->
<permission android:name="android.permission.CHANGE_CONFIGURATION"
android:protectionLevel="signature|privileged|development" />
@@ -2340,7 +2415,7 @@
<permission android:name="android.permission.WRITE_GSERVICES"
android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows an application to call
+ <!-- @SystemApi @TestApi Allows an application to call
{@link android.app.ActivityManager#forceStopPackage}.
@hide -->
<permission android:name="android.permission.FORCE_STOP_PACKAGES"
diff --git a/core/res/res/drawable/perm_group_aural.xml b/core/res/res/drawable/perm_group_aural.xml
new file mode 100644
index 0000000..0465e98
--- /dev/null
+++ b/core/res/res/drawable/perm_group_aural.xml
@@ -0,0 +1,24 @@
+<!--
+Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M20,2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-2,5h-3v5.5c0,1.38 -1.12,2.5 -2.5,2.5S10,13.88 10,12.5s1.12,-2.5 2.5,-2.5c0.57,0 1.08,0.19 1.5,0.51V5h4v2zM4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6z"/>
+</vector>
diff --git a/core/res/res/drawable/perm_group_visual.xml b/core/res/res/drawable/perm_group_visual.xml
new file mode 100644
index 0000000..bf9a0b1
--- /dev/null
+++ b/core/res/res/drawable/perm_group_visual.xml
@@ -0,0 +1,24 @@
+<!--
+Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z"/>
+</vector>
diff --git a/core/res/res/layout/resolver_different_item_header.xml b/core/res/res/layout/resolver_different_item_header.xml
index 5889136..7d9ffd7 100644
--- a/core/res/res/layout/resolver_different_item_header.xml
+++ b/core/res/res/layout/resolver_different_item_header.xml
@@ -29,6 +29,5 @@
android:paddingEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
- android:background="@color/white"
android:elevation="8dp"
/>
diff --git a/core/res/res/layout/resolver_list.xml b/core/res/res/layout/resolver_list.xml
index 40c9941..373354a 100644
--- a/core/res/res/layout/resolver_list.xml
+++ b/core/res/res/layout/resolver_list.xml
@@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:layout_alwaysShow="true"
android:elevation="8dp"
- android:background="@color/white">
+ android:background="?attr/colorBackgroundFloating">
<TextView
android:id="@+id/profile_button"
@@ -69,7 +69,7 @@
android:id="@+id/resolver_list"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
- android:background="@color/white"
+ android:background="?attr/colorBackgroundFloating"
android:elevation="8dp"
android:nestedScrollingEnabled="true"
android:scrollIndicators="top|bottom"
@@ -78,7 +78,7 @@
<TextView android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/white"
+ android:background="?attr/colorBackgroundFloating"
android:elevation="8dp"
android:layout_alwaysShow="true"
android:text="@string/noApplications"
@@ -99,7 +99,7 @@
android:orientation="horizontal"
android:layoutDirection="locale"
android:measureWithLargestChild="true"
- android:background="@color/white"
+ android:background="?attr/colorBackgroundFloating"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="12dp"
diff --git a/core/res/res/layout/resolver_list_with_default.xml b/core/res/res/layout/resolver_list_with_default.xml
index 8101183..740a7eb 100644
--- a/core/res/res/layout/resolver_list_with_default.xml
+++ b/core/res/res/layout/resolver_list_with_default.xml
@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_alwaysShow="true"
android:orientation="vertical"
- android:background="@color/white"
+ android:background="?attr/colorBackgroundFloating"
android:elevation="8dp">
<LinearLayout
@@ -111,7 +111,6 @@
android:paddingBottom="8dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
- android:background="@color/white"
android:elevation="8dp">
<Button
@@ -151,7 +150,7 @@
android:id="@+id/resolver_list"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
- android:background="@color/white"
+ android:background="?attr/colorBackgroundFloating"
android:elevation="8dp"
android:nestedScrollingEnabled="true"
android:divider="@null" />
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 73db3a1..703ecf7 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -133,7 +133,7 @@
<item msgid="4397097370387921767">"%s Wi-Fi-oproep"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Af"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Verkieslik Wi-Fi"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Verkies Wi-Fi"</string>
<string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Verkies mobiel"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Net Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Nie aangestuur nie"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Liggaamsensors"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"toegang te verkry tot sensordata oor jou lewenstekens"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Gee <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> toegang tot sensordata oor jou lewenstekens?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Venster-inhoud ophaal"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Die inhoud ondersoek van \'n venster waarmee jy interaksie het."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Verken deur raak aanskakel"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Laat die program toe om metodes te benut om vingerafdruksjablone vir gebruik by te voeg en uit te vee."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"gebruik vingerafdrukhardeware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Laat die program toe om vingerafdrukhardeware vir stawing te gebruik"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Gedeeltelike vingerafdruk is bespeur. Probeer asseblief weer."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Kon nie vingerafdruk verwerk nie. Probeer asseblief weer."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Vingerafdruksensor is vuil. Maak dit skoon en probeer weer."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Stoor <xliff:g id="TYPE">%1$s</xliff:g> in <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Stoor <xliff:g id="TYPE_0">%1$s</xliff:g> en <xliff:g id="TYPE_1">%2$s</xliff:g> in <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Stoor <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> en <xliff:g id="TYPE_2">%3$s</xliff:g> in <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Stoor"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nee, dankie"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"wagwoord"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adres"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredietkaart"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 400f304..5a7e643 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"የሰውነት ዳሳሾች"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ስለአስፈላጊ ምልክቶችዎ ያሉ የዳሳሽ ውሂብ ይድረሱ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> የሰውነትዎ መሠረታዊ ምልክቶች የዳሳሽ ውሂብ እንዲደርስ ይፈቀድለት?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"ሙዚቃ"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"ሙዚቃዎን መድረስ"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ቀን ሙዚቃዎን እንዲደርስ ይፈቀድለት?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"ፎቶዎች እና ቪዲዮዎች"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"የእርስዎን ፎቶዎች እና ቪዲዮዎች መድረስ"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> የእርስዎን ፎቶዎች እና ቪዲዮዎች እንዲደርስ ይፈቀድለት?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"የመስኮት ይዘት ሰርስረው ያውጡ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"መስተጋበር የሚፈጥሩት የመስኮት ይዘት ይመርምሩ።"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"በመንካት ያስሱን ያብሩ"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"መተግበሪያው ጥቅም ላይ እንዲውሉ የጣት አሻራ ቅንብር ደንቦችን ለማከል እና ለመሰረዝ የሚያስችሉ ስልቶችን እንዲያስጀምር ያስችለዋል።"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"የጣት አሻራ ሃርድዌርን ተጠቀም"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"መተግበሪያው የጣት አሻራ ሃርድዌር ለማረጋገጥ ስራ እንዲጠቀም ያስችለዋል"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"የሙዚቃ ስብስብዎን ማንበብ"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"መተግበሪያው የሙዚቃ ስብስብዎን እንዲያነብብ ያስችለዋል።"</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"የሙዚቃ ስብስብዎን መቀየር"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"መተግበሪያው የሙዚቃ ስብስብዎን እንዲቀይረው ያስችለዋል።"</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"የቪዲዮ ስብስብዎን ማንበብ"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"መተግበሪያው የቪዲዮ ስብስብዎን እንዲያነብብ ያስችለዋል።"</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"የቪዲዮ ስብስብዎን መቀየር"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"መተግበሪያው የፎቶ ስብስብዎን እንዲቀይረው ያስችለዋል።"</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"የፎቶ ስብስብዎን ማንበብ"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"መተግበሪያው የፎቶ ስብስብዎን እንዲያነብብ ያስችለዋል።"</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"የፎቶ ስብስብዎን መቀየር"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"መተግበሪያው የፎቶ ስብስብዎን እንዲቀይረው ያስችለዋል።"</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"አካባቢዎችን ከሚዲያ ስብስብዎ ማንበብ"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"መተግበሪያው አካባቢዎችን ከሚዲያ ስብስብዎ እንዲያነብብ ያስችለዋል።"</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ከፊል የጣት አሻራ ተገኝቷል። እባክዎ እንደገና ይሞክሩ።"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ጣት አሻራን መስራት አልተቻለም። እባክዎ እንደገና ይሞክሩ።"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"የጣት አሻራ ዳሳሽ ቆሽሿል። እባክዎ ያጽዱት እና እንደገና ይሞክሩ።"</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> ወደ <b><xliff:g id="LABEL">%2$s</xliff:g></b> ይቀመጥ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> እና <xliff:g id="TYPE_1">%2$s</xliff:g> ወደ <b><xliff:g id="LABEL">%3$s</xliff:g></b> ይቀመጡ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>፣ <xliff:g id="TYPE_1">%2$s</xliff:g> እና <xliff:g id="TYPE_2">%3$s</xliff:g> ወደ <b><xliff:g id="LABEL">%4$s</xliff:g></b> ይቀመጡ?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"ወደ <b><xliff:g id="LABEL">%1$s</xliff:g></b> ይዘመን?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g> ወደ <b><xliff:g id="LABEL">%2$s</xliff:g></b> ይዘመን?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g> እና <xliff:g id="TYPE_1">%2$s</xliff:g> ወደ <b><xliff:g id="LABEL">%3$s</xliff:g></b> ይዘመኑ?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>፣ <xliff:g id="TYPE_1">%2$s</xliff:g> እና <xliff:g id="TYPE_2">%3$s</xliff:g> ወደ <b><xliff:g id="LABEL">%4$s</xliff:g></b> ይዘመኑ?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"አስቀምጥ"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"አይ፣ አመሰግናለሁ"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"አዘምን"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"የይለፍ ቃል"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"አድራሻ"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ክሬዲት ካርድ"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 1470013..d46f758 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -138,7 +138,7 @@
</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_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>
@@ -312,6 +312,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"أجهزة استشعار الجسم"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"الوصول إلى بيانات المستشعر حول علاماتك الحيوية"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"هل تريد السماح لتطبيق <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> بالدخول إلى بيانات المستشعر حول علاماتك الحيوية؟"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"الموسيقى"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"الوصول إلى الموسيقى"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"هل تريد السماح لتطبيق <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> بالوصول إلى الموسيقى؟"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"الصور والفيديوهات"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"الوصول إلى صورك وفيديوهاتك"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"هل تريد السماح لتطبيق <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> بالوصول إلى صورك وفيديوهاتك؟"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"استرداد محتوى النافذة"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"فحص محتوى نافذة يتم التفاعل معها"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"تشغيل الاستكشاف باللمس"</string>
@@ -506,6 +512,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"للسماح للتطبيق باستدعاء طرق لإضافة نماذج من بصمات الأصابع وحذفها."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"لاستخدام أجهزة بصمة الإصبع"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"للسماح للتطبيق باستخدام أجهزة بصمة الإصبع للمصادقة"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"قراءة مجموعتك الموسيقية"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"للسماح للتطبيق بقراءة مجموعتك الموسيقية."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"تعديل مجموعتك الموسيقية"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"للسماح للتطبيق بتعديل مجموعتك الموسيقية."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"قراءة مجموعة الفيديو التابعة لك"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"للسماح للتطبيق بقراءة مجموعة الفيديوهات التابعة لك."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"تعديل مجموعة الفيديو التابعة لك"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"يسمح للتطبيق بتعديل مجموعة الفيديوهات التابعة لك."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"قراءة مجموعة صورك"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"للسماح للتطبيق بقراءة مجموعة صورك."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"تعديل مجموعة صورك"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"للسماح للتطبيق بتعديل مجموعة صورك."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"قراءة المواقع من مجموعة الوسائط التابعة لك"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"للسماح للتطبيق بقراءة المواقع من مجموعة الوسائط التابعة لك."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"تم اكتشاف بصمة الإصبع بشكل جزئي؛ يرجى إعادة المحاولة."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"تعذرت معالجة بصمة الإصبع. يُرجى إعادة المحاولة."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"جهاز استشعار بصمات الأصابع متسخ، يرجى تنظيفه وإعادة المحاولة."</string>
@@ -2012,8 +2032,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"هل تريد حفظ <xliff:g id="TYPE">%1$s</xliff:g> في <b><xliff:g id="LABEL">%2$s</xliff:g></b>؟"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"هل تريد حفظ <xliff:g id="TYPE_0">%1$s</xliff:g> و<xliff:g id="TYPE_1">%2$s</xliff:g> في <b><xliff:g id="LABEL">%3$s</xliff:g></b>؟"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"هل تريد حفظ <xliff:g id="TYPE_0">%1$s</xliff:g> و<xliff:g id="TYPE_1">%2$s</xliff:g> و<xliff:g id="TYPE_2">%3$s</xliff:g> في <b><xliff:g id="LABEL">%4$s</xliff:g></b>؟"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"هل تريد التعديل إلى <b><xliff:g id="LABEL">%1$s</xliff:g></b>؟"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"هل تريد تعديل <xliff:g id="TYPE">%1$s</xliff:g> إلى <b><xliff:g id="LABEL">%2$s</xliff:g></b>؟"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"هل تريد تعديل <xliff:g id="TYPE_0">%1$s</xliff:g> و<xliff:g id="TYPE_1">%2$s</xliff:g> إلى <b><xliff:g id="LABEL">%3$s</xliff:g></b>؟"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"هل تريد تعديل <xliff:g id="TYPE_0">%1$s</xliff:g> و<xliff:g id="TYPE_1">%2$s</xliff:g> و<xliff:g id="TYPE_2">%3$s</xliff:g> إلى <b><xliff:g id="LABEL">%4$s</xliff:g></b>؟"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"حفظ"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"لا، شكرًا"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"تعديل"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"كلمة مرور"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"عنوان"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"بطاقة ائتمان"</string>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index 2f9e444..0e8aa00 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"শৰীৰৰ ছেন্সৰসমূহ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"আপোনাৰ দেহৰ গুৰুত্বপূৰ্ণ অংগসমূহৰ অৱস্থাৰ বিষয়ে ছেন্সৰৰ ডেটা লাভ কৰিব পাৰে"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>ক আপোনাৰ দেহৰ গুৰুত্বপূৰ্ণ অংগসমূহৰ অৱস্থাৰ বিষয়ে ছেন্সৰৰ ডেটা লাভ কৰিবলৈ অনুমতি দিবনে?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ৱিণ্ড\' সমল বিচাৰি উলিয়াওক"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"আপুনি যোগাযোগ কৰি থকা ৱিণ্ড\'খনৰ সমল পৰীক্ষা কৰক।"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"স্পৰ্শৰদ্বাৰা অন্বেষণ কৰাৰ সুবিধা অন কৰক"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ফিংগাৰপ্ৰিণ্ট টেম্প্লেটসমূহ যোগ কৰা বা মচাৰ পদ্ধতিসমূহ কামত লগাবলৈ নিৰ্দেশ দিবলৈ এপটোক অনুমতি দিয়ে।"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ফিংগাৰপ্ৰিণ্ট হাৰ্ডৱেৰ ব্যৱহাৰ কৰিব পাৰে"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"প্ৰমাণীকৰণৰ বাবে ফিংগাৰপ্ৰিণ্ট হাৰ্ডৱেৰ ব্য়ৱহাৰ কৰিবলৈ এপটোক অনুমতি দিয়ে"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ফিংগাৰপ্ৰিণ্ট আংশিকভাৱে চিনাক্ত কৰা হৈছে। অনুগ্ৰহ কৰি আকৌ চেষ্টা কৰক৷"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ফিগাৰপ্ৰিণ্টৰ প্ৰক্ৰিয়া সম্পাদন কৰিবপৰা নগ\'ল। অনুগ্ৰহ কৰি আকৌ চেষ্টা কৰক৷"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ফিংগাৰপ্ৰিণ্ট ছেন্সৰটো লেতেৰা হৈ আছে। অনুগ্ৰহ কৰি পৰিষ্কাৰ কৰি আকৌ চেষ্টা কৰক।"</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>ক <b><xliff:g id="LABEL">%2$s</xliff:g></b>ত ছেভ কৰিবনে?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> আৰু <xliff:g id="TYPE_1">%2$s</xliff:g>ক <b><xliff:g id="LABEL">%3$s</xliff:g></b>ত ছেভ কৰিবনে?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, আৰু <xliff:g id="TYPE_2">%3$s</xliff:g>ক <b><xliff:g id="LABEL">%4$s</xliff:g></b>ত ছেভ কৰিবনে?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"ছেভ কৰক"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"নালাগে, ধন্যবাদ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"পাছৱৰ্ড"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ঠিকনা"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ক্ৰেডিট কাৰ্ড"</string>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index 7ddd88c2..6464c61 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Bədən Sensorları"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"Həyati əlamətlər haqqında sensor dataya daxil olun"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> tətbiqinə həyati əlamətlər haqqında sensor dataya daxil olmaq icazəsi verilsin?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Musiqi"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"musiqiyə daxil olun"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> tətbiqinin musiqiyə daxil olmağına icazə verilsin?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Foto və Videolar"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"foto və videolara daxil olun"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> tətbiqinin foto və videolarınıza daxil olmağına icazə verilsin?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Pəncərənin məzmununu əldə edin"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Əlaqədə olduğunuz pəncərənin məzmununu nəzərdən keçirin."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Toxunaraq Kəşf et funksiyasını yandırın"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Proqrama istifadə üçün barmaq izi şablonlarını əlavə etmək və silmək üçün üsullara müraciət etməyə imkan verir."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"barmaq izi avadanlığından istifadə edin"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Proqrama əsilliyi yoxlama üçün barmaq izi avadanlığından istifadə etməyə imkan verir"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"musiqi kolleksiyanızı oxuyun"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Tətbiqin musiqi kolleksiyanızı oxumasına icazə verir."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"musiqi kolleksiyanıza düzəliş edin"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Tətbiqin musiqi kolleksiyanıza düzəliş etməsinə icazə verir."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"video kolleksiyanızı oxuyun"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Tətbiqin video kolleksiyanızı oxumasına icazə verin."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"video kolleksiyanıza düzəliş edin"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Tətbiqin video kolleksiyanıza düzəliş etməsinə icazə verin."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"foto kolleksiyanızı oxuyun"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Tətbiqin foto kolleksiyanızı oxumasına icazə verir."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"foto kolleksiyanıza düzəliş edin"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Tətbiqin foto kolleksiyanıza düzəliş etməsinə icazə verir."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"media kolleksiyanızdan məkanları oxuyun"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Tətbiqin media kolleksiyanızdan məkanları oxumasına icazə verin."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Barmaq qismən müəyyən olundu. Lütfən, yenidən cəhd edin."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Barmaq izi tanınmadı. Lütfən, yenidən cəhd edin."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Barmaq izi sensoru çirklidir. Lütfən, təmizləyin və yenidən cəhd edin."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g><b> etiketində yadda saxlansın?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> və <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b> etiketində yadda saxlansın?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> və <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b> etiketində yadda saxlansın?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"<b><xliff:g id="LABEL">%1$s</xliff:g></b> etiketində yenilənsin?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g><b> etiketində yenilənsin?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g> və <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b> etiketində yenilənsin?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> və <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b> etiketində yenilənsin?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Yadda saxlayın"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Xeyr, çox sağ olun"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Yeniləyin"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"parol"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ünvan"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredit kartı"</string>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 6338e69..dcb7e21 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -303,6 +303,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Senzori za telo"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"pristupa podacima senzora o vitalnim funkcijama"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Želite li da omogućite da <b><xliff:g id="APP_NAME">%1$s</xliff:g></b>pristupa podacima senzora o vitalnim funkcijama?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"da preuzima sadržaj prozora"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Proverava sadržaj prozora sa kojim ostvarujete interakciju."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"da uključi Istraživanja dodirom"</string>
@@ -497,6 +509,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Dozvoljava aplikaciji da aktivira metode za dodavanje i brisanje šablona otisaka prstiju koji će se koristiti."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"koristi hardver za otiske prstiju"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Dozvoljava aplikaciji da koristi hardver za otiske prstiju radi potvrde autentičnosti"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Otkriven je delimični otisak prsta. Probajte ponovo."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Nije uspela obrada otiska prsta. Probajte ponovo."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Senzor za otiske prstiju je prljav. Očistite ga i pokušajte ponovo."</string>
@@ -1907,8 +1947,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Želite li da sačuvate stavku <xliff:g id="TYPE">%1$s</xliff:g> u: <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Želite li da sačuvate stavke <xliff:g id="TYPE_0">%1$s</xliff:g> i <xliff:g id="TYPE_1">%2$s</xliff:g> u: <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Želite li da sačuvate stavke <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> i <xliff:g id="TYPE_2">%3$s</xliff:g> u: <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Sačuvaj"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ne, hvala"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"lozinka"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresa"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditna kartica"</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index c93fa51..9041156 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Датчыкі цела"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"атрымліваць з датчыка даныя асноўных фізіялагічных паказчыкаў"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Дазволіць праграме <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> доступ да даных з датчыкаў пра вашы асноўныя фізіялагічныя паказчыкі?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Атрымліваць змесціва вакна"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Аналізаваць змесціва актыўнага вакна."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Уключаць Азнаямленне дотыкам"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Дазваляе праграме выкарыстоўваць спосабы дадання і выдалення шаблонаў адбіткаў пальцаў для выкарыстання."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"выкарыстоўваць апаратныя сродкі для адбіткаў пальцаў"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Дазваляе праграме выкарыстоўваць апаратныя сродкі распазнання адбіткаў пальцаў для аўтэнтыфікацыі"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Выяўлена частка адбіткаў пальцаў. Паспрабуйце яшчэ раз."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Не атрымалася апрацаваць адбітак пальца. Паспрабуйце яшчэ раз."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Датчык адбіткаў пальцаў брудны. Ачысціце яго і паспрабуйце яшчэ раз."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Захаваць <xliff:g id="TYPE">%1$s</xliff:g> у <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Захаваць <xliff:g id="TYPE_0">%1$s</xliff:g> і <xliff:g id="TYPE_1">%2$s</xliff:g> у <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Захаваць <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> і <xliff:g id="TYPE_2">%3$s</xliff:g> у <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Захаваць"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Не, дзякуй"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"пароль"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"адрас"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"крэдытная картка"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index d05d78c..80c6ceb 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Телесни сензори"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"достъп до сензорните данни за жизнените ви показатели"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Да се разреши ли на <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> да осъществява достъп до данните от сензорите за жизнените ви показатели?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Извличане на съдържанието от прозореца"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Инспектиране на съдържанието на прозорец, с който взаимодействате."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Включване на изследването чрез докосване"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Разрешава на приложението да извиква начини за добавяне и изтриване на шаблони за отпечатъци, които да се използват."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"използване на хардуера за отпечатъци"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Разрешава на приложението да използва хардуера за отпечатъци с цел удостоверяване"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Открит е частичен отпечатък. Моля, опитайте отново."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Отпечатъкът не можа да се обработи. Моля, опитайте отново."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Сензорът за отпечатъци е мръсен. Моля, почистете го и опитайте отново."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> да се запази ли в/ъв <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> и <xliff:g id="TYPE_1">%2$s</xliff:g> да се запазят ли в/ъв <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> и <xliff:g id="TYPE_2">%3$s</xliff:g> да се запазят ли в/ъв <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Запазване"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Не, благодаря"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"Паролата"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"Адресът"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"Кредитната карта"</string>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 949d206..026a759 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"বডি সেন্সরগুলি"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"আপনার অত্যাবশ্যক লক্ষণগুলির সম্পর্কে সেন্সর ডেটা অ্যাক্সেস করে"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>-কে সেন্সর থেকে আপনার ভাইটাল সাইনের ডেটা অ্যাক্সেস করতে দেবেন?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"উইন্ডোর কন্টেন্ট পুনরুদ্ধার করে"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"আপনি ইন্টারঅ্যাক্ট করছেন এমন একটি উইন্ডোর সামগ্রীকে সযত্নে নিরীক্ষণ করে৷"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"স্পর্শের মাধ্যমে অন্বেষণ করা চালু করুন"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ব্যবহার করার জন্য আঙ্গুলের ছাপের টেম্প্লেটগুলি যোগ করা এবং মোছার পদ্ধতিগুলি গ্রহন করতে অ্যাপ্লিকেশানটিতে অমুমতি দেয়৷"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"আঙ্গুলের ছাপ নেওয়ার হার্ডওয়্যার ব্যবহার করুন"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"অনুমোদনের জন্য আঙ্গুলের ছাপ নেওয়ার হার্ডওয়্যার ব্যবহার করতে অ্যাপ্লিকেশানটিতে অনুমতি দেয়"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"আঙ্গুলের ছাপ আংশিক শনাক্ত করা হয়েছে৷ অনুগ্রহ করে আবার চেষ্টা করুন৷"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"আঙ্গুলের ছাপ প্রক্রিয়া করা যায়নি৷ অনুগ্রহ করে আবার চেষ্টা করুন৷"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"আঙ্গুলের ছাপ নেওয়ার সেন্সরটি অপরিস্কার৷ অনুগ্রহ করে পরিষ্কার করে আবার চেষ্টা করুন৷"</string>
@@ -1110,7 +1150,7 @@
<string name="aerr_restart" msgid="7581308074153624475">"অ্যাপ্লিকেশানটিকে আবার খুলুন"</string>
<string name="aerr_report" msgid="5371800241488400617">"মতামত জানান"</string>
<string name="aerr_close" msgid="2991640326563991340">"বন্ধ করুন"</string>
- <string name="aerr_mute" msgid="1974781923723235953">"ডিভাইসটি পুনরায় আরম্ভ না হওয়া পর্যন্ত নিঃশব্দ করুন"</string>
+ <string name="aerr_mute" msgid="1974781923723235953">"ডিভাইসটি পুনরায় আরম্ভ না হওয়া পর্যন্ত মিউট করুন"</string>
<string name="aerr_wait" msgid="3199956902437040261">"অপেক্ষা করুন"</string>
<string name="aerr_close_app" msgid="3269334853724920302">"অ্যাপ্লিকেশান বন্ধ করুন"</string>
<string name="anr_title" msgid="4351948481459135709"></string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> কে <b><xliff:g id="LABEL">%2$s</xliff:g></b>এ সংরক্ষণ করবেন?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> এবং <xliff:g id="TYPE_1">%2$s</xliff:g> কে <b><xliff:g id="LABEL">%3$s</xliff:g></b> এ সংরক্ষণ করবেন?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, এবং <xliff:g id="TYPE_2">%3$s</xliff:g> কে <b><xliff:g id="LABEL">%4$s</xliff:g></b> এ সংরক্ষণ করবেন?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"সেভ করুন"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"না থাক"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"পাসওয়ার্ড"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ঠিকানা"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ক্রেডিট কার্ড"</string>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index 6a88c30..049b383 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>
@@ -303,6 +303,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Tjelesni senzori"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"pristupa podacima senzora o vašim vitalnim funkcijama"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Dozvoliti aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> pristup senzornim podacima o vašim vitalnim znacima?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Preuzima sadržaj prozora"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Pregleda sadržaj prozora koji trenutno koristite."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Uključi opciju Istraživanje dodirom"</string>
@@ -497,6 +509,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Omogućava aplikaciji da koristi metode za dodavanje i brisanje šablona otisaka prstiju za upotrebu."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"korištenje hardvera za otiske prstiju"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Omogućava aplikaciji da za provjeru vjerodostojnosti koristi hardver za otiske prstiju"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Otkriven je djelomičan otisak prsta. Pokušajte ponovo."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Nije uspjela obrada otiska prsta. Pokušajte ponovo."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Senzor za otisak prsta je prljav. Očistite ga i pokušajte ponovo."</string>
@@ -521,7 +561,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>
@@ -1909,8 +1949,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Želite li da se <xliff:g id="TYPE">%1$s</xliff:g> sačuva u <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Želite li da se <xliff:g id="TYPE_0">%1$s</xliff:g> i <xliff:g id="TYPE_1">%2$s</xliff:g> sačuvaju u <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Želite li da se <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, i <xliff:g id="TYPE_2">%3$s</xliff:g> sačuvaju <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Sačuvaj"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ne, hvala"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"lozinka"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresa"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditna kartica"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 6f79909..c75fc74 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensors corporals"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"accedir a les dades del sensor sobre els signes vitals"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Vols permetre que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> accedeixi a les dades del sensor de constants vitals?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Recuperar el contingut de la finestra"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecciona el contingut d\'una finestra amb què estàs interaccionant."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activar Exploració tàctil"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permet que l\'aplicació invoqui mètodes per afegir i suprimir plantilles d\'empremtes digitals que es puguin fer servir."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Utilitzar el maquinari d\'empremtes digitals"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permet que l\'aplicació faci servir maquinari d\'empremtes digitals per a l\'autenticació"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"S\'ha detectat una empremta digital parcial. Torna-ho a provar."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"No s\'ha pogut processar l\'empremta digital. Torna-ho a provar."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"El sensor d\'empremtes digitals està brut. Neteja\'l i torna-ho a provar."</string>
@@ -1100,7 +1140,7 @@
<string name="alwaysUse" msgid="4583018368000610438">"Utilitza-ho de manera predeterminada per a aquesta acció."</string>
<string name="use_a_different_app" msgid="8134926230585710243">"Fes servir una altra aplicació"</string>
<string name="clearDefaultHintMsg" msgid="3252584689512077257">"Esborra els paràmetres predeterminats a Configuració del sistema > Aplicacions > Baixades."</string>
- <string name="chooseActivity" msgid="7486876147751803333">"Tria una acció"</string>
+ <string name="chooseActivity" msgid="7486876147751803333">"Selecciona una acció"</string>
<string name="chooseUsbActivity" msgid="6894748416073583509">"Tria una aplicació per al dispositiu USB"</string>
<string name="noApplications" msgid="2991814273936504689">"No hi ha cap aplicació que pugui dur a terme aquesta acció."</string>
<string name="aerr_application" msgid="250320989337856518">"S\'ha aturat <xliff:g id="APPLICATION">%1$s</xliff:g>"</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Vols desar <xliff:g id="TYPE">%1$s</xliff:g> a <xliff:g id="LABEL">%2$s</xliff:g>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Vols desar <xliff:g id="TYPE_0">%1$s</xliff:g> i <xliff:g id="TYPE_1">%2$s</xliff:g> a <xliff:g id="LABEL">%3$s</xliff:g>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Vols desar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> i <xliff:g id="TYPE_2">%3$s</xliff:g> a <xliff:g id="LABEL">%4$s</xliff:g>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Desa"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, gràcies"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"contrasenya"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adreça"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"targeta de crèdit"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 289e49e..7d9c3c5 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>
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Tělesné senzory"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"přístup k datům ze snímačů vašich životních funkcí"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Povolit aplikaci <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> přístup k údajům ze snímačů vašich životních funkcí?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Načítat obsah oken"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Může prozkoumávat obsah oken, se kterými pracujete."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Zapnout funkci Prozkoumání dotykem"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Umožňuje aplikaci volat metody k přidání a smazání šablon otisků prstů, které budou použity."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"použití hardwaru na čtení otisků prstů"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Umožňuje aplikaci použít k ověření hardware na čtení otisků prstů"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Byla zjištěna jen část otisku prstu. Zkuste to znovu."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Zpracování otisku prstu se nezdařilo. Zkuste to znovu."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Senzor otisků prstů je znečištěn. Vyčistěte jej a zkuste to znovu."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Uložit položku <xliff:g id="TYPE">%1$s</xliff:g> do služby <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Uložit položky <xliff:g id="TYPE_0">%1$s</xliff:g> a <xliff:g id="TYPE_1">%2$s</xliff:g> do služby <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Uložit položky <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> a <xliff:g id="TYPE_2">%3$s</xliff:g> do služby <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Uložit"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ne, děkuji"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"heslo"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresa"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"platební karta"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 8c86ac8..909cd10 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>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Kropssensorer"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"få adgang til sensordata om dine livstegn"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Vil du give <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> adgang til sensordata om dine livstegn?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Hente indholdet i vinduet"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Undersøge indholdet i et vindue, du interagerer med."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Aktivere Udforsk ved berøring"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Tillader, at appen kan køre metoder til at tilføje og slette fingeraftryksskabeloner"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"bruge fingeraftrykhardware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Tillader, at appen kan bruge fingeraftrykhardware til godkendelse"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Der blev registreret et delvist fingeraftryk. Prøv igen."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Fingeraftrykket kunne ikke behandles. Prøv igen."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Sensoren til registrering af fingeraftryk er beskidt. Tør den af, og prøv igen."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Vil du gemme <xliff:g id="TYPE">%1$s</xliff:g> i <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Vil du gemme <xliff:g id="TYPE_0">%1$s</xliff:g> og <xliff:g id="TYPE_1">%2$s</xliff:g> i <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Vil du gemme <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> og <xliff:g id="TYPE_2">%3$s</xliff:g> i <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Gem"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nej tak"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"adgangskode"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresse"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditkort"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 8dc0ba4..e843488 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Körpersensoren"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"auf Sensordaten zu deinen Vitaldaten zugreifen"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> erlauben, auf Sensordaten zu deinen Vitalfunktionen zuzugreifen?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Fensterinhalte abrufen"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Die Inhalte eines Fensters, mit dem du interagierst, werden abgerufen."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"\"Tippen & Entdecken\" aktivieren"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Erlaubt der App, Methoden zum Hinzufügen und Löschen zu verwendender Fingerabdruckvorlagen aufzurufen"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Fingerabdruckhardware verwenden"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Erlaubt der App, Fingerabdruckhardware zur Authentifizierung zu verwenden"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Fingerabdruck teilweise erkannt. Versuche es erneut."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Fingerabdruck konnte nicht verarbeitet werden. Versuche es erneut."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingerabdrucksensor ist verschmutzt. Reinige ihn und versuche es erneut."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> in <b><xliff:g id="LABEL">%2$s</xliff:g></b> speichern?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> und <xliff:g id="TYPE_1">%2$s</xliff:g> in <b><xliff:g id="LABEL">%3$s</xliff:g></b> speichern?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> und <xliff:g id="TYPE_2">%3$s</xliff:g> in <b><xliff:g id="LABEL">%4$s</xliff:g></b> speichern?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Speichern"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nein danke"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"Passwort"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"Adresse"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"Kreditkarte"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index c6acc9e..ef8b072 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Αισθητήρες σώματος"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"πρόσβαση στα δεδομένα αισθητήρα σχετικά με τις ζωτικές ενδείξεις σας"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Να επιτρέπεται στην εφαρμογή <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> να έχει πρόσβαση στα δεδομένα αισθητήρα σχετικά με τις ζωτικές ενδείξεις σας;"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Ανάκτηση του περιεχομένου του παραθύρου"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Έλεγχος του περιεχομένου ενός παραθύρου με το οποίο αλληλεπιδράτε."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Ενεργοποίηση της \"Εξερεύνησης με άγγιγμα\""</string>
@@ -320,7 +332,7 @@
<string name="permdesc_expandStatusBar" msgid="6917549437129401132">"Επιτρέπει στην εφαρμογή να αναπτύξει ή να συμπτύξει τη γραμμή κατάστασης."</string>
<string name="permlab_install_shortcut" msgid="4279070216371564234">"εγκαθιστά συντομεύσεις"</string>
<string name="permdesc_install_shortcut" msgid="8341295916286736996">"Επιτρέπει σε μια εφαρμογή την προσθήκη συντομεύσεων στην Αρχική οθόνη χωρίς την παρέμβαση του χρήστη."</string>
- <string name="permlab_uninstall_shortcut" msgid="4729634524044003699">"καταργεί την εγκατάσταση συντομεύσεων"</string>
+ <string name="permlab_uninstall_shortcut" msgid="4729634524044003699">"απεγκατάσταση συντομεύσεων"</string>
<string name="permdesc_uninstall_shortcut" msgid="6745743474265057975">"Επιτρέπει στην εφαρμογή την κατάργηση συντομεύσεων από την Αρχική οθόνη χωρίς την παρέμβαση του χρήστη."</string>
<string name="permlab_processOutgoingCalls" msgid="3906007831192990946">"αναδρομολογεί τις εξερχόμενες κλήσεις"</string>
<string name="permdesc_processOutgoingCalls" msgid="5156385005547315876">"Επιτρέπει στην εφαρμογή να βλέπει τον αριθμό που καλέσατε κατά τη διάρκεια μιας εξερχόμενης κλήσης με επιλογή ανακατεύθυνσης της κλήσης σε έναν διαφορετικό αριθμό ή διακοπής της κλήσης."</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Επιτρέπει στην εφαρμογή να επικαλείται μεθόδους για την προσθήκη και τη διαγραφή προτύπων μοναδικού χαρακτηριστικού για χρήση."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"χρησιμοποιεί τον εξοπλισμό δακτυλικού αποτυπώματος"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Επιτρέπει στην εφαρμογή να χρησιμοποιεί εξοπλισμό μοναδικού χαρακτηριστικού για έλεγχο ταυτότητας"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Εντοπίστηκε μερικό μοναδικό χαρακτηριστικό. Δοκιμάστε ξανά."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Δεν ήταν δυνατή η επεξεργασία του μοναδικού χαρακτηριστικού. Δοκιμάστε ξανά."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Ο αισθητήρας μοναδικού χαρακτηριστικού δεν είναι καθαρός. Καθαρίστε τον και δοκιμάστε ξανά."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Αποθήκευση <xliff:g id="TYPE">%1$s</xliff:g> σε <b><xliff:g id="LABEL">%2$s</xliff:g></b>;"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Αποθήκευση <xliff:g id="TYPE_0">%1$s</xliff:g> και <xliff:g id="TYPE_1">%2$s</xliff:g> σε <b><xliff:g id="LABEL">%3$s</xliff:g></b>;"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Αποθήκευση <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> και <xliff:g id="TYPE_2">%3$s</xliff:g> σε <b><xliff:g id="LABEL">%4$s</xliff:g></b>;"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Αποθήκευση"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Όχι, ευχαριστώ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"κωδικός πρόσβασης"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"διεύθυνση"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"πιστωτική κάρτα"</string>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index f70ba3b..19d0916 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Body sensors"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"access sensor data about your vital signs"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access sensor data about your vital signs?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Music"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"access your music"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your music?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Photos & Videos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"access your photos & videos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your photos & videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Retrieve window content"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspect the content of a window that you\'re interacting with."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Turn on Explore by Touch"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Allows the app to invoke methods to add and delete fingerprint templates for use."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Use fingerprint hardware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Allows the app to use fingerprint hardware for authentication"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"read your music collection"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Allows the app to read your music collection."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modify your music collection"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Allows the app to modify your music collection."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"read your video collection"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Allows the app to read your video collection."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modify your video collection"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Allows the app to modify your video collection."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"read your photo collection"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Allows the app to read your photo collection."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modify your photo collection"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Allows the app to modify your photo collection."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"read locations from your media collection"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Allows the app to read locations from your media collection."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Partial fingerprint detected. Please try again."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Couldn\'t process fingerprint. Please try again."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingerprint sensor is dirty. Please clean and try again."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Save <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Save <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Save <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Update to <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Update <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Update <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Update <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Save"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, thanks"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Update"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"address"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"credit card"</string>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index 1ab78f1..1e2e081 100644
--- a/core/res/res/values-en-rCA/strings.xml
+++ b/core/res/res/values-en-rCA/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Body sensors"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"access sensor data about your vital signs"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access sensor data about your vital signs?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Music"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"access your music"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your music?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Photos & Videos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"access your photos & videos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your photos & videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Retrieve window content"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspect the content of a window that you\'re interacting with."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Turn on Explore by Touch"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Allows the app to invoke methods to add and delete fingerprint templates for use."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Use fingerprint hardware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Allows the app to use fingerprint hardware for authentication"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"read your music collection"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Allows the app to read your music collection."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modify your music collection"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Allows the app to modify your music collection."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"read your video collection"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Allows the app to read your video collection."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modify your video collection"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Allows the app to modify your video collection."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"read your photo collection"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Allows the app to read your photo collection."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modify your photo collection"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Allows the app to modify your photo collection."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"read locations from your media collection"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Allows the app to read locations from your media collection."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Partial fingerprint detected. Please try again."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Couldn\'t process fingerprint. Please try again."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingerprint sensor is dirty. Please clean and try again."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Save <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Save <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Save <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Update to <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Update <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Update <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Update <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Save"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, thanks"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Update"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"address"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"credit card"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index f70ba3b..19d0916 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Body sensors"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"access sensor data about your vital signs"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access sensor data about your vital signs?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Music"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"access your music"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your music?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Photos & Videos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"access your photos & videos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your photos & videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Retrieve window content"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspect the content of a window that you\'re interacting with."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Turn on Explore by Touch"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Allows the app to invoke methods to add and delete fingerprint templates for use."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Use fingerprint hardware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Allows the app to use fingerprint hardware for authentication"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"read your music collection"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Allows the app to read your music collection."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modify your music collection"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Allows the app to modify your music collection."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"read your video collection"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Allows the app to read your video collection."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modify your video collection"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Allows the app to modify your video collection."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"read your photo collection"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Allows the app to read your photo collection."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modify your photo collection"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Allows the app to modify your photo collection."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"read locations from your media collection"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Allows the app to read locations from your media collection."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Partial fingerprint detected. Please try again."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Couldn\'t process fingerprint. Please try again."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingerprint sensor is dirty. Please clean and try again."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Save <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Save <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Save <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Update to <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Update <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Update <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Update <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Save"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, thanks"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Update"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"address"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"credit card"</string>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index f70ba3b..19d0916 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Body sensors"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"access sensor data about your vital signs"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access sensor data about your vital signs?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Music"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"access your music"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your music?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Photos & Videos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"access your photos & videos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your photos & videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Retrieve window content"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspect the content of a window that you\'re interacting with."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Turn on Explore by Touch"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Allows the app to invoke methods to add and delete fingerprint templates for use."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Use fingerprint hardware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Allows the app to use fingerprint hardware for authentication"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"read your music collection"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Allows the app to read your music collection."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modify your music collection"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Allows the app to modify your music collection."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"read your video collection"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Allows the app to read your video collection."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modify your video collection"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Allows the app to modify your video collection."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"read your photo collection"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Allows the app to read your photo collection."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modify your photo collection"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Allows the app to modify your photo collection."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"read locations from your media collection"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Allows the app to read locations from your media collection."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Partial fingerprint detected. Please try again."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Couldn\'t process fingerprint. Please try again."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingerprint sensor is dirty. Please clean and try again."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Save <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Save <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Save <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Update to <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Update <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Update <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Update <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Save"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, thanks"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Update"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"address"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"credit card"</string>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index a4c8615..68bc261 100644
--- a/core/res/res/values-en-rXC/strings.xml
+++ b/core/res/res/values-en-rXC/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Body Sensors"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"access sensor data about your vital signs"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access sensor data about your vital signs?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Music"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"access your music"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your music?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Photos & Videos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"access your photos & videos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your photos & videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Retrieve window content"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspect the content of a window you\'re interacting with."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Turn on Explore by Touch"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Allows the app to invoke methods to add and delete fingerprint templates for use."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"use fingerprint hardware"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Allows the app to use fingerprint hardware for authentication"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"read your music collection"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Allows the app to read your music collection."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modify your music collection"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Allows the app to modify your music collection."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"read your video collection"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Allows the app to read your video collection."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modify your video collection"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Allows the app to modify your video collection."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"read your photo collection"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Allows the app to read your photo collection."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modify your photo collection"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Allows the app to modify your photo collection."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"read locations from your media collection"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Allows the app to read locations from your media collection."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Partial fingerprint detected. Please try again."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Couldn\'t process fingerprint. Please try again."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingerprint sensor is dirty. Please clean and try again."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Save <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Save <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Save <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Update to <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Update <xliff:g id="TYPE">%1$s</xliff:g> to <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Update <xliff:g id="TYPE_0">%1$s</xliff:g> and <xliff:g id="TYPE_1">%2$s</xliff:g> to <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Update <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, and <xliff:g id="TYPE_2">%3$s</xliff:g> to <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Save"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No thanks"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Update"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"address"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"credit card"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 2b7c4bf..9969af3 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensores corporales"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"acceder a los datos del sensor acerca de tus signos vitales"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"¿Permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda a los datos del sensor de tus signos vitales?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Música"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"acceder a tu música"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"¿Quieres permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda a tu música?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Fotos y videos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"acceder a tus fotos y videos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"¿Quieres permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda a tus fotos y videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Recuperar el contenido de las ventanas"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecciona el contenido de la ventana con la que estés interactuando."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activar la Exploración táctil"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite que la aplicación emplee métodos para agregar y eliminar plantillas de huellas digitales para su uso."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Utilizar hardware de huellas digitales"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite que la aplicación utilice el hardware de huellas digitales para realizar la autenticación."</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"leer tu colección de música"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Permite que la app lea tu colección de música."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modificar tu colección de música"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Permite que la app modifique tu colección de música."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"leer tu colección de videos"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Permite que la app lea tu colección de videos."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modificar tu colección de videos"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Permite que la app modifique tu colección de videos."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"leer tu colección de fotos"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Permite que la app lea tu colección de fotos."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modificar tu colección de fotos"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Permite que la app modifique tu colección de fotos."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"leer ubicaciones de tu colección de contenido multimedia"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Permite que la app lea las ubicaciones de tu colección de contenido multimedia."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"La huella digital se detectó parcialmente. Vuelve a intentarlo."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"No se pudo procesar la huella digital. Vuelve a intentarlo."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"El sensor de huellas digitales está sucio. Limpia el sensor y vuelve a intentarlo."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"¿Quieres guardar tu <xliff:g id="TYPE">%1$s</xliff:g> en <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"¿Quieres guardar tu <xliff:g id="TYPE_0">%1$s</xliff:g> y <xliff:g id="TYPE_1">%2$s</xliff:g> en <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"¿Quieres guardar tu <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> y <xliff:g id="TYPE_2">%3$s</xliff:g> en <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"¿Quieres actualizar los datos en <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"¿Quieres actualizar tu <xliff:g id="TYPE">%1$s</xliff:g> en <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"¿Quieres actualizar tu <xliff:g id="TYPE_0">%1$s</xliff:g> y <xliff:g id="TYPE_1">%2$s</xliff:g> en <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"¿Quieres actualizar tu <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, y <xliff:g id="TYPE_2">%3$s</xliff:g> en <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Guardar"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, gracias"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Actualizar"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"contraseña"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"dirección"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"tarjeta de crédito"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index c4b74af..55e0526 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -34,7 +34,7 @@
<string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string>
<string name="mmiError" msgid="5154499457739052907">"Se ha producido un problema de conexión o el código MMI no es válido."</string>
<string name="mmiFdnError" msgid="5224398216385316471">"La operación solo es válida para números de marcación fija."</string>
- <string name="mmiErrorWhileRoaming" msgid="762488890299284230">"No se puede cambiar la configuración de desvío de llamada desde tu teléfono mientras estás en itinerancia."</string>
+ <string name="mmiErrorWhileRoaming" msgid="762488890299284230">"No se puede cambiar la configuración de desvío de llamadas desde tu teléfono mientras estás en itinerancia."</string>
<string name="serviceEnabled" msgid="8147278346414714315">"El servicio se ha habilitado."</string>
<string name="serviceEnabledFor" msgid="6856228140453471041">"Se ha habilitado el servicio para:"</string>
<string name="serviceDisabled" msgid="1937553226592516411">"El servicio se ha inhabilitado."</string>
@@ -60,7 +60,7 @@
<string name="ClirMmi" msgid="7784673673446833091">"ID de emisor de llamada saliente"</string>
<string name="ColpMmi" msgid="3065121483740183974">"ID de línea conectada"</string>
<string name="ColrMmi" msgid="4996540314421889589">"Restricción de ID de línea conectada"</string>
- <string name="CfMmi" msgid="5123218989141573515">"Desvío de llamada"</string>
+ <string name="CfMmi" msgid="5123218989141573515">"Desvío de llamadas"</string>
<string name="CwMmi" msgid="9129678056795016867">"Llamada en espera"</string>
<string name="BaMmi" msgid="455193067926770581">"Bloqueo de llamada"</string>
<string name="PwdMmi" msgid="7043715687905254199">"Cambio de contraseña"</string>
@@ -88,7 +88,7 @@
<string name="EmergencyCallWarningTitle" msgid="813380189532491336">"Servicio de llamadas de emergencia no disponible"</string>
<string name="EmergencyCallWarningSummary" msgid="1899692069750260619">"No se pueden hacer llamadas de emergencia por Wi‑Fi"</string>
<string name="notification_channel_network_alert" msgid="4427736684338074967">"Alertas"</string>
- <string name="notification_channel_call_forward" msgid="2419697808481833249">"Desvío de llamada"</string>
+ <string name="notification_channel_call_forward" msgid="2419697808481833249">"Desvío de llamadas"</string>
<string name="notification_channel_emergency_callback" msgid="6686166232265733921">"Modo de devolución de llamada de emergencia"</string>
<string name="notification_channel_mobile_data_status" msgid="4575131690860945836">"Estado de los datos móviles"</string>
<string name="notification_channel_sms" msgid="3441746047346135073">"Mensajes SMS"</string>
@@ -133,7 +133,7 @@
<item msgid="4397097370387921767">"Llamadas Wi-Fi de %s"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Desactivado"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Preferir Wi-Fi"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Dar preferencia a Wi-Fi"</string>
<string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Preferir datos móviles"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Solo conexión Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: No desviada"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensores corporales"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"acceder a datos de sensores de tus constantes vitales"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"¿Quieres permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda a los datos del sensor sobre tus constantes vitales?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Comprobar el contenido de la ventana"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecciona el contenido de una ventana con la que estés interactuando."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activar la exploración táctil"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite que la aplicación invoque métodos para añadir y eliminar plantillas de huellas digitales y utilizarlas."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"utilizar hardware de huellas digitales"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite que la aplicación utilice el hardware de huellas digitales para realizar la autenticación"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Se ha detectado una huella digital parcial. Vuelve a intentarlo."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"No se ha podido procesar la huella digital. Vuelve a intentarlo."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"El sensor de huellas digitales está sucio. Límpialo y vuelve a intentarlo."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"¿Guardar <xliff:g id="TYPE">%1$s</xliff:g> en <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"¿Guardar <xliff:g id="TYPE_0">%1$s</xliff:g> y <xliff:g id="TYPE_1">%2$s</xliff:g> en <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"¿Guardar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> y <xliff:g id="TYPE_2">%3$s</xliff:g> en <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Guardar"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, gracias"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"contraseña"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"dirección"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"tarjeta de crédito"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 1e73bf1..758bf44 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Kehaandurid"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"juurdepääs anduri andmetele teie eluliste näitajate kohta"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Kas lubada rakendusele <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> juurdepääs anduri andmetele teie eluliste näitajate kohta?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Akna sisu toomine"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Kasutatava akna sisu kontrollimine."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Puudutusega sirvimise sisselülitamine"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Võimaldab rakendusel tühistada meetodid kasutatavate sõrmejäljemallide lisamiseks ja kustutamiseks."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"sõrmejälje riistvara kasutamine"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Võimaldab rakendusel autentimiseks kasutada sõrmejälje riistvara"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Tuvastati osaline sõrmejälg. Proovige uuesti."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Sõrmejälge ei õnnestunud töödelda. Proovige uuesti."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Sõrmejäljeandur on must. Puhastage see ja proovige uuesti."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Kas salvestada üksus <xliff:g id="TYPE">%1$s</xliff:g> teenusesse <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Kas salvestada üksused <xliff:g id="TYPE_0">%1$s</xliff:g> ja <xliff:g id="TYPE_1">%2$s</xliff:g> teenusesse <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Kas salvestada üksused <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ja <xliff:g id="TYPE_2">%3$s</xliff:g> teenusesse <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Salvesta"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Tänan, ei"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"parool"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"aadress"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"krediitkaart"</string>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index aa6edaa..567ca18 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -59,7 +59,7 @@
<string name="ClipMmi" msgid="6952821216480289285">"Sarrerako deien identifikazio-zerbitzua"</string>
<string name="ClirMmi" msgid="7784673673446833091">"Irteerako deien identifikazio-zerbitzua"</string>
<string name="ColpMmi" msgid="3065121483740183974">"Konektatutako linearen IDa"</string>
- <string name="ColrMmi" msgid="4996540314421889589">"Konektatutako linearen ID murrizketa"</string>
+ <string name="ColrMmi" msgid="4996540314421889589">"Konektatutako linearen ID murriztapena"</string>
<string name="CfMmi" msgid="5123218989141573515">"Dei-desbideratzea"</string>
<string name="CwMmi" msgid="9129678056795016867">"Deia zain"</string>
<string name="BaMmi" msgid="455193067926770581">"Deien debekuak"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Gorputz-sentsoreak"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"atzitu bizi-konstanteei buruzko sentsorearen datuak"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Bizi-konstanteei buruzko sentsorearen datuak atzitzea baimendu nahi diozu <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aplikazioari?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Eskuratu leihoko edukia"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Arakatu irekita daukazun leihoko edukia."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Aktibatu \"Arakatu ukituta\""</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Erreferentzia-gako digitalen txantiloiak gehitzeko eta ezabatzeko metodoei dei egitea baimentzen die aplikazioei."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"erabili erreferentzia-gako digitalen hardwarea"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Autentifikatzeko erreferentzia-gako digitalen hardwarea erabiltzea baimentzen die aplikazioei."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Hatz-marka digitala ez da osorik hauteman. Saiatu berriro."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Ezin izan da prozesatu hatz-marka. Saiatu berriro."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Hatz-marka digitalen sentsorea zikina dago. Garbi ezazu, eta saiatu berriro."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g></b> zerbitzuan gorde nahi duzu?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> eta <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b> zerbitzuan gorde nahi dituzu?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> eta <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b> zerbitzuan gorde nahi dituzu?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Gorde"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ez, eskerrik asko"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"pasahitza"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"helbidea"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditu-txartela"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index d8067f0..b64937c 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"حسگرهای بدن"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"دسترسی به دادههای حسگر در رابطه با علائم حیاتی شما"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"به <b><xliff:g id="APP_NAME">%1$s</xliff:g><b> اجازه داده شود به دادههای حسگر مربوط به علائم حیاتی شما دسترسی پیدا کند؟"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"موسیقی"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"دسترسی به موسیقی شما"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"به <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> اجازه داده شود به موسیقی شما دسترسی پیدا کند؟"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"عکس و ویدیو"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"دسترسی به عکسها و ویدیوهایتان"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"به <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> اجازه داده شود به عکسها و ویدیوهای شما دسترسی پیدا کند؟"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"محتوای پنجره را بازیابی کند"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"محتوای پنجرهای را که درحال تعامل با آن هستید بررسی میکند."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"فعالسازی کاوش لمسی"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"به برنامه امکان میدهد روشهایی را برای افزودن و حذف الگوهای اثر انگشت جهت استفاده، فعال کند."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"استفاده از سختافزار اثر انگشت"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"به برنامه امکان میدهد از سختافزار اثر انگشت برای احراز هویت استفاده کند"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"خواندن مجموعه موسیقی شما"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"به برنامه اجازه میدهد مجموعه موسیقیتان را بخواند."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"تغییر مجموعه موسیقی شما"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"به برنامه اجازه میدهد مجموعه موسیقیتان را تغییر دهد."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"خواندن مجموعه ویدیوی شما"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"به برنامه اجازه میدهد مجموعه ویدیویتان را بخواند."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"تغییر مجموعه ویدیوی شما"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"به برنامه اجازه میدهد مجموعه ویدیویتان را تغییر دهد."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"خواندن مجموعه عکس شما"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"به برنامه اجازه میدهد مجموعه عکستان را بخواند."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"تغییر مجموعه عکس شما"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"به برنامه اجازه میدهد مجموعه عکستان را تغییر دهد."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"خواندن مکانها از مجموعه رسانه شما"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"به برنامه اجازه میدهد مکانها را از مجموعه رسانهتان بخواند."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"بخشی از اثر انگشت شناسایی شد. لطفاً دوباره امتحان کنید."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"اثرانگشت پردازش نشد. لطفاً دوباره امتحان کنید."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"حسگر اثر انگشت کثیف است. لطفاً آن را تمیز کنید و دوباره امتحان نمایید."</string>
@@ -1410,7 +1430,7 @@
<string name="disable_tether_notification_message" msgid="2913366428516852495">"برای جزئیات، با سرپرستتان تماس بگیرید"</string>
<string name="back_button_label" msgid="2300470004503343439">"برگشت"</string>
<string name="next_button_label" msgid="1080555104677992408">"بعدی"</string>
- <string name="skip_button_label" msgid="1275362299471631819">"پرش"</string>
+ <string name="skip_button_label" msgid="1275362299471631819">"رد شدن"</string>
<string name="no_matches" msgid="8129421908915840737">"مورد منطبقی موجود نیست"</string>
<string name="find_on_page" msgid="1946799233822820384">"یافتن در صفحه"</string>
<plurals name="matches_found" formatted="false" msgid="1210884353962081884">
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> در <b><xliff:g id="LABEL">%2$s</xliff:g></b> ذخیره شود؟"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> و <xliff:g id="TYPE_1">%2$s</xliff:g> در <b><xliff:g id="LABEL">%3$s</xliff:g></b> ذخیره شوند؟"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>، <xliff:g id="TYPE_1">%2$s</xliff:g> و <xliff:g id="TYPE_2">%3$s</xliff:g> در <b><xliff:g id="LABEL">%4$s</xliff:g></b> ذخیره شوند؟"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"به <b><xliff:g id="LABEL">%1$s</xliff:g></b> بهروزرسانی شود؟"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g> به <b><xliff:g id="LABEL">%2$s</xliff:g></b> بهروزرسانی شود؟"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g> و <xliff:g id="TYPE_1">%2$s</xliff:g> به <b><xliff:g id="LABEL">%3$s</xliff:g></b> بهروزرسانی شود؟"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>، <xliff:g id="TYPE_1">%2$s</xliff:g>، و <xliff:g id="TYPE_2">%3$s</xliff:g> به <b><xliff:g id="LABEL">%4$s</xliff:g></b> بهروزرسانی شود؟"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"ذخیره"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"نه سپاسگزارم"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"بهروزرسانی"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"گذرواژه"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"نشانی"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"کارت اعتباری"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 36a656b0..e13a01f 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Kehon anturit"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"käyttää anturitietoja elintoiminnoistasi"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Saako <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> käyttää anturitietoja elintoiminnoistasi?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Musiikki"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"käyttää musiikkiasi"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Saako <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> käyttää musiikkiasi?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Kuvat ja videot"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"käyttää kuvia ja videoita"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Saako <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> käyttää kuviasi ja videoitasi?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Noutaa ikkunan sisältöä"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Tarkistaa käyttämäsi ikkunan sisältö."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Ottaa kosketuksella tutkimisen käyttöön"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Sallii sovelluksen käyttää menetelmiä, joilla voidaan lisätä tai poistaa sormenjälkimalleja."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"sormenjälkilaitteiston käyttö"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Sallii sovelluksen käyttää sormenjälkilaitteistoa todennukseen."</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"lukea musiikkikokoelmaasi"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Antaa sovelluksen lukea musiikkikokoelmaasi."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"muokata musiikkikokoelmaasi"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Antaa sovelluksen muokata musiikkikokoelmaasi."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"lukea videokokoelmaasi"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Antaa sovelluksen lukea videokokoelmaasi."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"muokata videokokoelmaasi"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Antaa sovelluksen muokata videokokoelmaasi."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"lukea kuvakokoelmaasi"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Antaa sovelluksen lukea kuvakokoelmaasi."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"muokata kuvakokoelmaasi"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Antaa sovelluksen muokata kuvakokoelmaasi."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"lukea mediakokoelmasi sijainteja"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Antaa sovelluksen lukea mediakokoelmasi sijainteja."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Sormenjälki havaittiin vain osittain. Yritä uudelleen."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Sormenjäljen käsittely epäonnistui. Yritä uudelleen."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Sormenjälkitunnistin on likainen. Puhdista tunnistin ja yritä uudelleen."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Tallennetaanko <xliff:g id="TYPE">%1$s</xliff:g> palveluun <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Tallennetaanko <xliff:g id="TYPE_0">%1$s</xliff:g> ja <xliff:g id="TYPE_1">%2$s</xliff:g> palveluun <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Tallennetaanko <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ja <xliff:g id="TYPE_2">%3$s</xliff:g> palveluun <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Muutetaanko tämä palvelussa <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Muutetaanko <xliff:g id="TYPE">%1$s</xliff:g>, jonka <b><xliff:g id="LABEL">%2$s</xliff:g></b> on tallentanut?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Muutetaanko <xliff:g id="TYPE_0">%1$s</xliff:g> ja <xliff:g id="TYPE_1">%2$s</xliff:g>, jotka <b><xliff:g id="LABEL">%3$s</xliff:g></b> on tallentanut?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Muutetaanko <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ja <xliff:g id="TYPE_2">%3$s</xliff:g>, jotka <b><xliff:g id="LABEL">%4$s</xliff:g></b> on tallentanut?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Tallenna"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ei kiitos"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Muuta"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"salasana"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"osoite"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"luottokortti"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index eaa2ba0..fda01a0 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Capteurs corporels"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"accéder aux données des capteurs sur vos signes vitaux"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Autoriser « <xliff:g id="APP_NAME">%1$s</xliff:g> » à accéder aux données des capteurs pour vos signes vitaux?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Musique"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"accéder à votre musique"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Autoriser <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> à accéder à votre musique?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Photos et vidéos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"accéder à vos photos et vos vidéos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Autoriser <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> à accéder à vos photos et vos videos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Récupérer le contenu d\'une fenêtre"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecter le contenu d\'une fenêtre avec laquelle vous interagissez."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activer la fonctionnalité Explorer au toucher"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permet à l\'application de faire appel à des méthodes d\'ajout et de suppression de modèles d\'empreinte digitale que vous pouvez utiliser."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"utiliser le matériel d\'empreinte digitale"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permet à l\'application d\'utiliser du matériel d\'empreinte digitale pour l\'authentification"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"lire votre collection de musique"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Autoriser l\'application à lire votre collection de musique."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modifier votre collection de musique"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Autoriser l\'application à modifier votre collection de musique."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"lire votre collection de vidéos"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Autoriser l\'application à lire votre collection de vidéos."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modifier votre collection de vidéos"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Autoriser l\'application à modifier votre collection de vidéos."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"lire votre collection de photos"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Autoriser l\'application à lire votre collection de photos."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modifier votre collection de photos"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Autoriser l\'application à modifier votre collection de photos."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"lire les positions indiquées dans votre collection multimédia"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Autoriser l\'application à lire les positions indiquées dans votre collection multimédia."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Empreinte digitale partielle détectée. Veuillez essayer de nouveau."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Impossible de traiter les empreintes digitales. Veuillez essayer de nouveau."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Le capteur d\'empreintes digitales est sale. Veuillez le nettoyer et essayer de nouveau."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Enregistrer <xliff:g id="TYPE">%1$s</xliff:g> dans <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Enregistrer <xliff:g id="TYPE_0">%1$s</xliff:g> et <xliff:g id="TYPE_1">%2$s</xliff:g> dans <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Enregistrer <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> et <xliff:g id="TYPE_2">%3$s</xliff:g> dans <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Mettre à jour vers <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Mettre à jour <xliff:g id="TYPE">%1$s</xliff:g> vers <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Mettre à jour <xliff:g id="TYPE_0">%1$s</xliff:g> et <xliff:g id="TYPE_1">%2$s</xliff:g> vers <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Mettre à jour <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> et <xliff:g id="TYPE_2">%3$s</xliff:g> vers <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Enregistrer"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Non, merci"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Mettre à jour"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"mot de passe"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresse"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"carte de crédit"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 33053d2..94d33db 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Capteurs corporels"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"accéder aux données des capteurs relatives à vos signes vitaux"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Permettre à <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> d\'accéder aux données des capteurs relatives à vos signes vitaux ?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Récupérer le contenu d\'une fenêtre"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecte le contenu d\'une fenêtre avec laquelle vous interagissez."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activer la fonctionnalité Explorer au toucher"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Autoriser l\'application à invoquer des méthodes pour ajouter et supprimer des modèles d\'empreintes digitales"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Utiliser le matériel d\'empreintes digitales"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Autoriser l\'application à utiliser le matériel d\'empreintes digitales pour l\'authentification"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Empreinte numérique partiellement détectée. Veuillez réessayer."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Impossible de reconnaître l\'empreinte numérique. Veuillez réessayer."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Le lecteur d\'empreintes numériques est sale. Veuillez le nettoyer, puis réessayer."</string>
@@ -1278,7 +1318,7 @@
<string name="no_permissions" msgid="7283357728219338112">"Aucune autorisation requise"</string>
<string name="perm_costs_money" msgid="4902470324142151116">"Cela peut engendrer des frais"</string>
<string name="dlg_ok" msgid="7376953167039865701">"OK"</string>
- <string name="usb_charging_notification_title" msgid="1595122345358177163">"Rechargement via USB de cet appareil"</string>
+ <string name="usb_charging_notification_title" msgid="1595122345358177163">"Appareil en charge via USB"</string>
<string name="usb_supplying_notification_title" msgid="4631045789893086181">"Rechargement via USB de l\'appareil connecté"</string>
<string name="usb_mtp_notification_title" msgid="4238227258391151029">"Transfert de fichiers via USB activé"</string>
<string name="usb_ptp_notification_title" msgid="5425857879922006878">"PTP via USB activé"</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Enregistrer <xliff:g id="TYPE">%1$s</xliff:g> dans <b><xliff:g id="LABEL">%2$s</xliff:g></b> ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Enregistrer <xliff:g id="TYPE_0">%1$s</xliff:g> et <xliff:g id="TYPE_1">%2$s</xliff:g> dans <b><xliff:g id="LABEL">%3$s</xliff:g></b> ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Enregistrer <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> et <xliff:g id="TYPE_2">%3$s</xliff:g> dans <b><xliff:g id="LABEL">%4$s</xliff:g></b> ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Enregistrer"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Non, merci"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"mot de passe"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresse"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"carte de paiement"</string>
@@ -1894,7 +1944,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-gl/strings.xml b/core/res/res/values-gl/strings.xml
index a5327f6..a32a36e 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -130,7 +130,7 @@
</string-array>
<string-array name="wfcSpnFormats">
<item msgid="6830082633573257149">"%s"</item>
- <item msgid="4397097370387921767">"Chamadas wifi de %s"</item>
+ <item msgid="4397097370387921767">"Chamadas por wifi de %s"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Desactivado"</string>
<string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Wifi preferida"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensores corporais"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"acceder aos datos do sensor sobre as túas constantes vitais"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Queres permitir que a aplicación <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda aos datos do sensor sobre as túas constantes vitais?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Recuperar contido da ventá"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecciona o contido dunha ventá coa que estás interactuando."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activar a exploración táctil"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite que a aplicación invoque métodos para engadir e eliminar modelos de uso de impresión dixital."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"usar hardware de impresión dixital"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite que a aplicación utilice hardware de impresión dixital para a autenticación"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Detectouse unha impresión dixital parcial. Téntao de novo."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Non se puido procesar a impresión dixital. Téntao de novo."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"O sensor de impresión dixital está sucio. Límpao e téntao de novo."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Queres gardar <xliff:g id="TYPE">%1$s</xliff:g> en: <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Queres gardar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> en: <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Queres gardar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> en: <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Gardar"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Non, grazas"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"contrasinal"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"enderezo"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"tarxeta de crédito"</string>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index d41a923..1cf8892 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"બોડી સેન્સર્સ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"તમારા મહત્વપૂર્ણ ચિહ્નો વિશે સેન્સર ડેટા ઍક્સેસ કરો"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>ને તમારી મહત્વપૂર્ણ સહી વિશેના સેન્સર ડેટાને ઍક્સેસ કરવાની મંજૂરી આપીએ?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"વિંડો કન્ટેન્ટ પુનઃપ્રાપ્ત કરો"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"તમે જેની સાથે ક્રિયા-પ્રતિક્રિયા કરી રહ્યાં છો તે વિંડોનું કન્ટેન્ટ તપાસો."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"સ્પર્શ કરીને શોધખોળ કરવું ચાલુ કરો"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"એપ્લિકેશનને ઉપયોગ માટે ફિંગરપ્રિન્ટ નમૂના ઉમેરવા અને કાઢી નાખવા માટે પદ્ધતિઓની વિનંતી કરવાની મંજૂરી આપે છે."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ફિંગરપ્રિન્ટ હાર્ડવેરનો ઉપયોગ કરો"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"એપ્લિકેશનને પ્રમાણીકરણ માટે ફિંગરપ્રિન્ટ હાર્ડવેરનો ઉપયોગ કરવાની મંજૂરી આપે છે"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"આંશિક ફિંગરપ્રિન્ટ મળી. કૃપા કરીને ફરી પ્રયાસ કરો."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ફિંગરપ્રિન્ટ પ્રક્રિયા કરી શકાઈ નથી. કૃપા કરીને ફરી પ્રયાસ કરો."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ફિંગરપ્રિન્ટ સેન્સર ગંદું છે. કૃપા કરીને સાફ કરો અને ફરી પ્રયાસ કરો."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>ને <b><xliff:g id="LABEL">%2$s</xliff:g></b>માં સાચવીએ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> અને <xliff:g id="TYPE_1">%2$s</xliff:g>ને <b><xliff:g id="LABEL">%3$s</xliff:g></b>માં સાચવીએ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> અને <xliff:g id="TYPE_2">%3$s</xliff:g>ને <b><xliff:g id="LABEL">%4$s</xliff:g></b>માં સાચવીએ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"સાચવો"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ના, આભાર"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"પાસવર્ડ"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"સરનામું"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ક્રેડિટ કાર્ડ"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 8c7a0d3..a85d6fa 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"शरीर संवेदक"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"अपने महत्वपूर्ण संकेतों के बारे में सेंसर डेटा को ऐक्सेस करें"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> को अपने स्वास्थ्य से जुड़ी ज़रूरी जानकारी इस्तेमाल करने की अनुमति देना चाहते हैं?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"विंडो की सामग्री वापस पाएं"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"उस विंडो की सामग्री की जाँच करें, जिसका आप इस्तेमाल कर रहे हैं."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"छूकर, किसी चीज़ से जुड़ी जानकारी सुनने की सुविधा चालू करें"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"उंगली की छाप वाले टेम्पलेट का उपयोग करने के लिए जोड़ने और हटाने हेतु ऐप को विधियां प्रारंभ करने देती है."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"उंगली की छाप के लिए हार्डवेयर का उपयोग करें"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ऐप के प्रमाणीकरण के लिए उंगली की छाप हार्डवेयर का उपयोग करने देती है"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"आंशिक फ़िंगरप्रिंट की पहचान की गई. कृपया पुनः प्रयास करें."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"फ़िंगरप्रिंट संसाधित नहीं हो सका. कृपया पुन: प्रयास करें."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"फ़िंगरप्रिंट सेंसर गंदा है. कृपया साफ़ करें और फिर कोशिश करें."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> को <b><xliff:g id="LABEL">%2$s</xliff:g></b> में सेव करें?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> और <xliff:g id="TYPE_1">%2$s</xliff:g> को <b><xliff:g id="LABEL">%3$s</xliff:g></b> में सेव करें?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> और <xliff:g id="TYPE_2">%3$s</xliff:g> को <b><xliff:g id="LABEL">%4$s</xliff:g></b> में सेव करें?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"सेव करें"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"नहीं, धन्यवाद"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"पासवर्ड"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"पता"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"क्रेडिट कार्ड"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 3baaf01..f9576e0 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -303,6 +303,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Biometrijski senzori"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"pristupiti podacima senzora o vašim vitalnim znakovima"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Želite li dopustiti aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> da pristupa podacima senzora o vašim vitalnim znakovima?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Dohvaćati sadržaj prozora"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Pregledat će sadržaj prozora koji upotrebljavate."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Uključiti značajku Istraži dodirom"</string>
@@ -497,6 +509,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Aplikaciji omogućuje pozivanje načina za dodavanje i brisanje predložaka otisaka prstiju koji će se upotrijebiti."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"upotreba hardvera za čitanje otisaka prstiju"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Aplikaciji omogućuje upotrebu hardvera za čitanje otisaka prstiju radi autentifikacije."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Otkriven je djelomični otisak prsta. Pokušajte ponovo."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Obrada otiska prsta nije uspjela. Pokušajte ponovo."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Senzor otiska prsta nije čist. Očistite ga i pokušajte ponovo."</string>
@@ -1907,8 +1947,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Želite li da se podatak (<xliff:g id="TYPE">%1$s</xliff:g>) spremi na uslugu <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Želite li da se <xliff:g id="TYPE_0">%1$s</xliff:g> i <xliff:g id="TYPE_1">%2$s</xliff:g> spreme na uslugu <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Želite li da se <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> i <xliff:g id="TYPE_2">%3$s</xliff:g> spreme na uslugu <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Spremi"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ne, hvala"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"zaporku"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresu"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditnu karticu"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 106f497..f957384 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Testérzékelők"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"az érzékelők által mért, életjelekkel kapcsolatos adatok elérése"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Engedélyezi a(z) <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> számára, hogy hozzáférjen az életjelekkel kapcsolatos szenzoradatokhoz?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Ablaktartalom lekérdezése"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"A használt ablak tartalmának vizsgálata."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Felfedezés érintéssel bekapcsolása"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Lehetővé teszi az alkalmazás számára a használni kívánt ujjlenyomatsablonok hozzáadására és törlésére szolgáló metódusok indítását."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ujjlenyomat-olvasó hardver használata"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Lehetővé teszi az alkalmazás számára az ujjlenyomat-olvasó hardver hitelesítésre való használatát"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"A rendszer az ujjlenyomatnak csak egy részletét érzékelte. Próbálkozzon újra."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Nem sikerült feldolgozni az ujjlenyomatot. Próbálkozzon újra."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Az ujjlenyomat-olvasó koszos. Tisztítsa meg, majd próbálkozzon újra."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Menti a következőt: <xliff:g id="TYPE">%1$s</xliff:g> ide: <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Menti a következőket: <xliff:g id="TYPE_0">%1$s</xliff:g> és <xliff:g id="TYPE_1">%2$s</xliff:g> ide: <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Menti a következőket: <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> és <xliff:g id="TYPE_2">%3$s</xliff:g> ide: <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Mentés"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nem, köszönöm"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"jelszó"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"cím"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"hitelkártya"</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 1161062..978e661 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Մարմնի սենսորներ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"օգտագործել սենսորների տվյալները ձեր օրգանիզմի վիճակի մասին"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Թույլ տա՞լ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> հավելվածին սենսորից ստանալ ձեր կենսագործունեության հիմնական տվյալները:"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Առբերել պատուհանի բովանդակությունը"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Վերլուծել գործող պատուհանի բովանդակությունը"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Միացնել Հպման միջոցով հետազոտումը"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Հավելվածին թույլ է տալիս կատարել այնպիսի գործառույթներ, որոնց միջոցով կարելի է օգտագործման համար ավելացնել և հեռացնել մատնահետքերի նմուշներ:"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"օգտագործել մատնահետքերի գրանցման սարքը"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Հավելվածին թույլ է տալիս նույնականացման համար օգտագործել մատնահետքերի գրանցման սարքը"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Մատնահետքը հայտնաբերվել է մասամբ: Փորձեք նորից:"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Չհաջողվեց մշակել մատնահետքը: Նորից փորձեք:"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Մատնահետքերի սենսորն աղտոտված է: Մաքրեք այն և փորձեք նորից:"</string>
@@ -1097,7 +1137,7 @@
<string name="whichImageCaptureApplication" msgid="3680261417470652882">"Լուսանկարել այս հավելվածի օգնությամբ"</string>
<string name="whichImageCaptureApplicationNamed" msgid="8619384150737825003">"Լուսանկարել %1$s հավելվածի օգնությամբ"</string>
<string name="whichImageCaptureApplicationLabel" msgid="6390303445371527066">"Լուսանկարել"</string>
- <string name="alwaysUse" msgid="4583018368000610438">"Օգտագործել լռելյայն այս գործողության համար:"</string>
+ <string name="alwaysUse" msgid="4583018368000610438">"Օգտագործել ըստ կանխադրման այս գործողության համար:"</string>
<string name="use_a_different_app" msgid="8134926230585710243">"Օգտագործել այլ հավելված"</string>
<string name="clearDefaultHintMsg" msgid="3252584689512077257">"Մաքրել լռելյայնը Համակարգի կարգավորումներ > Ծրագրեր >Ներբեռնված էջից:"</string>
<string name="chooseActivity" msgid="7486876147751803333">"Ընտրել գործողություն"</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Պահե՞լ <xliff:g id="TYPE">%1$s</xliff:g>ը <b><xliff:g id="LABEL">%2$s</xliff:g></b> ծառայությունում"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Պահե՞լ <xliff:g id="TYPE_0">%1$s</xliff:g>ն ու <xliff:g id="TYPE_1">%2$s</xliff:g>ը <b><xliff:g id="LABEL">%3$s</xliff:g></b> ծառայությունում"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Պահե՞լ <xliff:g id="TYPE_0">%1$s</xliff:g>ը, <xliff:g id="TYPE_1">%2$s</xliff:g>ն ու <xliff:g id="TYPE_2">%3$s</xliff:g>ը <b><xliff:g id="LABEL">%4$s</xliff:g></b> ծառայությունում"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Պահել"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ոչ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"գաղտնաբառ"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"հասցե"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"վարկային քարտ"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 05f6ba1..7ba8e2c 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensor Tubuh"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"mengakses data sensor tentang tanda-tanda vital"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Izinkan <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> mengakses data sensor tentang tanda-tanda vital Anda?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Mengambil konten jendela"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Memeriksa konten jendela tempat Anda berinteraksi."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Mengaktifkan Jelajahi dengan Sentuhan"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Mengizinkan aplikasi memanggil metode untuk menambahkan dan menghapus template sidik jari untuk digunakan."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"gunakan hardware sidik jari"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Mengizinkan aplikasi untuk menggunakan hardware sidik jari untuk otentikasi"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Sebagian sidik jari terdeteksi. Coba lagi."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Tidak dapat memproses sidik jari. Coba lagi."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Sensor sidik jari kotor. Bersihkan dan coba lagi."</string>
@@ -1305,7 +1345,7 @@
<string name="select_keyboard_layout_notification_message" msgid="8084622969903004900">"Tap untuk memilih bahasa dan tata letak"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
- <string name="alert_windows_notification_channel_group_name" msgid="1463953341148606396">"Tampilkan di atas aplikasi lain"</string>
+ <string name="alert_windows_notification_channel_group_name" msgid="1463953341148606396">"Tampilkan di atas apl lain"</string>
<string name="alert_windows_notification_channel_name" msgid="3116610965549449803">"<xliff:g id="NAME">%s</xliff:g> ditampilkan di atas aplikasi lain"</string>
<string name="alert_windows_notification_title" msgid="3697657294867638947">"<xliff:g id="NAME">%s</xliff:g> ditampilkan di atas aplikasi lain"</string>
<string name="alert_windows_notification_message" msgid="8917232109522912560">"Jika Anda tidak ingin <xliff:g id="NAME">%s</xliff:g> menggunakan fitur ini, tap untuk membuka setelan dan menonaktifkannya."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Simpan <xliff:g id="TYPE">%1$s</xliff:g> ke <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Simpan <xliff:g id="TYPE_0">%1$s</xliff:g> dan <xliff:g id="TYPE_1">%2$s</xliff:g> ke <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Simpan <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, dan <xliff:g id="TYPE_2">%3$s</xliff:g> ke <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Simpan"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Lain kali"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"sandi"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"alamat"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kartu kredit"</string>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index a915202..a2c79c0 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Líkamsskynjarar"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"aðgangur að skynjaragögnum yfir lífsmörk þín"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Viltu veita <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aðgang að skynjaragögnum yfir lífsmörk þín?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Sækja innihald glugga"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Kanna innihald glugga sem þú ert að nota."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Kveikja á snertikönnun"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Gerir forritinu kleift að beita aðferðum til að bæta við og eyða fingrafarasniðmátum til notkunar."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"nota fingrafarabúnað"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Leyfir forritinu að nota fingrafarabúnað til auðkenningar"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Hluti fingrafars greindist. Reyndu aftur."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Ekki var hægt að vinna úr fingrafarinu. Reyndu aftur."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingrafaraskynjarinn er óhreinn. Hreinsaðu hann og reyndu aftur."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Vista <xliff:g id="TYPE">%1$s</xliff:g> á <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Vista <xliff:g id="TYPE_0">%1$s</xliff:g> og <xliff:g id="TYPE_1">%2$s</xliff:g> á <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Vista <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> og <xliff:g id="TYPE_2">%3$s</xliff:g> á <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Vista"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nei, takk"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"aðgangsorð"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"heimilisfang"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditkort"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 445f3a7..a7c1ae2 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>
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensori per il corpo"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"accedere ai dati dei sensori relativi ai tuoi parametri vitali"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Consentire a <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> di accedere ai dati dei sensori relativi ai parametri vitali?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Musica"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"Accesso alla tua musica"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Vuoi consentire all\'app <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> di accedere alla tua musica?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Foto e video"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"Accesso alle tue foto e ai tuoi video"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Vuoi consentire all\'app <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> di accedere alle tue foto e ai tuoi video?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Recuperare contenuti della finestra"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Esaminare i contenuti di una finestra con cui interagisci."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Attivare Esplora al tocco"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Consente all\'app di richiamare metodi per aggiungere e rimuovere modelli di impronte digitali da utilizzare."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"utilizzo di hardware per il riconoscimento delle impronte digitali"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Consente all\'app di utilizzare l\'hardware per il riconoscimento delle impronte digitali per eseguire l\'autenticazione"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"Lettura della tua raccolta musicale"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Consente all\'app di leggere la tua raccolta musicale."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"Modifica della tua raccolta musicale"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Consente all\'app di modificare la tua raccolta musicale."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"Lettura della tua raccolta di video"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Consente all\'app di leggere la tua raccolta di video."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"Modifica della tua raccolta di video"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Consente all\'app di modificare la tua raccolta di video."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"Lettura della tua raccolta di foto"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Consente all\'app di leggere la tua raccolta di foto."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"Modifica della tua raccolta di foto"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Consente all\'app di modificare la tua raccolta di foto."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"Lettura delle posizioni dalla tua raccolta multimediale"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Consente all\'app di leggere le posizioni dalla tua raccolta multimediale."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Rilevata impronta digitale parziale. Riprova."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Impossibile elaborare l\'impronta digitale. Riprova."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Il sensore di impronte digitali è sporco. Puliscilo e riprova."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Salvare <xliff:g id="TYPE">%1$s</xliff:g> in <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Salvare <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> in <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Salvare <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> in <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Vuoi eseguire l\'aggiornamento a <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Vuoi eseguire l\'aggiornamento di <xliff:g id="TYPE">%1$s</xliff:g> a <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Vuoi eseguire l\'aggiornamento di <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> a <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Vuoi eseguire l\'aggiornamento di <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> a <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Salva"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"No, grazie"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Aggiorna"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"indirizzo"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"carta di credito"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 0c0e0ab..60eb471 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"חיישני גוף"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"גישה אל נתוני חיישנים של הסימנים החיוניים שלך"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"לתת לאפליקציה <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> הרשאת גישה לנתוני חיישנים העוקבים אחר הסימנים החיוניים שלך?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"אחזור תוכן של חלון"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"בדוק את התוכן של חלון שאיתו אתה מבצע אינטראקציה."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"הפעלה של \'גילוי באמצעות מגע\'"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"מאפשר לאפליקציה להפעיל שיטות להוספה ומחיקה של תבניות טביעות אצבעות שבהן ייעשה שימוש."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"חומרה של טביעות אצבעות"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"מאפשר לאפליקציה להשתמש בחומרה של טביעות אצבעות לצורך אימות"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"זוהתה טביעת אצבע חלקית. נסה שוב."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"לא ניתן היה לעבד את טביעת האצבע. נסה שוב."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"החיישן של טביעות האצבעות מלוכלך. נקה אותו ונסה שוב."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"האם לשמור <xliff:g id="TYPE">%1$s</xliff:g> בשירות <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"האם לשמור <xliff:g id="TYPE_0">%1$s</xliff:g> ו<xliff:g id="TYPE_1">%2$s</xliff:g> בשירות <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"האם לשמור <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ו<xliff:g id="TYPE_2">%3$s</xliff:g> בשירות <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"שמירה"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"לא, תודה"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"סיסמה"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"כתובת"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"כרטיס אשראי"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 00d1b5d..ec2ada4 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ボディーセンサー"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"バイタルサインに関するセンサーデータへのアクセス"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"バイタルサインに関するセンサーデータへのアクセスを <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> に許可しますか?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"音楽"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"音楽へのアクセス"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"音楽へのアクセスを <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> に許可しますか?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"写真と動画"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"写真と動画へのアクセス"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"写真と動画へのアクセスを <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> に許可しますか?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ウィンドウコンテンツの取得"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ユーザーがアクセスしているウィンドウのコンテンツを検査します。"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"タッチガイドの有効化"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"使用する指紋テンプレートの追加や削除を行う方法の呼び出しをアプリに許可します。"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"指紋ハードウェアの使用"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"指紋ハードウェアを認証に使用することをアプリに許可します"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"音楽コレクションの読み取り"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"音楽コレクションの読み取りをアプリに許可します。"</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"音楽コレクションの変更"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"音楽コレクションの変更をアプリに許可します。"</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"動画コレクションの読み取り"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"動画コレクションの読み取りをアプリに許可します。"</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"動画コレクションの変更"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"動画コレクションの変更をアプリに許可します。"</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"写真コレクションの読み取り"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"写真コレクションの読み取りをアプリに許可します。"</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"写真コレクションの変更"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"写真コレクションの変更をアプリに許可します。"</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"メディア コレクションの位置情報の読み取り"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"メディア コレクションの位置情報の読み取りをアプリに許可します。"</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"指紋を一部しか検出できませんでした。もう一度お試しください。"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"指紋を処理できませんでした。もう一度お試しください。"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"指紋認証センサーに汚れがあります。汚れを落としてもう一度お試しください。"</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>を <b><xliff:g id="LABEL">%2$s</xliff:g></b> に保存しますか?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>を <b><xliff:g id="LABEL">%3$s</xliff:g></b> に保存しますか?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>、<xliff:g id="TYPE_2">%3$s</xliff:g>を <b><xliff:g id="LABEL">%4$s</xliff:g></b> に保存しますか?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"<b><xliff:g id="LABEL">%1$s</xliff:g></b> に更新しますか?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g>を <b><xliff:g id="LABEL">%2$s</xliff:g></b> に更新しますか?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g>と<xliff:g id="TYPE_1">%2$s</xliff:g>を <b><xliff:g id="LABEL">%3$s</xliff:g></b> に更新しますか?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>、<xliff:g id="TYPE_2">%3$s</xliff:g>を <b><xliff:g id="LABEL">%4$s</xliff:g></b> に更新しますか?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"はい"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"いいえ"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"更新"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"パスワード"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"住所"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"クレジット カード"</string>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index ab65348..e728762 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"სხეულის სენსორები"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"თქვენი სასიცოცხლო ფუნქციების შესახებ სენსორის მონაცემებზე წვდომა"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"გსურთ, მიანიჭოთ <b><xliff:g id="APP_NAME">%1$s</xliff:g>-ს</b> თქვენი სასიცოცხლო ფუნქციების შესახებ სენსორის მონაცემებზე წვდომის ნებართვა?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ფანჯრის კონტენტის მოძიება"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"იმ ფანჯრის კონტენტის შემოწმება, რომელშიც მუშაობთ."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"„შეხებით აღმოჩენის“ ჩართვა"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"საშუალებას აძლევს აპლიკაციას დაამატოს ან ამოშალოს გამოსაყენებელი თითის ანაბეჭდის ნიმუშები,"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"თითის ანაბეჭდის აპარატის გამოყენება"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"საშუალებას აძლევს აპლიკაციას გამოიყენოს ავტენთიფიკაციისათვის თითის ანაბეჭდის აპარატი"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"აღმოჩენილია თითის ნაწილობრივი ანაბეჭდი. გთხოვთ, სცადოთ ხელახლა."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"თითის ანაბეჭდი ვერ მუშავდება. გთხოვთ, სცადოთ ხელახლა."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"თითის ანაბეჭდის სენსორი დაბინძურებულია. გთხოვთ, გაასუფთაოთ და სცადოთ ხელახლა."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"გსურთ, შეინახოთ <xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g>-ში</b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"გსურთ, შეინახოთ <xliff:g id="TYPE_0">%1$s</xliff:g> და <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g>-ში</b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"გსურთ, შეინახოთ <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, და <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g>-ში</b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"შენახვა"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"არა, გმადლობთ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"პაროლი"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"მისამართი"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"საკრედიტო ბარათი"</string>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 3d4749f..2e3ba64 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Дене датчиктері"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ағза күйінің көрсеткіштері туралы сенсор деректеріне қатынасу"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> қолданбасына негізгі физиологиялық көрсеткіштерді көрсететін сенсорлық деректерді пайдалануға рұқсат берілсін бе?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Терезе мазмұнын оқып отыру"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Ашық тұрған терезе мазмұнын тексеру."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Explore by Touch функциясын қосу"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Қолданбаға пайдаланатын саусақ ізі үлгілерін қосу және жою әдістерін шақыруға мүмкіндік береді."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"саусақ ізі жабдығын пайдалану"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Қолданбаға аутентификацияалу үшін саусақ ізі жабдығын пайдалануға мүмкіндік береді"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Саусақ ізі ішінара анықталды. Әрекетті қайталаңыз."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Саусақ ізін өңдеу мүмкін емес. Әрекетті қайталаңыз."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Саусақ ізі сенсоры лас. Тазалап, әрекетті қайталаңыз."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> \"<xliff:g id="LABEL">%2$s</xliff:g>\" қызметінде сақталсын ба?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> және <xliff:g id="TYPE_1">%2$s</xliff:g> \"<xliff:g id="LABEL">%3$s</xliff:g>\" қызметінде сақталсын ба?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> және <xliff:g id="TYPE_2">%3$s</xliff:g> \"<xliff:g id="LABEL">%4$s</xliff:g>\" қызметінде сақталсын ба?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Сақтау"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Жоқ, рақмет"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"құпия сөз"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"мекенжай"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"несие картасы"</string>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index 22bd6c3..6e2d41b 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -133,8 +133,8 @@
<item msgid="4397097370387921767">"ការហៅតាមរយៈ Wi-Fi %s"</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>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ឧបករណ៍ចាប់សញ្ញារាងកាយ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ចូលដំណើរការទិន្នន័យឧបករណ៍ចាប់សញ្ញាអំពីស្ថានភាពសុខភាពរបស់អ្នក"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"អនុញ្ញាតឱ្យ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ចូលប្រើទិន្នន័យឧបករណ៍ចាប់សញ្ញាអំពីស្ថានភាពសុខភាពរបស់អ្នក?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ទាញយកខ្លឹមសារវិនដូ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ពិនិត្យខ្លឹមសារវិនដូដែលអ្នកកំពុងទាក់ទងជាមួយ។"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"បើកការរកមើលដោយប៉ះ"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"អនុញ្ញាតឲ្យកម្មវិធីប្រើវិធីសាស្ត្របន្ថែម និងលុបពុម្ពម្រាមដៃសម្រាប់ប្រើប្រាស់។"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ប្រើផ្នែករឹងស្នាមម្រាមដៃ"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"អនុញ្ញាតឲ្យកម្មវិធីប្រើផ្នែករឹងស្នាមម្រាមដៃសម្រាប់ការផ្ទៀងផ្ទាត់"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"បានផ្តិតយកស្នាមម្រាមដៃមិនពេញលក្ខណៈ។ សូមព្យាយាមម្តងទៀត។"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"មិនអាចដំណើរការស្នាមម្រាមដៃបានទេ។ សូមព្យាយាមម្តងទៀត។"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ឧបករណ៍ផ្តិតម្រាមដៃប្រលាក់ហើយ។ សូមសម្អាត ហើយព្យាយាមម្តងទៀត។"</string>
@@ -1874,8 +1914,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"រក្សាទុក <xliff:g id="TYPE">%1$s</xliff:g> ទៅក្នុង <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"រក្សាទុក <xliff:g id="TYPE_0">%1$s</xliff:g> និង <xliff:g id="TYPE_1">%2$s</xliff:g> ទៅក្នុង <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"រក្សាទុក <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, និង <xliff:g id="TYPE_2">%3$s</xliff:g> ទៅក្នុង <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"រក្សាទុក"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ទេ អរគុណ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"ពាក្យសម្ងាត់"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"អាសយដ្ឋាន"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"បណ្ណឥណទាន"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 58f8d56..e99d53a 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -133,7 +133,7 @@
<item msgid="4397097370387921767">"%s ವೈ-ಫೈ ಕರೆ ಮಾಡುವಿಕೆ"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"ಆಫ್"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"ವೈ-ಫೈಗೆ ಆದ್ಯತೆ ನೀಡಲಾಗಿದೆ"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"ವೈ-ಫೈಗೆ ಆದ್ಯತೆ"</string>
<string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"ಮೊಬೈಲ್ಗೆ ಆದ್ಯತೆ"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"ವೈ-ಫೈ ಮಾತ್ರ"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: ಫಾರ್ವರ್ಡ್ ಮಾಡಲಾಗಿಲ್ಲ"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ದೇಹ ಸೆನ್ಸರ್ಗಳು"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ನಿಮ್ಮ ಮುಖ್ಯ ಲಕ್ಷಣಗಳ ಕುರಿತು ಸೆನ್ಸಾರ್ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಿ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"ನಿಮ್ಮ ಮುಖ್ಯ ಲಕ್ಷಣಗಳ ಕುರಿತು ಸೆನ್ಸರ್ ಡೇಟಾವನ್ನು <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ವಿಂಡೋ ವಿಷಯವನ್ನು ಹಿಂಪಡೆಯುತ್ತದೆ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ನೀವು ಬಳಸುತ್ತಿರುವ ವಿಂಡೋದ ವಿಷಯ ಪರೀಕ್ಷಿಸುತ್ತದೆ."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"ಸ್ಪರ್ಶ-ಎಕ್ಸ್ಪ್ಲೋರ್ ಆನ್ ಮಾಡುತ್ತದೆ"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ಬಳಕೆಗೆ ಬೆರಳಚ್ಚು ಟೆಂಪ್ಲೇಟ್ಗಳನ್ನು ಸೇರಿಸಲು ಮತ್ತು ಅಳಿಸಲು ವಿಧಾನಗಳನ್ನು ಮನವಿ ಮಾಡಲು ಅಪ್ಲಿಕೇಶನ್ಗೆ ಅನುಮತಿಸುತ್ತದೆ."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ಬೆರಳಚ್ಚು ಹಾರ್ಡ್ವೇರ್ ಬಳಸಿ"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ಪ್ರಮಾಣೀಕರಣಕ್ಕಾಗಿ ಬೆರಳಚ್ಚು ಹಾರ್ಡ್ವೇರ್ ಬಳಸಲು ಅಪ್ಲಿಕೇಶನ್ಗೆ ಅನುಮತಿಸುತ್ತದೆ"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ಭಾಗಶಃ ಬೆರಳಚ್ಚು ಪತ್ತೆಯಾಗಿದೆ. ದಯವಿಟ್ಟು ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ಬೆರಳಚ್ಚು ಪ್ರಕ್ರಿಯೆಗೊಳಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ. ದಯವಿಟ್ಟು ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ಬೆರಳಚ್ಚು ಸೆನ್ಸಾರ್ ಕೊಳೆಯಾಗಿದೆ. ದಯವಿಟ್ಟು ಅದನ್ನು ಸ್ವಚ್ಛಗೊಳಿಸಿ ಹಾಗೂ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> ಅನ್ನು <b><xliff:g id="LABEL">%2$s</xliff:g></b>ನಲ್ಲಿ ಉಳಿಸುವುದೇ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> ಹಾಗೂ <xliff:g id="TYPE_1">%2$s</xliff:g> ಅನ್ನು <b><xliff:g id="LABEL">%3$s</xliff:g></b>ನಲ್ಲಿ ಉಳಿಸುವುದೇ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, ಹಾಗೂ <xliff:g id="TYPE_2">%3$s</xliff:g> ಅನ್ನು <b><xliff:g id="LABEL">%4$s</xliff:g></b>ನಲ್ಲಿ ಉಳಿಸುವುದೇ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"ಉಳಿಸಿ"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ಬೇಡ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"ಪಾಸ್ವರ್ಡ್"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ವಿಳಾಸ"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 076b65f..89e7269 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"인체 감지 센서"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"생체 신호에 관한 센서 데이터에 액세스"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>에서 생체 신호에 관한 센서 데이터에 액세스하도록 허용하시겠습니까?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"창 콘텐츠 가져오기"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"상호작용 중인 창의 콘텐츠를 검사합니다."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"터치하여 탐색 사용"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"사용할 지문 템플릿의 추가 및 삭제 메소드를 앱에서 실행하도록 허용합니다."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"지문 하드웨어 사용"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"앱에서 지문 하드웨어를 인증에 사용하도록 허용합니다."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"지문이 일부만 인식되었습니다. 다시 시도해 주세요."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"지문을 인식할 수 없습니다. 다시 시도해 주세요."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"지문 센서를 깨끗이 닦고 다시 시도하세요."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>을(를) <b><xliff:g id="LABEL">%2$s</xliff:g></b>에 저장하시겠습니까?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> 및 <xliff:g id="TYPE_1">%2$s</xliff:g>을(를) <b><xliff:g id="LABEL">%3$s</xliff:g></b>에 저장하시겠습니까?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, <xliff:g id="TYPE_2">%3$s</xliff:g>을(를) <b><xliff:g id="LABEL">%4$s</xliff:g></b>에 저장하시겠습니까?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"저장"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"사용 안함"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"비밀번호"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"주소"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"신용카드"</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 7557cfa..55a721e 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>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Дене сенсорлору"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"организмдин абалына көз салган сенсордун дайындарына мүмкүнчүлүк алуу"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> колдонмосуна организмдин абалына көз салган сенсордун дайындарын пайдаланууга уруксат берилсинби?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Терезедеги мазмунду алып турат"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Учурда ачылып турган терезедеги маалыматты талдайт."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"\"Сыйпалап изилдөө\" мүмкүнчүлүгүн иштетет"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Колдонмого пайдалануу үчүн манжа изинин үлгүлөрүн кошуу жана жок кылуу мүмкүндүгүн берет."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"манжа изинин аппараттык камсыздоосун колдонуу"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Колдонмого аныктыгын текшерүү үчүн манжа изинин аппараттык камсыздоосун пайдалануу мүмкүндүгүн берет"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Манжа изи жарым-жартылай аныкталды. Кайра аракет кылыңыз."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Манжа изи иштелбей койду. Кайра аракет кылыңыз."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Манжа изинин сенсору кирдеп калган. Тазалап, кайра аракет кылыңыз."</string>
@@ -1874,8 +1914,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g></b> кызматында сакталсынбы?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> жана <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b> кызматында сакталсынбы?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> жана <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b> кызматында сакталсынбы?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Сактоо"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Жок, рахмат"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"сырсөз"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"дарек"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"насыя картасы"</string>
diff --git a/core/res/res/values-land/dimens_package_installer.xml b/core/res/res/values-land/dimens_permission_controller.xml
similarity index 100%
rename from core/res/res/values-land/dimens_package_installer.xml
rename to core/res/res/values-land/dimens_permission_controller.xml
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index ef2cede..24cef03 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ເຊັນເຊີຮ່າງກາຍ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ເຂົ້າຫາຂໍ້ມູນເຊັນເຊີກ່ຽວກັບສັນຍານຊີບຂອງທ່ານ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"ອະນຸຍາດ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ໃຫ້ເຂົ້າເຖິງຂໍ້ມູນເຊັນເຊີກ່ຽວກັບສັນຍານຊີບຂອງທ່ານບໍ?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ດຶງຂໍ້ມູນເນື້ອຫາໃນໜ້າຈໍ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ກວດກາເນື້ອຫາຂອງໜ້າຈໍທີ່ທ່ານກຳລັງມີປະຕິສຳພັນນຳ."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"ເປີດໃຊ້ \"ການສຳຫຼວດໂດຍສຳຜັດ\""</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ອະນຸຍາດໃຫ້ແອັບເຮັດໃຫ້ວິທີການຕ່າງໆເພີ່ມ ແລະລຶບແມ່ແບບລາຍນີ້ວມືສຳລັບການໃຊ້."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ໃຊ້ຮາດແວລາຍນີ້ວມື"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ອະນຸຍາດໃຫ້ແອັບນຳໃຊ້ຮາດແວລາຍນີ້ວມືສຳລັບການຮັບຮອງ"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ກວດພົບລາຍນີ້ວມືບາງສ່ວນແລ້ວ. ກະລຸນາລອງໃໝ່ອີກ."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ບໍ່ສາມາດດຳເນີນການລາຍນີ້ວມືໄດ້. ກະລຸນາລອງໃໝ່ອີກ."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ເຊັນເຊີລາຍນີ້ວມືເປື້ອນ. ກະລຸນາທຳຄວາມສະອາດ ແລະລອງໃໝ່ອີກ."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"ບັນທຶກ <xliff:g id="TYPE">%1$s</xliff:g> ໃສ່ <b><xliff:g id="LABEL">%2$s</xliff:g></b> ບໍ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"ບັນທຶກ <xliff:g id="TYPE_0">%1$s</xliff:g> ແລະ <xliff:g id="TYPE_1">%2$s</xliff:g> ໃສ່ <b><xliff:g id="LABEL">%3$s</xliff:g></b> ບໍ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"ບັນທຶກ <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ແລະ <xliff:g id="TYPE_2">%3$s</xliff:g> ໃສ່ <b><xliff:g id="LABEL">%4$s</xliff:g></b> ບໍ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"ບັນທຶກ"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ບໍ່, ຂອບໃຈ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"ລະຫັດຜ່ານ"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ທີ່ຢູ່"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ບັດເຄຣດິດ"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index e72b1a9..c61c30f 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Kūno jutikliai"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"pasiekti jutiklių duomenis apie gyvybinius ženklus"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Suteikti <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> galimybę pasiekti jutiklių duomenis apie gyvybinius ženklus?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Gauti lango turinį"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Tikrinti lango, su kuriuo sąveikaujate, turinį."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Įjungti „Naršyti paliečiant“"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Leidžiama programai aktyvinti metodus, norint pridėti ir ištrinti naudojamus kontrolinių kodų šablonus."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"naudoti kontrolinio kodo aparatinę įrangą"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Leidžiama programai naudoti kontrolinio kodo aparatinę įrangą tapatybei nustatyti"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Aptiktas dalinis kontrolinis kodas. Bandykite dar kartą."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Nepavyko apdoroti kontrolinio kodo. Bandykite dar kartą."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Kontrolinio kodo jutiklis purvinas. Nuvalykite ir bandykite dar kartą."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Išsaugoti <xliff:g id="TYPE">%1$s</xliff:g> sistemoje <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Išsaugoti <xliff:g id="TYPE_0">%1$s</xliff:g> ir <xliff:g id="TYPE_1">%2$s</xliff:g> sistemoje <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Išsaugoti <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ir <xliff:g id="TYPE_2">%3$s</xliff:g> sistemoje <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Išsaugoti"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ne, ačiū"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"slaptažodį"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresą"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredito kortelę"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index a5116e4..ea7140b 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -303,6 +303,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Ķermeņa sensori"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"piekļūt sensoru datiem par jūsu veselības rādījumiem"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Vai atļaut lietotnei <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> piekļūt sensoru uztvertajiem veselības rādījumiem?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Izgūt loga saturu."</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Skatīt tā loga saturu, ar kuru mijiedarbojaties."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Aktivizēt funkciju “Pārlūkot pieskaroties”."</string>
@@ -497,6 +509,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Atļauj lietotnei izsaukt metodes izmantojamo pirkstu nospiedumu veidņu pievienošanai un dzēšanai."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"lietot pirkstu nospiedumu aparatūru"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Atļauj lietotnei izmantot pirkstu nospiedumu aparatūru autentificēšanai."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Noteikts daļējs pirksta nospiedums. Lūdzu, mēģiniet vēlreiz."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Nevarēja apstrādāt pirksta nospiedumu. Lūdzu, mēģiniet vēlreiz."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Pirkstu nospiedumu sensors ir netīrs. Lūdzu, notīriet to un mēģiniet vēlreiz."</string>
@@ -1907,8 +1947,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Vai saglabāt vienumu “<xliff:g id="TYPE">%1$s</xliff:g>” pakalpojumā <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Vai saglabāt vienumus “<xliff:g id="TYPE_0">%1$s</xliff:g>” un “<xliff:g id="TYPE_1">%2$s</xliff:g>” pakalpojumā <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Vai saglabāt vienumus “<xliff:g id="TYPE_0">%1$s</xliff:g>”, “<xliff:g id="TYPE_1">%2$s</xliff:g>” un “<xliff:g id="TYPE_2">%3$s</xliff:g>” pakalpojumā <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Saglabāt"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nē, paldies"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"paroli"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresi"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredītkartes informāciju"</string>
diff --git a/core/res/res/values-mcc214-mnc01/config.xml b/core/res/res/values-mcc214-mnc01/config.xml
index 24150a7..41e24d7 100644
--- a/core/res/res/values-mcc214-mnc01/config.xml
+++ b/core/res/res/values-mcc214-mnc01/config.xml
@@ -40,4 +40,7 @@
<item>INTERNET,airtelnet.es,,,vodafone,vodafone,,,,,214,01,1,DUN</item>
</string-array>
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
</resources>
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-mcc222-mnc10/config.xml b/core/res/res/values-mcc222-mnc10/config.xml
index c819de2..0085a1b 100644
--- a/core/res/res/values-mcc222-mnc10/config.xml
+++ b/core/res/res/values-mcc222-mnc10/config.xml
@@ -28,4 +28,8 @@
<string-array translatable="false" name="config_tether_apndata">
<item>Tethering Internet,web.omnitel.it,,,,,,,,,222,10,,DUN</item>
</string-array>
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
</resources>
diff --git a/core/res/res/values-mcc234-mnc15/config.xml b/core/res/res/values-mcc234-mnc15/config.xml
new file mode 100644
index 0000000..84e779d
--- /dev/null
+++ b/core/res/res/values-mcc234-mnc15/config.xml
@@ -0,0 +1,25 @@
+<?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 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
+</resources>
diff --git a/core/res/res/values-mcc234-mnc91/config.xml b/core/res/res/values-mcc234-mnc91/config.xml
new file mode 100644
index 0000000..84e779d
--- /dev/null
+++ b/core/res/res/values-mcc234-mnc91/config.xml
@@ -0,0 +1,25 @@
+<?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 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
+</resources>
diff --git a/core/res/res/values-mcc262-mnc02/config.xml b/core/res/res/values-mcc262-mnc02/config.xml
new file mode 100644
index 0000000..84e779d
--- /dev/null
+++ b/core/res/res/values-mcc262-mnc02/config.xml
@@ -0,0 +1,25 @@
+<?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 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">false</bool>
+
+</resources>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index 47f388d..b2beb3a 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Телесни сензори"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"пристапува до податоците од сензорите за виталните знаци"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Дали да се дозволи <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> да пристапува до податоците на сензорот за витални знаци?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Музика"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"пристапува до музиката"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Дали да се дозволи <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> да пристапува до музиката?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Фотографии и видеа"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"пристапува до фотографиите и видеата"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Дали да се дозволи <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> да пристапува до фотографиите и видеата?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Преземе содржина на прозорец"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Ја следи содржината на прозорецот со кој се комуницира."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Вклучи „Истражувај со допир“"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Дозволува апликацијата да повика начини за додавање и бришење шаблони на отпечатоци за користење."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"користи хардвер за отпечатоци"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Дозволува апликацијата да користи хардвер за отпечатоци за проверка"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"да ја чита вашата музичка збирка"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Дозволува апликацијата да ја чита вашата музичка збирка."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"да ја менува вашата музичка збирка"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Дозволува апликацијата да ја менува вашата музичка збирка."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"да ја чита вашата збирка на видеа"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Дозволува апликацијата да ја чита вашата збирка на видеа."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"да ја менува вашата збирка на видеа"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Дозволува апликацијата да ја менува вашата збирка на видеа."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"да ја чита вашата збирка на фотографии"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Дозволува апликацијата да ја чита вашата збирка на фотографии."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"да ја менува вашата збирка на фотографии"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Дозволува апликацијата да ја менува вашата збирка на фотографии."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"да чита локации од вашата збирка на аудиовизуелни содржини"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Дозволува апликацијата да чита локации од вашата збирка на аудиовизуелни содржини."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Откриен е делумен отпечаток. Обидете се повторно."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Отпечатокот не можеше да се обработи. Обидете се повторно."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Сензорот за отпечатоци е валкан. Исчистете го и обидете се повторно."</string>
@@ -1875,8 +1895,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Да се зачува <xliff:g id="TYPE">%1$s</xliff:g> во <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Да се зачуваат <xliff:g id="TYPE_0">%1$s</xliff:g> и <xliff:g id="TYPE_1">%2$s</xliff:g> во <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Да се зачуваат <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> и <xliff:g id="TYPE_2">%3$s</xliff:g> во <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Дали да се ажурира на <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Дали да се ажурира <xliff:g id="TYPE">%1$s</xliff:g> на <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Дали да се ажурираат <xliff:g id="TYPE_0">%1$s</xliff:g> и <xliff:g id="TYPE_1">%2$s</xliff:g> на <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Дали да се ажурираат <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> и <xliff:g id="TYPE_2">%3$s</xliff:g> на <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Зачувај"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Не, фала"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Ажурирај"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"лозинка"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"адреса"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"кредитна картичка"</string>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index 1a3556c..db2aa1e 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ബോഡി സെൻസറുകൾ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"നിങ്ങളുടെ ജീവാധാര ലക്ഷണങ്ങളെ കുറിച്ചുള്ള സെൻസർ വിവരങ്ങൾ ആക്സസ് ചെയ്യുക"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"നിങ്ങളുടെ ജീവധാരണ ലക്ഷണങ്ങളെ കുറിച്ചുള്ള സെൻസർ ഡാറ്റ ആക്സസ് ചെയ്യാൻ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കണോ?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"വിൻഡോ ഉള്ളടക്കം വീണ്ടെടുക്കുക"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"നിങ്ങൾ സംവദിക്കുന്ന ഒരു വിൻഡോയുടെ ഉള്ളടക്കം പരിശോധിക്കുക."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"സ്പർശനം വഴി പര്യവേക്ഷണം ചെയ്യുക, ഓണാക്കുക"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ഉപയോഗിക്കാനായി വിരലടയാള ടെംപ്ലേറ്റുകൾ ചേർക്കാനും ഇല്ലാതാക്കാനുമുള്ള രീതികൾ അഭ്യർത്ഥിക്കാൻ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ഫിംഗർപ്രിന്റ് ഹാർഡ്വെയർ ഉപയോഗിക്കുക"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"പ്രാമാണീകരണത്തിനായി വിരലടയാളം ഉപയോഗിക്കാൻ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"വിരലടയാളം ഭാഗികമായി തിരിച്ചറിഞ്ഞു. വീണ്ടും ശ്രമിക്കുക."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"വിരലടയാളം പ്രോസസ്സ് ചെയ്യാനായില്ല. വീണ്ടും ശ്രമിക്കുക."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"വിരലടയാള സെൻസറിന് വൃത്തിയില്ല. അത് ശുചിയാക്കി വീണ്ടും ശ്രമിക്കുക."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> എന്നതിനെ <b><xliff:g id="LABEL">%2$s</xliff:g></b>എന്നതിലേക്ക് സംരക്ഷിക്കണോ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> എന്നിവ<b><xliff:g id="LABEL">%3$s</xliff:g></b>എന്നതിലേക്ക് സംരക്ഷിക്കണോ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, <xliff:g id="TYPE_2">%3$s</xliff:g> എന്നിവ<b><xliff:g id="LABEL">%4$s</xliff:g></b>എന്നതിലേക്ക് സംരക്ഷിക്കണോ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"സംരക്ഷിക്കുക"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"വേണ്ട, നന്ദി"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"പാസ്വേഡ്"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"വിലാസം"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ക്രെഡിറ്റ് കാർഡ്"</string>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 2a30fcb..ddf1bc6 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>
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Биеийн мэдрэгч"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"таны биеийн байдлын талаарх мэдрэгч бүхий өгөгдөлд нэвтрэх"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>-д таны биеийн ерөнхий байдлын үзүүлэлтүүдийн мэдрэгчийн өгөгдөлд хандахыг зөвшөөрөх үү?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Хөгжим"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"хөгжимдөө хандах"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>-д таны хөгжимд хандахыг зөвшөөрөх үү?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Зураг & видео"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"зураг & видеондоо хандах"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>-д таны зураг & видеонд хандахыг зөвшөөрөх үү?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Цонхны агуулгыг авах"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Таны харилцан үйлчлэх цонхны контентоос шалгах."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Хүрч танихыг асаах"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Хурууны хээний загварыг нэмэх эсвэл усгтах үйлдлийг хийх зөвшөөрлийг програмд олгодог."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"хурууны хээний програм хангамжийг ашиглах"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Баталгаажуулалт хийх зорилгоор хурууны хээний апп хамгамжийг ашиглах зөвшөөрлийг аппд олгодог"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"хөгжмийн цуглуулгаа унших"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Таны хөгжмийн цуглуулгыг унших зөвшөөрлийг аппад олгодог."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"хөгжмийн цуглуулгаа тохируулах"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Таны хөгжмийн цуглуулгыг тохируулах зөвшөөрлийг аппад олгодог."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"видео цуглуулгаа унших"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Таны видео цуглуулгыг унших зөвшөөрлийг аппад олгодог."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"видео цуглуулгаа тохируулах"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Таны видео цуглуулгыг тохируулах зөвшөөрлийг аппад олгодог."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"зургийн цуглуулгаа унших"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Таны зургийн цуглуулгыг унших зөвшөөрлийг аппад олгодог."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"зургийн цуглуулгаа тохируулах"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Таны зургийн цуглуулгыг тохируулах зөвшөөрлийг аппад олгодог."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"медиа цуглуулгаасаа байршлыг унших"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Таны медиа цуглуулгаас байршлыг унших зөвшөөрлийг аппад олгодог."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Хурууны хээг дутуу уншуулсан байна. Дахин оролдоно уу."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Хурууны хээ боловсруулж чадахгүй байна. Дахин оролдоно уу."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Хурууны хээ мэдрэгч бохирдсон байна. Та цэвэрлэсний дараагаар дахин оролдоно уу."</string>
@@ -762,7 +782,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 +1181,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 +1192,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>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>-г <b><xliff:g id="LABEL">%2$s</xliff:g></b>-д хадгалах уу?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>-г <b><xliff:g id="LABEL">%3$s</xliff:g></b>-д хадгалах уу?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, <xliff:g id="TYPE_2">%3$s</xliff:g>-г <b><xliff:g id="LABEL">%4$s</xliff:g></b>-д хадгалах уу?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"<b><xliff:g id="LABEL">%1$s</xliff:g></b>-д шинэчлэх үү?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g>-г <b><xliff:g id="LABEL">%2$s</xliff:g></b>-д шинэчлэх үү?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>-г <b><xliff:g id="LABEL">%3$s</xliff:g></b>-д шинэчлэх үү?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, <xliff:g id="TYPE_2">%3$s</xliff:g>-г <b><xliff:g id="LABEL">%4$s</xliff:g></b>-д шинэчлэх үү?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Хадгалах"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Үгүй, баярлалаа"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Шинэчлэх"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"нууц үг"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"хаяг"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"кредит карт"</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 27f6477..4b01543 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"शरीर सेन्सर"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"आपल्या महत्त्वाच्या मापनांविषयी सेंसर डेटा अॅक्सेस करा"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ला तुमच्या महत्त्वाच्या लक्षणांविषयीचा सेन्सर डेटा अॅक्सेस करू द्यायचे?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"विंडो सामग्री पुनर्प्राप्त करा"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"तुम्ही परस्परसंवाद करीत असलेल्या विंडोची सामग्री तपासा."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"स्पर्श करून अन्वेषण चालू करा"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"वापर करण्याकरिता फिंगरप्रिंट टेम्पलेट जोडण्यासाठी आणि हटविण्यासाठी पद्धती रद्द करण्यास अॅपला अनुमती देते."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"फिंगरप्रिंट हार्डवेअर वापरा"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"प्रमाणीकरणाकरिता फिंगरप्रिंट हार्डवेअरचा वापर करण्यासाठी अॅपला अनुमती देते"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"आंशिक फिंगरप्रिंट आढळली. कृपया पुन्हा प्रयत्न करा."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"फिंगरप्रिंटवर प्रक्रिया करणे शक्य झाले नाही. कृपया पुन्हा प्रयत्न करा."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"फिंगरप्रिंट सेन्सर खराब आहे. कृपया साफ करा आणि पुन्हा प्रयत्न करा."</string>
@@ -1842,7 +1882,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>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<b><xliff:g id="LABEL">%2$s</xliff:g></b>मध्ये <xliff:g id="TYPE">%1$s</xliff:g> सेव्ह करायची?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<b><xliff:g id="LABEL">%3$s</xliff:g></b>मध्ये <xliff:g id="TYPE_0">%1$s</xliff:g> आणि <xliff:g id="TYPE_1">%2$s</xliff:g> सेव्ह करायची?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<b><xliff:g id="LABEL">%4$s</xliff:g></b>मध्ये <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> आणि <xliff:g id="TYPE_2">%3$s</xliff:g> सेव्ह करायची?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"सेव्ह करा"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"नाही, नको"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"पासवर्ड"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"पत्ता"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"क्रेडिट कार्ड"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index b2f10c1..3df4e95 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Penderia Badan"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"akses data penderia tentang tanda vital anda"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Benarkan <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> mengakses data penderia tentang tanda vital anda?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Dapatkan kembali kandungan tetingkap"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Periksa kandungan tetingkap yang berinteraksi dengan anda."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Hidupkan Jelajah melalui Sentuhan"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Membenarkan apl menggunakan kaedah untuk menambahkan dan memadamkan templat cap jari untuk digunakan."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"gunakan perkakasan cap jari"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Membenarkan apl menggunakan perkakasan cap jari untuk pengesahan"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Cap jari separa dikesan. Sila cuba lagi."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Tidak dapat memproses cap jari. Sila cuba lagi."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Penderia cap jari kotor. Sila bersihkan dan cuba lagi."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Simpan <xliff:g id="TYPE">%1$s</xliff:g> ke <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Simpan <xliff:g id="TYPE_0">%1$s</xliff:g> dan <xliff:g id="TYPE_1">%2$s</xliff:g> ke <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Simpan <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> dan <xliff:g id="TYPE_2">%3$s</xliff:g> ke <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Simpan"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Tidak, terima kasih"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"kata laluan"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"alamat"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kad kredit"</string>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index f311ab3..db3fdd3 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -30,7 +30,7 @@
<string name="untitled" msgid="4638956954852782576">"<ခေါင်းစဉ်မဲ့>"</string>
<string name="emptyPhoneNumber" msgid="7694063042079676517">"(ဖုန်းနံပါတ်မရှိပါ)"</string>
<string name="unknownName" msgid="6867811765370350269">"မသိရ"</string>
- <string name="defaultVoiceMailAlphaTag" msgid="2660020990097733077">"အသံစာပို့စနစ်"</string>
+ <string name="defaultVoiceMailAlphaTag" msgid="2660020990097733077">"အသံမေးလ်"</string>
<string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string>
<string name="mmiError" msgid="5154499457739052907">"ဆက်သွယ်မှုဆိုင်ရာပြသနာ သို့မဟုတ် မမှန်ကန်သောMMIကုတ်"</string>
<string name="mmiFdnError" msgid="5224398216385316471">"သတ်မှတ်ခေါ်ဆိုနိုင်သောနံပါတ်များထံသာ ကန့်သတ်ထားသည်"</string>
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ခန္ဓာကိုယ် အာရုံခံကိရိယာများ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"သင်၏ အဓိကကျသော လက္ခဏာများအကြောင်း အာရုံခံကိရိယာဒေတာကို ရယူသုံးစွဲရန်"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> အား သင်၏ အရေးကြီးသောလက္ခဏာ အာရုံခံကိရိယာ ဒေတာများကို သုံးခွင့်ပေးလိုပါသလား။"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"တေးဂီတ"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"သင့်တေးဂီတကို ဝင်သုံးသည်"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> အား သင့်တေးဂီတကို ဝင်သုံးခွင့်ပေးလိုပါသလား။"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"ဓာတ်ပုံနှင့် ဗီဒီယိုများ"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"သင့်ဓာတ်ပုံနှင့် ဗီဒီယိုများကို ဝင်သုံးသည်"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> အား သင့်ဓာတ်ပုံနှင့် ဗီဒီယိုများကို ဝင်သုံးခွင့်ပေးလိုပါသလား။"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ဝင်းဒိုးတွင် ပါရှိသည်များကို ပြန်လည်ရယူရန်"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"သင်အသုံးပြုနေသော ဝင်းဒိုးတွင် ပါရှိသည်များကို ကြည့်ရှုစစ်ဆေးသည်။"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"တို့ထိခြင်းဖြင့် ရှာဖွေမှုကို ဖွင့်ရန်"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"အသုံးပြုရန်အတွက် လက်ဗွေရာပုံစံများကို ပေါင်းထည့်ရန် သို့မဟုတ် ဖျက်ရန်နည်းလမ်းများကို အပ်ဖ်အား အသုံးပြုခွင့်ပြုသည်။"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"လက်ဗွေရာပစ္စည်းကို အသုံးပြုမည်"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"စစ်မှန်ကြောင်းအထောက်အထားပြသခြင်းအတွက် လက်ဗွေရာပစ္စည်းကို အသုံးပြုရန် အပ်ဖ်အားခွင့်ပြုသည်။"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"သင့်တေးဂီတ စုစည်းမှုကို ဖတ်ခြင်း"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"အက်ပ်အား သင့်တေးဂီတစုစည်းမှုကို ဖတ်ခွင့်ပေးသည်။"</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"သင့်တေးဂီတ စုစည်းမှုကို ပြုပြင်ခြင်း"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"အက်ပ်အား သင့်တေးဂီတစုစည်းမှုကို ပြုပြင်ခွင့်ပေးသည်။"</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"သင့်ဗီဒီယို စုစည်းမှုကို ဖတ်ခြင်း"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"အက်ပ်အား သင့်ဗီဒီယိုစုစည်းမှုကို ဖတ်ခွင့်ပေးသည်။"</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"သင့်ဗီဒီယို စုစည်းမှုကို ပြုပြင်ခြင်း"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"အက်ပ်အား သင့်ဗီဒီယိုစုစည်းမှုကို ပြုပြင်ခွင့်ပေးသည်။"</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"သင့်ဓာတ်ပုံ စုစည်းမှုကို ဖတ်ခြင်း"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"အက်ပ်အား သင့်ဓာတ်ပုံစုစည်းမှုကို ဖတ်ခွင့်ပေးသည်။"</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"သင့်ဓာတ်ပုံ စုစည်းမှုကို ပြုပြင်ခြင်း"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"အက်ပ်အား သင့်ဓာတ်ပုံစုစည်းမှုကို ပြုပြင်ခွင့်ပေးသည်။"</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"သင့်မီဒီယာစုစည်းမှုမှ တည်နေရာများကို ဖတ်ခြင်း"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"အက်ပ်အား သင့်မီဒီယာစုစည်းမှုမှ တည်နေရာများကို ဖတ်ခွင့်ပေးသည်။"</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"လက်ဗွေရဦ တစ်ပိုင်းတစ်စ တွေ့ရှိသည်။ ကျေးဇူးပြု၍ ထပ်မံကြိုးစားပါ။"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"လက်ဗွေရာယူခြင်း မဆောင်ရွက်နိုင်ပါ။ ထပ်မံကြိုးစားပါ။"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"လက်ဗွေရာဖတ်ကိရိယာ ညစ်ပေနေသည်။ ကျေးဇူးပြု၍ ရှင်းလင်းကာ ထပ်မံကြိုးစားပါ။"</string>
@@ -1873,8 +1893,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> ကို <b><xliff:g id="LABEL">%2$s</xliff:g></b> တွင် သိမ်းဆည်းလိုပါသလား။"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> နှင့် <xliff:g id="TYPE_1">%2$s</xliff:g> ကို <b><xliff:g id="LABEL">%3$s</xliff:g></b> တွင် သိမ်းဆည်းလိုပါသလား။"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>၊ <xliff:g id="TYPE_1">%2$s</xliff:g> နှင့် <xliff:g id="TYPE_2">%3$s</xliff:g> ကို <b><xliff:g id="LABEL">%4$s</xliff:g></b> တွင် သိမ်းဆည်းလိုပါသလား။"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"<b><xliff:g id="LABEL">%1$s</xliff:g></b> သို့ အပ်ဒိတ်လုပ်လိုပါသလား။"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g> ကို <b><xliff:g id="LABEL">%2$s</xliff:g></b> သို့ အပ်ဒိတ်လုပ်လိုပါသလား။"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g> နှင့် <xliff:g id="TYPE_1">%2$s</xliff:g> ကို <b><xliff:g id="LABEL">%3$s</xliff:g></b> သို့ အပ်ဒိတ်လုပ်လိုပါသလား။"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>၊ <xliff:g id="TYPE_1">%2$s</xliff:g> နှင့် <xliff:g id="TYPE_2">%3$s</xliff:g> ကို <b><xliff:g id="LABEL">%4$s</xliff:g></b> သို့ အပ်ဒိတ်လုပ်လိုပါသလား။"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"သိမ်းရန်"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"မလိုပါ"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"အပ်ဒိတ်လုပ်ရန်"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"စကားဝှက်"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"လိပ်စာ"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ခရက်တစ်ကတ်"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index a5bd899..da47ea7 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Kroppssensorer"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"få tilgang til sensordata om de vitale tegnene dine"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Vil du gi <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> tilgang til sensordata om de vitale tegnene dine?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"hente innhold i vinduer"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Appen analyserer innholdet i vinduer du samhandler med."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"slå på berøringsutforsking"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Lar appen fremkalle metoder for å legge til og slette fingeravtrykkmaler for bruk."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"bruke fingeravtrykkmaskinvare"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Lar appen bruke fingeravtrykkmaskinvare til godkjenning"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Deler av fingeravtrykket er registrert. Prøv på nytt."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Kunne ikke registrere fingeravtrykket. Prøv på nytt."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingeravtrykksensoren er skitten. Rengjør den og prøv på nytt."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Vil du lagre <xliff:g id="TYPE">%1$s</xliff:g> i <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Vil du lagre <xliff:g id="TYPE_0">%1$s</xliff:g> og <xliff:g id="TYPE_1">%2$s</xliff:g> i <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Vil du lagre <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> og <xliff:g id="TYPE_2">%3$s</xliff:g> i <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Lagre"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nei takk"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"passord"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresse"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredittkort"</string>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index eac241b..c39b7c8 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"शारीरिक सेन्सर"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"तपाईंको महत्त्वपूर्ण संकेत बारे सेन्सर डेटा पहुँच गर्नुहोस्"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> लाई आफ्ना महत्त्वपूर्ण लक्षणहरूसम्बन्धी सेन्सर डेटामाथि पहुँच राख्न दिने हो?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"विन्डो सामग्रीको पुनःबहाली गर्नुहोस्।"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"तपाईँको अन्तरक्रिया भइरहेको विन्डोको सामग्रीको निरीक्षण गर्नुहोस्।"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"छोएर गरिने खोजलाई सुचारु गर्नुहोस्"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"अनुप्रयोगलाई प्रयोगको लागि औठाछाप टेम्प्लेट थप्न र मेटाउने तरिका आह्वान गर्न अनुमति दिन्छ।"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"औठाछाप हार्डवेयर प्रयोग गर्नुहोस्"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"अनुप्रयोगलाई प्रमाणीकरणको लागि औठाछाप हार्डवेयर प्रयोग गर्न अनुमति दिन्छ"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"आंशिक औठाछाप पत्ता लाग्यो। कृपया फेरि प्रयास गर्नुहोस्।"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"औठाछाप प्रशोधन गर्न सकिएन। कृपया फेरि प्रयास गर्नुहोस्।"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"औँठाछाप सेन्सर फोहोर छ। कृपया सफा गरेर फेरि प्रयास गर्नुहोस्।"</string>
@@ -1878,8 +1918,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> लाई <b><xliff:g id="LABEL">%2$s</xliff:g></b> मा सुरक्षित गर्ने हो?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> र <xliff:g id="TYPE_1">%2$s</xliff:g> लाई <b><xliff:g id="LABEL">%3$s</xliff:g></b> मा सुरक्षित गर्ने हो?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> र <xliff:g id="TYPE_2">%3$s</xliff:g> लाई to <b><xliff:g id="LABEL">%4$s</xliff:g></b> मा सुरक्षित गर्ने हो?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"सुरक्षित गर्नुहोस्"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"पर्दैन, धन्यवाद"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"पासवर्ड"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ठेगाना"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"क्रेडिट कार्ड"</string>
diff --git a/core/res/res/values-night/colors.xml b/core/res/res/values-night/colors.xml
index 688040b..351f8ea 100644
--- a/core/res/res/values-night/colors.xml
+++ b/core/res/res/values-night/colors.xml
@@ -19,12 +19,12 @@
<resources>
<!-- The primary text color if the text is on top of a dark background.
This is also affects colorized notifications with dark backgrounds. -->
- <color name="notification_primary_text_color_dark">#dadada</color>
+ <color name="notification_primary_text_color_dark">#ddffffff</color>
<!-- The secondary text color if the text is on top of a dark background. -->
- <color name="notification_secondary_text_color_dark">#dadada</color>
+ <color name="notification_secondary_text_color_dark">#ddffffff</color>
- <color name="notification_default_color_dark">#dadada</color>
+ <color name="notification_default_color_dark">#ddffffff</color>
<!-- The background color of a notification card. -->
<color name="notification_material_background_color">@*android:color/material_grey_900</color>
diff --git a/core/res/res/values-night/themes_package_installer.xml b/core/res/res/values-night/themes_permission_controller.xml
similarity index 100%
rename from core/res/res/values-night/themes_package_installer.xml
rename to core/res/res/values-night/themes_permission_controller.xml
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 99ee6d4..0e13132 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Lichaamssensoren"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"toegang krijgen tot sensorgegevens over je vitale functies"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> toegang geven tot sensorgegevens over je vitale functies?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Muziek"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"toegang tot je muziek"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> toegang geven tot je muziek?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Foto\'s en video\'s"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"toegang tot je foto\'s en video\'s"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Wil je <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> toegang geven tot je foto\'s en video\'s?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Content van vensters ophalen"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"De content inspecteren van een venster waarmee je interactie hebt."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"\'Verkennen via aanraking\' inschakelen"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Hiermee kan de app methoden aanroepen om vingerafdruksjablonen toe te voegen en te verwijderen voor gebruik."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Vingerafdrukhardware gebruiken"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Hiermee kan de app vingerafdrukhardware gebruiken voor verificatie"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"je muziekcollectie bekijken"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Hiermee sta je de app toe je muziekcollectie te bekijken."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"je muziekcollectie aanpassen"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Hiermee sta je de app toe je muziekcollectie aan te passen."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"je videocollectie bekijken"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Hiermee sta je de app toe je videocollectie te bekijken."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"je videocollectie aanpassen"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Hiermee sta je de app toe je videocollectie aan te passen."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"je fotocollectie bekijken"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Hiermee sta je de app toe je fotocollectie te bekijken."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"je fotocollectie aanpassen"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Hiermee sta je de app toe je fotocollectie aan te passen."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"locaties van je mediacollecties bekijken"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Hiermee sta je de app toe locaties van je mediacollectie te bekijken."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Gedeeltelijke vingerafdruk gedetecteerd. Probeer het opnieuw."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Kan vingerafdruk niet verwerken. Probeer het opnieuw."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"De vingerafdruksensor moet worden schoongemaakt. Probeer het daarna opnieuw."</string>
@@ -1166,7 +1186,7 @@
<string name="volume_music_hint_silent_ringtone_selected" msgid="8310739960973156272">"Stille beltoon ingesteld"</string>
<string name="volume_call" msgid="3941680041282788711">"Volume inkomend gesprek"</string>
<string name="volume_bluetooth_call" msgid="2002891926351151534">"Volume tijdens gesprek in Bluetooth-modus"</string>
- <string name="volume_alarm" msgid="1985191616042689100">"Alarmvolume"</string>
+ <string name="volume_alarm" msgid="1985191616042689100">"Wekkervolume"</string>
<string name="volume_notification" msgid="2422265656744276715">"Meldingsvolume"</string>
<string name="volume_unknown" msgid="1400219669770445902">"Volume"</string>
<string name="volume_icon_description_bluetooth" msgid="6538894177255964340">"Bluetooth-volume"</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> opslaan in <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> en <xliff:g id="TYPE_1">%2$s</xliff:g> opslaan in <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> en <xliff:g id="TYPE_2">%3$s</xliff:g> opslaan in <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Updaten naar <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<xliff:g id="TYPE">%1$s</xliff:g> updaten naar <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<xliff:g id="TYPE_0">%1$s</xliff:g> en <xliff:g id="TYPE_1">%2$s</xliff:g> updaten naar <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> en <xliff:g id="TYPE_2">%3$s</xliff:g> updaten naar <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Opslaan"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nee, bedankt"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Updaten"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"Wachtwoord"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"Adres"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"Creditcard"</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index c86fab8..4d5dd42 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ବଡୀ ସେନ୍ସର୍"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ଆପଣଙ୍କ ଗୁରୁତପୂର୍ଣ୍ଣ ସଂକେତଗୁଡ଼ିକ ବିଷୟରେ ସେନ୍ସର୍ ଡାଟା ଆକ୍ସେସ୍ କରେ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>କୁ ଆପଣଙ୍କ ଗୁରୁତ୍ୱପୂର୍ଣ୍ଣ ଲକ୍ଷଣଗୁଡ଼ିକ ବିଷୟରେ ସେନ୍ସର୍ ଡାଟା ଆକ୍ସେସ୍ କରିବା ପାଇଁ ଅନୁମତି ଦେବେ କି?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ୱିଣ୍ଡୋ କଣ୍ଟେଣ୍ଟ ହାସଲ କରନ୍ତୁ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ଆପଣ କାମ କରୁଥିବା ୱିଣ୍ଡୋର କଣ୍ଟେଣ୍ଟକୁ ଯାଞ୍ଚ କରନ୍ତୁ।"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"ସ୍ପର୍ଶ ଦ୍ୱାରା ଏକ୍ସପ୍ଲୋର୍ ଅନ୍ କରନ୍ତୁ"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ବ୍ୟବହାର କରିବା ପାଇଁ ଆଙ୍ଗୁଠି ଚିହ୍ନ ଯୋଡ଼ିବାକୁ ଓ ଡିଲିଟ୍ କରିବାକୁ ଆପକୁ ବିଧି ଆରମ୍ଭ କରିବାକୁ ଦେଇଥାଏ।"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ଆଙ୍ଗୁଠି ଚିହ୍ନ ହାର୍ଡୱେର୍ ବ୍ୟବହାର କରନ୍ତୁ"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ସ୍ୱୀକୃତି ପାଇଁ ଆଙ୍ଗୁଠି ଚିହ୍ନ ହାର୍ଡୱେର୍ ବ୍ୟବହାର କରିବାକୁ ଅନୁମତି ଦିଏ"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ଆଙ୍ଗୁଠି ଚିହ୍ନ ଆଂଶିକ ଚିହ୍ନଟ ହେଲା। ଦୟାକରି ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ଆଙ୍ଗୁଠି ଚିହ୍ନ ପ୍ରୋସେସ୍ କରାଯାଇପାରିଲା ନାହିଁ। ଦୟାକରି ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ଆଙ୍ଗୁଠି ଚିହ୍ନ ସେନ୍ସର୍ ମଇଳା ହୋଇଯାଇଛି। ଦୟାକରି ସଫା କରନ୍ତୁ ଓ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g></b>ରେ ସେଭ୍ କରିବେ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> ଏବଂ <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b>ରେ ସେଭ୍ କରିବେ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, ଏବଂ <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b>ରେ ସେଭ୍ କରିବେ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"ସେଭ୍ କରନ୍ତୁ"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ନାଁ, ପଚାରିଥିବାରୁ ଧନ୍ୟବାଦ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"ପାସୱର୍ଡ୍"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ଠିକଣା"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"କ୍ରେଡିଟ୍ କାର୍ଡ"</string>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 48c1a38..96fd692 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ਸਰੀਰ ਸੰਵੇਦਕ"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ਆਪਣੇ ਸਰੀਰ ਦੇ ਅਹਿਮ ਚਿੰਨ੍ਹਾਂ ਬਾਰੇ ਸੰਵੇਦਕ ਡਾਟਾ ਤੱਕ ਪਹੁੰਚ ਕਰਨ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"ਕੀ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ਨੂੰ ਤੁਹਾਡੇ ਸਰੀਰ ਦੇ ਅਹਿਮ ਲੱਛਣਾਂ ਸੰਬੰਧੀ ਸੈਂਸਰ ਡਾਟੇ ਤੱਕ ਪਹੁੰਚ ਕਰਨ ਦੇਣੀ ਹੈ?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ਵਿੰਡੋ ਸਮੱਗਰੀ ਮੁੜ ਪ੍ਰਾਪਤ ਕਰਨਾ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ਇੱਕ ਵਿੰਡੋ ਦੀ ਸਮੱਗਰੀ ਦੀ ਜਾਂਚ ਕਰੋ, ਜਿਸ ਨਾਲ ਤੁਸੀਂ ਅੰਤਰਕਿਰਿਆ ਕਰ ਰਹੇ ਹੋ"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"\'ਸਪੱਰਸ਼ ਰਾਹੀਂ ਪੜਚੋਲ ਕਰੋ\' ਚਾਲੂ ਕਰਨਾ"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ਐਪ ਨੂੰ ਵਰਤੋਂ ਲਈ ਫਿੰਗਰਪ੍ਰਿੰਟ ਸ਼ਾਮਲ ਕਰਨ ਅਤੇ ਮਿਟਾਉਣ ਦੀਆਂ ਵਿਧੀਆਂ ਦੀ ਬੇਨਤੀ ਕਰਨ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ।"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਹਾਰਡਵੇਅਰ ਵਰਤੋ"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ਐਪ ਨੂੰ ਪ੍ਰਮਾਣੀਕਰਨ ਲਈ ਫਿੰਗਰਪ੍ਰਿੰਟ ਹਾਰਡਵੇਅਰ ਵਰਤਣ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ਅਧੂਰਾ ਫਿੰਗਰਪ੍ਰਿਟ ਮਿਲਿਆ। ਕਿਰਪਾ ਕਰਕੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਦੀ ਪ੍ਰਕਿਰਿਆ ਨਹੀਂ ਕਰ ਸਕਿਆ। ਕਿਰਪਾ ਕਰਕੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਸੰਵੇਦਕ ਗੰਦਾ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਇਸਨੂੰ ਸਾਫ਼ ਕਰੋ ਅਤੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"ਕੀ <xliff:g id="TYPE">%1$s</xliff:g> ਨੂੰ <b><xliff:g id="LABEL">%2$s</xliff:g></b> ਵਿੱਚ ਰੱਖਿਅਤ ਕਰਨਾ ਹੈ?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"ਕੀ <xliff:g id="TYPE_0">%1$s</xliff:g> ਅਤੇ <xliff:g id="TYPE_1">%2$s</xliff:g> ਨੂੰ <b><xliff:g id="LABEL">%3$s</xliff:g></b> ਵਿੱਚ ਰੱਖਿਅਤ ਕਰਨਾ ਹੈ?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"ਕੀ <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, ਅਤੇ <xliff:g id="TYPE_2">%3$s</xliff:g> ਨੂੰ <b><xliff:g id="LABEL">%4$s</xliff:g></b> ਵਿੱਚ ਰੱਖਿਅਤ ਕਰਨਾ ਹੈ?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"ਰੱਖਿਅਤ ਕਰੋ"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ਨਹੀਂ ਧੰਨਵਾਦ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"ਪਾਸਵਰਡ"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ਪਤਾ"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ਕ੍ਰੈਡਿਟ ਕਾਰਡ"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 188e3e4..dbc5779 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -136,7 +136,7 @@
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Wył."</string>
<string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Preferuj Wi-Fi"</string>
- <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Preferowane mobilne"</string>
+ <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Preferowane komórkowe"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Tylko Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: nieprzekierowane"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Czujniki na ciele"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"dostęp do danych czujnika podstawowych funkcji życiowych"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Zezwolić aplikacji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> na dostęp do danych z czujnika podstawowych funkcji życiowych?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Pobieranie zawartości okna"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Sprawdzanie zawartości okna, z którego korzystasz."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Włączenie czytania dotykiem"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Zezwala aplikacji aktywować metody dodawania i usuwania szablonów odcisków palców."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"używanie czytnika linii papilarnych"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Zezwala aplikacji na używanie czytnika linii papilarnych na potrzeby autoryzacji"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Odcisk palca został odczytany tylko częściowo. Spróbuj ponownie."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Nie udało się przetworzyć odcisku palca. Spróbuj ponownie."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Czytnik linii papilarnych jest zabrudzony. Wyczyść go i spróbuj ponownie."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> – zapisać w: <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> i <xliff:g id="TYPE_1">%2$s</xliff:g> – zapisać w: <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> i <xliff:g id="TYPE_2">%3$s</xliff:g> – zapisać w: <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Zapisz"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nie, dziękuję"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"hasło"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adres"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"karta kredytowa"</string>
diff --git a/core/res/res/values-port/dimens_package_installer.xml b/core/res/res/values-port/dimens_permission_controller.xml
similarity index 100%
rename from core/res/res/values-port/dimens_package_installer.xml
rename to core/res/res/values-port/dimens_permission_controller.xml
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index 6c0391c..ad68dde 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -33,7 +33,7 @@
<string name="defaultVoiceMailAlphaTag" msgid="2660020990097733077">"Correio de voz"</string>
<string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string>
<string name="mmiError" msgid="5154499457739052907">"Problema de conexão ou código MMI inválido."</string>
- <string name="mmiFdnError" msgid="5224398216385316471">"A operação é limitada somente a números de chamadas fixas."</string>
+ <string name="mmiFdnError" msgid="5224398216385316471">"A operação é limitada somente a números de discagem fixa."</string>
<string name="mmiErrorWhileRoaming" msgid="762488890299284230">"Não é possível alterar as configurações de encaminhamento de chamada do seu smartphone em roaming."</string>
<string name="serviceEnabled" msgid="8147278346414714315">"O serviço foi ativado."</string>
<string name="serviceEnabledFor" msgid="6856228140453471041">"O serviço foi ativado para:"</string>
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensores corporais"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"acesse dados do sensor sobre seus sinais vitais"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse os dados do sensor sobre seus sinais vitais?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Músicas"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"acessar suas músicas"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Permitir que o app <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse suas músicas?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Fotos e vídeos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"acessar suas fotos e seus vídeos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Permitir que o app <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse suas fotos e seus vídeos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Acessar conteúdo de uma janela"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspeciona o conteúdo de uma janela com a qual você está interagindo."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Ativar Explorar por toque"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite que o app execute métodos para adicionar e excluir modelos de impressão digital para uso."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"usar hardware de impressão digital"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite que o app use hardware de impressão digital para autenticação."</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"ler sua coleção de músicas"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Permite que o app leia sua coleção de músicas."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modificar sua coleção de músicas"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Permite que o app modifique sua coleção de músicas."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"ler sua coleção de vídeos"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Permite que o app leia sua coleção de vídeos."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modificar sua coleção de vídeos"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Permite que o app modifique sua coleção de vídeos."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"ler sua coleção de fotos"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Permite que o app leia sua coleção de fotos."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modificar sua coleção de fotos"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Permite que o app modifique sua coleção de fotos."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"ler locais na sua coleção de mídias"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Permite que o app leia os locais na sua coleção de mídias."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Impressão digital parcial detectada. Tente novamente."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Não foi possível processar a impressão digital. Tente novamente."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"O sensor de impressão digital está sujo. Limpe-o e tente novamente."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Salvar <xliff:g id="TYPE">%1$s</xliff:g> em <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Salvar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> em <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Salvar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> em <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Atualizar no <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Atualizar <xliff:g id="TYPE">%1$s</xliff:g> no <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Atualizar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> no <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Atualizar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> no <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Salvar"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Não, obrigado"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Atualizar"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"senha"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"endereço"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"cartão de crédito"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 597be12..631e9f3 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensores de corpo"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"aceder a dados do sensor acerca dos seus sinais vitais"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Pretende permitir que a aplicação <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aceda aos dados do sensor acerca dos seus sinais vitais?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Música"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"aceder à sua música"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Pretende permitir que a aplicação <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aceda à sua música?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Fotos e vídeos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"aceder aos seus vídeos e fotos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Pretende permitir que a aplicação <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aceda às suas fotos e vídeos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Obter conteúdo da janela"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspecionar o conteúdo de uma janela com a qual está a interagir."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Ativar Explorar Através do Toque"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite que a aplicação invoque métodos para adicionar e eliminar modelos de impressão digital para utilização."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"utilizar o hardware de impressão digital"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite que a aplicação utilize o hardware de impressão digital para autenticação"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"ler a sua coleção de música"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Permite que a aplicação leia a sua coleção de música."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modificar a sua coleção de música"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Permite que a aplicação modifique a sua coleção de música."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"ler a sua coleção de vídeos"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Permite que a aplicação leia a sua coleção de vídeos."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modificar a sua coleção de vídeos"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Permite que a aplicação modifique a sua coleção de vídeos."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"ler a sua coleção de fotos"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Permite que a aplicação leia a sua coleção de fotos."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modificar a sua coleção de fotos"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Permite que a aplicação modifique a sua coleção de fotos."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"ler as localizações a partir da sua coleção de multimédia"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Permite que a aplicação leia as localizações a partir da sua coleção de multimédia."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Impressão digital detetada. Tente novamente."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Não foi possível processar a impressão digital. Tente novamente."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"O sensor de impressões digitais está sujo. Limpe-o e tente novamente."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Pretende guardar <xliff:g id="TYPE">%1$s</xliff:g> no <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Pretende guardar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> no <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Pretende guardar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> no <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Pretende atualizar para o <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Pretende atualizar <xliff:g id="TYPE">%1$s</xliff:g> para o <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Pretende atualizar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> para o <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Pretende atualizar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> para o <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Guardar"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Não, obrigado"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Atualizar"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"palavra-passe"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"endereço"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"cartão de crédito"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 6c0391c..ad68dde 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -33,7 +33,7 @@
<string name="defaultVoiceMailAlphaTag" msgid="2660020990097733077">"Correio de voz"</string>
<string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string>
<string name="mmiError" msgid="5154499457739052907">"Problema de conexão ou código MMI inválido."</string>
- <string name="mmiFdnError" msgid="5224398216385316471">"A operação é limitada somente a números de chamadas fixas."</string>
+ <string name="mmiFdnError" msgid="5224398216385316471">"A operação é limitada somente a números de discagem fixa."</string>
<string name="mmiErrorWhileRoaming" msgid="762488890299284230">"Não é possível alterar as configurações de encaminhamento de chamada do seu smartphone em roaming."</string>
<string name="serviceEnabled" msgid="8147278346414714315">"O serviço foi ativado."</string>
<string name="serviceEnabledFor" msgid="6856228140453471041">"O serviço foi ativado para:"</string>
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensores corporais"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"acesse dados do sensor sobre seus sinais vitais"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse os dados do sensor sobre seus sinais vitais?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Músicas"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"acessar suas músicas"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Permitir que o app <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse suas músicas?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Fotos e vídeos"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"acessar suas fotos e seus vídeos"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Permitir que o app <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse suas fotos e seus vídeos?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Acessar conteúdo de uma janela"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspeciona o conteúdo de uma janela com a qual você está interagindo."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Ativar Explorar por toque"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite que o app execute métodos para adicionar e excluir modelos de impressão digital para uso."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"usar hardware de impressão digital"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite que o app use hardware de impressão digital para autenticação."</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"ler sua coleção de músicas"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Permite que o app leia sua coleção de músicas."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"modificar sua coleção de músicas"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Permite que o app modifique sua coleção de músicas."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"ler sua coleção de vídeos"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Permite que o app leia sua coleção de vídeos."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"modificar sua coleção de vídeos"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Permite que o app modifique sua coleção de vídeos."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"ler sua coleção de fotos"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Permite que o app leia sua coleção de fotos."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"modificar sua coleção de fotos"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Permite que o app modifique sua coleção de fotos."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"ler locais na sua coleção de mídias"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Permite que o app leia os locais na sua coleção de mídias."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Impressão digital parcial detectada. Tente novamente."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Não foi possível processar a impressão digital. Tente novamente."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"O sensor de impressão digital está sujo. Limpe-o e tente novamente."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Salvar <xliff:g id="TYPE">%1$s</xliff:g> em <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Salvar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> em <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Salvar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> em <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Atualizar no <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Atualizar <xliff:g id="TYPE">%1$s</xliff:g> no <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Atualizar <xliff:g id="TYPE_0">%1$s</xliff:g> e <xliff:g id="TYPE_1">%2$s</xliff:g> no <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Atualizar <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> e <xliff:g id="TYPE_2">%3$s</xliff:g> no <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Salvar"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Não, obrigado"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Atualizar"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"senha"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"endereço"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"cartão de crédito"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 05aed44..ab276df 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>
@@ -303,6 +303,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Senzori corporali"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"acceseze datele de la senzori despre semnele vitale"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Permiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să acceseze datele de la senzori despre semnele dvs. vitale?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Analizează conținutul ferestrei"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspectează conținutul unei ferestre cu care interacționați."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Activează funcția Explorați prin atingere"</string>
@@ -497,6 +509,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Permite aplicației să invoce metode pentru a adăuga și pentru a șterge șabloane de amprentă pentru utilizare."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"folosește hardware-ul pentru amprentă"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Permite aplicației să folosească hardware pentru amprentă pentru autentificare"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"S-a detectat parțial amprenta. Încercați din nou."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Amprenta nu a putut fi procesată. Încercați din nou."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Senzorul pentru amprente este murdar. Curățați-l și încercați din nou."</string>
@@ -1907,8 +1947,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Salvați <xliff:g id="TYPE">%1$s</xliff:g> în <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Salvați <xliff:g id="TYPE_0">%1$s</xliff:g> și <xliff:g id="TYPE_1">%2$s</xliff:g> în <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Salvați <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> și <xliff:g id="TYPE_2">%3$s</xliff:g> în <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Salvați"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nu, mulțumesc"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"parolă"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresă"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"card de credit"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 63a8574..de009a6 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Нательные датчики"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"доступ к данным датчиков о состоянии организма"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Разрешить приложению <b>\"<xliff:g id="APP_NAME">%1$s</xliff:g>\"</b> доступ к данным датчиков о состоянии организма?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Получать содержимое окна"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Анализировать содержимое активного окна."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Включать Изучение касанием"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Приложение сможет добавлять и удалять шаблоны отпечатков пальцев."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"Использование сканера отпечатков"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Приложение сможет использовать сканер отпечатков пальцев для аутентификации."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Отсканирована только часть пальца. Повторите попытку."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Не удалось распознать отпечаток. Повторите попытку."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Очистите сканер и повторите попытку."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Сохранить <xliff:g id="TYPE">%1$s</xliff:g> в <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Сохранить <xliff:g id="TYPE_0">%1$s</xliff:g> и <xliff:g id="TYPE_1">%2$s</xliff:g> в <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Сохранить <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> и <xliff:g id="TYPE_2">%3$s</xliff:g> в <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Сохранить"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Нет, спасибо"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"Пароль"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"Адрес"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"Банковская карта"</string>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index a3e3ea0..bdc0c7b 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"ශරීර සංවේදක"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ඔබේ ජෛව ලක්ෂණ පිළිබඳ සංවේදක දත්ත වෙත පිවිසෙන්න"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g><b> වෙත ඔබගේ ජෛව ලක්ෂණ පිළිබඳ සංවේදක දත්ත වෙත ප්රවේශ වීමට ඉඩ දෙන්නද?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"කවුළු අන්න්තර්ගතය ලබාගන්න"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ඔබ අන්තර්ක්රියාකාරී වන කවුළුවේ අන්තර්ගතය පරීක්ෂා කරන්න."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"ස්පර්ශයෙන් ගවේෂණය සක්රිය කරන්න"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ඇඟිලි සලකුණු සැකිලි එකතු කිරීමට සහ ඉවත් කිරීමට අදාළ විධික්රම භාවිතය සඳහා මෙම යෙදුමට අවසර දෙයි."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ඇඟිලි සලකුණු දෘඩාංග භාවිතා කරන්න."</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"අනන්යතාවය තහවුරු කරගැනීමට ඇඟිලි සලකුණු දෘඩාංග භාවිතා කිරීමට මෙම යෙදුමට ඉඩ දෙන්න."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ඇඟිලි සලකුණ අඩ වශයෙන් අනාවරණය කර ගැනිණි. කරුණාකර නැවත උත්සාහ කරන්න."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ඇඟිලි සලකුණ පිරිසැකසීමට නොහැකි විය. කරුණාකර නැවත උත්සාහ කරන්න."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"ඇඟිලි සලකුණු සංවේදකය අපිරිසිදුයි. කරුණාකර පිරිසිදු කර නැවත උත්සාහ කරන්න."</string>
@@ -1874,8 +1914,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g></b> වෙත සුරකින්නද?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> සහ <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b> වෙත සුරකින්නද?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, සහ <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b> වෙත සුරකින්නද?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"සුරකින්න"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"එපා ස්තූතියි"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"මුරපදය"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ලිපිනය"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ණය කාඩ්පත"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 8f29cb7..f46771a 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>
@@ -306,6 +306,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Telesné senzory"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"prístup k dátam senzorov vašich životných funkcií"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Povoliť aplikácii <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> používať údaje senzorov o vašich životných funkciách?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Načítať obsah okna"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Môžete preskúmať obsah okna, s ktorým pracujete."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Zapnúť funkciu Preskúmanie dotykom"</string>
@@ -500,6 +512,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Umožňuje aplikácii zavolať metódy, ktoré pridávajú a odstraňujú vzory odtlačkov prstov."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"použiť hardvér na snímanie odtlačkov prstov"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Umožňuje aplikácii používať na overenie totožnosti hardvér na snímanie odtlačkov prstov."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Podarilo sa rozpoznať iba časť odtlačku prsta. Skúste to znova."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Odtlačok prsta sa nepodarilo spracovať. Skúste to znova."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Snímač odtlačkov je špinavý. Vyčistite ho a skúste to znova."</string>
@@ -1942,8 +1982,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Uložiť <xliff:g id="TYPE">%1$s</xliff:g> do služby <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Uložiť <xliff:g id="TYPE_0">%1$s</xliff:g> a <xliff:g id="TYPE_1">%2$s</xliff:g> do služby <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Uložiť <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> a <xliff:g id="TYPE_2">%3$s</xliff:g> do služby <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Uložiť"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nie, vďaka"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"heslo"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresa"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditná karta"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 3e035bf..0f9d038 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>
@@ -306,6 +306,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Tipala telesnih funkcij"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"dostop do podatkov tipala o vaših vitalnih znakih"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Želite aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> omogočiti dostop do podatkov tipala o vitalnih znakih?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Glasba"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"dostop do glasbe"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Želite aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> omogočiti dostop do glasbe?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Fotografije in videoposnetki"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"dostop do fotografij in videoposnetkov"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Želite aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> omogočiti dostop do fotografij in videoposnetkov?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Pridobiti vsebino okna"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Preverjanje vsebine okna, ki ga uporabljate."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Vklopiti raziskovanje z dotikom"</string>
@@ -500,6 +506,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Aplikaciji omogoča sprožanje načinov za dodajanje in brisanje predlog s prstnimi odtisi za uporabo."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"uporaba strojne opreme za prstne odtise"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Aplikaciji omogoča uporabo strojne opreme za prstne odtise za preverjanje pristnosti"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"branje glasbene zbirke"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Aplikaciji omogoča branje glasbene zbirke."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"spreminjanje glasbene zbirke"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Aplikaciji omogoča spreminjanje glasbene zbirke."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"branje zbirke videoposnetkov"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Aplikaciji omogoča branje zbirke videoposnetkov."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"spreminjanje zbirke videoposnetkov"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Aplikaciji omogoča spreminjanje zbirke videoposnetkov."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"branje zbirke fotografij"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Aplikaciji omogoča branje zbirke fotografij."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"spreminjanje zbirke fotografij"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Aplikaciji omogoča spreminjanje zbirke fotografij."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"branje lokacij v predstavnostni zbirki"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Aplikaciji omogoča branje lokacij v predstavnostni zbirki."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Zaznan delni prstni odtis. Poskusite znova."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Prstnega odtisa ni bilo mogoče obdelati. Poskusite znova."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Tipalo prstnih odtisov je umazano. Očistite ga in poskusite znova."</string>
@@ -1942,8 +1962,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Želite <xliff:g id="TYPE">%1$s</xliff:g> shraniti pod oznako <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Želite <xliff:g id="TYPE_0">%1$s</xliff:g> in <xliff:g id="TYPE_1">%2$s</xliff:g> shraniti pod oznako <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Želite <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> in <xliff:g id="TYPE_2">%3$s</xliff:g> shraniti pod oznako <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Želite posodobiti na oznako <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Želite <xliff:g id="TYPE">%1$s</xliff:g> posodobiti na oznako <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Želite <xliff:g id="TYPE_0">%1$s</xliff:g> in <xliff:g id="TYPE_1">%2$s</xliff:g> posodobiti na oznako <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Želite <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> in <xliff:g id="TYPE_2">%3$s</xliff:g> posodobiti na oznako <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Shrani"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ne, hvala"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Posodobi"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"geslo"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"naslov"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditno kartico"</string>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index bb42da4..15888fb 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Sensorët e trupit"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"qasu tek të dhënat e sensorëve rreth shenjave të tua jetësore"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Të lejohet që <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> të ketë qasje te të dhënat e sensorëve rreth shenjave të tua jetësore?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Nxjerrë përmbajtjen e dritares"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Inspekton përmbajtjen e dritares me të cilën po ndërvepron."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Aktivizojë funksionin \"Eksploro me prekje\""</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"E lejon aplikacionin që të aktivizojë metoda për të shtuar dhe për të fshirë shabllonet e gjurmës së gishtit për përdorim."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"përdor harduerin e gjurmës së gishtit"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"E lejon aplikacionin që të përdorë harduerin e gjurmës së gishtit për verifikim"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"U zbulua një gjurmë gishti e pjesshme. Provo përsëri."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Gjurma e gishtit nuk mund të përpunohej. Provo përsëri."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Sensori i gjurmës së gishtit nuk është i pastër. Pastroje dhe provo përsëri."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Të ruhet <xliff:g id="TYPE">%1$s</xliff:g> te <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Të ruhen <xliff:g id="TYPE_0">%1$s</xliff:g> dhe <xliff:g id="TYPE_1">%2$s</xliff:g> te <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Të ruhen <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> dhe <xliff:g id="TYPE_2">%3$s</xliff:g> te <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Ruaj"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Jo, faleminderit"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"fjalëkalimi"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adresa"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"karta e kreditit"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index fa1dc59..4c86605 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -303,6 +303,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Сензори за тело"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"приступа подацима сензора о виталним функцијама"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Желите ли да омогућите да <b><xliff:g id="APP_NAME">%1$s</xliff:g></b>приступа подацима сензора о виталним функцијама?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"да преузима садржај прозора"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Проверава садржај прозора са којим остварујете интеракцију."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"да укључи Истраживања додиром"</string>
@@ -497,6 +509,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Дозвољава апликацији да активира методе за додавање и брисање шаблона отисака прстију који ће се користити."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"користи хардвер за отиске прстију"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Дозвољава апликацији да користи хардвер за отиске прстију ради потврде аутентичности"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Откривен је делимични отисак прста. Пробајте поново."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Није успела обрада отиска прста. Пробајте поново."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Сензор за отиске прстију је прљав. Очистите га и покушајте поново."</string>
@@ -1907,8 +1947,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Желите ли да сачувате ставку <xliff:g id="TYPE">%1$s</xliff:g> у: <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Желите ли да сачувате ставке <xliff:g id="TYPE_0">%1$s</xliff:g> и <xliff:g id="TYPE_1">%2$s</xliff:g> у: <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Желите ли да сачувате ставке <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> и <xliff:g id="TYPE_2">%3$s</xliff:g> у: <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Сачувај"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Не, хвала"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"лозинка"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"адреса"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"кредитна картица"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 7b9005c50..1f3efe0 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Kroppssensorer"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"få åtkomst till sensordata om dina vitalparametrar"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Vill du ge <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> åtkomst till sensordata om vitalparametrar?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Hämta fönsterinnehåll"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Granska innehållet i ett fönster som du interagerar med."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Aktivera Explore by touch"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Tillåter att appen anropar metoder för att lägga till och radera fingeravtrycksmallar."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"använda maskinvara för fingeravtryck"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Tillåter att appen använder maskinvara för fingeravtryck vid autentisering"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Ofullständigt fingeravtryck. Försök igen."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Det gick inte att bearbeta fingeravtrycket. Försök igen."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Fingeravtryckssensorn är smutsig. Rengör den och försök igen."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Vill du spara <xliff:g id="TYPE">%1$s</xliff:g> i <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Vill du spara <xliff:g id="TYPE_0">%1$s</xliff:g> och <xliff:g id="TYPE_1">%2$s</xliff:g> i <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Vill du spara <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> och <xliff:g id="TYPE_2">%3$s</xliff:g> i <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Spara"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Nej tack"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"lösenordet"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adressen"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kreditkortet"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 9d8790d..5a7dcca 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -298,6 +298,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Vihisi vya Mwili"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"fikia data ya kitambuzi kuhusu alama zako muhimu"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Ungependa kuiruhusu <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ifikie data ya vitambuzi kuhusu viashiria muhimu vya mwili wako?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Muziki"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"kufikia muziki wako"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Ungependa kuiruhusu <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ifikie muziki wako?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Picha na Video"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"kufikia picha na video zako"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Ungependa kuruhusu <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ifikie picha na video zako?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Kufikia maudhui ya dirisha"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Kuchunguza maudhui ya dirisha unalotumia."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Kuwasha \'Chunguza kwa Kugusa\'"</string>
@@ -492,6 +498,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Huruhusu programu kuomba njia za kuongeza na kufuta violezo vya kitambulisho kwa matumizi."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"tumia maunzi ya kitambulisho"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Huruhusu programu kutumia maunzi ya kitambulisho kwa uthibitisho"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"kusoma mkusanyiko muziki wako"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Inaruhusu programu kusoma mkusanyiko wa muziki wako."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"kubadilisha mkusanyiko wa muziki wako"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Inaruhusu programu kubadilisha mkusanyiko wa muziki wako."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"kusoma mkusanyiko wa video zako"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Inaruhusu programu kusoma mkusanyiko wa video zako."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"kubadilisha mkusanyiko wa video zako"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Inaruhusu programu kubadilisha mkusanyiko wa video zako."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"kusoma mkusanyiko wa picha zako"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Inaruhusu programu kusoma mkusanyiko wa picha zako."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"kubadilisha mkusanyiko wa picha zako"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Inaruhusu programu kubadilisha mkusanyiko wa picha zako."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"kusoma maeneo kwenye mkusanyiko wa vipengee vyako"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Inaruhusu programu kusoma maeneo kwenye mkusanyiko wa vipengee vyako."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Kitambuzi kimegundua sehemu ya kitambulisho. Tafadhali jaribu tena."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Haikuweza kuchakata kitambulisho. Tafadhali jaribu tena."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Kitambuzi alama ya kidole ni kichafu. Tafadhali kisafishe na ujaribu tena."</string>
@@ -1870,8 +1890,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Ungependa kuhifadhi <xliff:g id="TYPE">%1$s</xliff:g> kwenye <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Ungependa kuhifadhi <xliff:g id="TYPE_0">%1$s</xliff:g> na <xliff:g id="TYPE_1">%2$s</xliff:g> kwenye <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Ungependa kuhifadhi <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, na <xliff:g id="TYPE_2">%3$s</xliff:g> kwenye <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Ungependa kusasisha kuwa <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Ungependa kusasisha <xliff:g id="TYPE">%1$s</xliff:g> kuwa <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Ungependa kusasisha <xliff:g id="TYPE_0">%1$s</xliff:g> na <xliff:g id="TYPE_1">%2$s</xliff:g> kuwa <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Ungependa kusasisha <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> na <xliff:g id="TYPE_2">%3$s</xliff:g> kuwa <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Hifadhi"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Hapana, asante"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Sasisha"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"nenosiri"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"anwani"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kadi ya mikopo"</string>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 0edf58c..00143b9 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -60,7 +60,7 @@
<string name="ClirMmi" msgid="7784673673446833091">"வெளிசெல்லும் அழைப்பாளர் ஐடி"</string>
<string name="ColpMmi" msgid="3065121483740183974">"இணைக்கப்பட்ட லைன் ஐடி"</string>
<string name="ColrMmi" msgid="4996540314421889589">"இணைக்கப்பட்ட லைன் ஐடியை வரம்பிடல்"</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>
@@ -88,7 +88,7 @@
<string name="EmergencyCallWarningTitle" msgid="813380189532491336">"அவசர அழைப்பைச் செய்ய முடியாது"</string>
<string name="EmergencyCallWarningSummary" msgid="1899692069750260619">"வைஃபை மூலம் அவசர அழைப்புகளைச் செய்ய முடியாது"</string>
<string name="notification_channel_network_alert" msgid="4427736684338074967">"விழிப்பூட்டல்கள்"</string>
- <string name="notification_channel_call_forward" msgid="2419697808481833249">"அழைப்புப் பகிர்வு"</string>
+ <string name="notification_channel_call_forward" msgid="2419697808481833249">"அழைப்பு திருப்பிவிடுதல்"</string>
<string name="notification_channel_emergency_callback" msgid="6686166232265733921">"அவசரகாலத் திரும்ப அழைக்கும் பயன்முறை"</string>
<string name="notification_channel_mobile_data_status" msgid="4575131690860945836">"மொபைல் டேட்டாவின் நிலை"</string>
<string name="notification_channel_sms" msgid="3441746047346135073">"SMS செய்திகள்"</string>
@@ -272,7 +272,7 @@
<string name="permgrouprequest_contacts" msgid="6032805601881764300">"தொடர்புகளை அணுகுவதற்கு <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
<string name="permgrouplab_location" msgid="7275582855722310164">"இருப்பிடம்"</string>
<string name="permgroupdesc_location" msgid="1346617465127855033">"இந்தச் சாதனத்தின் இருப்பிடத்தை அறிந்து கொள்ள"</string>
- <string name="permgrouprequest_location" msgid="3788275734953323491">"இந்தச் சாதனத்தின் இருப்பிடத்தை அணுகுவதற்கு <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
+ <string name="permgrouprequest_location" msgid="3788275734953323491">"இந்தச் சாதனத்தின் இருப்பிடத்தை அணுகுவதற்கு <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ஆப்ஸை அனுமதிக்கவா?"</string>
<string name="permgrouprequestdetail_location" msgid="1113400215566814664">"இந்த ஆப்ஸைப் பயன்படுத்தும் சமயத்தில் மட்டுமே, இது உங்கள் இருப்பிடத்தை அணுகும்."</string>
<string name="permgroupbackgroundrequest_location" msgid="8461841153030844390">"இதன் இருப்பிடத்தை எப்போதுமே <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> அணுக அனுமதிக்கவா?"</string>
<string name="permgroupbackgroundrequestdetail_location" msgid="1715668276378108654">"இந்த ஆப்ஸைப் பயன்படுத்தாத சமயங்களில் கூட, இது உங்கள் இருப்பிடத்தை அணுகும்."</string>
@@ -281,7 +281,7 @@
<string name="permgrouprequest_calendar" msgid="289900767793189421">"கேலெண்டரை அணுகுவதற்கு <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
<string name="permgrouplab_sms" msgid="228308803364967808">"SMS"</string>
<string name="permgroupdesc_sms" msgid="4656988620100940350">"SMS அனுப்பலாம், வந்த SMSகளைப் பார்க்கலாம்"</string>
- <string name="permgrouprequest_sms" msgid="7168124215838204719">"மெசேஜ்களை அனுப்பவும், அவற்றைப் பார்க்கவும் <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
+ <string name="permgrouprequest_sms" msgid="7168124215838204719">"மெசேஜ்களை அனுப்பவும், பார்க்கவும் <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ஆப்ஸை அனுமதிக்கவா?"</string>
<string name="permgrouplab_storage" msgid="1971118770546336966">"சேமிப்பிடம்"</string>
<string name="permgroupdesc_storage" msgid="637758554581589203">"உங்கள் சாதனத்தில் உள்ள படங்கள், மீடியா மற்றும் கோப்புகளை அணுக வேண்டும்"</string>
<string name="permgrouprequest_storage" msgid="7885942926944299560">"உங்கள் சாதனத்திலுள்ள படங்கள், மீடியா, ஃபைல்கள் ஆகியவற்றை அணுகுவதற்கு <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
@@ -296,10 +296,22 @@
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"உங்கள் மொபைல் அழைப்புப் பதிவுகளை அணுக, <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ஆப்ஸை அனுமதிக்கவா?"</string>
<string name="permgrouplab_phone" msgid="5229115638567440675">"ஃபோன்"</string>
<string name="permgroupdesc_phone" msgid="6234224354060641055">"யாரையும் தொலைபேசியில் அழைக்கலாம்"</string>
- <string name="permgrouprequest_phone" msgid="9166979577750581037">"மொபைல் அழைப்புகள் செய்யவும், அவற்றை நிர்வகிக்கவும், <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
+ <string name="permgrouprequest_phone" msgid="9166979577750581037">"மொபைல் அழைப்புகள் செய்யவும், அவற்றை நிர்வகிக்கவும், <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ஆப்ஸை அனுமதிக்கவா?"</string>
<string name="permgrouplab_sensors" msgid="416037179223226722">"உடல் சென்சார்கள்"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"உங்கள் உடல் இயக்கம் பற்றி உணர்விகள் கூறும் தகவலைப் பார்க்கலாம்"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"உங்கள் உடலியக்கக் குறிகள் பற்றிய சென்சார் தரவை அணுகுவதற்கு <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> பயன்பாட்டை அனுமதிக்கவா?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"சாளர உள்ளடக்கத்தைப் பெறும்"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"நீங்கள் பணியாற்றிக் கொண்டிருக்கும் சாளரத்தின் உள்ளடக்கத்தைப் பார்க்கலாம்."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"தொடுவதன் மூலம் அறிவதை இயக்கும்"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"பயன்படுத்துவதற்காக, கைரேகை டெம்ப்ளேட்களைச் சேர்க்க மற்றும் நீக்குவதற்கான செயல்முறைகளை இயக்குவதற்குப் பயன்பாட்டை அனுமதிக்கும்."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"கைரேகை வன்பொருளைப் பயன்படுத்து"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"அங்கீகரிப்பதற்கு, கைரேகை வன்பொருளைப் பயன்படுத்த, பயன்பாட்டை அனுமதிக்கும்"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"கைரேகையை ஓரளவுதான் கண்டறிய முடிந்தது. மீண்டும் முயலவும்."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"கைரேகையைச் செயலாக்க முடியவில்லை. மீண்டும் முயலவும்."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"கைரேகை உணர்வியில் தூசி உள்ளது. சுத்தம் செய்து, முயலவும்."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>ஐ <b><xliff:g id="LABEL">%2$s</xliff:g></b> இல் சேமிக்கவா?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> மற்றும் <xliff:g id="TYPE_1">%2$s</xliff:g>ஐ <b><xliff:g id="LABEL">%3$s</xliff:g></b> இல் சேமிக்கவா?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, <xliff:g id="TYPE_2">%3$s</xliff:g> ஆகியவற்றை <b><xliff:g id="LABEL">%4$s</xliff:g></b> இல் சேமிக்கவா?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"சேமி"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"வேண்டாம்"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"கடவுச்சொல்"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"முகவரி"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"கிரெடிட் கார்டு"</string>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 98b737f..e3f089a 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"శరీర సెన్సార్లు"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"మీ అత్యంత కీలకమైన గుర్తుల గురించి సెన్సార్ డేటాని యాక్సెస్ చేస్తుంది"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"మీ అత్యంత కీలకమైన గుర్తుల గురించి సెన్సార్ డేటాని యాక్సెస్ చేయడానికి <b><xliff:g id="APP_NAME">%1$s</xliff:g></b>ని అనుమతించాలా?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"విండో కంటెంట్ను తిరిగి పొందుతుంది"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"మీరు పరస్పర చర్య చేస్తున్న విండో కంటెంట్ను పరిశీలిస్తుంది."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"తాకడం ద్వారా విశ్లేషణను ప్రారంభిస్తుంది"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"వినియోగం కోసం వేలిముద్ర టెంప్లేట్లను జోడించే మరియు తొలగించే పద్ధతులను అమలు చేయడానికి యాప్ను అనుమతిస్తుంది."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"వేలిముద్ర హార్డ్వేర్ని ఉపయోగించడానికి అనుమతి"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ప్రామాణీకరణ కోసం వేలిముద్ర హార్డ్వేర్ను ఉపయోగించడానికి అనువర్తనాన్ని అనుమతిస్తుంది"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"పాక్షిక వేలిముద్ర గుర్తించబడింది. దయచేసి మళ్లీ ప్రయత్నించండి."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"వేలిముద్రను ప్రాసెస్ చేయడం సాధ్యపడలేదు. దయచేసి మళ్లీ ప్రయత్నించండి."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"వేలిముద్ర సెన్సార్ మురికిగా ఉంది. దయచేసి శుభ్రపరిచి, మళ్లీ ప్రయత్నించండి."</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>ని <b><xliff:g id="LABEL">%2$s</xliff:g></b>కు సేవ్ చేయాలా?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> మరియు <xliff:g id="TYPE_1">%2$s</xliff:g>లను <b><xliff:g id="LABEL">%3$s</xliff:g></b>కు సేవ్ చేయాలా?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> మరియు <xliff:g id="TYPE_2">%3$s</xliff:g>లను <b><xliff:g id="LABEL">%4$s</xliff:g></b>కు సేవ్ చేయాలా?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"సేవ్ చేయి"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"వద్దు, ధన్యవాదాలు"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"పాస్వర్డ్"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"చిరునామా"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"క్రెడిట్ కార్డ్"</string>
diff --git a/core/res/res/values-television/themes_device_defaults.xml b/core/res/res/values-television/themes_device_defaults.xml
index e380a7b..293591a 100644
--- a/core/res/res/values-television/themes_device_defaults.xml
+++ b/core/res/res/values-television/themes_device_defaults.xml
@@ -18,4 +18,5 @@
<style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" />
<style name="Theme.DeviceDefault.Autofill" parent="Theme.Material.Autofill" />
<style name="Theme.DeviceDefault.Autofill.Save" parent="Theme.Material.Autofill.Save" />
+ <style name="Theme.DeviceDefault.Resolver" parent="Theme.Leanback.Resolver" />
</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 89c2e44..5375278 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"เซ็นเซอร์ร่างกาย"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"เข้าถึงข้อมูลเซ็นเซอร์เกี่ยวกับสัญญาณชีพของคุณ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"อนุญาตให้ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> เข้าถึงข้อมูลเซ็นเซอร์เกี่ยวกับสัญญาณชีพไหม"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"เรียกข้อมูลเนื้อหาของหน้าต่าง"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"ตรวจสอบเนื้อหาของหน้าต่างที่คุณกำลังโต้ตอบอยู่"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"เปิด \"แตะเพื่อสำรวจ\""</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"อนุญาตให้แอปเรียกใช้วิธีการเพื่อเพิ่มและลบเทมเพลตลายนิ้วมือสำหรับการใช้งาน"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"ใช้ฮาร์ดแวร์ลายนิ้วมือ"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"อนุญาตให้แอปใช้ฮาร์ดแวร์ลายนิ้วมือเพื่อตรวจสอบสิทธิ์"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"ตรวจพบลายนิ้วมือเพียงบางส่วน โปรดลองอีกครั้ง"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"ไม่สามารถประมวลผลลายนิ้วมือได้ โปรดลองอีกครั้ง"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"เซ็นเซอร์ลายนิ้วมือไม่สะอาด โปรดทำความสะอาดและลองอีกครั้ง"</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"บันทึก <xliff:g id="TYPE">%1$s</xliff:g> ไปยัง <b><xliff:g id="LABEL">%2$s</xliff:g></b> ใช่ไหม"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"บันทึก <xliff:g id="TYPE_0">%1$s</xliff:g> และ <xliff:g id="TYPE_1">%2$s</xliff:g> ไปยัง <b><xliff:g id="LABEL">%3$s</xliff:g></b> ใช่ไหม"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"บันทึก <xliff:g id="TYPE_0">%1$s</xliff:g> <xliff:g id="TYPE_1">%2$s</xliff:g> และ <xliff:g id="TYPE_2">%3$s</xliff:g> ไปยัง <b><xliff:g id="LABEL">%4$s</xliff:g></b> ใช่ไหม"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"บันทึก"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"ไม่เป็นไร"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"รหัสผ่าน"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ที่อยู่"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"บัตรเครดิต"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 4453309..c4b14f7 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Mga Sensor ng Katawan"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"i-access ang data ng sensor tungkol sa iyong vital signs"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Payagan ang <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> na i-access ang data ng sensor tungkol sa iyong mga vital sign?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Musika"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"i-access ang iyong musika"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Payagan ang <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> na i-access ang iyong musika?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Mga Larawan at Video"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"i-access ang iyong mga larawan at video"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Payagan ang <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> na i-access ang iyong mga larawan at video?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Kunin ang content ng window"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Siyasatin ang nilalaman ng isang window kung saan ka nakikipag-ugnayan."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"I-on ang Explore by Touch"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Pinapayagan ang app na mag-invoke ng mga paraan upang magdagdag at mag-delete ng mga template ng fingerprint na magagamit."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"gamitin ang hardware ng fingerprint"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Pinapayagan ang app na gumamit ng hardware ng fingerprint para sa pagpapatotoo"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"basahin ang iyong koleksyon ng musika"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Pinapayagan ang app na basahin ang iyong koleksyon ng musika."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"baguhin ang iyong koleksyon ng musika"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Pinapayagan ang app na baguhin ang iyong koleksyon ng musika."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"basahin ang iyong koleksyon ng video"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Pinapayagan ang app na basahin ang iyong koleksyon ng video."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"baguhin ang iyong koleksyon ng video"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Pinapayagan ang app na baguhin ang iyong koleksyon ng video."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"basahin ang iyong koleksyon ng larawan"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Pinapayagan ang app na basahin ang iyong koleksyon ng larawan."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"baguhin ang iyong koleksyon ng larawan"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Pinapayagan ang app na baguhin ang iyong koleksyon ng larawan."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"basahin ang mga lokasyon mula sa iyong koleksyon ng media"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Pinapayagan ang app na basahin ang mga lokasyon mula sa iyong koleksyon ng media."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Hindi buo ang natukoy na fingerprint. Pakisubukang muli."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Hindi maproseso ang fingerprint. Pakisubukang muli."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Marumi ang sensor ng fingerprint. Pakilinis at subukang muli."</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"I-save ang <xliff:g id="TYPE">%1$s</xliff:g> sa <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"I-save ang <xliff:g id="TYPE_0">%1$s</xliff:g> at <xliff:g id="TYPE_1">%2$s</xliff:g> sa <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"I-save ang <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, at <xliff:g id="TYPE_2">%3$s</xliff:g> sa <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"I-update sa <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"I-update ang <xliff:g id="TYPE">%1$s</xliff:g> sa <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"I-update ang <xliff:g id="TYPE_0">%1$s</xliff:g> at <xliff:g id="TYPE_1">%2$s</xliff:g> sa <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"I-update ang <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, at <xliff:g id="TYPE_2">%3$s</xliff:g> sa <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"I-save"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Hindi, salamat na lang"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"I-update"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"password"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"address"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"credit card"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index a71bc4a..7ed5859 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -133,7 +133,7 @@
<item msgid="4397097370387921767">"%s Kablosuz Çağrı"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Kapalı"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Kablosuz bağlantı tercih edildi"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Kablosuz bağlantı tercihli"</string>
<string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Mobil tercihli"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Yalnızca kablosuz"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Yönlendirilmedi"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Vücut Sensörleri"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"hayati belirtilerinizle ilgili sensör verilerine erişme"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> uygulamasının hayati belirtilerinizle ilgili sensör verilerine erişmesine izin verilsin mi?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Pencere içeriğini alma"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Etkileşim kurduğunuz pencerenin içeriğini inceler."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Dokunarak Keşfet\'i açma"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Uygulamanın, kullanılacak parmak izi şablonlarını ekleme ve silme yöntemlerini başlatmasına izin verir."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"parmak izi donanımını kullanma"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Uygulamanın kimlik doğrulama için parmak izi donanımını kullanmasına izin verir."</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Parmak izinin tümü algılanamadı. Lütfen tekrar deneyin."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Parmak izi işlenemedi. Lütfen tekrar deneyin."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Parmak izi sensörü kirli. Lütfen temizleyin ve tekrar deneyin."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g>, <b><xliff:g id="LABEL">%2$s</xliff:g></b> hizmetine kaydedilsin mi?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> ve <xliff:g id="TYPE_1">%2$s</xliff:g>, <b><xliff:g id="LABEL">%3$s</xliff:g></b> hizmetine kaydedilsin mi?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> ve <xliff:g id="TYPE_2">%3$s</xliff:g>, <b><xliff:g id="LABEL">%4$s</xliff:g></b> hizmetine kaydedilsin mi?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Kaydet"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Hayır, teşekkürler"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"şifre"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"adres"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredi kartı"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 6476134..45b8dd4 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -306,6 +306,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Датчики на тілі"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"отримувати доступ до інформації датчиків про ваші життєві показники"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Надати додатку <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> доступ до життєвих показників із датчиків?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Музика"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"доступ до музики"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"Надати додатку <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> доступ до музики?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Фото й відео"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"доступ до фото й відео"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"Надати додатку <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> доступ до фото й відео?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Отримувати вміст вікна"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Перевіряти вміст вікна, з яким ви взаємодієте."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Увімкнути функцію дослідження дотиком"</string>
@@ -500,6 +506,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Увімкнути в додатку функції для додавання й видалення шаблонів цифрових відбитків."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"використання сканера цифрових відбитків"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Дозволити додатку використовувати апаратне забезпечення для автентифікації"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"розпізнавати колекцію музики"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Додаток зможе розпізнавати вашу колекцію музики."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"змінювати колекцію музики"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Додаток зможе змінювати вашу колекцію музики."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"розпізнавати колекцію відео"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Додаток зможе розпізнавати вашу колекцію відео."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"змінювати колекцію відео"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Додаток зможе змінювати вашу колекцію відео."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"розпізнавати колекцію фотографій"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Додаток зможе розпізнавати вашу колекцію фотографій."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"змінювати колекцію фотографій"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Додаток зможе змінювати вашу колекцію фотографій."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"розпізнавати геодані з колекції медіа-вмісту"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Додаток зможе розпізнавати геодані з вашої колекції медіа-вмісту."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Відбиток розпізнано частково. Повторіть спробу."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Не вдалось обробити відбиток. Повторіть спробу."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Датчик відбитків забруднився. Очистьте його та повторіть спробу."</string>
@@ -1942,8 +1962,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Зберегти дані (<xliff:g id="TYPE">%1$s</xliff:g>) у службі <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Зберегти дані (<xliff:g id="TYPE_0">%1$s</xliff:g> і <xliff:g id="TYPE_1">%2$s</xliff:g>) у службі <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Зберегти дані (<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> і <xliff:g id="TYPE_2">%3$s</xliff:g>) у службі <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"Оновити дані в сервісі <b><xliff:g id="LABEL">%1$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"Оновити дані (<xliff:g id="TYPE">%1$s</xliff:g>) у сервісі <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"Оновити дані (<xliff:g id="TYPE_0">%1$s</xliff:g> і <xliff:g id="TYPE_1">%2$s</xliff:g>) у сервісі <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"Оновити дані (<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> і <xliff:g id="TYPE_2">%3$s</xliff:g>) у сервісі <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Зберегти"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Ні, дякую"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Оновити"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"пароль"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"адреса"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"кредитна картка"</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 2ed0e6c..3c92c3d 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"باڈی سینسرز"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"اپنی علامات حیات کے متعلق سنسر ڈیٹا تک رسائی حاصل کریں"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> کو آپ کے اہم اشاروں کے متعلق سینسر ڈیٹا تک رسائی کی اجازت دیں؟"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ونڈو مواد بازیافت کرنے کی"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"کسی ایسی ونڈو کے مواد کا معائنہ کریں جس کے ساتھ آپ تعامل کر رہے ہیں۔"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"ٹچ کے ذریعے دریافت کریں کو آن کرنے کی"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"ایپ کو استعمال کیلئے فنگر پرنٹ کی تمثیلات شامل کرنے اور حذف کرنے کیلئے طریقوں کو کالعدم قرار دینے کی اجازت دیتا ہے۔"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"فنگر پرنٹ ہارڈ ویئر استعمال کریں"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"ایپ کو توثیق کیلئے فنگر پرنٹ ہارڈ ویئر استعمال کرنے کی اجازت دیتا ہے"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"جزوی فنگر پرنٹ کی شناخت ہوئی۔ براہ کرم دوبارہ کوشش کریں۔"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"فنگر پرنٹ پر کارروائی نہیں کی جا سکی۔ براہ کرم دوبارہ کوشش کریں۔"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"فنگر پرنٹ سینسر گندا ہے۔ براہ کرم صاف کریں اور دوبارہ کوشش کریں۔"</string>
@@ -1873,8 +1913,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> کو <b><xliff:g id="LABEL">%2$s</xliff:g></b> میں محفوظ کریں؟"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> اور <xliff:g id="TYPE_1">%2$s</xliff:g> کو <b><xliff:g id="LABEL">%3$s</xliff:g></b> میں محفوظ کریں؟"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>،<xliff:g id="TYPE_1">%2$s</xliff:g>، اور <xliff:g id="TYPE_2">%3$s</xliff:g> کو <b><xliff:g id="LABEL">%4$s</xliff:g></b> میں محفوظ کریں؟"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"محفوظ کریں"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"نہیں، شکریہ"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"پاس ورڈ"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"پتہ"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"کریڈٹ کارڈ"</string>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 577e6b9..684e78a 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -133,8 +133,8 @@
<item msgid="4397097370387921767">"%s Wi-Fi qo‘ng‘iroqlar"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"O‘chiq"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Wi-Fi afzal ko‘rilsin"</string>
- <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Mobil internet ustivorligi"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Wi-Fi afzalligi"</string>
+ <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Mobil internet afzalligi"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Faqat Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Yo‘naltirilmadi"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Tana sezgichlari"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"organizm holati haqidagi sezgich ma’lumotlariga kirish"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> uchun organizm holati haqidagi sezgichlar axborotlariga ruxsat berilsinmi?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"Musiqa"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"musiqaga kirish"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> uchun musiqangizga kirishga ruxsat berilsinmi?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"Surat va videolar"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"surat va videolarga kirish"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> uchun surat va videolaringizga kirishga ruxsat berilsinmi?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Oynadagi kontentni o‘qiydi"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Joriy oynadagi kontent mazmunini aniqlaydi."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Teginib o‘rganish xizmatini yoqadi"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Ilova foydalanish uchun barmoq izi namunalarini qo‘shish va o‘chirish usullarini qo‘llashi mumkin."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"barmoq izi sensoridan foydalanish"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Ilova haqiqiylikni tekshirish uchun barmoq izi sensoridan foydalanishi mumkin"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"musiqiy to‘plamni o‘qish"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"Ilovaga musiqiy to‘plamingizni o‘qishga ruxsat beradi."</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"musiqiy to‘plamni o‘zgartirish"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"Ilovaga musiqiy to‘plamni o‘zgartirishga ruxsat beradi."</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"video to‘plamni o‘qish"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"Ilovaga video to‘plamingizni o‘qishga ruxsat beradi."</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"video to‘plamni o‘zgartirish"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"Ilovaga video to‘plamingizni o‘zgartirishga ruxsat beradi."</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"suratlar to‘plamini o‘qish"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"Ilovaga suratlar to‘plamingizni o‘qishga ruxsat beradi."</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"suratlar to‘plamini o‘zgartirish"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"Ilovaga suratlar to‘plamingizni o‘zgartirishga ruxsat beradi."</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"multimedia to‘plamidan joylashuv axborotini o‘qish"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"Ilovaga multimedia to‘plamingizdan joylashuv axborotini o‘qishga ruxsat beradi."</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Barmoq izi qisman aniqlandi. Qayta urinib ko‘ring."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Barmoq izi aniqlanmadi. Qayta urinib ko‘ring."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Barmoq izi skaneri kirlangan. Uni tozalab, keyin qayta urinib ko‘ring."</string>
@@ -1161,7 +1181,7 @@
<string name="dump_heap_text" msgid="4809417337240334941">"<xliff:g id="PROC">%1$s</xliff:g> jarayoni o‘zi uchun ajratilgan <xliff:g id="SIZE">%2$s</xliff:g> xotira chegarasidan o‘tib ketdi. Ilova dasturchisi bilan ulashishingiz uchun hip-damp ma’lumotlari yig‘ilib qoldi. Ehtiyot bo\'ling: ushbu hip-dampda ilova uchun foydalanishga ruxsat berilgan shaxsiy ma’lumotlaringiz bo‘lishi mumkin."</string>
<string name="sendText" msgid="5209874571959469142">"Matn uchun amalni tanlash"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Jiringlaganda tovush balandligi"</string>
- <string name="volume_music" msgid="5421651157138628171">"Multimedia ovozi"</string>
+ <string name="volume_music" msgid="5421651157138628171">"Multimedia tovushi"</string>
<string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Bluetooth orqali ijro etilmoqda"</string>
<string name="volume_music_hint_silent_ringtone_selected" msgid="8310739960973156272">"Ovozsiz rejim tanlandi"</string>
<string name="volume_call" msgid="3941680041282788711">"Suhbat vaqtidagi tovush balandligi"</string>
@@ -1172,7 +1192,7 @@
<string name="volume_icon_description_bluetooth" msgid="6538894177255964340">"Bluetooth tovushi"</string>
<string name="volume_icon_description_ringer" msgid="3326003847006162496">"Rington balandligi"</string>
<string name="volume_icon_description_incall" msgid="8890073218154543397">"Qo‘ng‘iroq tovushi balandligi"</string>
- <string name="volume_icon_description_media" msgid="4217311719665194215">"Multimedia ovozi"</string>
+ <string name="volume_icon_description_media" msgid="4217311719665194215">"Multimedia tovushi"</string>
<string name="volume_icon_description_notification" msgid="7044986546477282274">"Eslatma tovushi"</string>
<string name="ringtone_default" msgid="3789758980357696936">"Standart rington"</string>
<string name="ringtone_default_with_actual" msgid="1767304850491060581">"Standart (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
@@ -1873,8 +1893,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"<xliff:g id="TYPE">%1$s</xliff:g> <b><xliff:g id="LABEL">%2$s</xliff:g></b> xizmatiga saqlansinmi?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"<xliff:g id="TYPE_0">%1$s</xliff:g> va <xliff:g id="TYPE_1">%2$s</xliff:g> <b><xliff:g id="LABEL">%3$s</xliff:g></b> xizmatiga saqlansinmi?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> va <xliff:g id="TYPE_2">%3$s</xliff:g> <b><xliff:g id="LABEL">%4$s</xliff:g></b> xizmatiga saqlansinmi?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"<b><xliff:g id="LABEL">%1$s</xliff:g></b> xizmatidagi ma’lumot yangilansinmi?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"<b><xliff:g id="LABEL">%2$s</xliff:g></b> xizmatida <xliff:g id="TYPE">%1$s</xliff:g> ma’lumotlari yangilansinmi?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"<b><xliff:g id="LABEL">%3$s</xliff:g></b> xizmatidagi <xliff:g id="TYPE_0">%1$s</xliff:g> va <xliff:g id="TYPE_1">%2$s</xliff:g> ma’lumotlari yangilansinmi?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"<b><xliff:g id="LABEL">%4$s</xliff:g></b> xizmatidagi <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> va <xliff:g id="TYPE_2">%3$s</xliff:g> ma’lumotlari yangilansinmi?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"Saqlash"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Kerak emas"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"Yangilash"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"parol"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"manzil"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"kredit karta"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 7b603fb..4e84f62 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -134,7 +134,7 @@
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Tắt"</string>
<string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Ưu tiên Wi-Fi"</string>
- <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Được ưu tiên trên thiết bị di động"</string>
+ <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Ưu tiên dữ liệu di động"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Chỉ Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Không được chuyển tiếp"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Cảm biến cơ thể"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"truy cập dữ liệu cảm biến về dấu hiệu sinh tồn của bạn"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Cho phép <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> truy cập vào dữ liệu cảm biến về các dấu hiệu sinh tồn của bạn?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Truy xuất nội dung cửa sổ"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Kiểm tra nội dung của cửa sổ bạn đang tương tác."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Bật Khám phá bằng cách chạm"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Cho phép ứng dụng gọi các phương pháp để thêm và xóa các mẫu vân tay để sử dụng."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"sử dụng phần cứng vân tay"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Cho phép ứng dụng sử dụng phần cứng vân tay để xác thực"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Đã phát hiện được một phần vân tay. Vui lòng thử lại."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Không thể xử lý vân tay. Vui lòng thử lại."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Cảm biến vân tay bị bẩn. Hãy làm sạch và thử lại."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Lưu <xliff:g id="TYPE">%1$s</xliff:g> vào <b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Lưu <xliff:g id="TYPE_0">%1$s</xliff:g> và <xliff:g id="TYPE_1">%2$s</xliff:g> vào <b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Lưu <xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g> và <xliff:g id="TYPE_2">%3$s</xliff:g> vào <b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Lưu"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Không, cảm ơn"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"mật khẩu"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"địa chỉ"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"thẻ tín dụng"</string>
diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml
index 8e82479..a96a96d 100644
--- a/core/res/res/values-watch/config.xml
+++ b/core/res/res/values-watch/config.xml
@@ -64,9 +64,8 @@
Set to true for watch devices. -->
<bool name="config_focusScrollContainersInTouchMode">true</bool>
- <!-- Enable generic multi-window in order to support Activity in virtual display. -->
- <bool name="config_supportsMultiWindow">true</bool>
- <bool name="config_supportsMultiDisplay">true</bool>
+ <bool name="config_supportsMultiWindow">false</bool>
+ <bool name="config_supportsMultiDisplay">false</bool>
<bool name="config_supportsSplitScreenMultiWindow">false</bool>
<!-- Default Gravity setting for the system Toast view. Equivalent to: Gravity.CENTER -->
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 8a55d01..0de78ce 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"身体传感器"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"访问与您的生命体征相关的传感器数据"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"允许<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>访问与您的生命体征相关的传感器数据吗?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"检索窗口内容"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"检测您正访问的窗口的内容。"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"启用触摸浏览"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"允许该应用调用方法来添加和删除可用的指纹模板。"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"使用指纹硬件"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"允许该应用使用指纹硬件进行身份验证"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"仅检测到部分指纹,请重试。"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"无法处理指纹,请重试。"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"指纹传感器有脏污。请擦拭干净,然后重试。"</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"要将<xliff:g id="TYPE">%1$s</xliff:g>保存到<b><xliff:g id="LABEL">%2$s</xliff:g></b>吗?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"要将<xliff:g id="TYPE_0">%1$s</xliff:g>和<xliff:g id="TYPE_1">%2$s</xliff:g>保存到<b><xliff:g id="LABEL">%3$s</xliff:g></b>吗?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"要将<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>和<xliff:g id="TYPE_2">%3$s</xliff:g>保存到<b><xliff:g id="LABEL">%4$s</xliff:g></b>吗?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"保存"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"不用了"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"密码"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"地址"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"信用卡"</string>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 18fc2c9..91633cd 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"人體感應器"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"存取與您生命體徵相關的感應器資料"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」<b></b>存取與您身體機能相關的感應器資料嗎?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"音樂"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"存取你的音樂"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」<b></b>存取你的音樂嗎?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"相片和影片"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"存取你的相片和影片"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」<b></b>存取你的相片和影片嗎?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"擷取視窗內容"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"檢查您使用中的視窗內容。"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"開啟「輕觸探索」功能"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"允許應用程式調用加入和刪除指紋模板的方法以供使用。"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"使用指紋硬件"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"允許應用程式使用指紋硬件驗證"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"讀取你的音樂收藏"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"允許應用程式讀取你的音樂收藏。"</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"修改你的音樂收藏"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"允許應用程式修改你的音樂收藏。"</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"讀取你的影片收藏"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"允許應用程式讀取你的影片收藏。"</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"修改你的影片收藏"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"允許應用程式修改你的影片收藏。"</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"讀取你的相片收藏"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"允許應用程式讀取你的相片收藏。"</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"修改你的相片收藏"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"允許應用程式修改你的相片收藏。"</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"讀取你的媒體收藏的位置資訊"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"允許應用程式讀取你的媒體收藏的位置資訊。"</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"只偵測到部分指紋。請再試一次。"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"無法處理指紋。請再試一次。"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"指紋感應器不乾淨。請清潔後再試一次。"</string>
@@ -1772,7 +1792,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>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"要將<xliff:g id="TYPE">%1$s</xliff:g>儲存至「<b><xliff:g id="LABEL">%2$s</xliff:g></b>」嗎?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>和<xliff:g id="TYPE_1">%2$s</xliff:g>儲存至「<b><xliff:g id="LABEL">%3$s</xliff:g></b>」嗎?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>和<xliff:g id="TYPE_2">%3$s</xliff:g>儲存至「<b><xliff:g id="LABEL">%4$s</xliff:g></b>」嗎?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"要更新為「<xliff:g id="LABEL">%1$s</xliff:g>」<b></b>嗎?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"要將<xliff:g id="TYPE">%1$s</xliff:g>更新為「<xliff:g id="LABEL">%2$s</xliff:g>」<b></b>嗎?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>和<xliff:g id="TYPE_1">%2$s</xliff:g>更新為「<xliff:g id="LABEL">%3$s</xliff:g>」<b></b>嗎?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>和<xliff:g id="TYPE_2">%3$s</xliff:g>更新為「<xliff:g id="LABEL">%4$s</xliff:g>」<b></b>嗎?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"儲存"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"不用了,謝謝"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"更新"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"密碼"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"地址"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"信用卡"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index d130fba..219f137 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -300,6 +300,12 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"人體感應器"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"存取與你生命徵象相關的感應器資料"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」存取與你生命徵象相關的感應器資料嗎?"</string>
+ <string name="permgrouplab_aural" msgid="965607064083134896">"音樂"</string>
+ <string name="permgroupdesc_aural" msgid="4870189506255958055">"存取你的音樂"</string>
+ <string name="permgrouprequest_aural" msgid="6787926123071735620">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」<b></b>存取你的音樂嗎?"</string>
+ <string name="permgrouplab_visual" msgid="8030190588123857921">"相片和影片"</string>
+ <string name="permgroupdesc_visual" msgid="3415827902566663546">"存取你的相片和影片"</string>
+ <string name="permgrouprequest_visual" msgid="6907523945030290376">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」<b></b>存取你的相片和影片嗎?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"擷取視窗內容"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"檢查你存取的視窗內容。"</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"啟用輕觸探索功能"</string>
@@ -494,6 +500,20 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"允許應用程式呼叫方法來新增及移除可用的指紋範本"</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"使用指紋硬體"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"允許應用程式使用指紋硬體進行驗證"</string>
+ <string name="permlab_audioRead" msgid="6617225220728465565">"讀取你的音樂收藏"</string>
+ <string name="permdesc_audioRead" msgid="5034032570243484805">"允許應用程式讀取你的音樂收藏。"</string>
+ <string name="permlab_audioWrite" msgid="2661772059799779292">"修改你的音樂收藏"</string>
+ <string name="permdesc_audioWrite" msgid="8888544708166230494">"允許應用程式修改你的音樂收藏。"</string>
+ <string name="permlab_videoRead" msgid="9182618678674737229">"讀取你的影片收藏"</string>
+ <string name="permdesc_videoRead" msgid="7045676429859396194">"允許應用程式讀取你的影片收藏。"</string>
+ <string name="permlab_videoWrite" msgid="128769316366746446">"修改你的影片收藏"</string>
+ <string name="permdesc_videoWrite" msgid="5448565757490640841">"允許應用程式修改你的影片收藏。"</string>
+ <string name="permlab_imagesRead" msgid="3015078545742665304">"讀取你的相片收藏"</string>
+ <string name="permdesc_imagesRead" msgid="3144263806038695580">"允許應用程式讀取你的相片收藏。"</string>
+ <string name="permlab_imagesWrite" msgid="3391306186247235510">"修改你的相片收藏"</string>
+ <string name="permdesc_imagesWrite" msgid="7073662756617474375">"允許應用程式修改你的相片收藏。"</string>
+ <string name="permlab_mediaLocation" msgid="8675148183726247864">"讀取你的媒體收藏的位置資訊"</string>
+ <string name="permdesc_mediaLocation" msgid="2237023389178865130">"允許應用程式讀取你的媒體收藏的位置資訊。"</string>
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"僅偵測到部分指紋,請再試一次。"</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"無法處理指紋,請再試一次。"</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"指紋感應器有髒汙。請清潔感應器,然後再試一次。"</string>
@@ -1872,8 +1892,13 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"要將<xliff:g id="TYPE">%1$s</xliff:g>儲存到「<xliff:g id="LABEL">%2$s</xliff:g>」嗎?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>和<xliff:g id="TYPE_1">%2$s</xliff:g>儲存到「<xliff:g id="LABEL">%3$s</xliff:g>」嗎?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>和<xliff:g id="TYPE_2">%3$s</xliff:g>儲存到「<xliff:g id="LABEL">%4$s</xliff:g>」嗎?"</string>
+ <string name="autofill_update_title" msgid="4879673117448810818">"要更新為「<xliff:g id="LABEL">%1$s</xliff:g>」<b></b>嗎?"</string>
+ <string name="autofill_update_title_with_type" msgid="339733442087186755">"要將<xliff:g id="TYPE">%1$s</xliff:g>更新為「<xliff:g id="LABEL">%2$s</xliff:g>」<b></b>嗎?"</string>
+ <string name="autofill_update_title_with_2types" msgid="6321714204167424745">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>和<xliff:g id="TYPE_1">%2$s</xliff:g>更新為「<xliff:g id="LABEL">%3$s</xliff:g>」<b></b>嗎?"</string>
+ <string name="autofill_update_title_with_3types" msgid="5866735124066629287">"要將<xliff:g id="TYPE_0">%1$s</xliff:g>、<xliff:g id="TYPE_1">%2$s</xliff:g>和<xliff:g id="TYPE_2">%3$s</xliff:g>更新為「<xliff:g id="LABEL">%4$s</xliff:g>」<b></b>嗎?"</string>
<string name="autofill_save_yes" msgid="6398026094049005921">"儲存"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"不用了,謝謝"</string>
+ <string name="autofill_update_yes" msgid="310358413273276958">"更新"</string>
<string name="autofill_save_type_password" msgid="5288448918465971568">"密碼"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"地址"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"信用卡"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index fed4824..37a2e20 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -300,6 +300,18 @@
<string name="permgrouplab_sensors" msgid="416037179223226722">"Izinzwa zomzimba"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"finyelela idatha yesizweli mayelana nezimpawu zakho ezibalulekile"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"Vumela i-<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ukuthi ifinyelele kudatha yenzwa emayelana nezimpawu zakho ezibalulekile?"</string>
+ <!-- no translation found for permgrouplab_aural (965607064083134896) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_aural (4870189506255958055) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_aural (6787926123071735620) -->
+ <skip />
+ <!-- no translation found for permgrouplab_visual (8030190588123857921) -->
+ <skip />
+ <!-- no translation found for permgroupdesc_visual (3415827902566663546) -->
+ <skip />
+ <!-- no translation found for permgrouprequest_visual (6907523945030290376) -->
+ <skip />
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"Thola okuqukethwe kwewindi"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"Hlola okuqukethwe kwewindi ohlanganyela nalo."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"Vula ukuhlola ngokuthinta"</string>
@@ -494,6 +506,34 @@
<string name="permdesc_manageFingerprint" msgid="178208705828055464">"Ivumela uhlelo lokusebenza ukuthi libuyisele izindlela zokungeza nokususa izifanekiso zezigxivizo zeminwe ngokusetshenziswa."</string>
<string name="permlab_useFingerprint" msgid="3150478619915124905">"sebenzisa izingxenyekazi zekhompyutha zezigxivizo zeminwe"</string>
<string name="permdesc_useFingerprint" msgid="9165097460730684114">"Ivumela uhlelo lokusebenza ukuthi lusebenzise izingxenyekazi zekhompyutha zezigxivizo zeminwe ukuze kuqinisekiswe"</string>
+ <!-- no translation found for permlab_audioRead (6617225220728465565) -->
+ <skip />
+ <!-- no translation found for permdesc_audioRead (5034032570243484805) -->
+ <skip />
+ <!-- no translation found for permlab_audioWrite (2661772059799779292) -->
+ <skip />
+ <!-- no translation found for permdesc_audioWrite (8888544708166230494) -->
+ <skip />
+ <!-- no translation found for permlab_videoRead (9182618678674737229) -->
+ <skip />
+ <!-- no translation found for permdesc_videoRead (7045676429859396194) -->
+ <skip />
+ <!-- no translation found for permlab_videoWrite (128769316366746446) -->
+ <skip />
+ <!-- no translation found for permdesc_videoWrite (5448565757490640841) -->
+ <skip />
+ <!-- no translation found for permlab_imagesRead (3015078545742665304) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesRead (3144263806038695580) -->
+ <skip />
+ <!-- no translation found for permlab_imagesWrite (3391306186247235510) -->
+ <skip />
+ <!-- no translation found for permdesc_imagesWrite (7073662756617474375) -->
+ <skip />
+ <!-- no translation found for permlab_mediaLocation (8675148183726247864) -->
+ <skip />
+ <!-- no translation found for permdesc_mediaLocation (2237023389178865130) -->
+ <skip />
<string name="fingerprint_acquired_partial" msgid="735082772341716043">"Izigxivizo zeminwe ezincane zitholiwe. Sicela uzame futhi."</string>
<string name="fingerprint_acquired_insufficient" msgid="4596546021310923214">"Ayikwazanga ukucubungula izigxivizo zeminwe. Sicela uzame futhi."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1087209702421076105">"Inzwa yezigxivizo zeminwe ingcolile. Sicela uyihlanze uphinde uzame futhi."</string>
@@ -1872,8 +1912,18 @@
<string name="autofill_save_title_with_type" msgid="8637809388029313305">"Londoloza i-<xliff:g id="TYPE">%1$s</xliff:g> ku-<b><xliff:g id="LABEL">%2$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_2types" msgid="5214035651838265325">"Londoloza i-<xliff:g id="TYPE_0">%1$s</xliff:g> ne-<xliff:g id="TYPE_1">%2$s</xliff:g> ku-<b><xliff:g id="LABEL">%3$s</xliff:g></b>?"</string>
<string name="autofill_save_title_with_3types" msgid="6943161834231458441">"Londoloza i-<xliff:g id="TYPE_0">%1$s</xliff:g>, <xliff:g id="TYPE_1">%2$s</xliff:g>, ne-<xliff:g id="TYPE_2">%3$s</xliff:g> ku-<b><xliff:g id="LABEL">%4$s</xliff:g></b>?"</string>
+ <!-- no translation found for autofill_update_title (4879673117448810818) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_type (339733442087186755) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_2types (6321714204167424745) -->
+ <skip />
+ <!-- no translation found for autofill_update_title_with_3types (5866735124066629287) -->
+ <skip />
<string name="autofill_save_yes" msgid="6398026094049005921">"Londoloza"</string>
<string name="autofill_save_no" msgid="2625132258725581787">"Cha ngiyabonga"</string>
+ <!-- no translation found for autofill_update_yes (310358413273276958) -->
+ <skip />
<string name="autofill_save_type_password" msgid="5288448918465971568">"iphasiwedi"</string>
<string name="autofill_save_type_address" msgid="4936707762193009542">"ikheli"</string>
<string name="autofill_save_type_credit_card" msgid="7127694776265563071">"ikhadi lesikweletu"</string>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 4c96c1b..74663c9 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -1358,7 +1358,10 @@
<!-- Specifies the target sandbox this app wants to use. Higher sandbox versions
will have increasing levels of security.
- <p>The default value of this attribute is <code>1</code>. -->
+ <p>The default value of this attribute is <code>1</code>.
+ <p>
+ @deprecated The security properties have been moved to
+ {@link android.os.Build.VERSION Build.VERSION} 27 and 28. -->
<attr name="targetSandboxVersion" format="integer" />
<!-- The user-visible SDK version (ex. 26) of the framework against which the application was
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 474c62d..c6931aa 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2105,6 +2105,9 @@
<!-- Type of the long press sensor. Empty if long press is not supported. -->
<string name="config_dozeLongPressSensorType" translatable="false"></string>
+ <!-- Type of the reach sensor. Empty if reach is not supported. -->
+ <string name="config_dozeReachSensorType" translatable="false"></string>
+
<!-- Control whether the always on display mode is available. This should only be enabled on
devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND
states. -->
@@ -2356,6 +2359,9 @@
<!-- Whether safe headphone volume is enabled or not (country specific). -->
<bool name="config_safe_media_volume_enabled">true</bool>
+ <!-- Whether safe headphone volume warning dialog is disabled on Vol+ (operator specific). -->
+ <bool name="config_safe_media_disable_on_volume_up">true</bool>
+
<!-- Set to true if the wifi display supports compositing content stored
in gralloc protected buffers. For this to be true, there must exist
a protected hardware path for surface flinger to composite and send
@@ -2491,6 +2497,7 @@
<item>com.android.server.notification.VisibilityExtractor</item>
<!-- Depends on ZenModeExtractor -->
<item>com.android.server.notification.BadgeExtractor</item>
+ <item>com.android.server.notification.CriticalNotificationExtractor</item>
</string-array>
@@ -2729,6 +2736,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>
@@ -2978,6 +2988,10 @@
-->
<bool name="config_fillMainBuiltInDisplayCutout">false</bool>
+ <!-- If true, and there is a cutout on the main built in display, the cutout will be masked
+ by shrinking the display such that it does not overlap the cutout area. -->
+ <bool name="config_maskMainBuiltInDisplayCutout">false</bool>
+
<!-- Ultrasound support for Mic/speaker path -->
<!-- Whether the default microphone audio source supports near-ultrasound frequencies
(range of 18 - 21 kHz). -->
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 471170b..73cb59e 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -61,6 +61,15 @@
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
<dimen name="status_bar_edge_ignore">5dp</dimen>
+ <!-- Default radius of the software rounded corners. -->
+ <dimen name="rounded_corner_radius">0dp</dimen>
+ <!-- Radius of the software rounded corners at the top of the display in its natural
+ orientation. If zero, the value of rounded_corner_radius is used. -->
+ <dimen name="rounded_corner_radius_top">0dp</dimen>
+ <!-- Radius of the software rounded corners at the bottom of the display in its natural
+ orientation. If zero, the value of rounded_corner_radius is used. -->
+ <dimen name="rounded_corner_radius_bottom">0dp</dimen>
+
<!-- Width of the window of the divider bar used to resize docked stacks. -->
<dimen name="docked_stack_divider_thickness">48dp</dimen>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 15331d64..dfd5e81 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -745,6 +745,22 @@
<string name="permgrouprequest_sensors">Allow
<b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to access sensor data about your vital signs?</string>
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_aural">Music</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_aural">access your music</string>
+ <!-- Message shown to the user when the apps requests permission from this group. If ever possible this should stay below 80 characters (assuming the parameters takes 20 characters). Don't abbreviate until the message reaches 120 characters though. [CHAR LIMIT=120] -->
+ <string name="permgrouprequest_aural">Allow
+ <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to access your music?</string>
+
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_visual">Photos & Videos</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_visual">access your photos & videos</string>
+ <!-- Message shown to the user when the apps requests permission from this group. If ever possible this should stay below 80 characters (assuming the parameters takes 20 characters). Don't abbreviate until the message reaches 120 characters though. [CHAR LIMIT=120] -->
+ <string name="permgrouprequest_visual">Allow
+ <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to access your photos & videos?</string>
+
<!-- Title for the capability of an accessibility service to retrieve window content. -->
<string name="capability_title_canRetrieveWindowContent">Retrieve window content</string>
<!-- Description for the capability of an accessibility service to retrieve window content. -->
@@ -1349,6 +1365,38 @@
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_useFingerprint">Allows the app to use fingerprint hardware for authentication</string>
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_audioRead">read your music collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_audioRead">Allows the app to read your music collection.</string>
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_audioWrite">modify your music collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_audioWrite">Allows the app to modify your music collection.</string>
+
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_videoRead">read your video collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_videoRead">Allows the app to read your video collection.</string>
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_videoWrite">modify your video collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_videoWrite">Allows the app to modify your video collection.</string>
+
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_imagesRead">read your photo collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_imagesRead">Allows the app to read your photo collection.</string>
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_imagesWrite">modify your photo collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_imagesWrite">Allows the app to modify your photo collection.</string>
+
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_mediaLocation">read locations from your media collection</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_mediaLocation">Allows the app to read locations from your media collection.</string>
+
<!-- Message shown during fingerprint acquisision when the fingerprint cannot be recognized -->
<string name="fingerprint_acquired_partial">Partial fingerprint detected. Please try again.</string>
<!-- Message shown during fingerprint acquisision when the fingerprint cannot be recognized -->
@@ -4936,10 +4984,29 @@
by an autofill service, and the service does knows what the activity represents, and it represents 3 types of
data (for example, username, password and credit card info) [CHAR LIMIT=NONE] -->
<string name="autofill_save_title_with_3types">Save <xliff:g id="type" example="Username">%1$s</xliff:g>, <xliff:g id="type" example="Password">%2$s</xliff:g>, and <xliff:g id="type" example="Credit Card">%3$s</xliff:g> to <b><xliff:g id="label" example="MyPass">%4$s</xliff:g></b>?</string>
+
+ <!-- Title for the autofill update dialog shown when the the contents of the activity can be updated
+ by an autofill service, but the service does not know what the activity represents [CHAR LIMIT=NONE] -->
+ <string name="autofill_update_title">Update to <b><xliff:g id="label" example="MyPass">%1$s</xliff:g></b>?</string>
+ <!-- Title for the autofill update dialog shown when the the contents of the activity can be updated
+ by an autofill service, and the service does knows what the activity represents (for example, credit card info) [CHAR LIMIT=NONE] -->
+ <string name="autofill_update_title_with_type">Update <xliff:g id="type" example="Credit Card">%1$s</xliff:g> to <b><xliff:g id="label" example="MyPass">%2$s</xliff:g></b>?</string>
+ <!-- Title for the autofill update dialog shown when the the contents of the activity can be updated
+ by an autofill service, and the service does knows what the activity represents, and it represents 2 types of
+ data (for example, password and credit card info) [CHAR LIMIT=NONE] -->
+ <string name="autofill_update_title_with_2types">Update <xliff:g id="type" example="Password">%1$s</xliff:g> and <xliff:g id="type" example="Credit Card">%2$s</xliff:g> to <b><xliff:g id="label" example="MyPass">%3$s</xliff:g></b>?</string>
+ <!-- Title for the autofill update dialog shown when the the contents of the activity can be updated
+ by an autofill service, and the service does knows what the activity represents, and it represents 3 types of
+ data (for example, username, password and credit card info) [CHAR LIMIT=NONE] -->
+ <string name="autofill_update_title_with_3types">Update <xliff:g id="type" example="Username">%1$s</xliff:g>, <xliff:g id="type" example="Password">%2$s</xliff:g>, and <xliff:g id="type" example="Credit Card">%3$s</xliff:g> to <b><xliff:g id="label" example="MyPass">%4$s</xliff:g></b>?</string>
+
+
<!-- Label for the autofill save button [CHAR LIMIT=NONE] -->
<string name="autofill_save_yes">Save</string>
<!-- Label for the autofill cancel button [CHAR LIMIT=NONE] -->
<string name="autofill_save_no">No thanks</string>
+ <!-- Label for the autofill update button [CHAR LIMIT=NONE] -->
+ <string name="autofill_update_yes">Update</string>
<!-- Label for the type of data being saved for autofill when it represent user credentials with a password [CHAR LIMIT=NONE] -->
<string name="autofill_save_type_password">password</string>
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/styles_package_installer.xml b/core/res/res/values/styles_permission_controller.xml
similarity index 100%
rename from core/res/res/values/styles_package_installer.xml
rename to core/res/res/values/styles_permission_controller.xml
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e47ea71..7fbad16 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -309,6 +309,7 @@
<java-symbol type="bool" name="config_allowAnimationsInLowPowerMode" />
<java-symbol type="bool" name="config_useDevInputEventForAudioJack" />
<java-symbol type="bool" name="config_safe_media_volume_enabled" />
+ <java-symbol type="bool" name="config_safe_media_disable_on_volume_up" />
<java-symbol type="bool" name="config_camera_sound_forced" />
<java-symbol type="bool" name="config_dontPreferApn" />
<java-symbol type="bool" name="config_restartRadioAfterProvisioning" />
@@ -2235,6 +2236,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" />
@@ -3107,6 +3109,11 @@
<java-symbol type="plurals" name="autofill_picker_some_suggestions" />
<java-symbol type="string" name="autofill" />
<java-symbol type="string" name="autofill_picker_accessibility_title " />
+ <java-symbol type="string" name="autofill_update_title" />
+ <java-symbol type="string" name="autofill_update_title_with_type" />
+ <java-symbol type="string" name="autofill_update_title_with_2types" />
+ <java-symbol type="string" name="autofill_update_title_with_3types" />
+ <java-symbol type="string" name="autofill_update_yes" />
<java-symbol type="string" name="autofill_save_accessibility_title " />
<java-symbol type="string" name="autofill_save_title" />
<java-symbol type="string" name="autofill_save_title_with_type" />
@@ -3255,6 +3262,7 @@
<java-symbol type="array" name="config_hideWhenDisabled_packageNames" />
<java-symbol type="string" name="config_dozeLongPressSensorType" />
+ <java-symbol type="string" name="config_dozeReachSensorType" />
<java-symbol type="array" name="config_allowedGlobalInstantAppSettings" />
<java-symbol type="array" name="config_allowedSystemInstantAppSettings" />
@@ -3434,6 +3442,8 @@
<java-symbol type="integer" name="config_defaultHapticFeedbackIntensity" />
<java-symbol type="integer" name="config_defaultNotificationVibrationIntensity" />
+ <java-symbol type="bool" name="config_maskMainBuiltInDisplayCutout" />
+
<java-symbol type="array" name="config_disableApksUnlessMatchedSku_apk_list" />
<java-symbol type="array" name="config_disableApkUnlessMatchedSku_skus_list" />
</resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 4833816..090f9af 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -306,6 +306,7 @@
<item name="quickContactBadgeStyleSmallWindowLarge">@style/Widget.QuickContactBadgeSmall.WindowLarge</item>
<item name="listPopupWindowStyle">@style/Widget.ListPopupWindow</item>
<item name="popupMenuStyle">@style/Widget.PopupMenu</item>
+ <item name="popupTheme">@null</item>
<item name="activityChooserViewStyle">@style/Widget.ActivityChooserView</item>
<item name="fragmentBreadCrumbsStyle">@style/Widget.FragmentBreadCrumbs</item>
<item name="contextPopupMenuStyle">?attr/popupMenuStyle</item>
diff --git a/core/res/res/values/themes_holo.xml b/core/res/res/values/themes_holo.xml
index cb5b93d..33832d4 100644
--- a/core/res/res/values/themes_holo.xml
+++ b/core/res/res/values/themes_holo.xml
@@ -296,6 +296,7 @@
<item name="quickContactBadgeStyleSmallWindowLarge">@style/Widget.Holo.QuickContactBadgeSmall.WindowLarge</item>
<item name="listPopupWindowStyle">@style/Widget.Holo.ListPopupWindow</item>
<item name="popupMenuStyle">@style/Widget.Holo.PopupMenu</item>
+ <item name="popupTheme">@null</item>
<item name="stackViewStyle">@style/Widget.Holo.StackView</item>
<item name="activityChooserViewStyle">@style/Widget.Holo.ActivityChooserView</item>
<item name="fragmentBreadCrumbsStyle">@style/Widget.Holo.FragmentBreadCrumbs</item>
@@ -658,9 +659,11 @@
<item name="quickContactBadgeStyleSmallWindowLarge">@style/Widget.Holo.QuickContactBadgeSmall.WindowLarge</item>
<item name="listPopupWindowStyle">@style/Widget.Holo.Light.ListPopupWindow</item>
<item name="popupMenuStyle">@style/Widget.Holo.Light.PopupMenu</item>
+ <item name="popupTheme">@null</item>
<item name="stackViewStyle">@style/Widget.Holo.StackView</item>
<item name="activityChooserViewStyle">@style/Widget.Holo.Light.ActivityChooserView</item>
<item name="fragmentBreadCrumbsStyle">@style/Widget.Holo.Light.FragmentBreadCrumbs</item>
+ <item name="contextPopupMenuStyle">?attr/popupMenuStyle</item>
<!-- Preference styles -->
<item name="preferenceScreenStyle">@style/Preference.Holo.PreferenceScreen</item>
diff --git a/core/res/res/values/themes_leanback.xml b/core/res/res/values/themes_leanback.xml
index 82cf288..f71df9f 100644
--- a/core/res/res/values/themes_leanback.xml
+++ b/core/res/res/values/themes_leanback.xml
@@ -93,4 +93,41 @@
<item name="textColorPrimary">@color/primary_text_leanback_formwizard_dark</item>
<item name="windowAnimationStyle">@style/WindowAnimationStyle.Leanback.Setup</item>
</style>
+
+ <!-- Theme used for the intent picker activity. -->
+ <style name="Theme.Leanback.Resolver" parent="Theme.Material">
+ <item name="windowEnterTransition">@empty</item>
+ <item name="windowExitTransition">@empty</item>
+ <item name="windowIsTranslucent">true</item>
+ <item name="windowNoTitle">true</item>
+ <item name="windowBackground">@color/transparent</item>
+ <item name="backgroundDimEnabled">true</item>
+ <item name="statusBarColor">@color/transparent</item>
+ <item name="windowContentOverlay">@null</item>
+ <item name="colorControlActivated">?attr/colorControlHighlight</item>
+ <item name="listPreferredItemPaddingStart">?attr/dialogPreferredPadding</item>
+ <item name="listPreferredItemPaddingEnd">?attr/dialogPreferredPadding</item>
+
+ <!-- Dialog attributes -->
+ <item name="dialogCornerRadius">@dimen/config_dialogCornerRadius</item>
+ <item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>
+
+ <!-- Button styles -->
+ <item name="buttonCornerRadius">@dimen/config_buttonCornerRadius</item>
+ <item name="buttonBarButtonStyle">@style/Widget.DeviceDefault.Button.ButtonBar.AlertDialog</item>
+
+ <!-- Color palette -->
+ <item name="colorPrimary">@color/primary_device_default_dark</item>
+ <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+ <item name="colorAccent">@color/accent_device_default_dark</item>
+ <item name="colorError">@color/error_color_device_default_dark</item>
+
+ <!-- Progress bar attributes -->
+ <item name="colorProgressBackgroundNormal">@color/config_progress_background_tint</item>
+ <item name="progressBarCornerRadius">@dimen/config_progressBarCornerRadius</item>
+
+ <!-- Toolbar attributes -->
+ <item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
+ </style>
+
</resources>
diff --git a/core/res/res/values/themes_package_installer.xml b/core/res/res/values/themes_permission_controller.xml
similarity index 100%
rename from core/res/res/values/themes_package_installer.xml
rename to core/res/res/values/themes_permission_controller.xml
diff --git a/core/tests/benchmarks/src/android/content/res/ResourcesBenchmark.java b/core/tests/benchmarks/src/android/content/res/ResourcesBenchmark.java
deleted file mode 100644
index 426b0dc..0000000
--- a/core/tests/benchmarks/src/android/content/res/ResourcesBenchmark.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2015 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.content.res;
-
-import android.util.AttributeSet;
-import android.util.Xml;
-
-import com.android.internal.R;
-
-import org.xmlpull.v1.XmlPullParser;
-
-import com.google.caliper.AfterExperiment;
-import com.google.caliper.BeforeExperiment;
-
-public class ResourcesBenchmark {
-
- private AssetManager mAsset;
- private Resources mRes;
-
- private int mTextId;
- private int mColorId;
- private int mIntegerId;
- private int mLayoutId;
-
- @BeforeExperiment
- protected void setUp() {
- mAsset = new AssetManager();
- mAsset.addAssetPath("/system/framework/framework-res.apk");
- mRes = new Resources(mAsset, null, null);
-
- mTextId = mRes.getIdentifier("cancel", "string", "android");
- mColorId = mRes.getIdentifier("transparent", "color", "android");
- mIntegerId = mRes.getIdentifier("config_shortAnimTime", "integer", "android");
- mLayoutId = mRes.getIdentifier("two_line_list_item", "layout", "android");
- }
-
- @AfterExperiment
- protected void tearDown() {
- mAsset.close();
- }
-
- public void timeGetString(int reps) {
- for (int i = 0; i < reps; i++) {
- mRes.getText(mTextId);
- }
- }
-
- public void timeGetColor(int reps) {
- for (int i = 0; i < reps; i++) {
- mRes.getColor(mColorId, null);
- }
- }
-
- public void timeGetInteger(int reps) {
- for (int i = 0; i < reps; i++) {
- mRes.getInteger(mIntegerId);
- }
- }
-
- public void timeGetLayoutAndTraverse(int reps) throws Exception {
- for (int i = 0; i < reps; i++) {
- final XmlResourceParser parser = mRes.getLayout(mLayoutId);
- try {
- while (parser.next() != XmlPullParser.END_DOCUMENT) {
- // Walk the entire tree
- }
- } finally {
- parser.close();
- }
- }
- }
-}
diff --git a/core/tests/coretests/AndroidManifest.xml b/core/tests/coretests/AndroidManifest.xml
index 2a906ae..d704957 100644
--- a/core/tests/coretests/AndroidManifest.xml
+++ b/core/tests/coretests/AndroidManifest.xml
@@ -1301,6 +1301,11 @@
android:process=":MemoryFileProvider">
</provider>
+ <provider android:name="android.content.RedactingProvider"
+ android:authorities="android.content.RedactingProvider"
+ android:process=":RedactingProvider">
+ </provider>
+
<!-- Application components used for os tests -->
<service android:name="android.os.MessengerService"
diff --git a/core/tests/coretests/src/android/content/RedactingProvider.java b/core/tests/coretests/src/android/content/RedactingProvider.java
new file mode 100644
index 0000000..e2ad448
--- /dev/null
+++ b/core/tests/coretests/src/android/content/RedactingProvider.java
@@ -0,0 +1,89 @@
+/*
+ * 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.content;
+
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.database.RedactingCursor;
+import android.net.Uri;
+import android.util.ArrayMap;
+
+public class RedactingProvider extends ContentProvider {
+ @Override
+ public boolean onCreate() {
+ return true;
+ }
+
+ @Override
+ public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+ String sortOrder) {
+ switch (uri.getLastPathSegment()) {
+ case "missing": {
+ final MatrixCursor cursor = new MatrixCursor(
+ new String[] { "name", "size", "_data" });
+ cursor.addRow(new Object[] { "foo", 10, "/path/to/foo" });
+ cursor.addRow(new Object[] { "bar", 20, "/path/to/bar" });
+
+ final ArrayMap<String, Object> redactions = new ArrayMap<>();
+ redactions.put("missing", null);
+ return RedactingCursor.create(cursor, redactions);
+ }
+ case "single": {
+ final MatrixCursor cursor = new MatrixCursor(
+ new String[] { "name", "size", "_data" });
+ cursor.addRow(new Object[] { "foo", 10, "/path/to/foo" });
+ cursor.addRow(new Object[] { "bar", 20, "/path/to/bar" });
+
+ final ArrayMap<String, Object> redactions = new ArrayMap<>();
+ redactions.put("name", null);
+ redactions.put("_data", "/dev/null");
+ return RedactingCursor.create(cursor, redactions);
+ }
+ case "multiple": {
+ final MatrixCursor cursor = new MatrixCursor(
+ new String[] { "_data", "name", "_data" });
+ cursor.addRow(new Object[] { "/path", "foo", "/path" });
+
+ final ArrayMap<String, Object> redactions = new ArrayMap<>();
+ redactions.put("_data", null);
+ return RedactingCursor.create(cursor, redactions);
+ }
+ }
+
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getType(Uri uri) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Uri insert(Uri uri, ContentValues values) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public int delete(Uri uri, String selection, String[] selectionArgs) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/core/tests/coretests/src/android/database/RedactingCursorTest.java b/core/tests/coretests/src/android/database/RedactingCursorTest.java
new file mode 100644
index 0000000..93998f3
--- /dev/null
+++ b/core/tests/coretests/src/android/database/RedactingCursorTest.java
@@ -0,0 +1,85 @@
+/*
+ * 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.database;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import android.content.Context;
+import android.net.Uri;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class RedactingCursorTest {
+ private Context getContext() {
+ return InstrumentationRegistry.getContext();
+ }
+
+ @Test
+ public void testMissing() throws Exception {
+ final Cursor redacting = getContext().getContentResolver().query(
+ Uri.parse("content://android.content.RedactingProvider/missing"), null, null, null);
+
+ redacting.moveToNext();
+ assertEquals("foo", redacting.getString(0));
+ assertEquals(10, redacting.getInt(1));
+ assertEquals("/path/to/foo", redacting.getString(2));
+ redacting.moveToNext();
+ assertEquals("bar", redacting.getString(0));
+ assertEquals(20, redacting.getInt(1));
+ assertEquals("/path/to/bar", redacting.getString(2));
+ }
+
+ @Test
+ public void testSingle() throws Exception {
+ final Cursor redacting = getContext().getContentResolver().query(
+ Uri.parse("content://android.content.RedactingProvider/single"), null, null, null);
+
+ redacting.moveToNext();
+ assertEquals(null, redacting.getString(0));
+ assertEquals(10, redacting.getInt(1));
+ assertEquals("/dev/null", redacting.getString(2));
+ assertEquals(Cursor.FIELD_TYPE_NULL, redacting.getType(0));
+ assertEquals(Cursor.FIELD_TYPE_INTEGER, redacting.getType(1));
+ assertEquals(Cursor.FIELD_TYPE_STRING, redacting.getType(2));
+ assertTrue(redacting.isNull(0));
+ assertFalse(redacting.isNull(1));
+ assertFalse(redacting.isNull(2));
+
+ redacting.moveToNext();
+ assertEquals(null, redacting.getString(0));
+ assertEquals(20, redacting.getInt(1));
+ assertEquals("/dev/null", redacting.getString(2));
+ }
+
+ @Test
+ public void testMultiple() throws Exception {
+ final Cursor redacting = getContext().getContentResolver().query(
+ Uri.parse("content://android.content.RedactingProvider/multiple"),
+ null, null, null);
+
+ redacting.moveToNext();
+ assertEquals(null, redacting.getString(0));
+ assertEquals("foo", redacting.getString(1));
+ assertEquals(null, redacting.getString(2));
+ }
+}
diff --git a/core/tests/coretests/src/android/graphics/TypefaceSystemFallbackTest.java b/core/tests/coretests/src/android/graphics/TypefaceSystemFallbackTest.java
index eaabdc8..dd34f1f 100644
--- a/core/tests/coretests/src/android/graphics/TypefaceSystemFallbackTest.java
+++ b/core/tests/coretests/src/android/graphics/TypefaceSystemFallbackTest.java
@@ -23,9 +23,12 @@
import android.content.Context;
import android.content.res.AssetManager;
+import android.graphics.fonts.FontFamily;
+import android.graphics.fonts.SystemFonts;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+import android.text.FontConfig;
import android.util.ArrayMap;
import org.junit.After;
@@ -112,7 +115,9 @@
} catch (IOException e) {
throw new RuntimeException(e);
}
- Typeface.buildSystemFallback(TEST_FONTS_XML, TEST_FONT_DIR, fontMap, fallbackMap);
+ final FontConfig.Alias[] aliases = SystemFonts.buildSystemFallback(TEST_FONTS_XML,
+ TEST_FONT_DIR, fallbackMap);
+ Typeface.initSystemDefaultTypefaces(fontMap, fallbackMap, aliases);
}
@Test
@@ -120,10 +125,14 @@
final ArrayMap<String, Typeface> fontMap = new ArrayMap<>();
final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>();
- Typeface.buildSystemFallback(SYSTEM_FONTS_XML, SYSTEM_FONT_DIR, fontMap, fallbackMap);
+ final FontConfig.Alias[] aliases = SystemFonts.buildSystemFallback(SYSTEM_FONTS_XML,
+ SYSTEM_FONT_DIR, fallbackMap);
- assertFalse(fontMap.isEmpty());
+ assertNotNull(aliases);
assertFalse(fallbackMap.isEmpty());
+
+ Typeface.initSystemDefaultTypefaces(fontMap, fallbackMap, aliases);
+ assertFalse(fontMap.isEmpty());
}
@Test
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/android/text/FontFallbackSetup.java b/core/tests/coretests/src/android/text/FontFallbackSetup.java
index ced74ee..6c34043 100644
--- a/core/tests/coretests/src/android/text/FontFallbackSetup.java
+++ b/core/tests/coretests/src/android/text/FontFallbackSetup.java
@@ -19,8 +19,9 @@
import android.annotation.NonNull;
import android.content.Context;
import android.content.res.AssetManager;
-import android.graphics.FontFamily;
import android.graphics.Typeface;
+import android.graphics.fonts.FontFamily;
+import android.graphics.fonts.SystemFonts;
import android.support.test.InstrumentationRegistry;
import android.util.ArrayMap;
@@ -73,7 +74,9 @@
}
final ArrayMap<String, FontFamily[]> fallbackMap = new ArrayMap<>();
- Typeface.buildSystemFallback(testFontsXml, mTestFontsDir, mFontMap, fallbackMap);
+ final FontConfig.Alias[] aliases = SystemFonts.buildSystemFallback(testFontsXml,
+ mTestFontsDir, fallbackMap);
+ Typeface.initSystemDefaultTypefaces(mFontMap, fallbackMap, aliases);
}
@NonNull
diff --git a/core/tests/coretests/src/android/view/DisplayCutoutTest.java b/core/tests/coretests/src/android/view/DisplayCutoutTest.java
index 6ee74cb..fe45fe7 100644
--- a/core/tests/coretests/src/android/view/DisplayCutoutTest.java
+++ b/core/tests/coretests/src/android/view/DisplayCutoutTest.java
@@ -19,6 +19,7 @@
import static android.view.DisplayCutout.NO_CUTOUT;
import static android.view.DisplayCutout.fromSpec;
+import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.sameInstance;
import static org.junit.Assert.assertEquals;
@@ -220,6 +221,19 @@
}
@Test
+ public void fromSpec_setsSafeInsets_top() {
+ DisplayCutout cutout = fromSpec("M -50,0 v 20 h 100 v -20 z", 200, 400, 2f);
+ assertThat(cutout.getSafeInsets(), equalTo(new Rect(0, 20, 0, 0)));
+ }
+
+ @Test
+ public void fromSpec_setsSafeInsets_top_and_bottom() {
+ DisplayCutout cutout = fromSpec("M -50,0 v 20 h 100 v -20 z"
+ + "@bottom M -50,0 v -10,0 h 100 v 20 z", 200, 400, 2f);
+ assertThat(cutout.getSafeInsets(), equalTo(new Rect(0, 20, 0, 10)));
+ }
+
+ @Test
public void parcel_unparcel_nocutout() {
Parcel p = Parcel.obtain();
diff --git a/core/tests/coretests/src/android/view/accessibility/AccessibilityCacheTest.java b/core/tests/coretests/src/android/view/accessibility/AccessibilityCacheTest.java
index ec80d20..7f675ff 100644
--- a/core/tests/coretests/src/android/view/accessibility/AccessibilityCacheTest.java
+++ b/core/tests/coretests/src/android/view/accessibility/AccessibilityCacheTest.java
@@ -501,7 +501,7 @@
}
@Test
- public void addNode_whenNodeBeingReplacedIsOwnGrandparent_doesntCrash() {
+ public void addNode_whenNodeBeingReplacedIsOwnGrandparentWithTwoChildren_doesntCrash() {
AccessibilityNodeInfo parentNodeInfo =
getNodeWithA11yAndWindowId(PARENT_VIEW_ID, WINDOW_ID_1);
parentNodeInfo.addChild(getMockViewWithA11yAndWindowIds(CHILD_VIEW_ID, WINDOW_ID_1));
@@ -525,6 +525,29 @@
}
@Test
+ public void addNode_whenNodeBeingReplacedIsOwnGrandparentWithOneChild_doesntCrash() {
+ AccessibilityNodeInfo parentNodeInfo =
+ getNodeWithA11yAndWindowId(PARENT_VIEW_ID, WINDOW_ID_1);
+ parentNodeInfo.addChild(getMockViewWithA11yAndWindowIds(CHILD_VIEW_ID, WINDOW_ID_1));
+ AccessibilityNodeInfo childNodeInfo =
+ getNodeWithA11yAndWindowId(CHILD_VIEW_ID, WINDOW_ID_1);
+ childNodeInfo.setParent(getMockViewWithA11yAndWindowIds(PARENT_VIEW_ID, WINDOW_ID_1));
+ childNodeInfo.addChild(getMockViewWithA11yAndWindowIds(PARENT_VIEW_ID, WINDOW_ID_1));
+
+ AccessibilityNodeInfo replacementParentNodeInfo =
+ getNodeWithA11yAndWindowId(PARENT_VIEW_ID, WINDOW_ID_1);
+ try {
+ mAccessibilityCache.add(parentNodeInfo);
+ mAccessibilityCache.add(childNodeInfo);
+ mAccessibilityCache.add(replacementParentNodeInfo);
+ } finally {
+ parentNodeInfo.recycle();
+ childNodeInfo.recycle();
+ replacementParentNodeInfo.recycle();
+ }
+ }
+
+ @Test
public void testCacheCriticalEventList_doesntLackEvents() {
for (int i = 0; i < 32; i++) {
int eventType = 1 << i;
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/core/tests/utiltests/jni/android_util_MemoryIntArrayTest.cpp b/core/tests/utiltests/jni/android_util_MemoryIntArrayTest.cpp
index 57ee2d5..4b14284 100644
--- a/core/tests/utiltests/jni/android_util_MemoryIntArrayTest.cpp
+++ b/core/tests/utiltests/jni/android_util_MemoryIntArrayTest.cpp
@@ -21,36 +21,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
-jint android_util_MemoryIntArrayTest_createAshmem(__attribute__((unused)) JNIEnv* env,
- __attribute__((unused)) jobject clazz,
- jstring name, jint size)
-{
-
- if (name == NULL) {
- return -1;
- }
-
- if (size < 0) {
- return -1;
- }
-
- const char* nameStr = env->GetStringUTFChars(name, NULL);
- const int ashmemSize = sizeof(std::atomic_int) * size;
- int fd = ashmem_create_region(nameStr, ashmemSize);
- env->ReleaseStringUTFChars(name, nameStr);
-
- if (fd < 0) {
- return -1;
- }
-
- int setProtResult = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE);
- if (setProtResult < 0) {
- return -1;
- }
-
- return fd;
-}
-
void android_util_MemoryIntArrayTest_setAshmemSize(__attribute__((unused)) JNIEnv* env,
__attribute__((unused)) jobject clazz, jint fd, jint size)
{
diff --git a/core/tests/utiltests/jni/registration.cpp b/core/tests/utiltests/jni/registration.cpp
index 0c84d98..d4fc2fb 100644
--- a/core/tests/utiltests/jni/registration.cpp
+++ b/core/tests/utiltests/jni/registration.cpp
@@ -16,25 +16,14 @@
#include <jni.h>
-extern jint android_util_MemoryIntArrayTest_createAshmem(JNIEnv* env,
- jobject clazz, jstring name, jint size);
extern void android_util_MemoryIntArrayTest_setAshmemSize(JNIEnv* env,
jobject clazz, jint fd, jint size);
extern "C" {
- JNIEXPORT jint JNICALL Java_android_util_MemoryIntArrayTest_nativeCreateAshmem(
- JNIEnv * env, jobject obj, jstring name, jint size);
JNIEXPORT void JNICALL Java_android_util_MemoryIntArrayTest_nativeSetAshmemSize(
JNIEnv * env, jobject obj, jint fd, jint size);
};
-JNIEXPORT jint JNICALL Java_android_util_MemoryIntArrayTest_nativeCreateAshmem(
- __attribute__((unused)) JNIEnv * env,__attribute__((unused)) jobject obj,
- jstring name, jint size)
-{
- return android_util_MemoryIntArrayTest_createAshmem(env, obj, name, size);
-}
-
JNIEXPORT void JNICALL Java_android_util_MemoryIntArrayTest_nativeSetAshmemSize(
__attribute__((unused)) JNIEnv * env,__attribute__((unused)) jobject obj,
jint fd, jint size)
diff --git a/core/tests/utiltests/src/android/util/MemoryIntArrayTest.java b/core/tests/utiltests/src/android/util/MemoryIntArrayTest.java
index 85817bb..24b33ef 100644
--- a/core/tests/utiltests/src/android/util/MemoryIntArrayTest.java
+++ b/core/tests/utiltests/src/android/util/MemoryIntArrayTest.java
@@ -23,6 +23,7 @@
import static org.junit.Assert.fail;
import android.os.Parcel;
+import android.os.ParcelFileDescriptor;
import android.support.test.runner.AndroidJUnit4;
import libcore.io.IoUtils;
import org.junit.Test;
@@ -251,13 +252,11 @@
// Create a MemoryIntArray to muck with
MemoryIntArray array = new MemoryIntArray(1);
- // Create the fd to stuff in the MemoryIntArray
- final int fd = nativeCreateAshmem("foo", 1);
-
- // Replace the fd with our ahsmem region
- Field fdFiled = MemoryIntArray.class.getDeclaredField("mFd");
- fdFiled.setAccessible(true);
- fdFiled.set(array, fd);
+ // Grab the internal ashmem fd.
+ Field fdField = MemoryIntArray.class.getDeclaredField("mFd");
+ fdField.setAccessible(true);
+ int fd = ((ParcelFileDescriptor)fdField.get(array)).getFd();
+ assertTrue("fd must be valid", fd != -1);
CountDownLatch countDownLatch = new CountDownLatch(2);
@@ -292,10 +291,9 @@
}
if (!success) {
- fail("MemoryIntArray should catch ahshmem size changing under it");
+ fail("MemoryIntArray should catch ashmem size changing under it");
}
}
- private native int nativeCreateAshmem(String name, int size);
private native void nativeSetAshmemSize(int fd, int size);
}
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index b3f05dc..6f52fbd 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -182,11 +182,11 @@
code to link against. -->
<library name="android.test.base"
- file="/system/framework/android.test.base.jar" />
+ file="/system/framework/android.test.base.impl.jar" />
<library name="android.test.mock"
- file="/system/framework/android.test.mock.jar" />
+ file="/system/framework/android.test.mock.impl.jar" />
<library name="android.test.runner"
- file="/system/framework/android.test.runner.jar" />
+ file="/system/framework/android.test.runner.impl.jar" />
<!-- These are the standard packages that are white-listed to always have internet
access while in power save mode, even if they aren't in the foreground. -->
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index f6587d3..616a8d6 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -126,6 +126,7 @@
<privapp-permissions package="com.android.omadm.service">
<permission name="android.permission.CHANGE_CONFIGURATION"/>
<permission name="android.permission.CONNECTIVITY_INTERNAL"/>
+ <permission name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/>
<permission name="android.permission.MODIFY_PHONE_STATE"/>
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
<permission name="android.permission.WRITE_APN_SETTINGS"/>
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/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
index 522d7a5..7fa7484 100644
--- a/graphics/java/android/graphics/Typeface.java
+++ b/graphics/java/android/graphics/Typeface.java
@@ -28,13 +28,13 @@
import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.graphics.fonts.FontVariationAxis;
+import android.graphics.fonts.SystemFonts;
import android.net.Uri;
import android.provider.FontRequest;
import android.provider.FontsContract;
import android.text.FontConfig;
import android.util.ArrayMap;
import android.util.Base64;
-import android.util.Log;
import android.util.LongSparseArray;
import android.util.LruCache;
import android.util.SparseArray;
@@ -47,12 +47,9 @@
import libcore.util.NativeAllocationRegistry;
-import org.xmlpull.v1.XmlPullParserException;
-
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Retention;
@@ -121,10 +118,14 @@
private static final Object sDynamicCacheLock = new Object();
static Typeface sDefaultTypeface;
+
+ // Following two fields are not used but left for hiddenapi private list
@UnsupportedAppUsage
static final Map<String, Typeface> sSystemFontMap;
+
+ // We cannot support sSystemFallbackMap since we will migrate to public FontFamily API.
@UnsupportedAppUsage
- static final Map<String, FontFamily[]> sSystemFallbackMap;
+ static final Map<String, FontFamily[]> sSystemFallbackMap = Collections.emptyMap();
/**
* @hide
@@ -566,11 +567,7 @@
return null;
}
- Typeface base = sSystemFontMap.get(mFallbackFamilyName);
- if (base == null) {
- base = sDefaultTypeface;
- }
-
+ final Typeface base = getSystemDefaultTypeface(mFallbackFamilyName);
if (mWeight == RESOLVE_BY_FONT_TABLE && mItalic == RESOLVE_BY_FONT_TABLE) {
return base;
}
@@ -687,7 +684,7 @@
* @return The best matching typeface.
*/
public static Typeface create(String familyName, @Style int style) {
- return create(sSystemFontMap.get(familyName), style);
+ return create(getSystemDefaultTypeface(familyName), style);
}
/**
@@ -897,7 +894,9 @@
* Create a new typeface from an array of font families.
*
* @param families array of font families
+ * @deprecated
*/
+ @Deprecated
@UnsupportedAppUsage
private static Typeface createFromFamilies(FontFamily[] families) {
long[] ptrArray = new long[families.length];
@@ -909,6 +908,21 @@
}
/**
+ * Create a new typeface from an array of android.graphics.fonts.FontFamily.
+ *
+ * @param families array of font families
+ */
+ private static Typeface createFromFamilies(
+ @Nullable android.graphics.fonts.FontFamily[] families) {
+ final long[] ptrArray = new long[families.length];
+ for (int i = 0; i < families.length; ++i) {
+ ptrArray[i] = families[i].getNativePtr();
+ }
+ return new Typeface(nativeCreateFromArray(ptrArray,
+ RESOLVE_BY_FONT_TABLE, RESOLVE_BY_FONT_TABLE));
+ }
+
+ /**
* This method is used by supportlib-v27.
* TODO: Remove private API use in supportlib: http://b/72665240
*/
@@ -934,16 +948,13 @@
@UnsupportedAppUsage
private static Typeface createFromFamiliesWithDefault(FontFamily[] families,
String fallbackName, int weight, int italic) {
- FontFamily[] fallback = sSystemFallbackMap.get(fallbackName);
- if (fallback == null) {
- fallback = sSystemFallbackMap.get(DEFAULT_FAMILY);
- }
+ android.graphics.fonts.FontFamily[] fallback = SystemFonts.getSystemFallback(fallbackName);
long[] ptrArray = new long[families.length + fallback.length];
for (int i = 0; i < families.length; i++) {
ptrArray[i] = families[i].mNativePtr;
}
for (int i = 0; i < fallback.length; i++) {
- ptrArray[i + families.length] = fallback[i].mNativePtr;
+ ptrArray[i + families.length] = fallback[i].getNativePtr();
}
return new Typeface(nativeCreateFromArray(ptrArray, weight, italic));
}
@@ -961,191 +972,41 @@
mWeight = nativeGetWeight(ni);
}
- private static @Nullable ByteBuffer mmap(String fullPath) {
- try (FileInputStream file = new FileInputStream(fullPath)) {
- final FileChannel fileChannel = file.getChannel();
- final long fontSize = fileChannel.size();
- return fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fontSize);
- } catch (IOException e) {
- Log.e(TAG, "Error mapping font file " + fullPath);
- return null;
- }
+ private static Typeface getSystemDefaultTypeface(@NonNull String familyName) {
+ Typeface tf = sSystemFontMap.get(familyName);
+ return tf == null ? Typeface.DEFAULT : tf;
}
- private static @Nullable FontFamily createFontFamily(
- String familyName, List<FontConfig.Font> fonts, String[] languageTags, int variant,
- Map<String, ByteBuffer> cache, String fontDir) {
- final FontFamily family = new FontFamily(languageTags, variant);
- for (int i = 0; i < fonts.size(); i++) {
- final FontConfig.Font font = fonts.get(i);
- final String fullPath = fontDir + font.getFontName();
- ByteBuffer buffer = cache.get(fullPath);
- if (buffer == null) {
- if (cache.containsKey(fullPath)) {
- continue; // Already failed to mmap. Skip it.
- }
- buffer = mmap(fullPath);
- cache.put(fullPath, buffer);
- if (buffer == null) {
- continue;
- }
- }
- if (!family.addFontFromBuffer(buffer, font.getTtcIndex(), font.getAxes(),
- font.getWeight(), font.isItalic() ? STYLE_ITALIC : STYLE_NORMAL)) {
- Log.e(TAG, "Error creating font " + fullPath + "#" + font.getTtcIndex());
- }
- }
- if (!family.freeze()) {
- Log.e(TAG, "Unable to load Family: " + familyName + " : "
- + Arrays.toString(languageTags));
- return null;
- }
- return family;
- }
-
- private static void pushFamilyToFallback(FontConfig.Family xmlFamily,
- ArrayMap<String, ArrayList<FontFamily>> fallbackMap,
- Map<String, ByteBuffer> cache,
- String fontDir) {
-
- final String[] languageTags = xmlFamily.getLanguages();
- final int variant = xmlFamily.getVariant();
-
- final ArrayList<FontConfig.Font> defaultFonts = new ArrayList<>();
- final ArrayMap<String, ArrayList<FontConfig.Font>> specificFallbackFonts = new ArrayMap<>();
-
- // Collect default fallback and specific fallback fonts.
- for (final FontConfig.Font font : xmlFamily.getFonts()) {
- final String fallbackName = font.getFallbackFor();
- if (fallbackName == null) {
- defaultFonts.add(font);
- } else {
- ArrayList<FontConfig.Font> fallback = specificFallbackFonts.get(fallbackName);
- if (fallback == null) {
- fallback = new ArrayList<>();
- specificFallbackFonts.put(fallbackName, fallback);
- }
- fallback.add(font);
- }
- }
-
- final FontFamily defaultFamily = defaultFonts.isEmpty() ? null : createFontFamily(
- xmlFamily.getName(), defaultFonts, languageTags, variant, cache, fontDir);
-
- // Insert family into fallback map.
- for (int i = 0; i < fallbackMap.size(); i++) {
- final ArrayList<FontConfig.Font> fallback =
- specificFallbackFonts.get(fallbackMap.keyAt(i));
- if (fallback == null) {
- if (defaultFamily != null) {
- fallbackMap.valueAt(i).add(defaultFamily);
- }
- } else {
- final FontFamily family = createFontFamily(
- xmlFamily.getName(), fallback, languageTags, variant, cache, fontDir);
- if (family != null) {
- fallbackMap.valueAt(i).add(family);
- } else if (defaultFamily != null) {
- fallbackMap.valueAt(i).add(defaultFamily);
- } else {
- // There is no valid for for default fallback. Ignore.
- }
- }
- }
- }
-
- /**
- * Build the system fallback from xml file.
- *
- * @param xmlPath A full path string to the fonts.xml file.
- * @param fontDir A full path string to the system font directory. This must end with
- * slash('/').
- * @param fontMap An output system font map. Caller must pass empty map.
- * @param fallbackMap An output system fallback map. Caller must pass empty map.
- * @hide
- */
+ /** @hide */
@VisibleForTesting
+ public static void initSystemDefaultTypefaces(Map<String, Typeface> systemFontMap,
+ Map<String, android.graphics.fonts.FontFamily[]> fallbacks,
+ FontConfig.Alias[] aliases) {
+ for (Map.Entry<String, android.graphics.fonts.FontFamily[]> entry : fallbacks.entrySet()) {
+ systemFontMap.put(entry.getKey(), createFromFamilies(entry.getValue()));
+ }
+
+ for (FontConfig.Alias alias : aliases) {
+ final Typeface base = systemFontMap.get(alias.getToName());
+ final int weight = alias.getWeight();
+ final Typeface newFace = weight == 400 ? base :
+ new Typeface(nativeCreateWeightAlias(base.native_instance, weight));
+ systemFontMap.put(alias.getName(), newFace);
+ }
+ }
+
+ // Following methods are left for layoutlib
+ // TODO: Remove once layoutlib stop calling buildSystemFallback
+ /** @hide */
public static void buildSystemFallback(String xmlPath, String fontDir,
ArrayMap<String, Typeface> fontMap, ArrayMap<String, FontFamily[]> fallbackMap) {
- try {
- final FileInputStream fontsIn = new FileInputStream(xmlPath);
- final FontConfig fontConfig = FontListParser.parse(fontsIn);
-
- final HashMap<String, ByteBuffer> bufferCache = new HashMap<String, ByteBuffer>();
- final FontConfig.Family[] xmlFamilies = fontConfig.getFamilies();
-
- final ArrayMap<String, ArrayList<FontFamily>> fallbackListMap = new ArrayMap<>();
- // First traverse families which have a 'name' attribute to create fallback map.
- for (final FontConfig.Family xmlFamily : xmlFamilies) {
- final String familyName = xmlFamily.getName();
- if (familyName == null) {
- continue;
- }
- final FontFamily family = createFontFamily(
- xmlFamily.getName(), Arrays.asList(xmlFamily.getFonts()),
- xmlFamily.getLanguages(), xmlFamily.getVariant(), bufferCache, fontDir);
- if (family == null) {
- continue;
- }
- final ArrayList<FontFamily> fallback = new ArrayList<>();
- fallback.add(family);
- fallbackListMap.put(familyName, fallback);
- }
-
- // Then, add fallback fonts to the each fallback map.
- for (int i = 0; i < xmlFamilies.length; i++) {
- final FontConfig.Family xmlFamily = xmlFamilies[i];
- // The first family (usually the sans-serif family) is always placed immediately
- // after the primary family in the fallback.
- if (i == 0 || xmlFamily.getName() == null) {
- pushFamilyToFallback(xmlFamily, fallbackListMap, bufferCache, fontDir);
- }
- }
-
- // Build the font map and fallback map.
- for (int i = 0; i < fallbackListMap.size(); i++) {
- final String fallbackName = fallbackListMap.keyAt(i);
- final List<FontFamily> familyList = fallbackListMap.valueAt(i);
- final FontFamily[] families = familyList.toArray(new FontFamily[familyList.size()]);
-
- fallbackMap.put(fallbackName, families);
- final long[] ptrArray = new long[families.length];
- for (int j = 0; j < families.length; j++) {
- ptrArray[j] = families[j].mNativePtr;
- }
- fontMap.put(fallbackName, new Typeface(nativeCreateFromArray(
- ptrArray, RESOLVE_BY_FONT_TABLE, RESOLVE_BY_FONT_TABLE)));
- }
-
- // Insert alias to font maps.
- for (final FontConfig.Alias alias : fontConfig.getAliases()) {
- Typeface base = fontMap.get(alias.getToName());
- Typeface newFace = base;
- int weight = alias.getWeight();
- if (weight != 400) {
- newFace = new Typeface(nativeCreateWeightAlias(base.native_instance, weight));
- }
- fontMap.put(alias.getName(), newFace);
- }
- } catch (RuntimeException e) {
- Log.w(TAG, "Didn't create default family (most likely, non-Minikin build)", e);
- // TODO: normal in non-Minikin case, remove or make error when Minikin-only
- } catch (FileNotFoundException e) {
- Log.e(TAG, "Error opening " + xmlPath, e);
- } catch (IOException e) {
- Log.e(TAG, "Error reading " + xmlPath, e);
- } catch (XmlPullParserException e) {
- Log.e(TAG, "XML parse exception for " + xmlPath, e);
- }
}
static {
- final ArrayMap<String, Typeface> systemFontMap = new ArrayMap<>();
- final ArrayMap<String, FontFamily[]> systemFallbackMap = new ArrayMap<>();
- buildSystemFallback("/system/etc/fonts.xml", "/system/fonts/", systemFontMap,
- systemFallbackMap);
+ final HashMap<String, Typeface> systemFontMap = new HashMap<>();
+ initSystemDefaultTypefaces(systemFontMap, SystemFonts.getRawSystemFallbackMap(),
+ SystemFonts.getAliases());
sSystemFontMap = Collections.unmodifiableMap(systemFontMap);
- sSystemFallbackMap = Collections.unmodifiableMap(systemFallbackMap);
setDefault(sSystemFontMap.get(DEFAULT_FAMILY));
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 040601c..7325b85 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -2033,7 +2033,7 @@
if (fillColors instanceof GradientColor) {
mFillColors = fillColors;
fillGradient = ((GradientColor) fillColors).getShader();
- } else if (fillColors.isStateful()) {
+ } else if (fillColors.isStateful() || fillColors.canApplyTheme()) {
mFillColors = fillColors;
} else {
mFillColors = null;
@@ -2049,7 +2049,7 @@
if (strokeColors instanceof GradientColor) {
mStrokeColors = strokeColors;
strokeGradient = ((GradientColor) strokeColors).getShader();
- } else if (strokeColors.isStateful()) {
+ } else if (strokeColors.isStateful() || strokeColors.canApplyTheme()) {
mStrokeColors = strokeColors;
} else {
mStrokeColors = null;
diff --git a/graphics/java/android/graphics/fonts/Font.java b/graphics/java/android/graphics/fonts/Font.java
index 9d94a64..f0c5199 100644
--- a/graphics/java/android/graphics/fonts/Font.java
+++ b/graphics/java/android/graphics/fonts/Font.java
@@ -36,11 +36,13 @@
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
+import java.util.Arrays;
+import java.util.Objects;
/**
* A font class can be used for creating FontFamily.
*/
-public class Font {
+public final class Font {
private static final String TAG = "Font";
private static final int NOT_SPECIFIED = -1;
@@ -109,6 +111,7 @@
private @IntRange(from = -1, to = 1) int mItalic = NOT_SPECIFIED;
private @IntRange(from = 0) int mTtcIndex = 0;
private @Nullable FontVariationAxis[] mAxes = null;
+ private @Nullable IOException mException;
/**
* Constructs a builder with a byte buffer.
@@ -132,11 +135,13 @@
*
* @param path a file path to the font file
*/
- public Builder(@NonNull File path) throws IOException {
+ public Builder(@NonNull File path) {
Preconditions.checkNotNull(path, "path can not be null");
try (FileInputStream fis = new FileInputStream(path)) {
final FileChannel fc = fis.getChannel();
mBuffer = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
+ } catch (IOException e) {
+ mException = e;
}
}
@@ -145,7 +150,7 @@
*
* @param fd a file descriptor
*/
- public Builder(@NonNull FileDescriptor fd) throws IOException {
+ public Builder(@NonNull FileDescriptor fd) {
this(fd, 0, -1);
}
@@ -157,11 +162,13 @@
* @param size a size of the font data. If -1 is passed, use until end of the file.
*/
public Builder(@NonNull FileDescriptor fd, @IntRange(from = 0) long offset,
- @IntRange(from = -1) long size) throws IOException {
+ @IntRange(from = -1) long size) {
try (FileInputStream fis = new FileInputStream(fd)) {
final FileChannel fc = fis.getChannel();
size = (size == -1) ? fc.size() - offset : size;
mBuffer = fc.map(FileChannel.MapMode.READ_ONLY, offset, size);
+ } catch (IOException e) {
+ mException = e;
}
}
@@ -171,15 +178,17 @@
* @param am the application's asset manager
* @param path the file name of the font data in the asset directory
*/
- public Builder(@NonNull AssetManager am, @NonNull String path) throws IOException {
+ public Builder(@NonNull AssetManager am, @NonNull String path) {
final long nativeAsset = nGetNativeAsset(am, path, true /* is asset */, 0 /* cookie */);
if (nativeAsset == 0) {
- throw new FileNotFoundException("Unable to open " + path);
+ mException = new FileNotFoundException("Unable to open " + path);
+ return;
}
final ByteBuffer b = nGetAssetBuffer(nativeAsset);
sAssetByteBufferRegistroy.registerNativeAllocation(b, nativeAsset);
if (b == null) {
- throw new FileNotFoundException(path + " not found");
+ mException = new FileNotFoundException(path + " not found");
+ return;
}
mBuffer = b;
}
@@ -192,25 +201,29 @@
* @param res the resource of this application.
* @param resId the resource ID of font file.
*/
- public Builder(@NonNull Resources res, int resId) throws IOException {
+ public Builder(@NonNull Resources res, int resId) {
final TypedValue value = new TypedValue();
res.getValue(resId, value, true);
if (value.string == null) {
- throw new FileNotFoundException(resId + " not found");
+ mException = new FileNotFoundException(resId + " not found");
+ return;
}
final String str = value.string.toString();
if (str.toLowerCase().endsWith(".xml")) {
- throw new FileNotFoundException(resId + " must be font file.");
+ mException = new FileNotFoundException(resId + " must be font file.");
+ return;
}
final long nativeAsset = nGetNativeAsset(res.getAssets(), str, false /* is asset */,
value.assetCookie);
if (nativeAsset == 0) {
- throw new FileNotFoundException("Unable to open " + str);
+ mException = new FileNotFoundException("Unable to open " + str);
+ return;
}
final ByteBuffer b = nGetAssetBuffer(nativeAsset);
sAssetByteBufferRegistroy.registerNativeAllocation(b, nativeAsset);
if (b == null) {
- throw new FileNotFoundException(str + " not found");
+ mException = new FileNotFoundException(str + " not found");
+ return;
}
mBuffer = b;
}
@@ -347,7 +360,7 @@
* @return this builder
*/
public @NonNull Builder setFontVariationSettings(@Nullable FontVariationAxis[] axes) {
- mAxes = axes;
+ mAxes = axes == null ? null : axes.clone();
return this;
}
@@ -355,7 +368,10 @@
* Creates the font based on the configured values.
* @return the Font object
*/
- public @Nullable Font build() {
+ public @Nullable Font build() throws IOException {
+ if (mException != null) {
+ throw new IOException("Failed to read font contents", mException);
+ }
if (mWeight == NOT_SPECIFIED || mItalic == NOT_SPECIFIED) {
final int packed = FontFileUtil.analyzeStyle(mBuffer, mTtcIndex, mAxes);
if (FontFileUtil.isSuccess(packed)) {
@@ -378,7 +394,7 @@
}
}
final long ptr = nBuild(builderPtr, mBuffer, mWeight, italic, mTtcIndex);
- final Font font = new Font(ptr, mWeight, italic, mTtcIndex, mAxes);
+ final Font font = new Font(ptr, mBuffer, mWeight, italic, mTtcIndex, mAxes);
sFontRegistory.registerNativeAllocation(font, ptr);
return font;
}
@@ -405,6 +421,7 @@
}
private final long mNativePtr; // address of the shared ptr of minikin::Font
+ private final @NonNull ByteBuffer mBuffer;
private final @IntRange(from = 0, to = 1000) int mWeight;
private final boolean mItalic;
private final @IntRange(from = 0) int mTtcIndex;
@@ -413,8 +430,10 @@
/**
* Use Builder instead
*/
- private Font(long nativePtr, @IntRange(from = 0, to = 1000) int weight, boolean italic,
+ private Font(long nativePtr, @NonNull ByteBuffer buffer,
+ @IntRange(from = 0, to = 1000) int weight, boolean italic,
@IntRange(from = 0) int ttcIndex, @Nullable FontVariationAxis[] axes) {
+ mBuffer = buffer;
mWeight = weight;
mItalic = italic;
mNativePtr = nativePtr;
@@ -462,7 +481,7 @@
* @return font variation settings
*/
public @Nullable FontVariationAxis[] getAxes() {
- return mAxes;
+ return mAxes == null ? null : mAxes.clone();
}
/** @hide */
@@ -471,6 +490,24 @@
}
@Override
+ public boolean equals(@Nullable Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o == null || !(o instanceof Font)) {
+ return false;
+ }
+ Font f = (Font) o;
+ return f.mWeight == mWeight && f.mItalic == mItalic && f.mTtcIndex == mTtcIndex
+ && Arrays.equals(f.mAxes, mAxes) && f.mBuffer.equals(mBuffer);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mWeight, mItalic, mTtcIndex, mAxes, mBuffer);
+ }
+
+ @Override
public String toString() {
return "Font {weight=" + mWeight + ", italic=" + mItalic + "}";
}
diff --git a/graphics/java/android/graphics/fonts/FontFamily.java b/graphics/java/android/graphics/fonts/FontFamily.java
index 74b58ea..c914ece 100644
--- a/graphics/java/android/graphics/fonts/FontFamily.java
+++ b/graphics/java/android/graphics/fonts/FontFamily.java
@@ -18,6 +18,9 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.text.FontConfig;
+import android.text.TextUtils;
import com.android.internal.util.Preconditions;
@@ -54,7 +57,7 @@
* </p>
*
*/
-public class FontFamily {
+public final class FontFamily {
private static final String TAG = "FontFamily";
/**
@@ -107,11 +110,25 @@
* @return a font family
*/
public @NonNull FontFamily build() {
+ return build(null, FontConfig.Family.VARIANT_DEFAULT);
+ }
+
+ /** @hide */
+ public @NonNull FontFamily build(@Nullable String[] langTags, int variant) {
final long builderPtr = nInitBuilder();
for (int i = 0; i < mFonts.size(); ++i) {
nAddFont(builderPtr, mFonts.get(i).getNativePtr());
}
- final long ptr = nBuild(builderPtr);
+ final String langString;
+ if (langTags == null || langTags.length == 0) {
+ langString = null;
+ } else if (langTags.length == 1) {
+ langString = langTags[0];
+ } else {
+ langString = TextUtils.join(",", langTags);
+ }
+
+ final long ptr = nBuild(builderPtr, langString, variant);
final FontFamily family = new FontFamily(mFonts, ptr);
sFamilyRegistory.registerNativeAllocation(family, ptr);
return family;
@@ -124,7 +141,7 @@
private static native long nInitBuilder();
@CriticalNative
private static native void nAddFont(long builderPtr, long fontPtr);
- private static native long nBuild(long builderPtr);
+ private static native long nBuild(long builderPtr, String langTags, int variant);
@CriticalNative
private static native long nGetReleaseNativeFamily();
}
@@ -153,7 +170,7 @@
*
* @return the number of fonts registered in this family.
*/
- public int getFontCount() {
+ public int getSize() {
return mFonts.size();
}
diff --git a/graphics/java/android/graphics/fonts/FontVariationAxis.java b/graphics/java/android/graphics/fonts/FontVariationAxis.java
index 2a902c5..242cbb8 100644
--- a/graphics/java/android/graphics/fonts/FontVariationAxis.java
+++ b/graphics/java/android/graphics/fonts/FontVariationAxis.java
@@ -22,6 +22,7 @@
import android.text.TextUtils;
import java.util.ArrayList;
+import java.util.Objects;
import java.util.regex.Pattern;
/**
@@ -186,5 +187,22 @@
}
return TextUtils.join(",", axes);
}
+
+ @Override
+ public boolean equals(@Nullable Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o == null || !(o instanceof FontVariationAxis)) {
+ return false;
+ }
+ FontVariationAxis axis = (FontVariationAxis) o;
+ return axis.mTag == mTag && axis.mStyleValue == mStyleValue;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mTag, mStyleValue);
+ }
}
diff --git a/graphics/java/android/graphics/fonts/SystemFonts.java b/graphics/java/android/graphics/fonts/SystemFonts.java
new file mode 100644
index 0000000..26b4ec5
--- /dev/null
+++ b/graphics/java/android/graphics/fonts/SystemFonts.java
@@ -0,0 +1,266 @@
+/*
+ * 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 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.graphics.fonts;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.graphics.FontListParser;
+import android.text.FontConfig;
+import android.util.ArrayMap;
+import android.util.Log;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.ArrayUtils;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Provides the system font configurations.
+ * @hide
+ */
+public class SystemFonts {
+ private static final String TAG = "SystemFonts";
+ private static final String DEFAULT_FAMILY = "sans-serif";
+
+ private SystemFonts() {} // Do not instansiate.
+
+ static final Map<String, FontFamily[]> sSystemFallbackMap;
+ static final FontConfig.Alias[] sAliases;
+
+ /**
+ * Returns fallback list for the given family name.
+ *
+ * If no fallback found for the given family name, returns fallback for the default family.
+ *
+ * @param familyName family name, e.g. "serif"
+ */
+ public static @NonNull FontFamily[] getSystemFallback(@Nullable String familyName) {
+ final FontFamily[] families = sSystemFallbackMap.get(familyName);
+ return families == null ? sSystemFallbackMap.get(DEFAULT_FAMILY) : families;
+ }
+
+ /**
+ * Returns raw system fallback map.
+ *
+ * This method is intended to be used only by Typeface static initializer.
+ */
+ public static @NonNull Map<String, FontFamily[]> getRawSystemFallbackMap() {
+ return sSystemFallbackMap;
+ }
+
+ /**
+ * Returns a list of aliases.
+ *
+ * This method is intended to be used only by Typeface static initializer.
+ */
+ public static @NonNull FontConfig.Alias[] getAliases() {
+ return sAliases;
+ }
+
+ private static @Nullable ByteBuffer mmap(@NonNull String fullPath) {
+ try (FileInputStream file = new FileInputStream(fullPath)) {
+ final FileChannel fileChannel = file.getChannel();
+ final long fontSize = fileChannel.size();
+ return fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fontSize);
+ } catch (IOException e) {
+ Log.e(TAG, "Error mapping font file " + fullPath);
+ return null;
+ }
+ }
+
+ private static void pushFamilyToFallback(@NonNull FontConfig.Family xmlFamily,
+ @NonNull ArrayMap<String, ArrayList<FontFamily>> fallbackMap,
+ @NonNull Map<String, ByteBuffer> cache,
+ @NonNull String fontDir) {
+
+ final String[] languageTags = xmlFamily.getLanguages();
+ final int variant = xmlFamily.getVariant();
+
+ final ArrayList<FontConfig.Font> defaultFonts = new ArrayList<>();
+ final ArrayMap<String, ArrayList<FontConfig.Font>> specificFallbackFonts = new ArrayMap<>();
+
+ // Collect default fallback and specific fallback fonts.
+ for (final FontConfig.Font font : xmlFamily.getFonts()) {
+ final String fallbackName = font.getFallbackFor();
+ if (fallbackName == null) {
+ defaultFonts.add(font);
+ } else {
+ ArrayList<FontConfig.Font> fallback = specificFallbackFonts.get(fallbackName);
+ if (fallback == null) {
+ fallback = new ArrayList<>();
+ specificFallbackFonts.put(fallbackName, fallback);
+ }
+ fallback.add(font);
+ }
+ }
+
+ final FontFamily defaultFamily = defaultFonts.isEmpty() ? null : createFontFamily(
+ xmlFamily.getName(), defaultFonts, languageTags, variant, cache, fontDir);
+
+ // Insert family into fallback map.
+ for (int i = 0; i < fallbackMap.size(); i++) {
+ final ArrayList<FontConfig.Font> fallback =
+ specificFallbackFonts.get(fallbackMap.keyAt(i));
+ if (fallback == null) {
+ if (defaultFamily != null) {
+ fallbackMap.valueAt(i).add(defaultFamily);
+ }
+ } else {
+ final FontFamily family = createFontFamily(
+ xmlFamily.getName(), fallback, languageTags, variant, cache, fontDir);
+ if (family != null) {
+ fallbackMap.valueAt(i).add(family);
+ } else if (defaultFamily != null) {
+ fallbackMap.valueAt(i).add(defaultFamily);
+ } else {
+ // There is no valid for for default fallback. Ignore.
+ }
+ }
+ }
+ }
+
+ private static @Nullable FontFamily createFontFamily(@NonNull String familyName,
+ @NonNull List<FontConfig.Font> fonts,
+ @NonNull String[] languageTags,
+ @FontConfig.Family.Variant int variant,
+ @NonNull Map<String, ByteBuffer> cache,
+ @NonNull String fontDir) {
+ if (fonts.size() == 0) {
+ return null;
+ }
+
+ FontFamily.Builder b = null;
+ for (int i = 0; i < fonts.size(); i++) {
+ final FontConfig.Font fontConfig = fonts.get(i);
+ final String fullPath = fontDir + fontConfig.getFontName();
+ ByteBuffer buffer = cache.get(fullPath);
+ if (buffer == null) {
+ if (cache.containsKey(fullPath)) {
+ continue; // Already failed to mmap. Skip it.
+ }
+ buffer = mmap(fullPath);
+ cache.put(fullPath, buffer);
+ if (buffer == null) {
+ continue;
+ }
+ }
+
+ final Font font;
+ try {
+ font = new Font.Builder(buffer)
+ .setWeight(fontConfig.getWeight())
+ .setItalic(fontConfig.isItalic())
+ .setTtcIndex(fontConfig.getTtcIndex())
+ .setFontVariationSettings(fontConfig.getAxes())
+ .build();
+ } catch (IOException e) {
+ throw new RuntimeException(e); // Never reaches here
+ }
+
+ if (b == null) {
+ b = new FontFamily.Builder(font);
+ } else {
+ b.addFont(font);
+ }
+ }
+ return b == null ? null : b.build(languageTags, variant);
+ }
+
+ /**
+ * Build the system fallback from xml file.
+ *
+ * @param xmlPath A full path string to the fonts.xml file.
+ * @param fontDir A full path string to the system font directory. This must end with
+ * slash('/').
+ * @param fallbackMap An output system fallback map. Caller must pass empty map.
+ * @return a list of aliases
+ * @hide
+ */
+ @VisibleForTesting
+ public static FontConfig.Alias[] buildSystemFallback(@NonNull String xmlPath,
+ @NonNull String fontDir,
+ @NonNull ArrayMap<String, FontFamily[]> fallbackMap) {
+ try {
+ final FileInputStream fontsIn = new FileInputStream(xmlPath);
+ final FontConfig fontConfig = FontListParser.parse(fontsIn);
+
+ final HashMap<String, ByteBuffer> bufferCache = new HashMap<String, ByteBuffer>();
+ final FontConfig.Family[] xmlFamilies = fontConfig.getFamilies();
+
+ final ArrayMap<String, ArrayList<FontFamily>> fallbackListMap = new ArrayMap<>();
+ // First traverse families which have a 'name' attribute to create fallback map.
+ for (final FontConfig.Family xmlFamily : xmlFamilies) {
+ final String familyName = xmlFamily.getName();
+ if (familyName == null) {
+ continue;
+ }
+ final FontFamily family = createFontFamily(
+ xmlFamily.getName(), Arrays.asList(xmlFamily.getFonts()),
+ xmlFamily.getLanguages(), xmlFamily.getVariant(), bufferCache, fontDir);
+ if (family == null) {
+ continue;
+ }
+ final ArrayList<FontFamily> fallback = new ArrayList<>();
+ fallback.add(family);
+ fallbackListMap.put(familyName, fallback);
+ }
+
+ // Then, add fallback fonts to the each fallback map.
+ for (int i = 0; i < xmlFamilies.length; i++) {
+ final FontConfig.Family xmlFamily = xmlFamilies[i];
+ // The first family (usually the sans-serif family) is always placed immediately
+ // after the primary family in the fallback.
+ if (i == 0 || xmlFamily.getName() == null) {
+ pushFamilyToFallback(xmlFamily, fallbackListMap, bufferCache, fontDir);
+ }
+ }
+
+ // Build the font map and fallback map.
+ for (int i = 0; i < fallbackListMap.size(); i++) {
+ final String fallbackName = fallbackListMap.keyAt(i);
+ final List<FontFamily> familyList = fallbackListMap.valueAt(i);
+ final FontFamily[] families = familyList.toArray(new FontFamily[familyList.size()]);
+
+ fallbackMap.put(fallbackName, families);
+ }
+
+ return fontConfig.getAliases();
+ } catch (IOException | XmlPullParserException e) {
+ Log.e(TAG, "Failed initialize system fallbacks.", e);
+ return ArrayUtils.emptyArray(FontConfig.Alias.class);
+ }
+ }
+
+ static {
+ final ArrayMap<String, FontFamily[]> systemFallbackMap = new ArrayMap<>();
+ sAliases = buildSystemFallback("/system/etc/fonts.xml", "/system/fonts/",
+ systemFallbackMap);
+ sSystemFallbackMap = Collections.unmodifiableMap(systemFallbackMap);
+ }
+
+}
diff --git a/keystore/java/android/security/Credentials.java b/keystore/java/android/security/Credentials.java
index 57db20b..7216a22 100644
--- a/keystore/java/android/security/Credentials.java
+++ b/keystore/java/android/security/Credentials.java
@@ -16,6 +16,7 @@
package android.security;
+import android.annotation.UnsupportedAppUsage;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -172,6 +173,7 @@
private static Credentials singleton;
+ @UnsupportedAppUsage
public static Credentials getInstance() {
if (singleton == null) {
singleton = new Credentials();
@@ -179,6 +181,7 @@
return singleton;
}
+ @UnsupportedAppUsage
public void unlock(Context context) {
try {
Intent intent = new Intent(UNLOCK_ACTION);
@@ -197,6 +200,7 @@
}
}
+ @UnsupportedAppUsage
public void install(Context context, KeyPair pair) {
try {
Intent intent = KeyChain.createInstallIntent();
@@ -208,6 +212,7 @@
}
}
+ @UnsupportedAppUsage
public void install(Context context, String type, byte[] value) {
try {
Intent intent = KeyChain.createInstallIntent();
diff --git a/keystore/java/android/security/GateKeeper.java b/keystore/java/android/security/GateKeeper.java
index 03df5de..a50ff79 100644
--- a/keystore/java/android/security/GateKeeper.java
+++ b/keystore/java/android/security/GateKeeper.java
@@ -16,6 +16,7 @@
package android.security;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -42,6 +43,7 @@
return service;
}
+ @UnsupportedAppUsage
public static long getSecureUserId() throws IllegalStateException {
try {
return getService().getSecureUserId(UserHandle.myUserId());
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index 4f4ca3f..0a4ac8c 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -16,6 +16,7 @@
package android.security;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.Application;
@@ -57,6 +58,7 @@
private static final String TAG = "KeyStore";
// ResponseCodes - see system/security/keystore/include/keystore/keystore.h
+ @UnsupportedAppUsage
public static final int NO_ERROR = 1;
public static final int LOCKED = 2;
public static final int UNINITIALIZED = 3;
@@ -129,7 +131,9 @@
// States
public enum State {
+ @UnsupportedAppUsage
UNLOCKED,
+ @UnsupportedAppUsage
LOCKED,
UNINITIALIZED
};
@@ -146,6 +150,7 @@
mContext = getApplicationContext();
}
+ @UnsupportedAppUsage
public static Context getApplicationContext() {
Application application = ActivityThread.currentApplication();
if (application == null) {
@@ -155,6 +160,7 @@
return application;
}
+ @UnsupportedAppUsage
public static KeyStore getInstance() {
IKeystoreService keystore = IKeystoreService.Stub.asInterface(ServiceManager
.getService("android.security.keystore"));
@@ -168,6 +174,7 @@
return mToken;
}
+ @UnsupportedAppUsage
public State state(int userId) {
final int ret;
try {
@@ -185,6 +192,7 @@
}
}
+ @UnsupportedAppUsage
public State state() {
return state(UserHandle.myUserId());
}
@@ -197,6 +205,7 @@
return get(key, uid, false);
}
+ @UnsupportedAppUsage
public byte[] get(String key) {
return get(key, UID_SELF);
}
@@ -247,6 +256,7 @@
}
}
+ @UnsupportedAppUsage
public boolean delete(String key) {
return delete(key, UID_SELF);
}
@@ -283,6 +293,7 @@
return list(prefix, UID_SELF);
}
+ @UnsupportedAppUsage
public boolean reset() {
try {
return mBinder.reset() == NO_ERROR;
@@ -333,6 +344,7 @@
}
}
+ @UnsupportedAppUsage
public boolean unlock(String password) {
return unlock(UserHandle.getUserId(Process.myUid()), password);
}
@@ -349,6 +361,7 @@
}
}
+ @UnsupportedAppUsage
public boolean isEmpty() {
return isEmpty(UserHandle.myUserId());
}
@@ -818,6 +831,7 @@
* Returns a {@link KeyStoreException} corresponding to the provided keystore/keymaster error
* code.
*/
+ @UnsupportedAppUsage
public static KeyStoreException getKeyStoreException(int errorCode) {
if (errorCode > 0) {
// KeyStore layer error
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
index 419eb24..953cef7d 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
@@ -301,6 +301,9 @@
KeyStoreCryptoOperationUtils.getRandomBytesToMixIntoKeystoreRng(
mRng, (mKeySizeBits + 7) / 8);
int flags = 0;
+ if (spec.isStrongBoxBacked()) {
+ flags |= KeyStore.FLAG_STRONGBOX;
+ }
String keyAliasInKeystore = Credentials.USER_PRIVATE_KEY + spec.getKeystoreAlias();
KeyCharacteristics resultingKeyCharacteristics = new KeyCharacteristics();
boolean success = false;
@@ -314,8 +317,12 @@
flags,
resultingKeyCharacteristics);
if (errorCode != KeyStore.NO_ERROR) {
- throw new ProviderException(
- "Keystore operation failed", KeyStore.getKeyStoreException(errorCode));
+ if (errorCode == KeyStore.HARDWARE_TYPE_UNAVAILABLE) {
+ throw new StrongBoxUnavailableException("Failed to generate key");
+ } else {
+ throw new ProviderException(
+ "Keystore operation failed", KeyStore.getKeyStoreException(errorCode));
+ }
}
@KeyProperties.KeyAlgorithmEnum String keyAlgorithmJCA;
try {
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java b/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java
index c048e82..c7c9ee4 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java
@@ -17,6 +17,7 @@
package android.security.keystore;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.security.KeyStore;
import android.security.keymaster.ExportResult;
import android.security.keymaster.KeyCharacteristics;
@@ -156,6 +157,7 @@
* by AndroidKeyStore provider.
* @throws IllegalStateException if the provided primitive is not initialized.
*/
+ @UnsupportedAppUsage
public static long getKeyStoreOperationHandle(Object cryptoPrimitive) {
if (cryptoPrimitive == null) {
throw new NullPointerException();
diff --git a/keystore/java/android/security/keystore/KeyGenParameterSpec.java b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
index 89d370f..c4df274 100644
--- a/keystore/java/android/security/keystore/KeyGenParameterSpec.java
+++ b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;
import android.hardware.fingerprint.FingerprintManager;
import android.security.GateKeeper;
@@ -371,6 +372,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getUid() {
return mUid;
}
@@ -645,6 +647,7 @@
*
* Returns {@code true} if the attestation certificate will contain a unique ID field.
*/
+ @UnsupportedAppUsage
public boolean isUniqueIdIncluded() {
return mUniqueIdIncluded;
}
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index fc625bb..843c146 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -74,6 +74,7 @@
const char* AssetManager::IDMAP_BIN = "/system/bin/idmap";
const char* AssetManager::OVERLAY_DIR = "/vendor/overlay";
const char* AssetManager::PRODUCT_OVERLAY_DIR = "/product/overlay";
+const char* AssetManager::PRODUCT_SERVICES_OVERLAY_DIR = "/product_services/overlay";
const char* AssetManager::OVERLAY_THEME_DIR_PROPERTY = "ro.boot.vendor.overlay.theme";
const char* AssetManager::TARGET_PACKAGE_NAME = "android";
const char* AssetManager::TARGET_APK_PATH = "/system/framework/framework-res.apk";
diff --git a/libs/androidfw/include/androidfw/AssetManager.h b/libs/androidfw/include/androidfw/AssetManager.h
index 08da731..cdb87bc 100644
--- a/libs/androidfw/include/androidfw/AssetManager.h
+++ b/libs/androidfw/include/androidfw/AssetManager.h
@@ -61,6 +61,7 @@
static const char* IDMAP_BIN;
static const char* OVERLAY_DIR;
static const char* PRODUCT_OVERLAY_DIR;
+ static const char* PRODUCT_SERVICES_OVERLAY_DIR;
/*
* If OVERLAY_THEME_DIR_PROPERTY is set, search for runtime resource overlay
* APKs in OVERLAY_DIR/<value of OVERLAY_THEME_DIR_PROPERTY> in addition to
diff --git a/libs/hwui/hwui/AnimatedImageDrawable.cpp b/libs/hwui/hwui/AnimatedImageDrawable.cpp
index 007961a..8d4e7e0 100644
--- a/libs/hwui/hwui/AnimatedImageDrawable.cpp
+++ b/libs/hwui/hwui/AnimatedImageDrawable.cpp
@@ -21,7 +21,8 @@
#include <SkPicture.h>
#include <SkRefCnt.h>
-#include <SkTLazy.h>
+
+#include <optional>
namespace android {
@@ -126,13 +127,13 @@
// Only called on the RenderThread.
void AnimatedImageDrawable::onDraw(SkCanvas* canvas) {
- SkTLazy<SkPaint> lazyPaint;
+ std::optional<SkPaint> lazyPaint;
SkAutoCanvasRestore acr(canvas, false);
if (mProperties.mAlpha != SK_AlphaOPAQUE || mProperties.mColorFilter.get()) {
- lazyPaint.init();
- lazyPaint.get()->setAlpha(mProperties.mAlpha);
- lazyPaint.get()->setColorFilter(mProperties.mColorFilter);
- lazyPaint.get()->setFilterQuality(kLow_SkFilterQuality);
+ lazyPaint.emplace();
+ lazyPaint->setAlpha(mProperties.mAlpha);
+ lazyPaint->setColorFilter(mProperties.mColorFilter);
+ lazyPaint->setFilterQuality(kLow_SkFilterQuality);
}
if (mProperties.mMirrored) {
canvas->save();
@@ -147,8 +148,8 @@
if (drawDirectly) {
// The image is not animating, and never was. Draw directly from
// mSkAnimatedImage.
- if (lazyPaint.isValid()) {
- canvas->saveLayer(mSkAnimatedImage->getBounds(), lazyPaint.get());
+ if (lazyPaint) {
+ canvas->saveLayer(mSkAnimatedImage->getBounds(), &*lazyPaint);
}
std::unique_lock lock{mImageLock};
@@ -193,7 +194,7 @@
if (!drawDirectly) {
// No other thread will modify mCurrentSnap so this should be safe to
// use without locking.
- canvas->drawPicture(mSnapshot.mPic, nullptr, lazyPaint.getMaybeNull());
+ canvas->drawPicture(mSnapshot.mPic, nullptr, lazyPaint ? &*lazyPaint : nullptr);
}
if (finalFrame) {
diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
index 85fdc103..ea14d11 100644
--- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
+++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
@@ -21,6 +21,8 @@
#include "SkiaPipeline.h"
#include "utils/TraceUtils.h"
+#include <optional>
+
namespace android {
namespace uirenderer {
namespace skiapipeline {
@@ -171,9 +173,9 @@
protected:
bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type t) const override {
- SkTLazy<SkPaint> defaultPaint;
+ std::optional<SkPaint> defaultPaint;
if (!*paint) {
- paint->init(*defaultPaint.init());
+ paint->init(defaultPaint.emplace());
}
paint->writable()->setAlpha((uint8_t)(*paint)->getAlpha() * mAlpha);
return true;
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 3eaf43b..c1284ec 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -189,6 +189,7 @@
LOG_ALWAYS_FATAL_IF(!glInterface.get());
GrContextOptions options;
+ options.fPreferExternalImagesOverES3 = true;
options.fDisableDistanceFieldPaths = true;
cacheManager().configureContext(&options);
sk_sp<GrContext> grContext(GrContext::MakeGL(std::move(glInterface), options));
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index a19edae..1517f57 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -25,6 +25,8 @@
#include <GrBackendSurface.h>
#include <GrContext.h>
#include <GrTypes.h>
+#include <GrTypes.h>
+#include <vk/GrVkExtensions.h>
#include <vk/GrVkTypes.h>
namespace android {
@@ -62,7 +64,7 @@
mInstance = VK_NULL_HANDLE;
}
-bool VulkanManager::setupDevice(VkPhysicalDeviceFeatures& deviceFeatures) {
+bool VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFeatures2& features) {
VkResult err;
constexpr VkApplicationInfo app_info = {
@@ -128,7 +130,7 @@
GET_INST_PROC(DestroyInstance);
GET_INST_PROC(EnumeratePhysicalDevices);
GET_INST_PROC(GetPhysicalDeviceQueueFamilyProperties);
- GET_INST_PROC(GetPhysicalDeviceFeatures);
+ GET_INST_PROC(GetPhysicalDeviceFeatures2);
GET_INST_PROC(CreateDevice);
GET_INST_PROC(EnumerateDeviceExtensionProperties);
GET_INST_PROC(CreateAndroidSurfaceKHR);
@@ -217,11 +219,38 @@
}
}
- // query to get the physical device properties
- mGetPhysicalDeviceFeatures(mPhysicalDevice, &deviceFeatures);
+ auto getProc = [] (const char* proc_name, VkInstance instance, VkDevice device) {
+ if (device != VK_NULL_HANDLE) {
+ return vkGetDeviceProcAddr(device, proc_name);
+ }
+ return vkGetInstanceProcAddr(instance, proc_name);
+ };
+ grExtensions.init(getProc, mInstance, mPhysicalDevice, instanceExtensions.size(),
+ instanceExtensions.data(), deviceExtensions.size(), deviceExtensions.data());
+
+ memset(&features, 0, sizeof(VkPhysicalDeviceFeatures2));
+ features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
+ features.pNext = nullptr;
+
+ // Setup all extension feature structs we may want to use.
+ void** tailPNext = &features.pNext;
+
+ if (grExtensions.hasExtension(VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME, 2)) {
+ VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* blend;
+ blend = (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*) malloc(
+ sizeof(VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT));
+ LOG_ALWAYS_FATAL_IF(!blend);
+ blend->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT;
+ blend->pNext = nullptr;
+ *tailPNext = blend;
+ tailPNext = &blend->pNext;
+ }
+
+ // query to get the physical device features
+ mGetPhysicalDeviceFeatures2(mPhysicalDevice, &features);
// this looks like it would slow things down,
// and we can't depend on it on all platforms
- deviceFeatures.robustBufferAccess = VK_FALSE;
+ features.features.robustBufferAccess = VK_FALSE;
float queuePriorities[1] = { 0.0 };
@@ -247,7 +276,7 @@
const VkDeviceCreateInfo deviceInfo = {
VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, // sType
- nullptr, // pNext
+ &features, // pNext
0, // VkDeviceCreateFlags
queueInfoCount, // queueCreateInfoCount
queueInfo, // pQueueCreateInfos
@@ -255,7 +284,7 @@
nullptr, // ppEnabledLayerNames
(uint32_t) deviceExtensions.size(), // extensionCount
deviceExtensions.data(), // ppEnabledExtensionNames
- &deviceFeatures // ppEnabledFeatures
+ nullptr, // ppEnabledFeatures
};
err = mCreateDevice(mPhysicalDevice, &deviceInfo, nullptr, &mDevice);
@@ -294,33 +323,39 @@
return true;
}
+static void free_features_extensions_structs(const VkPhysicalDeviceFeatures2& features) {
+ // All Vulkan structs that could be part of the features chain will start with the
+ // structure type followed by the pNext pointer. We cast to the CommonVulkanHeader
+ // so we can get access to the pNext for the next struct.
+ struct CommonVulkanHeader {
+ VkStructureType sType;
+ void* pNext;
+ };
+
+ void* pNext = features.pNext;
+ while (pNext) {
+ void* current = pNext;
+ pNext = static_cast<CommonVulkanHeader*>(current)->pNext;
+ free(current);
+ }
+}
+
void VulkanManager::initialize() {
if (mDevice != VK_NULL_HANDLE) {
return;
}
- std::vector<const char*> instanceExtensions;
- std::vector<const char*> deviceExtensions;
- VkPhysicalDeviceFeatures deviceFeatures;
- LOG_ALWAYS_FATAL_IF(!this->setupDevice(deviceFeatures));
+ GET_PROC(EnumerateInstanceVersion);
+ uint32_t instanceVersion = 0;
+ LOG_ALWAYS_FATAL_IF(mEnumerateInstanceVersion(&instanceVersion));
+ LOG_ALWAYS_FATAL_IF(instanceVersion < VK_MAKE_VERSION(1, 1, 0));
+
+ GrVkExtensions extensions;
+ VkPhysicalDeviceFeatures2 features;
+ LOG_ALWAYS_FATAL_IF(!this->setupDevice(extensions, features));
mGetDeviceQueue(mDevice, mGraphicsQueueIndex, 0, &mGraphicsQueue);
- uint32_t extensionFlags = kKHR_surface_GrVkExtensionFlag |
- kKHR_android_surface_GrVkExtensionFlag |
- kKHR_swapchain_GrVkExtensionFlag;
-
- uint32_t featureFlags = 0;
- if (deviceFeatures.geometryShader) {
- featureFlags |= kGeometryShader_GrVkFeatureFlag;
- }
- if (deviceFeatures.dualSrcBlend) {
- featureFlags |= kDualSrcBlend_GrVkFeatureFlag;
- }
- if (deviceFeatures.sampleRateShading) {
- featureFlags |= kSampleRateShading_GrVkFeatureFlag;
- }
-
auto getProc = [] (const char* proc_name, VkInstance instance, VkDevice device) {
if (device != VK_NULL_HANDLE) {
return vkGetDeviceProcAddr(device, proc_name);
@@ -334,11 +369,10 @@
backendContext.fDevice = mDevice;
backendContext.fQueue = mGraphicsQueue;
backendContext.fGraphicsQueueIndex = mGraphicsQueueIndex;
- backendContext.fMinAPIVersion = VK_MAKE_VERSION(1, 0, 0);
- backendContext.fExtensions = extensionFlags;
- backendContext.fFeatures = featureFlags;
+ backendContext.fInstanceVersion = instanceVersion;
+ backendContext.fVkExtensions = &extensions;
+ backendContext.fDeviceFeatures2 = &features;
backendContext.fGetProc = std::move(getProc);
- backendContext.fOwnsInstanceAndDevice = false;
// create the command pool for the command buffers
if (VK_NULL_HANDLE == mCommandPool) {
@@ -361,6 +395,9 @@
sk_sp<GrContext> grContext(GrContext::MakeVulkan(backendContext, options));
LOG_ALWAYS_FATAL_IF(!grContext.get());
mRenderThread.setGrContext(grContext);
+
+ free_features_extensions_structs(features);
+
DeviceInfo::initialize(mRenderThread.getGrContext()->maxRenderTargetSize());
if (Properties::enablePartialUpdates && Properties::useBufferAge) {
diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h
index 69641d5..5524c39 100644
--- a/libs/hwui/renderthread/VulkanManager.h
+++ b/libs/hwui/renderthread/VulkanManager.h
@@ -25,6 +25,8 @@
#include <SkSurface.h>
#include <vk/GrVkBackendContext.h>
+class GrVkExtensions;
+
namespace android {
namespace uirenderer {
namespace renderthread {
@@ -116,7 +118,7 @@
// Sets up the VkInstance and VkDevice objects. Also fills out the passed in
// VkPhysicalDeviceFeatures struct.
- bool setupDevice(VkPhysicalDeviceFeatures& deviceFeatures);
+ bool setupDevice(GrVkExtensions&, VkPhysicalDeviceFeatures2&);
void destroyBuffers(VulkanSurface* surface);
@@ -156,13 +158,14 @@
VkPtr<PFN_vkCreateSharedSwapchainsKHR> mCreateSharedSwapchainsKHR;
// Instance Functions
+ VkPtr<PFN_vkEnumerateInstanceVersion> mEnumerateInstanceVersion;
VkPtr<PFN_vkEnumerateInstanceExtensionProperties> mEnumerateInstanceExtensionProperties;
VkPtr<PFN_vkCreateInstance> mCreateInstance;
VkPtr<PFN_vkDestroyInstance> mDestroyInstance;
VkPtr<PFN_vkEnumeratePhysicalDevices> mEnumeratePhysicalDevices;
VkPtr<PFN_vkGetPhysicalDeviceQueueFamilyProperties> mGetPhysicalDeviceQueueFamilyProperties;
- VkPtr<PFN_vkGetPhysicalDeviceFeatures> mGetPhysicalDeviceFeatures;
+ VkPtr<PFN_vkGetPhysicalDeviceFeatures2> mGetPhysicalDeviceFeatures2;
VkPtr<PFN_vkCreateDevice> mCreateDevice;
VkPtr<PFN_vkEnumerateDeviceExtensionProperties> mEnumerateDeviceExtensionProperties;
diff --git a/location/java/android/location/Country.java b/location/java/android/location/Country.java
index 7c1485d..6f82b78 100644
--- a/location/java/android/location/Country.java
+++ b/location/java/android/location/Country.java
@@ -16,6 +16,7 @@
package android.location;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
@@ -78,6 +79,7 @@
* <li>{@link #COUNTRY_SOURCE_LOCALE}</li>
* </ul>
*/
+ @UnsupportedAppUsage
public Country(final String countryIso, final int source) {
if (countryIso == null || source < COUNTRY_SOURCE_NETWORK
|| source > COUNTRY_SOURCE_LOCALE) {
@@ -107,6 +109,7 @@
/**
* @return the ISO 3166-1 two letters country code
*/
+ @UnsupportedAppUsage
public final String getCountryIso() {
return mCountryIso;
}
@@ -121,6 +124,7 @@
* <li>{@link #COUNTRY_SOURCE_LOCALE}</li>
* </ul>
*/
+ @UnsupportedAppUsage
public final int getSource() {
return mSource;
}
diff --git a/location/java/android/location/CountryDetector.java b/location/java/android/location/CountryDetector.java
index ec6dfb7..119d1e0 100644
--- a/location/java/android/location/CountryDetector.java
+++ b/location/java/android/location/CountryDetector.java
@@ -19,6 +19,7 @@
import java.util.HashMap;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
@@ -87,6 +88,7 @@
* create an instance of this class is using the factory
* Context.getSystemService.
*/
+ @UnsupportedAppUsage
public CountryDetector(ICountryDetector service) {
mService = service;
mListeners = new HashMap<CountryListener, ListenerTransport>();
@@ -98,6 +100,7 @@
* @return the country if it is available immediately, otherwise null will
* be returned.
*/
+ @UnsupportedAppUsage
public Country detectCountry() {
try {
return mService.detectCountry();
@@ -116,6 +119,7 @@
* implement the callback mechanism. If looper is null then the
* callbacks will be called on the main thread.
*/
+ @UnsupportedAppUsage
public void addCountryListener(CountryListener listener, Looper looper) {
synchronized (mListeners) {
if (!mListeners.containsKey(listener)) {
@@ -133,6 +137,7 @@
/**
* Remove the listener
*/
+ @UnsupportedAppUsage
public void removeCountryListener(CountryListener listener) {
synchronized (mListeners) {
ListenerTransport transport = mListeners.get(listener);
diff --git a/location/java/android/location/CountryListener.java b/location/java/android/location/CountryListener.java
index e36db41..70a83c5 100644
--- a/location/java/android/location/CountryListener.java
+++ b/location/java/android/location/CountryListener.java
@@ -16,6 +16,8 @@
package android.location;
+import android.annotation.UnsupportedAppUsage;
+
/**
* The listener for receiving the notification when the country is detected or
* changed
@@ -26,5 +28,6 @@
/**
* @param country the changed or detected country.
*/
+ @UnsupportedAppUsage
void onCountryDetected(Country country);
}
diff --git a/location/java/android/location/GeocoderParams.java b/location/java/android/location/GeocoderParams.java
index 174fe3e..d90e4b5 100644
--- a/location/java/android/location/GeocoderParams.java
+++ b/location/java/android/location/GeocoderParams.java
@@ -16,6 +16,7 @@
package android.location;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
@@ -53,6 +54,7 @@
/**
* returns the Geocoder's locale
*/
+ @UnsupportedAppUsage
public Locale getLocale() {
return mLocale;
}
@@ -60,6 +62,7 @@
/**
* returns the package name of the Geocoder's client
*/
+ @UnsupportedAppUsage
public String getClientPackage() {
return mPackageName;
}
diff --git a/location/java/android/location/Geofence.java b/location/java/android/location/Geofence.java
index 5de779a..ed2aa64 100644
--- a/location/java/android/location/Geofence.java
+++ b/location/java/android/location/Geofence.java
@@ -16,6 +16,7 @@
package android.location;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -98,6 +99,7 @@
}
}
+ @UnsupportedAppUsage
public static final Parcelable.Creator<Geofence> CREATOR = new Parcelable.Creator<Geofence>() {
@Override
public Geofence createFromParcel(Parcel in) {
diff --git a/location/java/android/location/GpsStatus.java b/location/java/android/location/GpsStatus.java
index b601cde..d90a597 100644
--- a/location/java/android/location/GpsStatus.java
+++ b/location/java/android/location/GpsStatus.java
@@ -16,6 +16,7 @@
package android.location;
+import android.annotation.UnsupportedAppUsage;
import android.util.SparseArray;
import java.util.Iterator;
@@ -206,6 +207,7 @@
status.mAzimuths);
}
+ @UnsupportedAppUsage
void setTimeToFirstFix(int ttff) {
mTimeToFirstFix = ttff;
}
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index 684cafa..70a97e1 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -123,8 +124,10 @@
}
};
+ @UnsupportedAppUsage
private String mProvider;
private long mTime = 0;
+ @UnsupportedAppUsage
private long mElapsedRealtimeNanos = 0;
private double mLatitude = 0.0;
private double mLongitude = 0.0;
@@ -1156,6 +1159,7 @@
* @param value the Location to attach
* @hide
*/
+ @UnsupportedAppUsage
public void setExtraLocation(String key, Location value) {
if (mExtras == null) {
mExtras = new Bundle();
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 30a07ef..b5d9431 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -29,6 +29,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
@@ -68,6 +69,7 @@
private static final String TAG = "LocationManager";
private final Context mContext;
+ @UnsupportedAppUsage
private final ILocationManager mService;
private final GnssMeasurementCallbackTransport mGnssMeasurementCallbackTransport;
private final GnssNavigationMessageCallbackTransport mGnssNavigationMessageCallbackTransport;
@@ -1004,6 +1006,7 @@
}
}
+ @UnsupportedAppUsage
private void requestLocationUpdates(LocationRequest request, LocationListener listener,
Looper looper, PendingIntent intent) {
@@ -2328,6 +2331,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean sendNiResponse(int notifId, int userResponse) {
try {
return mService.sendNiResponse(notifId, userResponse);
diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java
index 96a0817..2d7f7e3 100644
--- a/location/java/android/location/LocationRequest.java
+++ b/location/java/android/location/LocationRequest.java
@@ -17,6 +17,7 @@
package android.location;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
@@ -141,16 +142,26 @@
*/
private static final double FASTEST_INTERVAL_FACTOR = 6.0; // 6x
+ @UnsupportedAppUsage
private int mQuality = POWER_LOW;
+ @UnsupportedAppUsage
private long mInterval = 60 * 60 * 1000; // 60 minutes
+ @UnsupportedAppUsage
private long mFastestInterval = (long) (mInterval / FASTEST_INTERVAL_FACTOR); // 10 minutes
+ @UnsupportedAppUsage
private boolean mExplicitFastestInterval = false;
+ @UnsupportedAppUsage
private long mExpireAt = Long.MAX_VALUE; // no expiry
+ @UnsupportedAppUsage
private int mNumUpdates = Integer.MAX_VALUE; // no expiry
+ @UnsupportedAppUsage
private float mSmallestDisplacement = 0.0f; // meters
+ @UnsupportedAppUsage
private WorkSource mWorkSource = null;
+ @UnsupportedAppUsage
private boolean mHideFromAppOps = false; // True if this request shouldn't be counted by AppOps
+ @UnsupportedAppUsage
private String mProvider = LocationManager.FUSED_PROVIDER;
// for deprecated APIs that explicitly request a provider
@@ -592,12 +603,14 @@
return mHideFromAppOps;
}
+ @UnsupportedAppUsage
private static void checkInterval(long millis) {
if (millis < 0) {
throw new IllegalArgumentException("invalid interval: " + millis);
}
}
+ @UnsupportedAppUsage
private static void checkQuality(int quality) {
switch (quality) {
case ACCURACY_FINE:
@@ -612,12 +625,14 @@
}
}
+ @UnsupportedAppUsage
private static void checkDisplacement(float meters) {
if (meters < 0.0f) {
throw new IllegalArgumentException("invalid displacement: " + meters);
}
}
+ @UnsupportedAppUsage
private static void checkProvider(String name) {
if (name == null) {
throw new IllegalArgumentException("invalid provider: " + name);
diff --git a/location/java/com/android/internal/location/ProviderRequest.java b/location/java/com/android/internal/location/ProviderRequest.java
index 45fdb76..88919f6 100644
--- a/location/java/com/android/internal/location/ProviderRequest.java
+++ b/location/java/com/android/internal/location/ProviderRequest.java
@@ -19,6 +19,7 @@
import java.util.ArrayList;
import java.util.List;
+import android.annotation.UnsupportedAppUsage;
import android.location.LocationRequest;
import android.os.Parcel;
import android.os.Parcelable;
@@ -27,9 +28,11 @@
/** @hide */
public final class ProviderRequest implements Parcelable {
/** Location reporting is requested (true) */
+ @UnsupportedAppUsage
public boolean reportLocation = false;
/** The smallest requested interval */
+ @UnsupportedAppUsage
public long interval = Long.MAX_VALUE;
/**
@@ -45,8 +48,10 @@
* is a high power slow interval request and a
* low power fast interval request.
*/
+ @UnsupportedAppUsage
public List<LocationRequest> locationRequests = new ArrayList<LocationRequest>();
+ @UnsupportedAppUsage
public ProviderRequest() {
}
diff --git a/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java b/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
index 3643ca4..8a02a82 100644
--- a/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
+++ b/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
@@ -18,6 +18,7 @@
import android.os.SystemClock;
import android.os.connectivity.GpsBatteryStats;
+import android.os.SystemProperties;
import android.text.format.DateUtils;
import android.util.Base64;
@@ -175,6 +176,7 @@
= topFourAverageCn0Statistics.getStandardDeviation();
}
msg.powerMetrics = mGnssPowerMetrics.buildProto();
+ msg.hardwareRevision = SystemProperties.get("ro.boot.revision", "");
String s = Base64.encodeToString(GnssLog.toByteArray(msg), Base64.DEFAULT);
reset();
return s;
@@ -239,6 +241,7 @@
s.append(" Energy consumed while on battery (mAh): ").append(
stats.getEnergyConsumedMaMs() / ((double) DateUtils.HOUR_IN_MILLIS)).append("\n");
}
+ s.append("Hardware Version: " + SystemProperties.get("ro.boot.revision", "")).append("\n");
return s.toString();
}
diff --git a/media/OWNERS b/media/OWNERS
index 182f661..1ae2a7b 100644
--- a/media/OWNERS
+++ b/media/OWNERS
@@ -1,5 +1,8 @@
elaurent@google.com
etalvala@google.com
+gkasten@google.com
+hunga@google.com
+jmtrivi@google.com
lajos@google.com
marcone@google.com
sungsoo@google.com
diff --git a/media/java/android/media/AmrInputStream.java b/media/java/android/media/AmrInputStream.java
index efaf224..5088798 100644
--- a/media/java/android/media/AmrInputStream.java
+++ b/media/java/android/media/AmrInputStream.java
@@ -20,6 +20,7 @@
import java.io.IOException;
import java.nio.ByteBuffer;
+import android.annotation.UnsupportedAppUsage;
import android.media.MediaCodec.BufferInfo;
import android.util.Log;
@@ -53,6 +54,7 @@
/**
* DO NOT USE - use MediaCodec instead
*/
+ @UnsupportedAppUsage
public AmrInputStream(InputStream inputStream) {
Log.w(TAG, "@@@@ AmrInputStream is not a public API @@@@");
mInputStream = inputStream;
diff --git a/media/java/android/media/AsyncPlayer.java b/media/java/android/media/AsyncPlayer.java
index c1a178a..8ac2655 100644
--- a/media/java/android/media/AsyncPlayer.java
+++ b/media/java/android/media/AsyncPlayer.java
@@ -17,6 +17,7 @@
package android.media;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.media.PlayerBase;
import android.net.Uri;
@@ -248,6 +249,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setUsesWakeLock(Context context) {
if (mWakeLock != null || mThread != null) {
// if either of these has happened, we've already played something.
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index 9152ff2..e8bc622 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -372,11 +373,16 @@
private final static int FLAG_ALL_PUBLIC = FLAG_AUDIBILITY_ENFORCED |
FLAG_HW_AV_SYNC | FLAG_LOW_LATENCY;
+ @UnsupportedAppUsage
private int mUsage = USAGE_UNKNOWN;
+ @UnsupportedAppUsage
private int mContentType = CONTENT_TYPE_UNKNOWN;
+ @UnsupportedAppUsage
private int mSource = MediaRecorder.AudioSource.AUDIO_SOURCE_INVALID;
+ @UnsupportedAppUsage
private int mFlags = 0x0;
private HashSet<String> mTags;
+ @UnsupportedAppUsage
private String mFormattedTags;
private Bundle mBundle; // lazy-initialized, may be null
@@ -646,6 +652,7 @@
* @param tag
* @return the same Builder instance.
*/
+ @UnsupportedAppUsage
public Builder addTag(String tag) {
mTags.add(tag);
return this;
@@ -675,6 +682,7 @@
* @param streamType
* @return the same Builder instance.
*/
+ @UnsupportedAppUsage
public Builder setInternalLegacyStreamType(int streamType) {
switch(streamType) {
case AudioSystem.STREAM_VOICE_CALL:
@@ -1016,6 +1024,7 @@
* @param aa non-null AudioAttributes.
* @return a valid stream type for volume control that matches the attributes.
*/
+ @UnsupportedAppUsage
public static int toLegacyStreamType(@NonNull AudioAttributes aa) {
return toVolumeStreamType(false /*fromGetVolumeControlStream*/, aa);
}
diff --git a/media/java/android/media/AudioDevicePort.java b/media/java/android/media/AudioDevicePort.java
index aea39a3..62b18cb 100644
--- a/media/java/android/media/AudioDevicePort.java
+++ b/media/java/android/media/AudioDevicePort.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.media.AudioSystem;
/**
@@ -36,6 +37,7 @@
private final int mType;
private final String mAddress;
+ @UnsupportedAppUsage
AudioDevicePort(AudioHandle handle, String deviceName,
int[] samplingRates, int[] channelMasks, int[] channelIndexMasks,
int[] formats, AudioGain[] gains, int type, String address) {
@@ -50,6 +52,7 @@
/**
* Get the device type (e.g AudioManager.DEVICE_OUT_SPEAKER)
*/
+ @UnsupportedAppUsage
public int type() {
return mType;
}
diff --git a/media/java/android/media/AudioDevicePortConfig.java b/media/java/android/media/AudioDevicePortConfig.java
index e468a53..0c647ea 100644
--- a/media/java/android/media/AudioDevicePortConfig.java
+++ b/media/java/android/media/AudioDevicePortConfig.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An AudioDevicePortConfig describes a possible configuration of an output or input device
* (speaker, headphone, microphone ...).
@@ -26,6 +28,7 @@
*/
public class AudioDevicePortConfig extends AudioPortConfig {
+ @UnsupportedAppUsage
AudioDevicePortConfig(AudioDevicePort devicePort, int samplingRate, int channelMask,
int format, AudioGainConfig gain) {
super((AudioPort)devicePort, samplingRate, channelMask, format, gain);
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index 1030d9d..38204a5 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -663,6 +664,7 @@
*/
// Update sound trigger JNI in core/jni/android_hardware_SoundTrigger.cpp when modifying this
// constructor
+ @UnsupportedAppUsage
private AudioFormat(int encoding, int sampleRate, int channelMask, int channelIndexMask) {
mEncoding = encoding;
mSampleRate = sampleRate;
@@ -685,8 +687,11 @@
/** @hide */
public final static int AUDIO_FORMAT_HAS_PROPERTY_CHANNEL_INDEX_MASK = 0x1 << 3;
+ @UnsupportedAppUsage
private int mEncoding;
+ @UnsupportedAppUsage
private int mSampleRate;
+ @UnsupportedAppUsage
private int mChannelMask;
private int mChannelIndexMask;
private int mPropertySetMask;
diff --git a/media/java/android/media/AudioGain.java b/media/java/android/media/AudioGain.java
index 57709d5..dd129a2 100644
--- a/media/java/android/media/AudioGain.java
+++ b/media/java/android/media/AudioGain.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* The AudioGain describes a gain controller. Gain controllers are exposed by
* audio ports when the gain is configurable at this port's input or output.
@@ -69,6 +71,7 @@
// The channel mask passed to the constructor is as specified in AudioFormat
// (e.g. AudioFormat.CHANNEL_OUT_STEREO)
+ @UnsupportedAppUsage
AudioGain(int index, int mode, int channelMask,
int minValue, int maxValue, int defaultValue, int stepValue,
int rampDurationMinMs, int rampDurationMaxMs) {
diff --git a/media/java/android/media/AudioGainConfig.java b/media/java/android/media/AudioGainConfig.java
index ea61679..f5ebef8 100644
--- a/media/java/android/media/AudioGainConfig.java
+++ b/media/java/android/media/AudioGainConfig.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* The AudioGainConfig is used by APIs setting or getting values on a given gain
* controller. It contains a valid configuration (value, channels...) for a gain controller
@@ -26,12 +28,18 @@
*/
public class AudioGainConfig {
AudioGain mGain;
+ @UnsupportedAppUsage
private final int mIndex;
+ @UnsupportedAppUsage
private final int mMode;
+ @UnsupportedAppUsage
private final int mChannelMask;
+ @UnsupportedAppUsage
private final int mValues[];
+ @UnsupportedAppUsage
private final int mRampDurationMs;
+ @UnsupportedAppUsage
AudioGainConfig(int index, AudioGain gain, int mode, int channelMask,
int[] values, int rampDurationMs) {
mIndex = index;
diff --git a/media/java/android/media/AudioHandle.java b/media/java/android/media/AudioHandle.java
index 6493dac..24f81f9 100644
--- a/media/java/android/media/AudioHandle.java
+++ b/media/java/android/media/AudioHandle.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* The AudioHandle is used by the audio framework implementation to
* uniquely identify a particular component of the routing topology
@@ -23,8 +25,10 @@
* It is not visible or used at the API.
*/
class AudioHandle {
+ @UnsupportedAppUsage
private final int mId;
+ @UnsupportedAppUsage
AudioHandle(int id) {
mId = id;
}
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 1a282b2..85eac4b 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -25,6 +25,7 @@
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.bluetooth.BluetoothDevice;
@@ -154,6 +155,7 @@
* @see #EXTRA_PREV_VOLUME_STREAM_VALUE
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @UnsupportedAppUsage
public static final String VOLUME_CHANGED_ACTION = "android.media.VOLUME_CHANGED_ACTION";
/**
@@ -220,6 +222,7 @@
/**
* @hide The stream type for the volume changed intent.
*/
+ @UnsupportedAppUsage
public static final String EXTRA_VOLUME_STREAM_TYPE = "android.media.EXTRA_VOLUME_STREAM_TYPE";
/**
@@ -236,6 +239,7 @@
/**
* @hide The volume associated with the stream for the volume changed intent.
*/
+ @UnsupportedAppUsage
public static final String EXTRA_VOLUME_STREAM_VALUE =
"android.media.EXTRA_VOLUME_STREAM_VALUE";
@@ -342,14 +346,17 @@
public static final int STREAM_NOTIFICATION = AudioSystem.STREAM_NOTIFICATION;
/** @hide Used to identify the volume of audio streams for phone calls when connected
* to bluetooth */
+ @UnsupportedAppUsage
public static final int STREAM_BLUETOOTH_SCO = AudioSystem.STREAM_BLUETOOTH_SCO;
/** @hide Used to identify the volume of audio streams for enforced system sounds
* in certain countries (e.g camera in Japan) */
+ @UnsupportedAppUsage
public static final int STREAM_SYSTEM_ENFORCED = AudioSystem.STREAM_SYSTEM_ENFORCED;
/** Used to identify the volume of audio streams for DTMF Tones */
public static final int STREAM_DTMF = AudioSystem.STREAM_DTMF;
/** @hide Used to identify the volume of audio streams exclusively transmitted through the
* speaker (TTS) of the device */
+ @UnsupportedAppUsage
public static final int STREAM_TTS = AudioSystem.STREAM_TTS;
/** Used to identify the volume of audio streams for accessibility prompts */
public static final int STREAM_ACCESSIBILITY = AudioSystem.STREAM_ACCESSIBILITY;
@@ -675,6 +682,7 @@
* @hide
* For test purposes only, will throw NPE with some methods that require a Context.
*/
+ @UnsupportedAppUsage
public AudioManager() {
mUseVolumeKeySounds = true;
mUseFixedVolume = false;
@@ -683,6 +691,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public AudioManager(Context context) {
setContext(context);
mUseVolumeKeySounds = getContext().getResources().getBoolean(
@@ -710,6 +719,7 @@
}
}
+ @UnsupportedAppUsage
private static IAudioService getService()
{
if (sService != null) {
@@ -880,6 +890,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setMasterMute(boolean mute, int flags) {
final IAudioService service = getService();
try {
@@ -914,6 +925,7 @@
* @see #setRingerMode(int)
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isValidRingerMode(int ringerMode) {
if (ringerMode < 0 || ringerMode > RINGER_MODE_MAX) {
return false;
@@ -1062,6 +1074,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getLastAudibleStreamVolume(int streamType) {
final IAudioService service = getService();
try {
@@ -1222,6 +1235,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean isMasterMute() {
final IAudioService service = getService();
try {
@@ -1239,6 +1253,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ @UnsupportedAppUsage
public void forceVolumeControlStream(int streamType) {
final IAudioService service = getService();
try {
@@ -1531,6 +1546,7 @@
* @see #stopBluetoothSco()
* @see #ACTION_SCO_AUDIO_STATE_UPDATED
*/
+ @UnsupportedAppUsage
public void startBluetoothScoVirtualCall() {
final IAudioService service = getService();
try {
@@ -1854,6 +1870,7 @@
* display). Note that BT audio sinks are not considered remote devices.
* @return true if {@link AudioManager#STREAM_MUSIC} is active on a remote device
*/
+ @UnsupportedAppUsage
public boolean isMusicActiveRemotely() {
return AudioSystem.isStreamActiveRemotely(STREAM_MUSIC, 0);
}
@@ -2004,6 +2021,7 @@
/**
* @hide Number of sound effects
*/
+ @UnsupportedAppUsage
public static final int NUM_SOUND_EFFECTS = 10;
/**
@@ -2234,6 +2252,7 @@
* Map to convert focus event listener IDs, as used in the AudioService audio focus stack,
* to actual listener objects.
*/
+ @UnsupportedAppUsage
private final ConcurrentHashMap<String, FocusRequestInfo> mAudioFocusIdListenerMap =
new ConcurrentHashMap<String, FocusRequestInfo>();
@@ -2810,6 +2829,7 @@
* @param durationHint the type of focus request. AUDIOFOCUS_GAIN_TRANSIENT is recommended so
* media applications resume after a call
*/
+ @UnsupportedAppUsage
public void requestAudioFocusForCall(int streamType, int durationHint) {
final IAudioService service = getService();
try {
@@ -2913,6 +2933,7 @@
* when ringing ends and the call is rejected or not answered.
* Should match one or more calls to {@link #requestAudioFocusForCall(int, int)}.
*/
+ @UnsupportedAppUsage
public void abandonAudioFocusForCall() {
final IAudioService service = getService();
try {
@@ -3582,6 +3603,7 @@
* agent when audio settings are restored and causes the AudioService
* to read and apply restored settings.
*/
+ @UnsupportedAppUsage
public void reloadAudioSettings() {
final IAudioService service = getService();
try {
@@ -3620,6 +3642,7 @@
*
* @hide pending API Council approval
*/
+ @UnsupportedAppUsage
public boolean isSilentMode() {
int ringerMode = getRingerMode();
boolean silentMode =
@@ -3641,15 +3664,19 @@
* such as earbuds, earphones, or in-ear monitors (IEM). Those would be handled as a
* {@link #DEVICE_OUT_WIRED_HEADPHONE}.
*/
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_EARPIECE = AudioSystem.DEVICE_OUT_EARPIECE;
/** @hide
* The audio output device code for the built-in speaker */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_SPEAKER = AudioSystem.DEVICE_OUT_SPEAKER;
/** @hide
* The audio output device code for a wired headset with attached microphone */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_WIRED_HEADSET = AudioSystem.DEVICE_OUT_WIRED_HEADSET;
/** @hide
* The audio output device code for a wired headphone without attached microphone */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_WIRED_HEADPHONE = AudioSystem.DEVICE_OUT_WIRED_HEADPHONE;
/** @hide
* The audio output device code for a USB headphone with attached microphone */
@@ -3661,6 +3688,7 @@
* The audio output device code for Bluetooth SCO Headset Profile (HSP) and
* Hands-Free Profile (HFP), for voice
*/
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_SCO_HEADSET =
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
/** @hide
@@ -3669,13 +3697,16 @@
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
/** @hide
* The audio output device code for generic Bluetooth A2DP, for music */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_A2DP = AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP;
/** @hide
* The audio output device code for Bluetooth A2DP headphones, for music */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES =
AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
/** @hide
* The audio output device code for Bluetooth A2DP external speaker, for music */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER =
AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
/** @hide
@@ -3684,16 +3715,19 @@
public static final int DEVICE_OUT_AUX_DIGITAL = AudioSystem.DEVICE_OUT_AUX_DIGITAL;
/** @hide
* The audio output device code for HDMI */
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_HDMI = AudioSystem.DEVICE_OUT_HDMI;
/** @hide
* The audio output device code for an analog wired headset attached via a
* docking station
*/
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_ANLG_DOCK_HEADSET = AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET;
/** @hide
* The audio output device code for a digital wired headset attached via a
* docking station
*/
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_DGTL_DOCK_HEADSET = AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET;
/** @hide
* The audio output device code for a USB audio accessory. The accessory is in USB host
@@ -3872,6 +3906,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public int getDevicesForStream(int streamType) {
switch (streamType) {
case STREAM_VOICE_CALL:
@@ -3895,6 +3930,7 @@
* @param name device name
* {@hide}
*/
+ @UnsupportedAppUsage
public void setWiredDeviceConnectionState(int type, int state, String address, String name) {
final IAudioService service = getService();
try {
@@ -4079,6 +4115,7 @@
* a better solution.
* @hide
*/
+ @UnsupportedAppUsage
public int getOutputLatency(int streamType) {
return AudioSystem.getOutputLatency(streamType);
}
@@ -4150,6 +4187,7 @@
* Only useful for volume controllers.
* @hide
*/
+ @UnsupportedAppUsage
public void setRingerModeInternal(int ringerMode) {
try {
getService().setRingerModeInternal(ringerMode, getContext().getOpPackageName());
@@ -4162,6 +4200,7 @@
* Only useful for volume controllers.
* @hide
*/
+ @UnsupportedAppUsage
public int getRingerModeInternal() {
try {
return getService().getRingerModeInternal();
@@ -4251,6 +4290,7 @@
* @param ports An AudioPort ArrayList where the list will be returned.
* @hide
*/
+ @UnsupportedAppUsage
public static int listAudioPorts(ArrayList<AudioPort> ports) {
return updateAudioPortCache(ports, null, null);
}
@@ -4332,6 +4372,7 @@
* patch[0] contains the newly created patch
* @hide
*/
+ @UnsupportedAppUsage
public static int createAudioPatch(AudioPatch[] patch,
AudioPortConfig[] sources,
AudioPortConfig[] sinks) {
@@ -4349,6 +4390,7 @@
* - {@link #ERROR} if patch cannot be released for any other reason.
* @hide
*/
+ @UnsupportedAppUsage
public static int releaseAudioPatch(AudioPatch patch) {
return AudioSystem.releaseAudioPatch(patch);
}
@@ -4358,6 +4400,7 @@
* @param patches An AudioPatch array where the list will be returned.
* @hide
*/
+ @UnsupportedAppUsage
public static int listAudioPatches(ArrayList<AudioPatch> patches) {
return updateAudioPortCache(null, patches, null);
}
@@ -4406,6 +4449,7 @@
* Register an audio port list update listener.
* @hide
*/
+ @UnsupportedAppUsage
public void registerAudioPortUpdateListener(OnAudioPortUpdateListener l) {
sAudioPortEventHandler.init();
sAudioPortEventHandler.registerListener(l);
@@ -4415,6 +4459,7 @@
* Unregister an audio port list update listener.
* @hide
*/
+ @UnsupportedAppUsage
public void unregisterAudioPortUpdateListener(OnAudioPortUpdateListener l) {
sAudioPortEventHandler.unregisterListener(l);
}
diff --git a/media/java/android/media/AudioMixPort.java b/media/java/android/media/AudioMixPort.java
index ba144bf..c4a5c4d 100644
--- a/media/java/android/media/AudioMixPort.java
+++ b/media/java/android/media/AudioMixPort.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* The AudioMixPort is a specialized type of AudioPort
* describing an audio mix or stream at an input or output stream of the audio
@@ -30,6 +32,7 @@
private final int mIoHandle;
+ @UnsupportedAppUsage
AudioMixPort(AudioHandle handle, int ioHandle, int role, String deviceName,
int[] samplingRates, int[] channelMasks, int[] channelIndexMasks,
int[] formats, AudioGain[] gains) {
@@ -50,6 +53,7 @@
/**
* Get the device type (e.g AudioManager.DEVICE_OUT_SPEAKER)
*/
+ @UnsupportedAppUsage
public int ioHandle() {
return mIoHandle;
}
diff --git a/media/java/android/media/AudioMixPortConfig.java b/media/java/android/media/AudioMixPortConfig.java
index 8eb9ef46..315e46b 100644
--- a/media/java/android/media/AudioMixPortConfig.java
+++ b/media/java/android/media/AudioMixPortConfig.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An AudioMixPortConfig describes a possible configuration of an output or input mixer.
* It is used to specify a sink or source when creating a connection with
@@ -26,6 +28,7 @@
public class AudioMixPortConfig extends AudioPortConfig {
+ @UnsupportedAppUsage
AudioMixPortConfig(AudioMixPort mixPort, int samplingRate, int channelMask, int format,
AudioGainConfig gain) {
super((AudioPort)mixPort, samplingRate, channelMask, format, gain);
diff --git a/media/java/android/media/AudioPatch.java b/media/java/android/media/AudioPatch.java
index 6c70213..d1f8006 100644
--- a/media/java/android/media/AudioPatch.java
+++ b/media/java/android/media/AudioPatch.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An AudioPatch describes a connection between audio sources and audio sinks.
@@ -29,10 +31,12 @@
*/
public class AudioPatch {
+ @UnsupportedAppUsage
private final AudioHandle mHandle;
private final AudioPortConfig[] mSources;
private final AudioPortConfig[] mSinks;
+ @UnsupportedAppUsage
AudioPatch(AudioHandle patchHandle, AudioPortConfig[] sources, AudioPortConfig[] sinks) {
mHandle = patchHandle;
mSources = sources;
@@ -42,6 +46,7 @@
/**
* Retrieve the list of sources of this audio patch.
*/
+ @UnsupportedAppUsage
public AudioPortConfig[] sources() {
return mSources;
}
@@ -49,6 +54,7 @@
/**
* Retreive the list of sinks of this audio patch.
*/
+ @UnsupportedAppUsage
public AudioPortConfig[] sinks() {
return mSinks;
}
diff --git a/media/java/android/media/AudioPort.java b/media/java/android/media/AudioPort.java
index 047db19..83eb240 100644
--- a/media/java/android/media/AudioPort.java
+++ b/media/java/android/media/AudioPort.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An audio port is a node of the audio framework or hardware that can be connected to or
* disconnect from another audio node to create a specific audio routing configuration.
@@ -66,16 +68,21 @@
public static final int TYPE_SESSION = 3;
+ @UnsupportedAppUsage
AudioHandle mHandle;
+ @UnsupportedAppUsage
protected final int mRole;
private final String mName;
private final int[] mSamplingRates;
private final int[] mChannelMasks;
private final int[] mChannelIndexMasks;
private final int[] mFormats;
+ @UnsupportedAppUsage
private final AudioGain[] mGains;
+ @UnsupportedAppUsage
private AudioPortConfig mActiveConfig;
+ @UnsupportedAppUsage
AudioPort(AudioHandle handle, int role, String name,
int[] samplingRates, int[] channelMasks, int[] channelIndexMasks,
int[] formats, AudioGain[] gains) {
@@ -97,6 +104,7 @@
/**
* Get the system unique device ID.
*/
+ @UnsupportedAppUsage
public int id() {
return mHandle.id();
}
@@ -105,6 +113,7 @@
/**
* Get the audio port role
*/
+ @UnsupportedAppUsage
public int role() {
return mRole;
}
diff --git a/media/java/android/media/AudioPortConfig.java b/media/java/android/media/AudioPortConfig.java
index f937cc2..45e49a7 100644
--- a/media/java/android/media/AudioPortConfig.java
+++ b/media/java/android/media/AudioPortConfig.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
* An AudioPortConfig contains a possible configuration of an audio port chosen
* among all possible attributes described by an AudioPort.
@@ -30,10 +32,15 @@
*/
public class AudioPortConfig {
+ @UnsupportedAppUsage
final AudioPort mPort;
+ @UnsupportedAppUsage
private final int mSamplingRate;
+ @UnsupportedAppUsage
private final int mChannelMask;
+ @UnsupportedAppUsage
private final int mFormat;
+ @UnsupportedAppUsage
private final AudioGainConfig mGain;
// mConfigMask indicates which fields in this configuration should be
@@ -43,8 +50,10 @@
static final int CHANNEL_MASK = 0x2;
static final int FORMAT = 0x4;
static final int GAIN = 0x8;
+ @UnsupportedAppUsage
int mConfigMask;
+ @UnsupportedAppUsage
AudioPortConfig(AudioPort port, int samplingRate, int channelMask, int format,
AudioGainConfig gain) {
mPort = port;
@@ -58,6 +67,7 @@
/**
* Returns the audio port this AudioPortConfig is issued from.
*/
+ @UnsupportedAppUsage
public AudioPort port() {
return mPort;
}
diff --git a/media/java/android/media/AudioPortEventHandler.java b/media/java/android/media/AudioPortEventHandler.java
index ac3904a..f9a4b1e 100644
--- a/media/java/android/media/AudioPortEventHandler.java
+++ b/media/java/android/media/AudioPortEventHandler.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
@@ -48,6 +49,7 @@
* Accessed by native methods: JNI Callback context.
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mJniCallback;
void init() {
@@ -170,6 +172,7 @@
}
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private static void postEventFromNative(Object module_ref,
int what, int arg1, int arg2, Object obj) {
AudioPortEventHandler eventHandler =
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index 54800ae..452ba0f 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -29,6 +29,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.os.Binder;
import android.os.Handler;
@@ -157,18 +158,21 @@
* Accessed by native methods: provides access to C++ AudioRecord object
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mNativeRecorderInJavaObj;
/**
* Accessed by native methods: provides access to the callback data.
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mNativeCallbackCookie;
/**
* Accessed by native methods: provides access to the JNIDeviceCallback instance.
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mNativeDeviceCallback;
@@ -233,6 +237,7 @@
/**
* Looper associated with the thread that creates the AudioRecord instance
*/
+ @UnsupportedAppUsage
private Looper mInitializationLooper = null;
/**
* Size of the native audio buffer.
@@ -245,6 +250,7 @@
/**
* AudioAttributes
*/
+ @UnsupportedAppUsage
private AudioAttributes mAudioAttributes;
private boolean mIsSubmixFullVolume = false;
@@ -1720,6 +1726,7 @@
// Java methods called from the native side
//--------------------
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private static void postEventFromNative(Object audiorecord_ref,
int what, int arg1, int arg2, Object obj) {
//logd("Event posted from the native side: event="+ what + " args="+ arg1+" "+arg2);
@@ -1746,6 +1753,7 @@
// Native methods called from the Java side
//--------------------
+ @UnsupportedAppUsage
private native final int native_setup(Object audiorecord_this,
Object /*AudioAttributes*/ attributes,
int[] sampleRate, int channelMask, int channelIndexMask, int audioFormat,
@@ -1758,6 +1766,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public native final void native_release();
private native final int native_start(int syncEvent, int sessionId);
diff --git a/media/java/android/media/AudioRecordingConfiguration.java b/media/java/android/media/AudioRecordingConfiguration.java
index 984c554..9ada216 100644
--- a/media/java/android/media/AudioRecordingConfiguration.java
+++ b/media/java/android/media/AudioRecordingConfiguration.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
@@ -173,6 +174,7 @@
* <br>When called without the permission, the result is an empty string.
* @return the package name
*/
+ @UnsupportedAppUsage
public String getClientPackageName() { return mClientPackageName; }
/**
@@ -184,6 +186,7 @@
* <br>The result is -1 without the permission.
* @return the user id
*/
+ @UnsupportedAppUsage
public int getClientUid() { return mClientUid; }
/**
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index 7c893d0..39f3b31 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -17,6 +17,7 @@
package android.media;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.media.audiopolicy.AudioMix;
@@ -59,6 +60,7 @@
public static final int STREAM_BLUETOOTH_SCO = 6;
/** Used to identify the volume of audio streams for enforced system sounds in certain
* countries (e.g camera in Japan) */
+ @UnsupportedAppUsage
public static final int STREAM_SYSTEM_ENFORCED = 7;
/** Used to identify the volume of audio streams for DTMF tones */
public static final int STREAM_DTMF = 8;
@@ -74,6 +76,7 @@
// Expose only the getter method publicly so we can change it in the future
private static final int NUM_STREAM_TYPES = 11;
+ @UnsupportedAppUsage
public static final int getNumStreamTypes() { return NUM_STREAM_TYPES; }
public static final String[] STREAM_NAMES = new String[] {
@@ -97,6 +100,7 @@
* <var>false</var> to turn mute off
* @return command completion status see AUDIO_STATUS_OK, see AUDIO_STATUS_ERROR
*/
+ @UnsupportedAppUsage
public static native int muteMicrophone(boolean on);
/*
@@ -104,6 +108,7 @@
*
* @return true if microphone is muted, false if it's not
*/
+ @UnsupportedAppUsage
public static native boolean isMicrophoneMuted();
/* modes for setPhoneState, must match AudioSystem.h audio_mode */
@@ -151,6 +156,7 @@
*
* return true if any track playing on this stream is active.
*/
+ @UnsupportedAppUsage
public static native boolean isStreamActive(int stream, int inPastMs);
/*
@@ -166,6 +172,7 @@
*
* return true if any recorder using this source is currently recording
*/
+ @UnsupportedAppUsage
public static native boolean isSourceActive(int source);
/*
@@ -186,6 +193,7 @@
* param keyValuePairs list of parameters key value pairs in the form:
* key1=value1;key2=value2;...
*/
+ @UnsupportedAppUsage
public static native int setParameters(String keyValuePairs);
/*
@@ -196,6 +204,7 @@
* return value: list of parameters key value pairs in the form:
* key1=value1;key2=value2;...
*/
+ @UnsupportedAppUsage
public static native String getParameters(String keys);
// These match the enum AudioError in frameworks/base/core/jni/android_media_AudioSystem.cpp
@@ -227,6 +236,7 @@
* Registers a callback to be invoked when an error occurs.
* @param cb the callback to run
*/
+ @UnsupportedAppUsage
public static void setErrorCallback(ErrorCallback cb)
{
synchronized (AudioSystem.class) {
@@ -237,6 +247,7 @@
}
}
+ @UnsupportedAppUsage
private static void errorCallbackFromNative(int error)
{
ErrorCallback errorCallback = null;
@@ -272,6 +283,7 @@
}
}
+ @UnsupportedAppUsage
private static void dynamicPolicyCallbackFromNative(int event, String regId, int val)
{
DynamicPolicyCallback cb = null;
@@ -336,6 +348,7 @@
* {@link AudioRecordingCallback#onRecordingConfigurationChanged(int, int, int, int, int[])}
* for the description of the record format.
*/
+ @UnsupportedAppUsage
private static void recordingCallbackFromNative(int event, int uid, int session, int source,
int[] recordingFormat) {
AudioRecordingCallback cb = null;
@@ -374,27 +387,45 @@
public static final int DEVICE_BIT_IN = 0x80000000;
public static final int DEVICE_BIT_DEFAULT = 0x40000000;
// output devices, be sure to update AudioManager.java also
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_EARPIECE = 0x1;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_SPEAKER = 0x2;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_WIRED_HEADSET = 0x4;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_WIRED_HEADPHONE = 0x8;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_SCO = 0x10;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 0x20;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 0x40;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_A2DP = 0x80;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_AUX_DIGITAL = 0x400;
public static final int DEVICE_OUT_HDMI = DEVICE_OUT_AUX_DIGITAL;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_USB_ACCESSORY = 0x2000;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_USB_DEVICE = 0x4000;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_REMOTE_SUBMIX = 0x8000;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_TELEPHONY_TX = 0x10000;
public static final int DEVICE_OUT_LINE = 0x20000;
public static final int DEVICE_OUT_HDMI_ARC = 0x40000;
public static final int DEVICE_OUT_SPDIF = 0x80000;
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_FM = 0x100000;
public static final int DEVICE_OUT_AUX_LINE = 0x200000;
public static final int DEVICE_OUT_SPEAKER_SAFE = 0x400000;
@@ -441,6 +472,7 @@
public static final int DEVICE_OUT_ALL_SCO = (DEVICE_OUT_BLUETOOTH_SCO |
DEVICE_OUT_BLUETOOTH_SCO_HEADSET |
DEVICE_OUT_BLUETOOTH_SCO_CARKIT);
+ @UnsupportedAppUsage
public static final int DEVICE_OUT_ALL_USB = (DEVICE_OUT_USB_ACCESSORY |
DEVICE_OUT_USB_DEVICE |
DEVICE_OUT_USB_HEADSET);
@@ -452,31 +484,46 @@
DEVICE_OUT_SPEAKER);
// input devices
+ @UnsupportedAppUsage
public static final int DEVICE_IN_COMMUNICATION = DEVICE_BIT_IN | 0x1;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_AMBIENT = DEVICE_BIT_IN | 0x2;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_BUILTIN_MIC = DEVICE_BIT_IN | 0x4;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_BLUETOOTH_SCO_HEADSET = DEVICE_BIT_IN | 0x8;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_WIRED_HEADSET = DEVICE_BIT_IN | 0x10;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_AUX_DIGITAL = DEVICE_BIT_IN | 0x20;
public static final int DEVICE_IN_HDMI = DEVICE_IN_AUX_DIGITAL;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_VOICE_CALL = DEVICE_BIT_IN | 0x40;
public static final int DEVICE_IN_TELEPHONY_RX = DEVICE_IN_VOICE_CALL;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_BACK_MIC = DEVICE_BIT_IN | 0x80;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_REMOTE_SUBMIX = DEVICE_BIT_IN | 0x100;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_ANLG_DOCK_HEADSET = DEVICE_BIT_IN | 0x200;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_DGTL_DOCK_HEADSET = DEVICE_BIT_IN | 0x400;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_USB_ACCESSORY = DEVICE_BIT_IN | 0x800;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_USB_DEVICE = DEVICE_BIT_IN | 0x1000;
public static final int DEVICE_IN_FM_TUNER = DEVICE_BIT_IN | 0x2000;
public static final int DEVICE_IN_TV_TUNER = DEVICE_BIT_IN | 0x4000;
public static final int DEVICE_IN_LINE = DEVICE_BIT_IN | 0x8000;
public static final int DEVICE_IN_SPDIF = DEVICE_BIT_IN | 0x10000;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_BLUETOOTH_A2DP = DEVICE_BIT_IN | 0x20000;
public static final int DEVICE_IN_LOOPBACK = DEVICE_BIT_IN | 0x40000;
public static final int DEVICE_IN_IP = DEVICE_BIT_IN | 0x80000;
public static final int DEVICE_IN_BUS = DEVICE_BIT_IN | 0x100000;
public static final int DEVICE_IN_PROXY = DEVICE_BIT_IN | 0x1000000;
public static final int DEVICE_IN_USB_HEADSET = DEVICE_BIT_IN | 0x2000000;
+ @UnsupportedAppUsage
public static final int DEVICE_IN_DEFAULT = DEVICE_BIT_IN | DEVICE_BIT_DEFAULT;
public static final int DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION |
@@ -509,7 +556,9 @@
DEVICE_IN_USB_HEADSET);
// device states, must match AudioSystem::device_connection_state
+ @UnsupportedAppUsage
public static final int DEVICE_STATE_UNAVAILABLE = 0;
+ @UnsupportedAppUsage
public static final int DEVICE_STATE_AVAILABLE = 1;
private static final int NUM_DEVICE_STATES = 1;
@@ -575,6 +624,7 @@
public static final String DEVICE_IN_PROXY_NAME = "proxy";
public static final String DEVICE_IN_USB_HEADSET_NAME = "usb_headset";
+ @UnsupportedAppUsage
public static String getOutputDeviceName(int device)
{
switch(device) {
@@ -701,15 +751,20 @@
public static final int PHONE_STATE_INCALL = 2;
// device categories config for setForceUse, must match audio_policy_forced_cfg_t
+ @UnsupportedAppUsage
public static final int FORCE_NONE = 0;
public static final int FORCE_SPEAKER = 1;
public static final int FORCE_HEADPHONES = 2;
public static final int FORCE_BT_SCO = 3;
public static final int FORCE_BT_A2DP = 4;
public static final int FORCE_WIRED_ACCESSORY = 5;
+ @UnsupportedAppUsage
public static final int FORCE_BT_CAR_DOCK = 6;
+ @UnsupportedAppUsage
public static final int FORCE_BT_DESK_DOCK = 7;
+ @UnsupportedAppUsage
public static final int FORCE_ANALOG_DOCK = 8;
+ @UnsupportedAppUsage
public static final int FORCE_DIGITAL_DOCK = 9;
public static final int FORCE_NO_BT_A2DP = 10;
public static final int FORCE_SYSTEM_ENFORCED = 11;
@@ -775,22 +830,32 @@
* @return command completion status, one of {@link #AUDIO_STATUS_OK},
* {@link #AUDIO_STATUS_ERROR} or {@link #AUDIO_STATUS_SERVER_DIED}
*/
+ @UnsupportedAppUsage
public static native int setDeviceConnectionState(int device, int state,
String device_address, String device_name);
+ @UnsupportedAppUsage
public static native int getDeviceConnectionState(int device, String device_address);
public static native int handleDeviceConfigChange(int device,
String device_address,
String device_name);
+ @UnsupportedAppUsage
public static native int setPhoneState(int state);
+ @UnsupportedAppUsage
public static native int setForceUse(int usage, int config);
+ @UnsupportedAppUsage
public static native int getForceUse(int usage);
+ @UnsupportedAppUsage
public static native int initStreamVolume(int stream, int indexMin, int indexMax);
+ @UnsupportedAppUsage
public static native int setStreamVolumeIndex(int stream, int index, int device);
public static native int getStreamVolumeIndex(int stream, int device);
public static native int setMasterVolume(float value);
public static native float getMasterVolume();
+ @UnsupportedAppUsage
public static native int setMasterMute(boolean mute);
+ @UnsupportedAppUsage
public static native boolean getMasterMute();
+ @UnsupportedAppUsage
public static native int getDevicesForStream(int stream);
/** @hide returns true if master mono is enabled. */
@@ -799,11 +864,15 @@
public static native int setMasterMono(boolean mono);
// helpers for android.media.AudioManager.getProperty(), see description there for meaning
+ @UnsupportedAppUsage
public static native int getPrimaryOutputSamplingRate();
+ @UnsupportedAppUsage
public static native int getPrimaryOutputFrameCount();
+ @UnsupportedAppUsage
public static native int getOutputLatency(int stream);
public static native int setLowRamDevice(boolean isLowRamDevice, long totalMemory);
+ @UnsupportedAppUsage
public static native int checkAudioFlinger();
public static native int listAudioPorts(ArrayList<AudioPort> ports, int[] generation);
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 87b5d43..aaf7dd7 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -30,6 +30,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.content.Context;
import android.os.Handler;
@@ -351,6 +352,7 @@
* {@link AudioManager#STREAM_ALARM}, {@link AudioManager#STREAM_NOTIFICATION}, and
* {@link AudioManager#STREAM_DTMF}.
*/
+ @UnsupportedAppUsage
private int mStreamType = AudioManager.STREAM_MUSIC;
/**
@@ -399,12 +401,14 @@
* Accessed by native methods: provides access to C++ AudioTrack object.
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
protected long mNativeTrackInJavaObj;
/**
* Accessed by native methods: provides access to the JNI data (i.e. resources used by
* the native AudioTrack object, but not stored in it).
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mJniData;
@@ -692,6 +696,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
/* package */ void deferred_connect(long nativeTrackInJavaObj) {
if (mState != STATE_INITIALIZED) {
// Note that for this native_setup, we are providing an already created/initialized
@@ -1501,6 +1506,7 @@
* a better solution.
* @hide
*/
+ @UnsupportedAppUsage
public int getLatency() {
return native_get_latency();
}
@@ -3125,6 +3131,7 @@
// Java methods called from the native side
//--------------------
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private static void postEventFromNative(Object audiotrack_ref,
int what, int arg1, int arg2, Object obj) {
//logd("Event posted from the native side: event="+ what + " args="+ arg1+" "+arg2);
@@ -3192,6 +3199,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public native final void native_release();
private native final void native_start();
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index d303a2e..aa123bd 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
@@ -495,7 +496,9 @@
}
// Methods implemented by JNI
+ @UnsupportedAppUsage
private static native final void native_init();
+ @UnsupportedAppUsage
private static native final CamcorderProfile native_get_camcorder_profile(
int cameraId, int quality);
private static native final boolean native_has_camcorder_profile(
diff --git a/media/java/android/media/DecoderCapabilities.java b/media/java/android/media/DecoderCapabilities.java
index f16cccf..df5e918 100644
--- a/media/java/android/media/DecoderCapabilities.java
+++ b/media/java/android/media/DecoderCapabilities.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import java.util.List;
import java.util.ArrayList;
@@ -32,6 +33,7 @@
*
*/
public enum VideoDecoder {
+ @UnsupportedAppUsage
VIDEO_DECODER_WMV,
};
@@ -39,6 +41,7 @@
* The AudioDecoder class represents the type of an audio decoder
*/
public enum AudioDecoder {
+ @UnsupportedAppUsage
AUDIO_DECODER_WMA,
};
@@ -51,6 +54,7 @@
* Returns the list of video decoder types
* @see android.media.DecoderCapabilities.VideoDecoder
*/
+ @UnsupportedAppUsage
public static List<VideoDecoder> getVideoDecoders() {
List<VideoDecoder> decoderList = new ArrayList<VideoDecoder>();
int nDecoders = native_get_num_video_decoders();
@@ -64,6 +68,7 @@
* Returns the list of audio decoder types
* @see android.media.DecoderCapabilities.AudioDecoder
*/
+ @UnsupportedAppUsage
public static List<AudioDecoder> getAudioDecoders() {
List<AudioDecoder> decoderList = new ArrayList<AudioDecoder>();
int nDecoders = native_get_num_audio_decoders();
diff --git a/media/java/android/media/EncoderCapabilities.java b/media/java/android/media/EncoderCapabilities.java
index 332e360..c09c5fa 100644
--- a/media/java/android/media/EncoderCapabilities.java
+++ b/media/java/android/media/EncoderCapabilities.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import java.util.List;
import java.util.ArrayList;
@@ -42,11 +43,20 @@
*/
static public class VideoEncoderCap {
// These are not modifiable externally, thus are public accessible
- public final int mCodec; // @see android.media.MediaRecorder.VideoEncoder
- public final int mMinBitRate, mMaxBitRate; // min and max bit rate (bps)
- public final int mMinFrameRate, mMaxFrameRate; // min and max frame rate (fps)
- public final int mMinFrameWidth, mMaxFrameWidth; // min and max frame width (pixel)
- public final int mMinFrameHeight, mMaxFrameHeight; // minn and max frame height (pixel)
+ @UnsupportedAppUsage
+ public final int mCodec; // @see android.media.MediaRecorder.VideoEncoder
+ public final int mMinBitRate; // min bit rate (bps)
+ public final int mMaxBitRate; // max bit rate (bps)
+ public final int mMinFrameRate; // min frame rate (fps)
+ public final int mMaxFrameRate; // max frame rate (fps)
+ @UnsupportedAppUsage
+ public final int mMinFrameWidth; // min frame width (pixel)
+ @UnsupportedAppUsage
+ public final int mMaxFrameWidth; // max frame width (pixel)
+ @UnsupportedAppUsage
+ public final int mMinFrameHeight; // min frame height (pixel)
+ @UnsupportedAppUsage
+ public final int mMaxFrameHeight; // max frame height (pixel)
// Private constructor called by JNI
private VideoEncoderCap(int codec,
@@ -123,6 +133,7 @@
* Returns the capabilities of the supported video encoders.
* @see android.media.EncoderCapabilities.VideoEncoderCap
*/
+ @UnsupportedAppUsage
public static List<VideoEncoderCap> getVideoEncoders() {
int nEncoders = native_get_num_video_encoders();
if (nEncoders == 0) return null;
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 450a656..2395b24 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -17,6 +17,7 @@
package android.media;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -468,6 +469,7 @@
// See http://www.exiv2.org/makernote.html#R11
private static final int PEF_MAKER_NOTE_SKIP_SIZE = 6;
+ @UnsupportedAppUsage
private static SimpleDateFormat sFormatter;
// See Exchangeable image file format for digital still cameras: Exif version 2.2.
@@ -1293,14 +1295,17 @@
sExifPointerTagMap.put(EXIF_POINTER_TAGS[5].number, IFD_TYPE_ORF_IMAGE_PROCESSING); // 8256
}
+ @UnsupportedAppUsage
private final String mFilename;
private final FileDescriptor mSeekableFileDescriptor;
private final AssetManager.AssetInputStream mAssetInputStream;
private final boolean mIsInputStream;
private int mMimeType;
+ @UnsupportedAppUsage
private final HashMap[] mAttributes = new HashMap[EXIF_TAGS.length];
private Set<Integer> mAttributesOffsets = new HashSet<>(EXIF_TAGS.length);
private ByteOrder mExifByteOrder = ByteOrder.BIG_ENDIAN;
+ @UnsupportedAppUsage
private boolean mHasThumbnail;
// The following values used for indicating a thumbnail position.
private int mThumbnailOffset;
@@ -2022,6 +2027,7 @@
* Returns -1 if the date time information if not available.
* @hide
*/
+ @UnsupportedAppUsage
public long getDateTime() {
String dateTimeString = getAttribute(TAG_DATETIME);
if (dateTimeString == null
@@ -2058,6 +2064,7 @@
* Returns -1 if the date time information if not available.
* @hide
*/
+ @UnsupportedAppUsage
public long getGpsDateTime() {
String date = getAttribute(TAG_GPS_DATESTAMP);
String time = getAttribute(TAG_GPS_TIMESTAMP);
@@ -2080,6 +2087,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static float convertRationalLatLonToFloat(String rationalString, String ref) {
try {
String [] parts = rationalString.split(",");
diff --git a/media/java/android/media/Image.java b/media/java/android/media/Image.java
index a768dd3..dff5e9a 100644
--- a/media/java/android/media/Image.java
+++ b/media/java/android/media/Image.java
@@ -20,6 +20,7 @@
import java.lang.AutoCloseable;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import android.hardware.HardwareBuffer;
@@ -57,6 +58,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected Image() {
}
@@ -378,6 +380,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected Plane() {
}
diff --git a/media/java/android/media/JetPlayer.java b/media/java/android/media/JetPlayer.java
index 7735e78..b12e647 100644
--- a/media/java/android/media/JetPlayer.java
+++ b/media/java/android/media/JetPlayer.java
@@ -21,6 +21,7 @@
import java.lang.ref.WeakReference;
import java.lang.CloneNotSupportedException;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetFileDescriptor;
import android.os.Looper;
import android.os.Handler;
@@ -127,6 +128,7 @@
* Accessed by native methods: provides access to C++ JetPlayer object
*/
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mNativePlayerInJavaObj;
@@ -560,6 +562,7 @@
// Called exclusively by native code
//--------------------
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private static void postEventFromNative(Object jetplayer_ref,
int what, int arg1, int arg2) {
//logd("Event posted from the native side: event="+ what + " args="+ arg1+" "+arg2);
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 2207a2a..76fc9e3 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.ImageFormat;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
@@ -2137,6 +2138,7 @@
* Thrown when an internal codec error occurs.
*/
public final static class CodecException extends IllegalStateException {
+ @UnsupportedAppUsage
CodecException(int errorCode, int actionCode, @Nullable String detailMessage) {
super(detailMessage);
mErrorCode = errorCode;
@@ -2805,6 +2807,7 @@
index, true /* render */, true /* updatePTS */, renderTimestampNs);
}
+ @UnsupportedAppUsage
private native final void releaseOutputBuffer(
int index, boolean render, boolean updatePTS, long timeNs);
@@ -3525,6 +3528,7 @@
}
}
+ @UnsupportedAppUsage
private native final void setParameters(@NonNull String[] keys, @NonNull Object[] values);
/**
@@ -3555,6 +3559,7 @@
private native final MediaCodecInfo getOwnCodecInfo();
@NonNull
+ @UnsupportedAppUsage
private native final ByteBuffer[] getBuffers(boolean input);
@Nullable
@@ -3575,6 +3580,7 @@
native_init();
}
+ @UnsupportedAppUsage
private long mNativeContext;
/** @hide */
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 62d3dea..ef312d1 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.util.Log;
import android.util.Pair;
import android.util.Range;
@@ -1588,6 +1589,7 @@
private VideoCapabilities() { }
/** @hide */
+ @UnsupportedAppUsage
public static VideoCapabilities create(
MediaFormat info, CodecCapabilities parent) {
VideoCapabilities caps = new VideoCapabilities();
diff --git a/media/java/android/media/MediaDrm.java b/media/java/android/media/MediaDrm.java
index 60cad90..850be78 100644
--- a/media/java/android/media/MediaDrm.java
+++ b/media/java/android/media/MediaDrm.java
@@ -21,6 +21,7 @@
import android.annotation.Nullable;
import android.annotation.StringDef;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.os.Handler;
import android.os.Looper;
@@ -1473,6 +1474,7 @@
* Get the opaque message data
*/
@NonNull
+ @UnsupportedAppUsage
public byte[] getData() { return mData; }
/**
@@ -1481,6 +1483,7 @@
* certificate server URL obtained from other sources.
*/
@NonNull
+ @UnsupportedAppUsage
public String getDefaultUrl() { return mDefaultUrl; }
}
@@ -1497,6 +1500,7 @@
* @hide - not part of the public API at this time
*/
@NonNull
+ @UnsupportedAppUsage
public CertificateRequest getCertificateRequest(
@CertificateType int certType, @NonNull String certAuthority)
{
@@ -1518,6 +1522,7 @@
* Get the wrapped private key data
*/
@NonNull
+ @UnsupportedAppUsage
public byte[] getWrappedPrivateKey() {
if (mWrappedKey == null) {
// this should never happen as mWrappedKey is initialized in
@@ -1532,6 +1537,7 @@
* Get the PEM-encoded certificate chain
*/
@NonNull
+ @UnsupportedAppUsage
public byte[] getContent() {
if (mCertificateData == null) {
// this should never happen as mCertificateData is initialized in
@@ -1565,6 +1571,7 @@
* @hide - not part of the public API at this time
*/
@NonNull
+ @UnsupportedAppUsage
public Certificate provideCertificateResponse(@NonNull byte[] response)
throws DeniedByServerException {
return provideProvisionResponseNative(response);
@@ -1587,6 +1594,7 @@
* @hide - not part of the public API at this time
*/
@NonNull
+ @UnsupportedAppUsage
public byte[] signRSA(
@NonNull byte[] sessionId, @NonNull String algorithm,
@NonNull byte[] wrappedKey, @NonNull byte[] message) {
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index 35937de..3b9b6dd 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.media.DecoderCapabilities;
import android.media.DecoderCapabilities.VideoDecoder;
import android.media.DecoderCapabilities.AudioDecoder;
@@ -43,7 +44,9 @@
public static final int FILE_TYPE_AAC = 8;
public static final int FILE_TYPE_MKA = 9;
public static final int FILE_TYPE_FLAC = 10;
+ @UnsupportedAppUsage
private static final int FIRST_AUDIO_FILE_TYPE = FILE_TYPE_MP3;
+ @UnsupportedAppUsage
private static final int LAST_AUDIO_FILE_TYPE = FILE_TYPE_FLAC;
// MIDI file types
@@ -123,7 +126,9 @@
public static final int FILE_TYPE_ZIP = 107;
public static class MediaFileType {
+ @UnsupportedAppUsage
public final int fileType;
+ @UnsupportedAppUsage
public final String mimeType;
MediaFileType(int fileType, String mimeType) {
@@ -132,20 +137,25 @@
}
}
+ @UnsupportedAppUsage
private static final HashMap<String, MediaFileType> sFileTypeMap
= new HashMap<String, MediaFileType>();
private static final HashMap<String, Integer> sMimeTypeMap
= new HashMap<String, Integer>();
// maps file extension to MTP format code
+ @UnsupportedAppUsage
private static final HashMap<String, Integer> sFileTypeToFormatMap
= new HashMap<String, Integer>();
// maps mime type to MTP format code
+ @UnsupportedAppUsage
private static final HashMap<String, Integer> sMimeTypeToFormatMap
= new HashMap<String, Integer>();
// maps MTP format code to mime type
+ @UnsupportedAppUsage
private static final HashMap<Integer, String> sFormatToMimeTypeMap
= new HashMap<Integer, String>();
+ @UnsupportedAppUsage
static void addFileType(String extension, int fileType, String mimeType) {
sFileTypeMap.put(extension, new MediaFileType(fileType, mimeType));
sMimeTypeMap.put(mimeType, Integer.valueOf(fileType));
@@ -277,6 +287,7 @@
addFileType("MPEG", FILE_TYPE_MP2PS, "video/mp2p");
}
+ @UnsupportedAppUsage
public static boolean isAudioFileType(int fileType) {
return ((fileType >= FIRST_AUDIO_FILE_TYPE &&
fileType <= LAST_AUDIO_FILE_TYPE) ||
@@ -284,6 +295,7 @@
fileType <= LAST_MIDI_FILE_TYPE));
}
+ @UnsupportedAppUsage
public static boolean isVideoFileType(int fileType) {
return (fileType >= FIRST_VIDEO_FILE_TYPE &&
fileType <= LAST_VIDEO_FILE_TYPE)
@@ -291,6 +303,7 @@
fileType <= LAST_VIDEO_FILE_TYPE2);
}
+ @UnsupportedAppUsage
public static boolean isImageFileType(int fileType) {
return (fileType >= FIRST_IMAGE_FILE_TYPE &&
fileType <= LAST_IMAGE_FILE_TYPE)
@@ -303,16 +316,19 @@
fileType <= LAST_RAW_IMAGE_FILE_TYPE);
}
+ @UnsupportedAppUsage
public static boolean isPlayListFileType(int fileType) {
return (fileType >= FIRST_PLAYLIST_FILE_TYPE &&
fileType <= LAST_PLAYLIST_FILE_TYPE);
}
+ @UnsupportedAppUsage
public static boolean isDrmFileType(int fileType) {
return (fileType >= FIRST_DRM_FILE_TYPE &&
fileType <= LAST_DRM_FILE_TYPE);
}
+ @UnsupportedAppUsage
public static MediaFileType getFileType(String path) {
int lastDot = path.lastIndexOf('.');
if (lastDot < 0)
@@ -327,6 +343,7 @@
}
// generates a title based on file name
+ @UnsupportedAppUsage
public static String getFileTitle(String path) {
// extract file name after last slash
int lastSlash = path.lastIndexOf('/');
@@ -344,11 +361,13 @@
return path;
}
+ @UnsupportedAppUsage
public static int getFileTypeForMimeType(String mimeType) {
Integer value = sMimeTypeMap.get(mimeType);
return (value == null ? 0 : value.intValue());
}
+ @UnsupportedAppUsage
public static String getMimeTypeForFile(String path) {
MediaFileType mediaFileType = getFileType(path);
return (mediaFileType == null ? null : mediaFileType.mimeType);
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index 2a2f4fe..d10cbbc 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -17,6 +17,7 @@
package android.media;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -188,6 +189,7 @@
*/
public static final String MIMETYPE_TEXT_CEA_708 = "text/cea-708";
+ @UnsupportedAppUsage
private Map<String, Object> mMap;
/**
@@ -946,6 +948,7 @@
mMap = new HashMap();
}
+ @UnsupportedAppUsage
/* package private */ Map<String, Object> getMap() {
return mMap;
}
diff --git a/media/java/android/media/MediaHTTPConnection.java b/media/java/android/media/MediaHTTPConnection.java
index 6bf52bd..ad25a06 100644
--- a/media/java/android/media/MediaHTTPConnection.java
+++ b/media/java/android/media/MediaHTTPConnection.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.net.NetworkUtils;
import android.os.IBinder;
import android.os.StrictMode;
@@ -46,20 +47,28 @@
// connection timeout - 30 sec
private static final int CONNECT_TIMEOUT_MS = 30 * 1000;
+ @UnsupportedAppUsage
private long mCurrentOffset = -1;
+ @UnsupportedAppUsage
private URL mURL = null;
+ @UnsupportedAppUsage
private Map<String, String> mHeaders = null;
+ @UnsupportedAppUsage
private HttpURLConnection mConnection = null;
+ @UnsupportedAppUsage
private long mTotalSize = -1;
private InputStream mInputStream = null;
+ @UnsupportedAppUsage
private boolean mAllowCrossDomainRedirect = true;
+ @UnsupportedAppUsage
private boolean mAllowCrossProtocolRedirect = true;
// from com.squareup.okhttp.internal.http
private final static int HTTP_TEMP_REDIRECT = 307;
private final static int MAX_REDIRECTS = 20;
+ @UnsupportedAppUsage
public MediaHTTPConnection() {
CookieHandler cookieHandler = CookieHandler.getDefault();
if (cookieHandler == null) {
@@ -70,6 +79,7 @@
}
@Override
+ @UnsupportedAppUsage
public IBinder connect(String uri, String headers) {
if (VERBOSE) {
Log.d(TAG, "connect: uri=" + uri + ", headers=" + headers);
@@ -128,6 +138,7 @@
}
@Override
+ @UnsupportedAppUsage
public void disconnect() {
teardownConnection();
mHeaders = null;
@@ -312,6 +323,7 @@
}
@Override
+ @UnsupportedAppUsage
public int readAt(long offset, int size) {
return native_readAt(offset, size);
}
@@ -381,6 +393,7 @@
}
@Override
+ @UnsupportedAppUsage
public synchronized String getMIMEType() {
if (mConnection == null) {
try {
@@ -394,6 +407,7 @@
}
@Override
+ @UnsupportedAppUsage
public String getUri() {
return mURL.toString();
}
diff --git a/media/java/android/media/MediaHTTPService.java b/media/java/android/media/MediaHTTPService.java
index 3a0e58a..97a0df7 100644
--- a/media/java/android/media/MediaHTTPService.java
+++ b/media/java/android/media/MediaHTTPService.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.IBinder;
import android.util.Log;
@@ -28,10 +30,10 @@
/** @hide */
public class MediaHTTPService extends IMediaHTTPService.Stub {
private static final String TAG = "MediaHTTPService";
- private List<HttpCookie> mCookies;
+ @Nullable private List<HttpCookie> mCookies;
private Boolean mCookieStoreInitialized = new Boolean(false);
- public MediaHTTPService(List<HttpCookie> cookies) {
+ public MediaHTTPService(@Nullable List<HttpCookie> cookies) {
mCookies = cookies;
Log.v(TAG, "MediaHTTPService(" + this + "): Cookies: " + cookies);
}
@@ -82,6 +84,7 @@
return new MediaHTTPConnection();
}
+ @UnsupportedAppUsage
/* package private */static IBinder createHttpServiceBinderIfNecessary(
String path) {
return createHttpServiceBinderIfNecessary(path, null);
diff --git a/media/java/android/media/MediaInserter.java b/media/java/android/media/MediaInserter.java
index dd06921..0749f58 100644
--- a/media/java/android/media/MediaInserter.java
+++ b/media/java/android/media/MediaInserter.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProviderClient;
import android.content.ContentValues;
import android.net.Uri;
@@ -67,6 +68,7 @@
}
}
+ @UnsupportedAppUsage
public void flushAll() throws RemoteException {
flushAllPriority();
for (Uri tableUri : mRowMap.keySet()){
diff --git a/media/java/android/media/MediaMetadata.java b/media/java/android/media/MediaMetadata.java
index 94d4d55..2721ad1 100644
--- a/media/java/android/media/MediaMetadata.java
+++ b/media/java/android/media/MediaMetadata.java
@@ -17,6 +17,7 @@
import android.annotation.NonNull;
import android.annotation.StringDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -626,6 +627,7 @@
* @return The key used by this class or null if no mapping exists
* @hide
*/
+ @UnsupportedAppUsage
public static String getKeyFromMetadataEditorKey(int editorKey) {
return EDITOR_KEY_MAPPING.get(editorKey, null);
}
diff --git a/media/java/android/media/MediaMetadataRetriever.java b/media/java/android/media/MediaMetadataRetriever.java
index f9a47a6..57b648e 100644
--- a/media/java/android/media/MediaMetadataRetriever.java
+++ b/media/java/android/media/MediaMetadataRetriever.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
@@ -668,6 +669,7 @@
return getEmbeddedPicture(EMBEDDED_PICTURE_TYPE_ANY);
}
+ @UnsupportedAppUsage
private native byte[] getEmbeddedPicture(int pictureType);
/**
@@ -675,9 +677,12 @@
* allocated internally.
*/
public native void release();
+ @UnsupportedAppUsage
private native void native_setup();
+ @UnsupportedAppUsage
private static native void native_init();
+ @UnsupportedAppUsage
private native final void native_finalize();
@Override
diff --git a/media/java/android/media/MediaMuxer.java b/media/java/android/media/MediaMuxer.java
index 205ce8d..c91d4d3 100644
--- a/media/java/android/media/MediaMuxer.java
+++ b/media/java/android/media/MediaMuxer.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.media.MediaCodec;
import android.media.MediaCodec.BufferInfo;
import dalvik.system.CloseGuard;
@@ -283,8 +284,10 @@
public @interface Format {}
// All the native functions are listed here.
+ @UnsupportedAppUsage
private static native long nativeSetup(@NonNull FileDescriptor fd, int format)
throws IllegalArgumentException, IOException;
+ @UnsupportedAppUsage
private static native void nativeRelease(long nativeObject);
private static native void nativeStart(long nativeObject);
private static native void nativeStop(long nativeObject);
@@ -298,16 +301,22 @@
int offset, int size, long presentationTimeUs, @MediaCodec.BufferFlag int flags);
// Muxer internal states.
+ @UnsupportedAppUsage
private static final int MUXER_STATE_UNINITIALIZED = -1;
private static final int MUXER_STATE_INITIALIZED = 0;
+ @UnsupportedAppUsage
private static final int MUXER_STATE_STARTED = 1;
+ @UnsupportedAppUsage
private static final int MUXER_STATE_STOPPED = 2;
+ @UnsupportedAppUsage
private int mState = MUXER_STATE_UNINITIALIZED;
+ @UnsupportedAppUsage
private final CloseGuard mCloseGuard = CloseGuard.get();
private int mLastTrackIndex = -1;
+ @UnsupportedAppUsage
private long mNativeObject;
/**
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index d532e52..ed4da22 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.content.ContentProvider;
import android.content.ContentResolver;
@@ -597,6 +598,7 @@
// FIXME: add link to getMetadata(boolean, boolean)
{@hide}
*/
+ @UnsupportedAppUsage
public static final boolean METADATA_ALL = false;
/**
@@ -613,6 +615,7 @@
// FIXME: add link to getMetadata(boolean, boolean)
{@hide}
*/
+ @UnsupportedAppUsage
public static final boolean BYPASS_METADATA_FILTER = false;
static {
@@ -630,6 +633,7 @@
private long mNativeSurfaceTexture; // accessed by native methods
private int mListenerContext; // accessed by native methods
private SurfaceHolder mSurfaceHolder;
+ @UnsupportedAppUsage
private EventHandler mEventHandler;
private PowerManager.WakeLock mWakeLock = null;
private boolean mScreenOnWhilePlaying;
@@ -710,6 +714,7 @@
* player.
* {@hide}
*/
+ @UnsupportedAppUsage
public Parcel newRequest() {
Parcel parcel = Parcel.obtain();
parcel.writeInterfaceToken(IMEDIA_PLAYER);
@@ -730,6 +735,7 @@
* native player.
* {@hide}
*/
+ @UnsupportedAppUsage
public void invoke(Parcel request, Parcel reply) {
int retcode = native_invoke(request, reply);
reply.setDataPosition(0);
@@ -1139,11 +1145,13 @@
* @throws IllegalStateException if it is called in an invalid state
* @hide pending API council
*/
+ @UnsupportedAppUsage
public void setDataSource(String path, Map<String, String> headers)
throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
setDataSource(path, headers, null);
}
+ @UnsupportedAppUsage
private void setDataSource(String path, Map<String, String> headers, List<HttpCookie> cookies)
throws IOException, IllegalArgumentException, SecurityException, IllegalStateException
{
@@ -1164,6 +1172,7 @@
setDataSource(path, keys, values, cookies);
}
+ @UnsupportedAppUsage
private void setDataSource(String path, String[] keys, String[] values,
List<HttpCookie> cookies)
throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
@@ -2010,6 +2019,7 @@
// FIXME: unhide.
* {@hide}
*/
+ @UnsupportedAppUsage
public Metadata getMetadata(final boolean update_only,
final boolean apply_filter) {
Parcel reply = Parcel.obtain();
@@ -2234,6 +2244,7 @@
* @return true if the parameter is set successfully, false otherwise
* {@hide}
*/
+ @UnsupportedAppUsage
private native boolean setParameter(int key, Parcel value);
/**
@@ -2550,6 +2561,7 @@
/**
* Used to read a TrackInfo from a Parcel.
*/
+ @UnsupportedAppUsage
static final Parcelable.Creator<TrackInfo> CREATOR
= new Parcelable.Creator<TrackInfo>() {
@Override
@@ -2660,6 +2672,7 @@
private SubtitleController mSubtitleController;
/** @hide */
+ @UnsupportedAppUsage
public void setSubtitleAnchor(
SubtitleController controller,
SubtitleController.Anchor anchor) {
@@ -2764,6 +2777,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void addSubtitleSource(InputStream is, MediaFormat format)
throws IllegalStateException
{
@@ -3276,6 +3290,7 @@
*
* {@hide} pending API council
*/
+ @UnsupportedAppUsage
public void setRetransmitEndpoint(InetSocketAddress endpoint)
throws IllegalStateException, IllegalArgumentException
{
@@ -3327,6 +3342,7 @@
private TimeProvider mTimeProvider;
/** @hide */
+ @UnsupportedAppUsage
public MediaTimeProvider getMediaTimeProvider() {
if (mTimeProvider == null) {
mTimeProvider = new TimeProvider(this);
@@ -3723,6 +3739,7 @@
mOnPreparedListener = listener;
}
+ @UnsupportedAppUsage
private OnPreparedListener mOnPreparedListener;
/**
@@ -3750,6 +3767,7 @@
mOnCompletionListener = listener;
}
+ @UnsupportedAppUsage
private OnCompletionListener mOnCompletionListener;
/**
@@ -3822,6 +3840,7 @@
mOnSeekCompleteListener = listener;
}
+ @UnsupportedAppUsage
private OnSeekCompleteListener mOnSeekCompleteListener;
/**
@@ -3883,6 +3902,7 @@
mOnTimedTextListener = listener;
}
+ @UnsupportedAppUsage
private OnTimedTextListener mOnTimedTextListener;
/**
@@ -4162,6 +4182,7 @@
mOnErrorListener = listener;
}
+ @UnsupportedAppUsage
private OnErrorListener mOnErrorListener;
@@ -4231,6 +4252,7 @@
* JAVA framework to avoid triggering track scanning.
* @hide
*/
+ @UnsupportedAppUsage
public static final int MEDIA_INFO_EXTERNAL_METADATA_UPDATE = 803;
/** Informs that audio is not playing. Note that playback of the video
@@ -4250,6 +4272,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final int MEDIA_INFO_TIMED_TEXT_ERROR = 900;
/** Subtitle track was not supported by the media framework.
@@ -4306,6 +4329,7 @@
mOnInfoListener = listener;
}
+ @UnsupportedAppUsage
private OnInfoListener mOnInfoListener;
// Modular DRM begin
diff --git a/media/java/android/media/MediaPlayer2.java b/media/java/android/media/MediaPlayer2.java
index bcff5bf..e183a6b 100644
--- a/media/java/android/media/MediaPlayer2.java
+++ b/media/java/android/media/MediaPlayer2.java
@@ -20,6 +20,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.SurfaceTexture;
import android.net.Uri;
@@ -787,7 +788,7 @@
* {@code EventCallback.onCommandLabelReached} will be fired with the
* given {@code label}.
*
- * @see android.media.MediaPlayer2.EventCallback#onCommandLabelReached
+ * @see EventCallback#onCommandLabelReached
*
* @param label An application specific Object used to help to identify the completeness
* of a batch of commands.
@@ -1378,13 +1379,14 @@
/**
* Class for MediaPlayer2 to return each audio/video/subtitle track's metadata.
*
- * @see android.media.MediaPlayer2#getTrackInfo
+ * @see MediaPlayer2#getTrackInfo
*/
public abstract static class TrackInfo {
/**
* Gets the track type.
* @return TrackType which indicates if the track is video, audio, timed text.
*/
+ @UnsupportedAppUsage
public abstract int getTrackType();
/**
@@ -1393,6 +1395,7 @@
* When the language is unknown or could not be determined,
* ISO-639-2 language code, "und", is returned.
*/
+ @UnsupportedAppUsage
public abstract String getLanguage();
/**
@@ -1585,7 +1588,7 @@
* each individual track can be found by calling {@link #getTrackInfo()} method.
* @throws IllegalStateException if called in an invalid state.
*
- * @see android.media.MediaPlayer2#getTrackInfo
+ * @see MediaPlayer2#getTrackInfo
*/
// This is an asynchronous call.
public abstract void selectTrack(int index);
@@ -1602,7 +1605,7 @@
* each individual track can be found by calling {@link #getTrackInfo()} method.
* @throws IllegalStateException if called in an invalid state.
*
- * @see android.media.MediaPlayer2#getTrackInfo
+ * @see MediaPlayer2#getTrackInfo
*/
// This is an asynchronous call.
public abstract void deselectTrack(int index);
@@ -1750,14 +1753,14 @@
* in include/media/mediaplayer2.h!
*/
/** Unspecified media player error.
- * @see android.media.MediaPlayer2.EventCallback#onError
+ * @see EventCallback#onError
*/
public static final int MEDIA_ERROR_UNKNOWN = 1;
/** The video is streamed and its container is not valid for progressive
* playback i.e the video's index (e.g moov atom) is not at the start of the
* file.
- * @see android.media.MediaPlayer2.EventCallback#onError
+ * @see EventCallback#onError
*/
public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200;
@@ -1773,7 +1776,7 @@
/** Unspecified low-level system error. This value originated from UNKNOWN_ERROR in
* system/core/include/utils/Errors.h
- * @see android.media.MediaPlayer2.EventCallback#onError
+ * @see EventCallback#onError
* @hide
*/
public static final int MEDIA_ERROR_SYSTEM = -2147483648;
@@ -1797,62 +1800,68 @@
* in include/media/MediaPlayer2Types.h!
*/
/** Unspecified media player info.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_UNKNOWN = 1;
/** The player just started the playback of this datas source.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_DATA_SOURCE_START = 2;
/** The player just pushed the very first video frame for rendering.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_VIDEO_RENDERING_START = 3;
/** The player just rendered the very first audio sample.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_AUDIO_RENDERING_START = 4;
/** The player just completed the playback of this data source.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_DATA_SOURCE_END = 5;
/** The player just completed the playback of all data sources set by {@link #setDataSource},
* {@link #setNextDataSource} and {@link #setNextDataSources}.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_DATA_SOURCE_LIST_END = 6;
+ /** The player just completed an iteration of playback loop. This event is sent only when
+ * looping is enabled by {@link #loopCurrent}.
+ * @see EventCallback#onInfo
+ */
+ public static final int MEDIA_INFO_DATA_SOURCE_REPEAT = 7;
+
/** The player just prepared a data source.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_PREPARED = 100;
/** The video is too complex for the decoder: it can't decode frames fast
* enough. Possibly only the audio plays fine at this stage.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700;
/** MediaPlayer2 is temporarily pausing playback internally in order to
* buffer more data.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_BUFFERING_START = 701;
/** MediaPlayer2 is resuming playback after filling buffers.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_BUFFERING_END = 702;
/** Estimated network bandwidth information (kbps) is available; currently this event fires
* simultaneously as {@link #MEDIA_INFO_BUFFERING_START} and {@link #MEDIA_INFO_BUFFERING_END}
* when playing network files.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
* @hide
*/
public static final int MEDIA_INFO_NETWORK_BANDWIDTH = 703;
@@ -1866,24 +1875,24 @@
*
* The {@code extra} parameter in {@code EventCallback.onInfo} is the
* percentage (0-100) of the content that has been buffered or played thus far.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_BUFFERING_UPDATE = 704;
/** Bad interleaving means that a media has been improperly interleaved or
* not interleaved at all, e.g has all the video samples first then all the
* audio ones. Video is playing but a lot of disk seeks may be happening.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_BAD_INTERLEAVING = 800;
/** The media cannot be seeked (e.g live stream)
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_NOT_SEEKABLE = 801;
/** A new set of metadata is available.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_METADATA_UPDATE = 802;
@@ -1895,30 +1904,30 @@
/** Informs that audio is not playing. Note that playback of the video
* is not interrupted.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_AUDIO_NOT_PLAYING = 804;
/** Informs that video is not playing. Note that playback of the audio
* is not interrupted.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_VIDEO_NOT_PLAYING = 805;
/** Failed to handle timed text track properly.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*
* {@hide}
*/
public static final int MEDIA_INFO_TIMED_TEXT_ERROR = 900;
/** Subtitle track was not supported by the media framework.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901;
/** Reading the subtitle track takes too long.
- * @see android.media.MediaPlayer2.EventCallback#onInfo
+ * @see EventCallback#onInfo
*/
public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902;
@@ -1953,124 +1962,124 @@
//--------------------------------------------------------------------------
/** The player just completed a call {@link #attachAuxEffect}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_ATTACH_AUX_EFFECT = 1;
/** The player just completed a call {@link #deselectTrack}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_DESELECT_TRACK = 2;
/** The player just completed a call {@link #loopCurrent}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_LOOP_CURRENT = 3;
/** The player just completed a call {@link #pause}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_PAUSE = 4;
/** The player just completed a call {@link #play}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_PLAY = 5;
/** The player just completed a call {@link #prepare}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_PREPARE = 6;
/** The player just completed a call {@link #releaseDrm}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_RELEASE_DRM = 12;
/** The player just completed a call {@link #restoreDrmKeys}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_RESTORE_DRM_KEYS = 13;
/** The player just completed a call {@link #seekTo}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SEEK_TO = 14;
/** The player just completed a call {@link #selectTrack}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SELECT_TRACK = 15;
/** The player just completed a call {@link #setAudioAttributes}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_AUDIO_ATTRIBUTES = 16;
/** The player just completed a call {@link #setAudioSessionId}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_AUDIO_SESSION_ID = 17;
/** The player just completed a call {@link #setAuxEffectSendLevel}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_AUX_EFFECT_SEND_LEVEL = 18;
/** The player just completed a call {@link #setDataSource}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_DATA_SOURCE = 19;
/** The player just completed a call {@link #setNextDataSource}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_NEXT_DATA_SOURCE = 22;
/** The player just completed a call {@link #setNextDataSources}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_NEXT_DATA_SOURCES = 23;
/** The player just completed a call {@link #setPlaybackParams}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_PLAYBACK_PARAMS = 24;
/** The player just completed a call {@link #setPlayerVolume}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_PLAYER_VOLUME = 26;
/** The player just completed a call {@link #setSurface}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_SURFACE = 27;
/** The player just completed a call {@link #setSyncParams}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SET_SYNC_PARAMS = 28;
/** The player just completed a call {@link #skipToNext}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_COMPLETED_SKIP_TO_NEXT = 29;
/** The player just completed a call {@link #setBufferingParams}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
* @hide
*/
public static final int CALL_COMPLETED_SET_BUFFERING_PARAMS = 1001;
/** The player just completed a call {@code setVideoScalingMode}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
* @hide
*/
public static final int CALL_COMPLETED_SET_VIDEO_SCALING_MODE = 1002;
/** The player just completed a call {@code notifyWhenCommandLabelReached}.
- * @see android.media.MediaPlayer2.EventCallback#onCommandLabelReached
+ * @see EventCallback#onCommandLabelReached
* @hide
*/
public static final int CALL_COMPLETED_NOTIFY_WHEN_COMMAND_LABEL_REACHED = 1003;
@@ -2108,32 +2117,32 @@
public @interface CallCompleted {}
/** Status code represents that call is completed without an error.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_NO_ERROR = 0;
/** Status code represents that call is ended with an unknown error.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_ERROR_UNKNOWN = Integer.MIN_VALUE;
/** Status code represents that the player is not in valid state for the operation.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_INVALID_OPERATION = 1;
/** Status code represents that the argument is illegal.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_BAD_VALUE = 2;
/** Status code represents that the operation is not allowed.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_PERMISSION_DENIED = 3;
/** Status code represents a file or network related operation error.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_ERROR_IO = 4;
@@ -2145,7 +2154,7 @@
/** Status code represents that DRM operation is called before preparing a DRM scheme through
* {@link #prepareDrm}.
- * @see android.media.MediaPlayer2.EventCallback#onCallCompleted
+ * @see EventCallback#onCallCompleted
*/
public static final int CALL_STATUS_NO_DRM_SCHEME = 6;
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index b47b4cd..d4bfd61 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.hardware.Camera;
import android.os.Bundle;
@@ -97,13 +98,19 @@
private long mNativeContext;
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private Surface mSurface;
+ @UnsupportedAppUsage
private String mPath;
+ @UnsupportedAppUsage
private FileDescriptor mFd;
private File mFile;
+ @UnsupportedAppUsage
private EventHandler mEventHandler;
+ @UnsupportedAppUsage
private OnErrorListener mOnErrorListener;
+ @UnsupportedAppUsage
private OnInfoListener mOnInfoListener;
private int mChannelCount;
@@ -942,6 +949,7 @@
// native implementation
private native void _setOutputFile(FileDescriptor fd) throws IllegalStateException, IOException;
private native void _setNextOutputFile(FileDescriptor fd) throws IllegalStateException, IOException;
+ @UnsupportedAppUsage
private native void _prepare() throws IllegalStateException, IOException;
/**
@@ -1043,6 +1051,7 @@
mEventHandler.removeCallbacksAndMessages(null);
}
+ @UnsupportedAppUsage
private native void native_reset();
/**
@@ -1500,13 +1509,17 @@
*/
public native void release();
+ @UnsupportedAppUsage
private static native final void native_init();
+ @UnsupportedAppUsage
private native final void native_setup(Object mediarecorder_this,
String clientName, String opPackageName) throws IllegalStateException;
+ @UnsupportedAppUsage
private native final void native_finalize();
+ @UnsupportedAppUsage
private native void setParameter(String nameValuePair);
/**
diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java
index d5afd9a..43bee85 100644
--- a/media/java/android/media/MediaRouter.java
+++ b/media/java/android/media/MediaRouter.java
@@ -21,6 +21,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -786,6 +787,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public RouteInfo getSelectedRoute() {
return getSelectedRoute(ROUTE_TYPE_ANY);
}
@@ -939,6 +941,7 @@
/**
* @hide internal use
*/
+ @UnsupportedAppUsage
public void selectRouteInt(int types, RouteInfo route, boolean explicit) {
selectRouteStatic(types, route, explicit);
}
@@ -1527,6 +1530,7 @@
*/
public static class RouteInfo {
CharSequence mName;
+ @UnsupportedAppUsage
int mNameResId;
CharSequence mDescription;
private CharSequence mStatus;
@@ -1558,7 +1562,9 @@
/** @hide */ public static final int STATUS_NONE = 0;
/** @hide */ public static final int STATUS_SCANNING = 1;
- /** @hide */ public static final int STATUS_CONNECTING = 2;
+ /** @hide */
+ @UnsupportedAppUsage
+ public static final int STATUS_CONNECTING = 2;
/** @hide */ public static final int STATUS_AVAILABLE = 3;
/** @hide */ public static final int STATUS_NOT_AVAILABLE = 4;
/** @hide */ public static final int STATUS_IN_USE = 5;
@@ -1675,6 +1681,7 @@
return getName(context.getResources());
}
+ @UnsupportedAppUsage
CharSequence getName(Resources res) {
if (mNameResId != 0) {
return res.getText(mNameResId);
@@ -1770,6 +1777,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getStatusCode() {
return mResolvedStatusCode;
}
@@ -1794,6 +1802,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean matchesTypes(int types) {
return (mSupportedTypes & types) != 0;
}
@@ -2024,6 +2033,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public String getDeviceAddress() {
return mDeviceAddress;
}
@@ -2048,11 +2058,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isSelected() {
return this == sStatic.mSelectedRoute;
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isDefault() {
return this == sStatic.mDefaultAudioVideo;
}
@@ -2063,6 +2075,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void select() {
selectRouteStatic(mSupportedTypes, this, true);
}
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 8a757b8..dcacb92 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -62,11 +63,10 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.text.SimpleDateFormat;
import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.Locale;
import java.util.TimeZone;
@@ -125,11 +125,13 @@
private final static String TAG = "MediaScanner";
+ @UnsupportedAppUsage
private static final String[] FILES_PRESCAN_PROJECTION = new String[] {
Files.FileColumns._ID, // 0
Files.FileColumns.DATA, // 1
Files.FileColumns.FORMAT, // 2
Files.FileColumns.DATE_MODIFIED, // 3
+ Files.FileColumns.MEDIA_TYPE, // 4
};
private static final String[] ID_PROJECTION = new String[] {
@@ -140,6 +142,7 @@
private static final int FILES_PRESCAN_PATH_COLUMN_INDEX = 1;
private static final int FILES_PRESCAN_FORMAT_COLUMN_INDEX = 2;
private static final int FILES_PRESCAN_DATE_MODIFIED_COLUMN_INDEX = 3;
+ private static final int FILES_PRESCAN_MEDIA_TYPE_COLUMN_INDEX = 4;
private static final String[] PLAYLIST_MEMBERS_PROJECTION = new String[] {
Audio.Playlists.Members.PLAYLIST_ID, // 0
@@ -317,14 +320,18 @@
};
private long mNativeContext;
+ @UnsupportedAppUsage
private final Context mContext;
+ @UnsupportedAppUsage
private final String mPackageName;
private final String mVolumeName;
private final ContentProviderClient mMediaProvider;
+ @UnsupportedAppUsage
private final Uri mAudioUri;
private final Uri mVideoUri;
private final Uri mImagesUri;
private final Uri mPlaylistsUri;
+ @UnsupportedAppUsage
private final Uri mFilesUri;
private final Uri mFilesUriNoNotify;
private final boolean mProcessPlaylists;
@@ -347,10 +354,13 @@
/** Whether the scanner has set a default sound for the alarm ringtone. */
private boolean mDefaultAlarmSet;
/** The filename for the default sound for the ringer ringtone. */
+ @UnsupportedAppUsage
private String mDefaultRingtoneFilename;
/** The filename for the default sound for the notification ringtone. */
+ @UnsupportedAppUsage
private String mDefaultNotificationFilename;
/** The filename for the default sound for the alarm ringtone. */
+ @UnsupportedAppUsage
private String mDefaultAlarmAlertFilename;
/**
* The prefix for system properties that define the default sound for
@@ -362,17 +372,28 @@
private final BitmapFactory.Options mBitmapOptions = new BitmapFactory.Options();
private static class FileEntry {
+ @UnsupportedAppUsage
long mRowId;
String mPath;
long mLastModified;
int mFormat;
+ int mMediaType;
+ @UnsupportedAppUsage
boolean mLastModifiedChanged;
+ /** @deprecated kept intact for lame apps using reflection */
+ @Deprecated
+ @UnsupportedAppUsage
FileEntry(long rowId, String path, long lastModified, int format) {
+ this(rowId, path, lastModified, format, FileColumns.MEDIA_TYPE_NONE);
+ }
+
+ FileEntry(long rowId, String path, long lastModified, int format, int mediaType) {
mRowId = rowId;
mPath = path;
mLastModified = lastModified;
mFormat = format;
+ mMediaType = mediaType;
mLastModifiedChanged = false;
}
@@ -391,10 +412,12 @@
private final ArrayList<PlaylistEntry> mPlaylistEntries = new ArrayList<>();
private final ArrayList<FileEntry> mPlayLists = new ArrayList<>();
+ @UnsupportedAppUsage
private MediaInserter mMediaInserter;
private DrmManagerClient mDrmManagerClient = null;
+ @UnsupportedAppUsage
public MediaScanner(Context c, String volumeName) {
native_setup();
mContext = c;
@@ -458,8 +481,10 @@
+ Settings.System.ALARM_ALERT);
}
+ @UnsupportedAppUsage
private final MyMediaScannerClient mClient = new MyMediaScannerClient();
+ @UnsupportedAppUsage
private boolean isDrmEnabled() {
String prop = SystemProperties.get("drm.service.enabled");
return prop != null && prop.equals("true");
@@ -475,18 +500,23 @@
private String mTitle;
private String mComposer;
private String mGenre;
+ @UnsupportedAppUsage
private String mMimeType;
+ @UnsupportedAppUsage
private int mFileType;
private int mTrack;
private int mYear;
private int mDuration;
+ @UnsupportedAppUsage
private String mPath;
private long mDate;
private long mLastModified;
private long mFileSize;
private String mWriter;
private int mCompilation;
+ @UnsupportedAppUsage
private boolean mIsDrm;
+ @UnsupportedAppUsage
private boolean mNoMedia; // flag to suppress file from appearing in media tables
private boolean mScanSuccess;
private int mWidth;
@@ -497,6 +527,7 @@
mDateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
}
+ @UnsupportedAppUsage
public FileEntry beginFile(String path, String mimeType, long lastModified,
long fileSize, boolean isDirectory, boolean noMedia) {
mMimeType = mimeType;
@@ -541,7 +572,8 @@
entry.mLastModified = lastModified;
} else {
entry = new FileEntry(0, path, lastModified,
- (isDirectory ? MtpConstants.FORMAT_ASSOCIATION : 0));
+ (isDirectory ? MtpConstants.FORMAT_ASSOCIATION : 0),
+ FileColumns.MEDIA_TYPE_NONE);
}
entry.mLastModifiedChanged = true;
}
@@ -574,6 +606,7 @@
}
@Override
+ @UnsupportedAppUsage
public void scanFile(String path, long lastModified, long fileSize,
boolean isDirectory, boolean noMedia) {
// This is the callback funtion from native codes.
@@ -581,6 +614,7 @@
doScanFile(path, null, lastModified, fileSize, isDirectory, false, noMedia);
}
+ @UnsupportedAppUsage
public Uri doScanFile(String path, String mimeType, long lastModified,
long fileSize, boolean isDirectory, boolean scanAlways, boolean noMedia) {
Uri result = null;
@@ -689,6 +723,7 @@
return result;
}
+ @UnsupportedAppUsage
public void handleStringTag(String name, String value) {
if (name.equalsIgnoreCase("title") || name.startsWith("title;")) {
// Don't trim() here, to preserve the special \001 character
@@ -833,6 +868,7 @@
return false;
}
+ @UnsupportedAppUsage
public void setMimeType(String mimeType) {
if ("audio/mp4".equals(mMimeType) &&
mimeType.startsWith("video")) {
@@ -851,6 +887,7 @@
*
* @return a map of values
*/
+ @UnsupportedAppUsage
private ContentValues toValues() {
ContentValues map = new ContentValues();
@@ -907,6 +944,7 @@
return map;
}
+ @UnsupportedAppUsage
private Uri endFile(FileEntry entry, boolean ringtones, boolean notifications,
boolean alarms, boolean music, boolean podcasts)
throws RemoteException {
@@ -1009,14 +1047,21 @@
}
Uri tableUri = mFilesUri;
+ int mediaType = FileColumns.MEDIA_TYPE_NONE;
MediaInserter inserter = mMediaInserter;
if (mScanSuccess && !mNoMedia) {
if (MediaFile.isVideoFileType(mFileType)) {
tableUri = mVideoUri;
+ mediaType = FileColumns.MEDIA_TYPE_VIDEO;
} else if (MediaFile.isImageFileType(mFileType)) {
tableUri = mImagesUri;
+ mediaType = FileColumns.MEDIA_TYPE_IMAGE;
} else if (MediaFile.isAudioFileType(mFileType)) {
tableUri = mAudioUri;
+ mediaType = FileColumns.MEDIA_TYPE_AUDIO;
+ } else if (MediaFile.isPlayListFileType(mFileType)) {
+ tableUri = mPlaylistsUri;
+ mediaType = FileColumns.MEDIA_TYPE_PLAYLIST;
}
}
Uri result = null;
@@ -1079,20 +1124,16 @@
// with squashed lower case paths
values.remove(MediaStore.MediaColumns.DATA);
- int mediaType = 0;
- if (mScanSuccess && !MediaScanner.isNoMediaPath(entry.mPath)) {
- int fileType = MediaFile.getFileTypeForMimeType(mMimeType);
- if (MediaFile.isAudioFileType(fileType)) {
- mediaType = FileColumns.MEDIA_TYPE_AUDIO;
- } else if (MediaFile.isVideoFileType(fileType)) {
- mediaType = FileColumns.MEDIA_TYPE_VIDEO;
- } else if (MediaFile.isImageFileType(fileType)) {
- mediaType = FileColumns.MEDIA_TYPE_IMAGE;
- } else if (MediaFile.isPlayListFileType(fileType)) {
- mediaType = FileColumns.MEDIA_TYPE_PLAYLIST;
+ if (mScanSuccess && !mNoMedia) {
+ // Changing media type must be done as separate update
+ if (mediaType != entry.mMediaType) {
+ final ContentValues mediaTypeValues = new ContentValues();
+ mediaTypeValues.put(FileColumns.MEDIA_TYPE, mediaType);
+ mMediaProvider.update(ContentUris.withAppendedId(mFilesUri, rowId),
+ mediaTypeValues, null, null);
}
- values.put(FileColumns.MEDIA_TYPE, mediaType);
}
+
mMediaProvider.update(result, values, null, null);
}
@@ -1135,6 +1176,7 @@
Settings.System.putInt(cr, settingSetIndicatorName(settingName), 1);
}
+ @UnsupportedAppUsage
private int getFileTypeFromDrm(String path) {
if (!isDrmEnabled()) {
return 0;
@@ -1185,6 +1227,7 @@
}
}
+ @UnsupportedAppUsage
private void prescan(String filePath, boolean prescanFiles) throws RemoteException {
Cursor c = null;
String where = null;
@@ -1331,6 +1374,7 @@
}
}
+ @UnsupportedAppUsage
private void postscan(final String[] directories) throws RemoteException {
// handle playlists last, after we know what media files are on the storage.
@@ -1395,6 +1439,7 @@
}
// this function is used to scan a single file
+ @UnsupportedAppUsage
public Uri scanSingleFile(String path, String mimeType) {
try {
prescan(path, true);
@@ -1467,6 +1512,7 @@
}
}
+ @UnsupportedAppUsage
public static boolean isNoMediaPath(String path) {
if (path == null) {
return false;
@@ -1565,6 +1611,7 @@
}
}
+ @UnsupportedAppUsage
FileEntry makeEntryFor(String path) {
String where;
String[] selectionArgs;
@@ -1577,9 +1624,10 @@
where, selectionArgs, null, null);
if (c.moveToFirst()) {
long rowId = c.getLong(FILES_PRESCAN_ID_COLUMN_INDEX);
- int format = c.getInt(FILES_PRESCAN_FORMAT_COLUMN_INDEX);
long lastModified = c.getLong(FILES_PRESCAN_DATE_MODIFIED_COLUMN_INDEX);
- return new FileEntry(rowId, path, lastModified, format);
+ int format = c.getInt(FILES_PRESCAN_FORMAT_COLUMN_INDEX);
+ int mediaType = c.getInt(FILES_PRESCAN_MEDIA_TYPE_COLUMN_INDEX);
+ return new FileEntry(rowId, path, lastModified, format, mediaType);
}
} catch (RemoteException e) {
} finally {
@@ -1900,6 +1948,7 @@
private native void processDirectory(String path, MediaScannerClient client);
private native boolean processFile(String path, String mimeType, MediaScannerClient client);
+ @UnsupportedAppUsage
private native void setLocale(String locale);
public native byte[] extractAlbumArt(FileDescriptor fd);
diff --git a/media/java/android/media/Metadata.java b/media/java/android/media/Metadata.java
index 4b8f81e..792a2ba 100644
--- a/media/java/android/media/Metadata.java
+++ b/media/java/android/media/Metadata.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.util.Log;
import android.util.MathUtils;
@@ -68,18 +69,22 @@
/**
* Indicate whether the media can be paused
*/
+ @UnsupportedAppUsage
public static final int PAUSE_AVAILABLE = 1; // Boolean
/**
* Indicate whether the media can be backward seeked
*/
+ @UnsupportedAppUsage
public static final int SEEK_BACKWARD_AVAILABLE = 2; // Boolean
/**
* Indicate whether the media can be forward seeked
*/
+ @UnsupportedAppUsage
public static final int SEEK_FORWARD_AVAILABLE = 3; // Boolean
/**
* Indicate whether the media can be seeked
*/
+ @UnsupportedAppUsage
public static final int SEEK_AVAILABLE = 4; // Boolean
// TODO: Should we use numbers compatible with the metadata retriever?
@@ -264,6 +269,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public Metadata() { }
/**
@@ -382,6 +388,7 @@
* @return false if an error occurred.
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean parse(Parcel parcel) {
if (parcel.dataAvail() < kMetaHeaderSize) {
Log.e(TAG, "Not enough data " + parcel.dataAvail());
@@ -418,6 +425,7 @@
/**
* @return The set of metadata ID found.
*/
+ @UnsupportedAppUsage
public Set<Integer> keySet() {
return mKeyToPosMap.keySet();
}
@@ -425,6 +433,7 @@
/**
* @return true if a value is present for the given key.
*/
+ @UnsupportedAppUsage
public boolean has(final int metadataId) {
if (!checkMetadataId(metadataId)) {
throw new IllegalArgumentException("Invalid key: " + metadataId);
@@ -439,6 +448,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public String getString(final int key) {
checkType(key, STRING_VAL);
return mParcel.readString();
@@ -447,6 +457,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public int getInt(final int key) {
checkType(key, INTEGER_VAL);
return mParcel.readInt();
@@ -455,6 +466,7 @@
/**
* Get the boolean value indicated by key
*/
+ @UnsupportedAppUsage
public boolean getBoolean(final int key) {
checkType(key, BOOLEAN_VAL);
return mParcel.readInt() == 1;
@@ -463,6 +475,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public long getLong(final int key) {
checkType(key, LONG_VAL); /**
* {@hide}
@@ -473,6 +486,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public double getDouble(final int key) {
checkType(key, DOUBLE_VAL);
return mParcel.readDouble();
@@ -481,6 +495,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public byte[] getByteArray(final int key) {
checkType(key, BYTE_ARRAY_VAL);
return mParcel.createByteArray();
@@ -489,6 +504,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public Date getDate(final int key) {
checkType(key, DATE_VAL);
final long timeSinceEpoch = mParcel.readLong();
diff --git a/media/java/android/media/MicrophoneInfo.java b/media/java/android/media/MicrophoneInfo.java
index d6399a4..f805975 100644
--- a/media/java/android/media/MicrophoneInfo.java
+++ b/media/java/android/media/MicrophoneInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.util.Pair;
import java.lang.annotation.Retention;
@@ -163,6 +164,7 @@
private int mType;
private int mDirectionality;
+ @UnsupportedAppUsage
MicrophoneInfo(String deviceId, int type, String address, int location,
int group, int indexInTheGroup, Coordinate3F position,
Coordinate3F orientation, List<Pair<Float, Float>> frequencyResponse,
diff --git a/media/java/android/media/MiniThumbFile.java b/media/java/android/media/MiniThumbFile.java
index 9899367..716e0cb 100644
--- a/media/java/android/media/MiniThumbFile.java
+++ b/media/java/android/media/MiniThumbFile.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Environment;
import android.util.Log;
@@ -59,6 +60,7 @@
* We store different types of thumbnails in different files. To remain backward compatibility,
* we should hashcode of content://media/external/images/media remains the same.
*/
+ @UnsupportedAppUsage
public static synchronized void reset() {
for (MiniThumbFile file : sThumbFiles.values()) {
file.deactivate();
diff --git a/media/java/android/media/PlaybackParams.java b/media/java/android/media/PlaybackParams.java
index b85e4d0..6594dd7 100644
--- a/media/java/android/media/PlaybackParams.java
+++ b/media/java/android/media/PlaybackParams.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -85,16 +86,25 @@
public static final int AUDIO_STRETCH_MODE_VOICE = 1;
// flags to indicate which params are actually set
+ @UnsupportedAppUsage
private static final int SET_SPEED = 1 << 0;
+ @UnsupportedAppUsage
private static final int SET_PITCH = 1 << 1;
+ @UnsupportedAppUsage
private static final int SET_AUDIO_FALLBACK_MODE = 1 << 2;
+ @UnsupportedAppUsage
private static final int SET_AUDIO_STRETCH_MODE = 1 << 3;
+ @UnsupportedAppUsage
private int mSet = 0;
// params
+ @UnsupportedAppUsage
private int mAudioFallbackMode = AUDIO_FALLBACK_MODE_DEFAULT;
+ @UnsupportedAppUsage
private int mAudioStretchMode = AUDIO_STRETCH_MODE_DEFAULT;
+ @UnsupportedAppUsage
private float mPitch = 1.0f;
+ @UnsupportedAppUsage
private float mSpeed = 1.0f;
public PlaybackParams() {
diff --git a/media/java/android/media/RemoteControlClient.java b/media/java/android/media/RemoteControlClient.java
index 6d32eff..3b51c82 100644
--- a/media/java/android/media/RemoteControlClient.java
+++ b/media/java/android/media/RemoteControlClient.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Intent;
@@ -820,6 +821,7 @@
* position updates. The playback position being "readable" is considered from the application's
* point of view.
*/
+ @UnsupportedAppUsage
public static int MEDIA_POSITION_READABLE = 1 << 0;
/**
* @hide
@@ -827,6 +829,7 @@
* playback position updates. The playback position being "writable"
* is considered from the application's point of view.
*/
+ @UnsupportedAppUsage
public static int MEDIA_POSITION_WRITABLE = 1 << 1;
/** @hide */
diff --git a/media/java/android/media/RemoteController.java b/media/java/android/media/RemoteController.java
index 90f2163..b6e3276 100644
--- a/media/java/android/media/RemoteController.java
+++ b/media/java/android/media/RemoteController.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
@@ -79,6 +80,7 @@
private int mArtworkHeight = -1;
private boolean mEnabled = true;
// synchronized on mInfoLock, for USE_SESSION apis.
+ @UnsupportedAppUsage
private MediaController mCurrentSession;
/**
@@ -292,6 +294,7 @@
* @return true if successful
* @throws IllegalArgumentException
*/
+ @UnsupportedAppUsage
public boolean setArtworkConfiguration(boolean wantBitmap, int width, int height)
throws IllegalArgumentException {
synchronized (mInfoLock) {
@@ -689,6 +692,7 @@
* Used by AudioManager to access user listener receiving the client update notifications
* @return
*/
+ @UnsupportedAppUsage
OnClientUpdateListener getUpdateListener() {
return mOnClientUpdateListener;
}
diff --git a/media/java/android/media/RemoteDisplay.java b/media/java/android/media/RemoteDisplay.java
index 5add65a..2be206f 100644
--- a/media/java/android/media/RemoteDisplay.java
+++ b/media/java/android/media/RemoteDisplay.java
@@ -18,6 +18,7 @@
import dalvik.system.CloseGuard;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.view.Surface;
@@ -88,6 +89,7 @@
/**
* Disconnects the remote display and stops listening for new connections.
*/
+ @UnsupportedAppUsage
public void dispose() {
dispose(false);
}
@@ -125,6 +127,7 @@
}
// Called from native.
+ @UnsupportedAppUsage
private void notifyDisplayConnected(final Surface surface,
final int width, final int height, final int flags, final int session) {
mHandler.post(new Runnable() {
@@ -136,6 +139,7 @@
}
// Called from native.
+ @UnsupportedAppUsage
private void notifyDisplayDisconnected() {
mHandler.post(new Runnable() {
@Override
@@ -146,6 +150,7 @@
}
// Called from native.
+ @UnsupportedAppUsage
private void notifyDisplayError(final int error) {
mHandler.post(new Runnable() {
@Override
diff --git a/media/java/android/media/RemoteDisplayState.java b/media/java/android/media/RemoteDisplayState.java
index 1197f65..f8a4605 100644
--- a/media/java/android/media/RemoteDisplayState.java
+++ b/media/java/android/media/RemoteDisplayState.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -40,8 +41,10 @@
/**
* A list of all remote displays.
*/
+ @UnsupportedAppUsage
public final ArrayList<RemoteDisplayInfo> displays;
+ @UnsupportedAppUsage
public RemoteDisplayState() {
displays = new ArrayList<RemoteDisplayInfo>();
}
diff --git a/media/java/android/media/Ringtone.java b/media/java/android/media/Ringtone.java
index c0468dc9..32aba7f 100644
--- a/media/java/android/media/Ringtone.java
+++ b/media/java/android/media/Ringtone.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
@@ -71,9 +72,11 @@
private final IRingtonePlayer mRemotePlayer;
private final Binder mRemoteToken;
+ @UnsupportedAppUsage
private MediaPlayer mLocalPlayer;
private final MyOnCompletionListener mCompletionListener = new MyOnCompletionListener();
+ @UnsupportedAppUsage
private Uri mUri;
private String mTitle;
@@ -87,6 +90,7 @@
private final Object mPlaybackSettingsLock = new Object();
/** {@hide} */
+ @UnsupportedAppUsage
public Ringtone(Context context, boolean allowRemote) {
mContext = context;
mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
@@ -298,6 +302,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setUri(Uri uri) {
destroyLocalPlayer();
@@ -335,6 +340,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public Uri getUri() {
return mUri;
}
diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java
index 0dddaf5..66feb1d 100644
--- a/media/java/android/media/RingtoneManager.java
+++ b/media/java/android/media/RingtoneManager.java
@@ -21,6 +21,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import android.app.Activity;
import android.content.ContentProvider;
@@ -244,6 +245,7 @@
private final Activity mActivity;
private final Context mContext;
+ @UnsupportedAppUsage
private Cursor mCursor;
private int mType = TYPE_RINGTONE;
@@ -602,6 +604,7 @@
}
}
+ @UnsupportedAppUsage
private Cursor getInternalRingtones() {
return query(
MediaStore.Audio.Media.INTERNAL_CONTENT_URI, INTERNAL_COLUMNS,
@@ -613,6 +616,7 @@
return getMediaRingtones(mContext);
}
+ @UnsupportedAppUsage
private Cursor getMediaRingtones(Context context) {
if (PackageManager.PERMISSION_GRANTED != context.checkPermission(
android.Manifest.permission.READ_EXTERNAL_STORAGE,
@@ -727,6 +731,7 @@
* not be set (and the default used instead).
* @see #getRingtone(Context, Uri)
*/
+ @UnsupportedAppUsage
private static Ringtone getRingtone(final Context context, Uri ringtoneUri, int streamType) {
try {
final Ringtone r = new Ringtone(context, true);
diff --git a/media/java/android/media/SubtitleController.java b/media/java/android/media/SubtitleController.java
index fd72b39..1a241af 100644
--- a/media/java/android/media/SubtitleController.java
+++ b/media/java/android/media/SubtitleController.java
@@ -19,6 +19,7 @@
import java.util.Locale;
import java.util.Vector;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.media.MediaPlayer.TrackInfo;
import android.media.SubtitleTrack.RenderingWidget;
@@ -41,6 +42,7 @@
private SubtitleTrack mSelectedTrack;
private boolean mShowing;
private CaptioningManager mCaptioningManager;
+ @UnsupportedAppUsage
private Handler mHandler;
private static final int WHAT_SHOW = 1;
@@ -91,6 +93,7 @@
*
* @param timeProvider
*/
+ @UnsupportedAppUsage
public SubtitleController(
Context context,
MediaTimeProvider timeProvider,
@@ -300,6 +303,7 @@
}
/** @hide - must be called from anchor thread */
+ @UnsupportedAppUsage
public void reset() {
checkAnchorLooper();
hide();
@@ -344,6 +348,7 @@
*
* Should be called from the anchor's (UI) thread. {@see #Anchor.getSubtitleLooper}
*/
+ @UnsupportedAppUsage
public void show() {
processOnAnchor(mHandler.obtainMessage(WHAT_SHOW));
}
@@ -361,6 +366,7 @@
*
* Should be called from the anchor's (UI) thread. {@see #Anchor.getSubtitleLooper}
*/
+ @UnsupportedAppUsage
public void hide() {
processOnAnchor(mHandler.obtainMessage(WHAT_HIDE));
}
@@ -412,6 +418,7 @@
* @param renderer a {@link SubtitleController.Renderer} object that adds
* support for a subtitle format.
*/
+ @UnsupportedAppUsage
public void registerRenderer(Renderer renderer) {
synchronized(mRenderers) {
// TODO how to get available renderers in the system
diff --git a/media/java/android/media/SubtitleTrack.java b/media/java/android/media/SubtitleTrack.java
index 6c8e323..5596c32 100644
--- a/media/java/android/media/SubtitleTrack.java
+++ b/media/java/android/media/SubtitleTrack.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.media.MediaPlayer.TrackInfo;
import android.os.Handler;
@@ -677,6 +678,7 @@
*
* @param callback update callback
*/
+ @UnsupportedAppUsage
public void setOnChangedListener(OnChangedListener callback);
/**
@@ -685,6 +687,7 @@
* @param width width in pixels
* @param height height in pixels
*/
+ @UnsupportedAppUsage
public void setSize(int width, int height);
/**
@@ -699,16 +702,19 @@
*
* @param c canvas on which to render subtitles
*/
+ @UnsupportedAppUsage
public void draw(Canvas c);
/**
* Called when the widget is attached to a window.
*/
+ @UnsupportedAppUsage
public void onAttachedToWindow();
/**
* Called when the widget is detached from a window.
*/
+ @UnsupportedAppUsage
public void onDetachedFromWindow();
/**
diff --git a/media/java/android/media/ThumbnailUtils.java b/media/java/android/media/ThumbnailUtils.java
index 429ef29..07ab069 100644
--- a/media/java/android/media/ThumbnailUtils.java
+++ b/media/java/android/media/ThumbnailUtils.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -65,6 +66,7 @@
* Constant used to indicate the dimension of micro thumbnail.
* @hide Only used by media framework and media provider internally.
*/
+ @UnsupportedAppUsage
public static final int TARGET_SIZE_MICRO_THUMBNAIL = 96;
/**
@@ -81,6 +83,7 @@
*
* @hide This method is only used by media framework and media provider internally.
*/
+ @UnsupportedAppUsage
public static Bitmap createImageThumbnail(String filePath, int kind) {
boolean wantMini = (kind == Images.Thumbnails.MINI_KIND);
int targetSize = wantMini
@@ -252,6 +255,7 @@
* For example, BitmapFactory downsamples an image by 2 even though the
* request is 3. So we round up the sample size to avoid OOM.
*/
+ @UnsupportedAppUsage
private static int computeSampleSize(BitmapFactory.Options options,
int minSideLength, int maxNumOfPixels) {
int initialSize = computeInitialSampleSize(options, minSideLength,
@@ -270,6 +274,7 @@
return roundedSize;
}
+ @UnsupportedAppUsage
private static int computeInitialSampleSize(BitmapFactory.Options options,
int minSideLength, int maxNumOfPixels) {
double w = options.outWidth;
@@ -337,6 +342,7 @@
return b;
}
+ @UnsupportedAppUsage
private static void closeSilently(ParcelFileDescriptor c) {
if (c == null) return;
try {
@@ -346,6 +352,7 @@
}
}
+ @UnsupportedAppUsage
private static ParcelFileDescriptor makeInputStream(
Uri uri, ContentResolver cr) {
try {
@@ -358,6 +365,7 @@
/**
* Transform source Bitmap to targeted width and height.
*/
+ @UnsupportedAppUsage
private static Bitmap transform(Matrix scaler,
Bitmap source,
int targetWidth,
@@ -474,6 +482,7 @@
* The functions returns a SizedThumbnailBitmap,
* which contains a downsampled bitmap and the thumbnail data in EXIF if exists.
*/
+ @UnsupportedAppUsage
private static void createThumbnailFromEXIF(String filePath, int targetSize,
int maxPixels, SizedThumbnailBitmap sizedThumbBitmap) {
if (filePath == null) return;
diff --git a/media/java/android/media/TimedText.java b/media/java/android/media/TimedText.java
index e6a7e13..ebcea19 100644
--- a/media/java/android/media/TimedText.java
+++ b/media/java/android/media/TimedText.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Rect;
import android.os.Parcel;
import android.util.Log;
@@ -724,6 +725,7 @@
* List of CharPos, Karaoke, Font, Style, and HyperText, or 3) an instance of
* Justification.
*/
+ @UnsupportedAppUsage
private Object getObject(final int key) {
if (containsKey(key)) {
return mKeyObjectMap.get(key);
diff --git a/media/java/android/media/ToneGenerator.java b/media/java/android/media/ToneGenerator.java
index 4661226..c6d5ba3 100644
--- a/media/java/android/media/ToneGenerator.java
+++ b/media/java/android/media/ToneGenerator.java
@@ -16,6 +16,8 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
+
/**
@@ -893,5 +895,6 @@
protected void finalize() { native_finalize(); }
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private long mNativeContext; // accessed by native methods
}
diff --git a/media/java/android/media/TtmlRenderer.java b/media/java/android/media/TtmlRenderer.java
index 9d587b9..34154ce 100644
--- a/media/java/android/media/TtmlRenderer.java
+++ b/media/java/android/media/TtmlRenderer.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
@@ -48,6 +49,7 @@
private TtmlRenderingWidget mRenderingWidget;
+ @UnsupportedAppUsage
public TtmlRenderer(Context context) {
mContext = context;
}
diff --git a/media/java/android/media/VolumeShaper.java b/media/java/android/media/VolumeShaper.java
index b654214..2f33e75 100644
--- a/media/java/android/media/VolumeShaper.java
+++ b/media/java/android/media/VolumeShaper.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -413,16 +414,23 @@
*/
// type of VolumeShaper
+ @UnsupportedAppUsage
private final int mType;
// valid when mType is TYPE_ID
+ @UnsupportedAppUsage
private final int mId;
// valid when mType is TYPE_SCALE
+ @UnsupportedAppUsage
private final int mOptionFlags;
+ @UnsupportedAppUsage
private final double mDurationMs;
+ @UnsupportedAppUsage
private final int mInterpolatorType;
+ @UnsupportedAppUsage
private final float[] mTimes;
+ @UnsupportedAppUsage
private final float[] mVolumes;
@Override
@@ -565,6 +573,7 @@
* Direct constructor for VolumeShaper.
* Use the Builder instead.
*/
+ @UnsupportedAppUsage
private Configuration(@Type int type,
int id,
@OptionFlag int optionFlags,
@@ -1124,8 +1133,11 @@
private static final int FLAG_PUBLIC_ALL = FLAG_REVERSE | FLAG_TERMINATE;
+ @UnsupportedAppUsage
private final int mFlags;
+ @UnsupportedAppUsage
private final int mReplaceId;
+ @UnsupportedAppUsage
private final float mXOffset;
@Override
@@ -1187,6 +1199,7 @@
}
};
+ @UnsupportedAppUsage
private Operation(@Flag int flags, int replaceId, float xOffset) {
mFlags = flags;
mReplaceId = replaceId;
@@ -1346,7 +1359,9 @@
* Not for public use.
*/
public static final class State implements Parcelable {
+ @UnsupportedAppUsage
private float mVolume;
+ @UnsupportedAppUsage
private float mXOffset;
@Override
@@ -1397,6 +1412,7 @@
}
};
+ @UnsupportedAppUsage
/* package */ State(float volume, float xOffset) {
mVolume = volume;
mXOffset = xOffset;
diff --git a/media/java/android/media/WebVttRenderer.java b/media/java/android/media/WebVttRenderer.java
index 91c53fa..36458d7 100644
--- a/media/java/android/media/WebVttRenderer.java
+++ b/media/java/android/media/WebVttRenderer.java
@@ -16,6 +16,7 @@
package android.media;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.text.Layout.Alignment;
import android.text.SpannableStringBuilder;
@@ -44,6 +45,7 @@
private WebVttRenderingWidget mRenderingWidget;
+ @UnsupportedAppUsage
public WebVttRenderer(Context context) {
mContext = context;
}
diff --git a/media/java/android/media/audiofx/AudioEffect.java b/media/java/android/media/audiofx/AudioEffect.java
index 24c595f..1a456f6 100644
--- a/media/java/android/media/audiofx/AudioEffect.java
+++ b/media/java/android/media/audiofx/AudioEffect.java
@@ -19,6 +19,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.os.Handler;
import android.os.Looper;
@@ -400,6 +401,7 @@
* @hide
*/
+ @UnsupportedAppUsage
public AudioEffect(UUID type, UUID uuid, int priority, int audioSession)
throws IllegalArgumentException, UnsupportedOperationException,
RuntimeException {
@@ -629,6 +631,7 @@
* @see #setParameter(byte[], byte[])
* @hide
*/
+ @UnsupportedAppUsage
public int setParameter(int[] param, short[] value)
throws IllegalStateException {
if (param.length > 2 || value.length > 2) {
@@ -778,6 +781,7 @@
* In case of success, the returns the number of meaningful integers in value array.
* @hide
*/
+ @UnsupportedAppUsage
public int getParameter(int[] param, int[] value)
throws IllegalStateException {
if (param.length > 2 || value.length > 2) {
@@ -846,6 +850,7 @@
* @see #getParameter(byte[], byte[])
* @hide
*/
+ @UnsupportedAppUsage
public int getParameter(int[] param, byte[] value)
throws IllegalStateException {
if (param.length > 2) {
@@ -867,6 +872,7 @@
* In case of failure, the returned value is negative and implementation specific.
* @hide
*/
+ @UnsupportedAppUsage
public int command(int cmdCode, byte[] command, byte[] reply)
throws IllegalStateException {
checkState("command()");
@@ -1277,6 +1283,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void checkState(String methodName) throws IllegalStateException {
synchronized (mStateLock) {
if (mState != STATE_INITIALIZED) {
diff --git a/media/java/android/media/audiofx/DefaultEffect.java b/media/java/android/media/audiofx/DefaultEffect.java
index a919868..ce087ad 100644
--- a/media/java/android/media/audiofx/DefaultEffect.java
+++ b/media/java/android/media/audiofx/DefaultEffect.java
@@ -24,6 +24,7 @@
* <p>Applications should not use the DefaultEffect class directly but one of its derived classes
* to control specific types of defaults:
* <ul>
+ * <li> {@link android.media.audiofx.SourceDefaultEffect}</li>
* <li> {@link android.media.audiofx.StreamDefaultEffect}</li>
* </ul>
* <p>Creating a DefaultEffect object will register the corresponding effect engine as a default
diff --git a/media/java/android/media/audiofx/SourceDefaultEffect.java b/media/java/android/media/audiofx/SourceDefaultEffect.java
new file mode 100644
index 0000000..d7a292e
--- /dev/null
+++ b/media/java/android/media/audiofx/SourceDefaultEffect.java
@@ -0,0 +1,118 @@
+/*
+ * 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.media.audiofx;
+
+import android.annotation.RequiresPermission;
+import android.app.ActivityThread;
+import android.util.Log;
+import java.util.UUID;
+
+/**
+ * SourceDefaultEffect is a default effect that attaches automatically to all AudioRecord and
+ * MediaRecorder instances of a given source type.
+ * <p>see {@link android.media.audiofx.DefaultEffect} class for more details on default effects.
+ * @hide
+ */
+
+public class SourceDefaultEffect extends DefaultEffect {
+ static {
+ System.loadLibrary("audioeffect_jni");
+ }
+
+ private final static String TAG = "SourceDefaultEffect-JAVA";
+
+ /**
+ * Class constructor.
+ *
+ * @param type type of effect engine to be default. This parameter is ignored if uuid is set,
+ * and can be set to {@link android.media.audiofx.AudioEffect#EFFECT_TYPE_NULL}
+ * in that case.
+ * @param uuid unique identifier of a particular effect implementation to be default. This
+ * parameter can be set to
+ * {@link android.media.audiofx.AudioEffect#EFFECT_TYPE_NULL}, in which case only
+ * the type will be used to select the effect.
+ * @param priority the priority level requested by the application for controlling the effect
+ * engine. As the same engine can be shared by several applications, this parameter
+ * indicates how much the requesting application needs control of effect parameters.
+ * The normal priority is 0, above normal is a positive number, below normal a
+ * negative number.
+ * @param source a MediaRecorder.AudioSource.* constant from
+ * {@link android.media.MediaRecorder.AudioSource} indicating
+ * what sources the given effect should attach to by default. Note that similar
+ * sources may share defaults.
+ *
+ * @throws java.lang.IllegalArgumentException
+ * @throws java.lang.UnsupportedOperationException
+ * @throws java.lang.RuntimeException
+ */
+ @RequiresPermission(value = android.Manifest.permission.MODIFY_DEFAULT_AUDIO_EFFECTS,
+ conditional = true) // Android Things uses an alternate permission.
+ public SourceDefaultEffect(UUID type, UUID uuid, int priority, int source) {
+ int[] id = new int[1];
+ int initResult = native_setup(type.toString(),
+ uuid.toString(),
+ priority,
+ source,
+ ActivityThread.currentOpPackageName(),
+ id);
+ if (initResult != AudioEffect.SUCCESS) {
+ Log.e(TAG, "Error code " + initResult + " when initializing SourceDefaultEffect");
+ switch (initResult) {
+ case AudioEffect.ERROR_BAD_VALUE:
+ throw (new IllegalArgumentException(
+ "Source, type uuid, or implementation uuid not supported."));
+ case AudioEffect.ERROR_INVALID_OPERATION:
+ throw (new UnsupportedOperationException(
+ "Effect library not loaded"));
+ default:
+ throw (new RuntimeException(
+ "Cannot initialize effect engine for type: " + type
+ + " Error: " + initResult));
+ }
+ }
+
+ mId = id[0];
+ }
+
+
+ /**
+ * Releases the native SourceDefaultEffect resources. It is a good practice to
+ * release the default effect when done with use as control can be returned to
+ * other applications or the native resources released.
+ */
+ public void release() {
+ native_release(mId);
+ }
+
+ @Override
+ protected void finalize() {
+ release();
+ }
+
+ // ---------------------------------------------------------
+ // Native methods called from the Java side
+ // --------------------
+
+ private native final int native_setup(String type,
+ String uuid,
+ int priority,
+ int source,
+ String opPackageName,
+ int[] id);
+
+ private native final void native_release(int id);
+}
diff --git a/media/java/android/media/audiofx/Visualizer.java b/media/java/android/media/audiofx/Visualizer.java
index f2b4fe0..a7bdf4f 100644
--- a/media/java/android/media/audiofx/Visualizer.java
+++ b/media/java/android/media/audiofx/Visualizer.java
@@ -16,6 +16,7 @@
package android.media.audiofx;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.util.Log;
import java.lang.ref.WeakReference;
@@ -164,6 +165,7 @@
/**
* System wide unique Identifier of the visualizer engine used by this Visualizer instance
*/
+ @UnsupportedAppUsage
private int mId;
/**
diff --git a/media/java/android/media/audiopolicy/AudioMix.java b/media/java/android/media/audiopolicy/AudioMix.java
index fca0cc7..8bc1d35 100644
--- a/media/java/android/media/audiopolicy/AudioMix.java
+++ b/media/java/android/media/audiopolicy/AudioMix.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.media.AudioDeviceInfo;
import android.media.AudioFormat;
import android.media.AudioSystem;
@@ -33,17 +34,24 @@
@SystemApi
public class AudioMix {
+ @UnsupportedAppUsage
private AudioMixingRule mRule;
+ @UnsupportedAppUsage
private AudioFormat mFormat;
+ @UnsupportedAppUsage
private int mRouteFlags;
+ @UnsupportedAppUsage
private int mMixType = MIX_TYPE_INVALID;
// written by AudioPolicy
int mMixState = MIX_STATE_DISABLED;
+ @UnsupportedAppUsage
int mCallbackFlags;
+ @UnsupportedAppUsage
String mDeviceAddress;
// initialized in constructor, read by AudioPolicyConfig
+ @UnsupportedAppUsage
final int mDeviceSystemType; // an AudioSystem.DEVICE_* value, not AudioDeviceInfo.TYPE_*
/**
diff --git a/media/java/android/media/audiopolicy/AudioMixingRule.java b/media/java/android/media/audiopolicy/AudioMixingRule.java
index 749a45e..fbee62a 100644
--- a/media/java/android/media/audiopolicy/AudioMixingRule.java
+++ b/media/java/android/media/audiopolicy/AudioMixingRule.java
@@ -17,6 +17,7 @@
package android.media.audiopolicy;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.media.AudioAttributes;
import android.os.Parcel;
import android.util.Log;
@@ -92,8 +93,11 @@
RULE_EXCLUSION_MASK | RULE_MATCH_UID;
static final class AudioMixMatchCriterion {
+ @UnsupportedAppUsage
final AudioAttributes mAttr;
+ @UnsupportedAppUsage
final int mIntProp;
+ @UnsupportedAppUsage
final int mRule;
/** input parameters must be valid */
@@ -157,6 +161,7 @@
private final int mTargetMixType;
int getTargetMixType() { return mTargetMixType; }
+ @UnsupportedAppUsage
private final ArrayList<AudioMixMatchCriterion> mCriteria;
ArrayList<AudioMixMatchCriterion> getCriteria() { return mCriteria; }
diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java
index 3f8bab5..c4b82c3 100644
--- a/media/java/android/media/session/MediaController.java
+++ b/media/java/android/media/session/MediaController.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.Context;
import android.content.pm.ParceledListSlice;
@@ -503,6 +504,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean controlsSameSession(MediaController other) {
if (other == null) return false;
return mSessionBinder.asBinder() == other.getSessionBinder().asBinder();
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java
index fad7e3f..d43cd30 100644
--- a/media/java/android/media/session/MediaSession.java
+++ b/media/java/android/media/session/MediaSession.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
@@ -132,6 +133,7 @@
private final CallbackStub mCbStub;
// Do not change the name of mCallback. Support lib accesses this by using reflection.
+ @UnsupportedAppUsage
private CallbackMessageHandler mCallback;
private VolumeProvider mVolumeProvider;
private PlaybackState mPlaybackState;
@@ -555,6 +557,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getCallingPackage() {
if (mCallback != null && mCallback.mCurrentControllerInfo != null) {
return mCallback.mCurrentControllerInfo.getPackageName();
@@ -1304,6 +1307,7 @@
public static final int UNKNOWN_ID = -1;
private final MediaDescription mDescription;
+ @UnsupportedAppUsage
private final long mId;
/**
diff --git a/media/java/android/media/session/MediaSessionLegacyHelper.java b/media/java/android/media/session/MediaSessionLegacyHelper.java
index 7c3af31..123c4f7 100644
--- a/media/java/android/media/session/MediaSessionLegacyHelper.java
+++ b/media/java/android/media/session/MediaSessionLegacyHelper.java
@@ -16,6 +16,7 @@
package android.media.session;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.content.ComponentName;
@@ -65,6 +66,7 @@
.getSystemService(Context.MEDIA_SESSION_SERVICE);
}
+ @UnsupportedAppUsage
public static MediaSessionLegacyHelper getHelper(Context context) {
synchronized (sLock) {
if (sInstance == null) {
diff --git a/media/java/android/media/session/MediaSessionManager.java b/media/java/android/media/session/MediaSessionManager.java
index 98fb573..5ade4dd 100644
--- a/media/java/android/media/session/MediaSessionManager.java
+++ b/media/java/android/media/session/MediaSessionManager.java
@@ -22,6 +22,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.media.AudioManager;
@@ -144,6 +145,7 @@
* @return A list of controllers for ongoing sessions.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull List<MediaController> getActiveSessionsForUser(
@Nullable ComponentName notificationListener, int userId) {
ArrayList<MediaController> controllers = new ArrayList<MediaController>();
diff --git a/media/java/android/media/soundtrigger/SoundTriggerDetector.java b/media/java/android/media/soundtrigger/SoundTriggerDetector.java
index 7969ee7..56e5566 100644
--- a/media/java/android/media/soundtrigger/SoundTriggerDetector.java
+++ b/media/java/android/media/soundtrigger/SoundTriggerDetector.java
@@ -22,6 +22,7 @@
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.soundtrigger.IRecognitionStatusCallback;
import android.hardware.soundtrigger.SoundTrigger;
import android.hardware.soundtrigger.SoundTrigger.RecognitionConfig;
@@ -164,6 +165,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public byte[] getData() {
if (!mTriggerAvailable) {
return mData;
@@ -191,6 +193,7 @@
* @hide
*/
@Nullable
+ @UnsupportedAppUsage
public Integer getCaptureSession() {
if (mCaptureAvailable) {
return mCaptureSession;
diff --git a/media/java/android/media/soundtrigger/SoundTriggerManager.java b/media/java/android/media/soundtrigger/SoundTriggerManager.java
index 107ce8e..9eb0c6d 100644
--- a/media/java/android/media/soundtrigger/SoundTriggerManager.java
+++ b/media/java/android/media/soundtrigger/SoundTriggerManager.java
@@ -23,6 +23,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@@ -239,6 +240,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER)
+ @UnsupportedAppUsage
public int loadSoundModel(SoundModel soundModel) {
if (soundModel == null) {
return STATUS_ERROR;
@@ -281,6 +283,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER)
+ @UnsupportedAppUsage
public int startRecognition(@NonNull UUID soundModelId, @Nullable Bundle params,
@NonNull ComponentName detectionService, @NonNull RecognitionConfig config) {
Preconditions.checkNotNull(soundModelId);
@@ -300,6 +303,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER)
+ @UnsupportedAppUsage
public int stopRecognition(UUID soundModelId) {
if (soundModelId == null) {
return STATUS_ERROR;
@@ -316,6 +320,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER)
+ @UnsupportedAppUsage
public int unloadSoundModel(UUID soundModelId) {
if (soundModelId == null) {
return STATUS_ERROR;
@@ -333,6 +338,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER)
+ @UnsupportedAppUsage
public boolean isRecognitionActive(UUID soundModelId) {
if (soundModelId == null) {
return false;
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 74085d3..5cb8fb8 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -20,6 +20,7 @@
import android.annotation.NonNull;
import android.annotation.StringRes;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -318,6 +319,7 @@
* Returns the component of the service that implements this TV input.
* @hide
*/
+ @UnsupportedAppUsage
public ComponentName getComponent() {
return new ComponentName(mService.serviceInfo.packageName, mService.serviceInfo.name);
}
diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java
index e24124d..d9017b4 100644
--- a/media/java/android/media/tv/TvInputService.java
+++ b/media/java/android/media/tv/TvInputService.java
@@ -22,6 +22,7 @@
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.Service;
import android.content.Context;
@@ -283,6 +284,7 @@
private OverlayViewCleanUpTask mOverlayViewCleanUpTask;
private boolean mOverlayViewEnabled;
private IBinder mWindowToken;
+ @UnsupportedAppUsage
private Rect mOverlayFrame;
private long mStartPositionMs = TvInputManager.TIME_SHIFT_INVALID_TIME;
private long mCurrentPositionMs = TvInputManager.TIME_SHIFT_INVALID_TIME;
diff --git a/media/java/android/mtp/MtpPropertyList.java b/media/java/android/mtp/MtpPropertyList.java
index ede90da..557f099 100644
--- a/media/java/android/mtp/MtpPropertyList.java
+++ b/media/java/android/mtp/MtpPropertyList.java
@@ -16,6 +16,7 @@
package android.mtp;
+import android.annotation.UnsupportedAppUsage;
import java.util.ArrayList;
import java.util.List;
@@ -49,6 +50,7 @@
mStringValues = new ArrayList<>();
}
+ @UnsupportedAppUsage
public void append(int handle, int property, int type, long value) {
mObjectHandles.add(handle);
mPropertyCodes.add(property);
@@ -57,6 +59,7 @@
mStringValues.add(null);
}
+ @UnsupportedAppUsage
public void append(int handle, int property, String value) {
mObjectHandles.add(handle);
mPropertyCodes.add(property);
diff --git a/media/java/android/mtp/MtpStorage.java b/media/java/android/mtp/MtpStorage.java
index 2625e0c..c714b3c 100644
--- a/media/java/android/mtp/MtpStorage.java
+++ b/media/java/android/mtp/MtpStorage.java
@@ -16,6 +16,7 @@
package android.mtp;
+import android.annotation.UnsupportedAppUsage;
import android.os.storage.StorageVolume;
/**
@@ -46,6 +47,7 @@
*
* @return the storage ID
*/
+ @UnsupportedAppUsage
public final int getStorageId() {
return mStorageId;
}
@@ -55,6 +57,7 @@
*
* @return the storage file path
*/
+ @UnsupportedAppUsage
public final String getPath() {
return mPath;
}
diff --git a/media/java/android/service/media/MediaBrowserService.java b/media/java/android/service/media/MediaBrowserService.java
index ca7ab7e..5a60ac1 100644
--- a/media/java/android/service/media/MediaBrowserService.java
+++ b/media/java/android/service/media/MediaBrowserService.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.Service;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -89,6 +90,7 @@
* A key for passing the MediaItem to the ResultReceiver in getItem.
* @hide
*/
+ @UnsupportedAppUsage
public static final String KEY_MEDIA_ITEM = "media_item";
private static final int RESULT_FLAG_OPTION_NOT_HANDLED = 1 << 0;
@@ -149,6 +151,7 @@
private Object mDebug;
private boolean mDetachCalled;
private boolean mSendResultCalled;
+ @UnsupportedAppUsage
private int mFlags;
Result(Object debug) {
diff --git a/media/jni/Android.bp b/media/jni/Android.bp
index bf80c57..de9a24b 100644
--- a/media/jni/Android.bp
+++ b/media/jni/Android.bp
@@ -101,7 +101,6 @@
"libandroid_runtime", // ???
"libaudioclient", // for use of AudioTrack, AudioSystem. to be removed
"libbinder",
- "libdrmframework", // for FileSource, MediaHTTP
"libgui", // for VideoFrameScheduler
"libhidlallocatorutils",
"libhidlbase", // VNDK???
diff --git a/media/jni/audioeffect/Android.bp b/media/jni/audioeffect/Android.bp
index 0063c11..09c546a 100644
--- a/media/jni/audioeffect/Android.bp
+++ b/media/jni/audioeffect/Android.bp
@@ -3,6 +3,7 @@
srcs: [
"android_media_AudioEffect.cpp",
+ "android_media_SourceDefaultEffect.cpp",
"android_media_StreamDefaultEffect.cpp",
"android_media_Visualizer.cpp",
],
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index d3ba9f2..693bd8b 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -824,21 +824,19 @@
android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz __unused,
jint audioSession)
{
- effect_descriptor_t *descriptors = new effect_descriptor_t[AudioEffect::kMaxPreProcessing];
+ auto descriptors = std::make_unique<effect_descriptor_t[]>(AudioEffect::kMaxPreProcessing);
uint32_t numEffects = AudioEffect::kMaxPreProcessing;
status_t status = AudioEffect::queryDefaultPreProcessing((audio_session_t) audioSession,
- descriptors,
+ descriptors.get(),
&numEffects);
if (status != NO_ERROR || numEffects == 0) {
- delete[] descriptors;
return NULL;
}
ALOGV("queryDefaultPreProcessing() got %d effects", numEffects);
jobjectArray ret = env->NewObjectArray(numEffects, fields.clazzDesc, NULL);
if (ret == NULL) {
- delete[] descriptors;
return ret;
}
@@ -875,7 +873,7 @@
if (jdesc == NULL) {
ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
env->DeleteLocalRef(ret);
- return NULL;;
+ return NULL;
}
env->SetObjectArrayElement(ret, i, jdesc);
@@ -907,6 +905,7 @@
// ----------------------------------------------------------------------------
+extern int register_android_media_SourceDefaultEffect(JNIEnv *env);
extern int register_android_media_StreamDefaultEffect(JNIEnv *env);
extern int register_android_media_visualizer(JNIEnv *env);
@@ -932,6 +931,11 @@
goto bail;
}
+ if (register_android_media_SourceDefaultEffect(env) < 0) {
+ ALOGE("ERROR: SourceDefaultEffect native registration failed\n");
+ goto bail;
+ }
+
if (register_android_media_StreamDefaultEffect(env) < 0) {
ALOGE("ERROR: StreamDefaultEffect native registration failed\n");
goto bail;
diff --git a/media/jni/audioeffect/android_media_SourceDefaultEffect.cpp b/media/jni/audioeffect/android_media_SourceDefaultEffect.cpp
new file mode 100644
index 0000000..d244bcb7
--- /dev/null
+++ b/media/jni/audioeffect/android_media_SourceDefaultEffect.cpp
@@ -0,0 +1,142 @@
+/*
+ * 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "SourceDefaultEffect-JNI"
+
+#include <utils/Errors.h>
+#include <utils/Log.h>
+#include <jni.h>
+#include <nativehelper/JNIHelp.h>
+#include <android_runtime/AndroidRuntime.h>
+#include "media/AudioEffect.h"
+
+#include <nativehelper/ScopedUtfChars.h>
+
+#include "android_media_AudioEffect.h"
+
+using namespace android;
+
+static const char* const kClassPathName = "android/media/audiofx/SourceDefaultEffect";
+
+static jint android_media_SourceDefaultEffect_native_setup(JNIEnv *env,
+ jobject /*thiz*/,
+ jstring type,
+ jstring uuid,
+ jint priority,
+ jint source,
+ jstring opPackageName,
+ jintArray jId)
+{
+ ALOGV("android_media_SourceDefaultEffect_native_setup");
+ status_t lStatus = NO_ERROR;
+ jint* nId = NULL;
+ const char *typeStr = NULL;
+ const char *uuidStr = NULL;
+
+ ScopedUtfChars opPackageNameStr(env, opPackageName);
+
+ if (type != NULL) {
+ typeStr = env->GetStringUTFChars(type, NULL);
+ if (typeStr == NULL) { // Out of memory
+ lStatus = NO_MEMORY;
+ jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
+ goto setup_exit;
+ }
+ }
+
+ if (uuid != NULL) {
+ uuidStr = env->GetStringUTFChars(uuid, NULL);
+ if (uuidStr == NULL) { // Out of memory
+ lStatus = NO_MEMORY;
+ jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
+ goto setup_exit;
+ }
+ }
+
+ if (typeStr == NULL && uuidStr == NULL) {
+ lStatus = BAD_VALUE;
+ goto setup_exit;
+ }
+
+ nId = reinterpret_cast<jint *>(env->GetPrimitiveArrayCritical(jId, NULL));
+ if (nId == NULL) {
+ ALOGE("setup: Error retrieving id pointer");
+ lStatus = BAD_VALUE;
+ goto setup_exit;
+ }
+
+ // create the native SourceDefaultEffect.
+ audio_unique_id_t id;
+ lStatus = AudioEffect::addSourceDefaultEffect(typeStr,
+ String16(opPackageNameStr.c_str()),
+ uuidStr,
+ priority,
+ static_cast<audio_source_t>(source),
+ &id);
+ if (lStatus != NO_ERROR) {
+ ALOGE("setup: Error adding SourceDefaultEffect");
+ goto setup_exit;
+ }
+
+ nId[0] = static_cast<jint>(id);
+
+setup_exit:
+ // Final cleanup and return.
+
+ if (nId != NULL) {
+ env->ReleasePrimitiveArrayCritical(jId, nId, 0);
+ nId = NULL;
+ }
+
+ if (uuidStr != NULL) {
+ env->ReleaseStringUTFChars(uuid, uuidStr);
+ uuidStr = NULL;
+ }
+
+ if (typeStr != NULL) {
+ env->ReleaseStringUTFChars(type, typeStr);
+ typeStr = NULL;
+ }
+
+ return AudioEffectJni::translateNativeErrorToJava(lStatus);
+}
+
+static void android_media_SourceDefaultEffect_native_release(JNIEnv */*env*/,
+ jobject /*thiz*/,
+ jint id) {
+ status_t lStatus = AudioEffect::removeSourceDefaultEffect(id);
+ if (lStatus != NO_ERROR) {
+ ALOGW("Error releasing SourceDefaultEffect: %d", lStatus);
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+// Dalvik VM type signatures
+static const JNINativeMethod gMethods[] = {
+ {"native_setup", "(Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;[I)I",
+ (void *)android_media_SourceDefaultEffect_native_setup},
+ {"native_release", "(I)V", (void *)android_media_SourceDefaultEffect_native_release},
+};
+
+
+// ----------------------------------------------------------------------------
+
+int register_android_media_SourceDefaultEffect(JNIEnv *env)
+{
+ return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+}
diff --git a/media/lib/remotedisplay/Android.bp b/media/lib/remotedisplay/Android.bp
new file mode 100644
index 0000000..1e9320d
--- /dev/null
+++ b/media/lib/remotedisplay/Android.bp
@@ -0,0 +1,35 @@
+//
+// 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.
+//
+
+droiddoc {
+ name: "com.android.media.remotedisplay.stubs-gen-docs",
+ srcs: [
+ "java/**/*.java",
+ ],
+ args: " -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
+ " -stubpackages com.android.media.remotedisplay " +
+ " -nodocs ",
+ custom_template: "droiddoc-templates-sdk",
+ installable: false,
+}
+
+java_library_static {
+ name: "com.android.media.remotedisplay.stubs",
+ srcs: [
+ ":com.android.media.remotedisplay.stubs-gen-docs",
+ ],
+ sdk_version: "current",
+}
diff --git a/media/lib/remotedisplay/Android.mk b/media/lib/remotedisplay/Android.mk
index 63f9f91..e88c0f1 100644
--- a/media/lib/remotedisplay/Android.mk
+++ b/media/lib/remotedisplay/Android.mk
@@ -42,24 +42,3 @@
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := com.android.media.remotedisplay.stubs-gen
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_SRC_FILES := $(call all-java-files-under,java)
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/com.android.media.remotedisplay.stubs_intermediates/src
-LOCAL_DROIDDOC_OPTIONS:= \
- -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
- -stubpackages com.android.media.remotedisplay \
- -nodocs
-LOCAL_UNINSTALLABLE_MODULE := true
-include $(BUILD_DROIDDOC)
-com_android_media_remotedisplay_gen_stamp := $(full_target)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := com.android.media.remotedisplay.stubs
-LOCAL_SDK_VERSION := current
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-LOCAL_ADDITIONAL_DEPENDENCIES := $(com_android_media_remotedisplay_gen_stamp)
-com_android_media_remotedisplay_gen_stamp :=
-include $(BUILD_STATIC_JAVA_LIBRARY)
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/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java
index 53ec6c8..728e6e1 100644
--- a/opengl/java/android/opengl/EGL14.java
+++ b/opengl/java/android/opengl/EGL14.java
@@ -18,6 +18,7 @@
package android.opengl;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.SurfaceTexture;
import android.view.Surface;
import android.view.SurfaceView;
@@ -163,6 +164,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public static native EGLDisplay eglGetDisplay(
long display_id
);
diff --git a/opengl/java/android/opengl/GLES20.java b/opengl/java/android/opengl/GLES20.java
index 137f2f5..d66e7ac 100644
--- a/opengl/java/android/opengl/GLES20.java
+++ b/opengl/java/android/opengl/GLES20.java
@@ -19,6 +19,8 @@
package android.opengl;
+import android.annotation.UnsupportedAppUsage;
+
/** OpenGL ES 2.0
*/
public class GLES20 {
@@ -824,6 +826,7 @@
// C function void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
/** @hide Method is broken, but used to be public (b/6006380) */
+ @UnsupportedAppUsage
public static native void glGetActiveAttrib(
int program,
int index,
@@ -872,6 +875,7 @@
// C function void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
/** @hide Method is broken, but used to be public (b/6006380) */
+ @UnsupportedAppUsage
public static native void glGetActiveUniform(
int program,
int index,
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 0f0a7e9d..8a3e6a0 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -16,6 +16,7 @@
package android.opengl;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Trace;
import android.util.AttributeSet;
@@ -1235,6 +1236,7 @@
EGLDisplay mEglDisplay;
EGLSurface mEglSurface;
EGLConfig mEglConfig;
+ @UnsupportedAppUsage
EGLContext mEglContext;
}
@@ -1844,6 +1846,7 @@
// End of member variables protected by the sGLThreadManager monitor.
+ @UnsupportedAppUsage
private EglHelper mEglHelper;
/**
@@ -1919,7 +1922,9 @@
private final WeakReference<GLSurfaceView> mThisWeakRef =
new WeakReference<GLSurfaceView>(this);
+ @UnsupportedAppUsage
private GLThread mGLThread;
+ @UnsupportedAppUsage
private Renderer mRenderer;
private boolean mDetached;
private EGLConfigChooser mEGLConfigChooser;
diff --git a/opengl/java/javax/microedition/khronos/egl/EGL10.java b/opengl/java/javax/microedition/khronos/egl/EGL10.java
index 612d59c..8a25170 100644
--- a/opengl/java/javax/microedition/khronos/egl/EGL10.java
+++ b/opengl/java/javax/microedition/khronos/egl/EGL10.java
@@ -16,6 +16,7 @@
package javax.microedition.khronos.egl;
+import android.annotation.UnsupportedAppUsage;
import java.lang.String;
public interface EGL10 extends EGL {
@@ -116,6 +117,7 @@
String eglQueryString(EGLDisplay display, int name);
boolean eglQuerySurface(EGLDisplay display, EGLSurface surface, int attribute, int[] value);
/** @hide **/
+ @UnsupportedAppUsage
boolean eglReleaseThread();
boolean eglSwapBuffers(EGLDisplay display, EGLSurface surface);
boolean eglTerminate(EGLDisplay display);
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/CarSystemUI/Android.bp b/packages/CarSystemUI/Android.bp
new file mode 100644
index 0000000..36ef04a
--- /dev/null
+++ b/packages/CarSystemUI/Android.bp
@@ -0,0 +1,76 @@
+//
+// 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.
+//
+android_app {
+ name: "CarSystemUI",
+
+ srcs: [
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ],
+
+ static_libs: [
+ "SystemUI-core",
+ "SystemUIPluginLib",
+ "SystemUISharedLib",
+ "SettingsLib",
+ "androidx.car_car",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.recyclerview_recyclerview",
+ "androidx.preference_preference",
+ "androidx.appcompat_appcompat",
+ "androidx.mediarouter_mediarouter",
+ "androidx.palette_palette",
+ "androidx.legacy_legacy-preference-v14",
+ "androidx.leanback_leanback",
+ "androidx.slice_slice-core",
+ "androidx.slice_slice-view",
+ "androidx.slice_slice-builders",
+ "androidx.arch.core_core-runtime",
+ "androidx.lifecycle_lifecycle-extensions",
+ "SystemUI-tags",
+ "SystemUI-proto",
+ ],
+
+ libs: [
+ "telephony-common",
+ "android.car",
+ ],
+
+ manifest: "AndroidManifest.xml",
+
+ owner: "google",
+ platform_apis: true,
+ certificate: "platform",
+ privileged: true,
+
+ optimize: {
+ proguard_flags_files: [
+ "proguard.flags",
+ ],
+ },
+ resource_dirs: [
+ "res",
+ ],
+
+
+ dxflags: ["--multi-dex"],
+
+ aaptflags: [
+ "--extra-packages",
+ "com.android.keyguard",
+ ],
+
+}
diff --git a/packages/CarSystemUI/Android.mk b/packages/CarSystemUI/Android.mk
deleted file mode 100644
index 0d40b7f..0000000
--- a/packages/CarSystemUI/Android.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-# LOCAL_PATH is not the current directory of this file.
-# If you need the local path, use CAR_SYSUI_PATH.
-# This tweak ensures that the resource overlay that is device-specific still works
-# which requires that LOCAL_PATH match the original path (which must be frameworks/base/packages/SystemUI).
-#
-# For clarity, we also define SYSTEM_UI_AOSP_PATH to frameworks/base/packages/SystemUI and refer to that
-SYSTEM_UI_AOSP_PATH := frameworks/base/packages/SystemUI
-SYSTEM_UI_CAR_PATH := frameworks/base/packages/CarSystemUI
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_MODULE_TAGS := optional
-
-# The same as SYSTEM_UI_AOSP_PATH but based on the value of LOCAL_PATH which is
-# frameworks/base/packages/CarSystemUI.
-RELATIVE_SYSTEM_UI_AOSP_PATH := ../../../../$(SYSTEM_UI_AOSP_PATH)
-
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- $(call all-Iaidl-files-under, src) \
- $(call all-java-files-under, $(RELATIVE_SYSTEM_UI_AOSP_PATH)/src) \
- $(call all-Iaidl-files-under, $(RELATIVE_SYSTEM_UI_AOSP_PATH)/src)
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- SystemUIPluginLib \
- SystemUISharedLib \
- androidx.car_car \
- androidx.legacy_legacy-support-v4 \
- androidx.recyclerview_recyclerview \
- androidx.preference_preference \
- androidx.appcompat_appcompat \
- androidx.mediarouter_mediarouter \
- androidx.palette_palette \
- androidx.legacy_legacy-preference-v14 \
- androidx.leanback_leanback \
- androidx.slice_slice-core \
- androidx.slice_slice-view \
- androidx.slice_slice-builders \
- androidx.arch.core_core-runtime \
- androidx.lifecycle_lifecycle-extensions \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- SystemUI-tags \
- SystemUI-proto
-
-LOCAL_JAVA_LIBRARIES := telephony-common \
- android.car
-
-LOCAL_FULL_LIBS_MANIFEST_FILES := $(SYSTEM_UI_AOSP_PATH)/AndroidManifest.xml
-LOCAL_MANIFEST_FILE := AndroidManifest.xml
-
-LOCAL_MODULE_OWNER := google
-LOCAL_PACKAGE_NAME := CarSystemUI
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_PROGUARD_FLAG_FILES := $(RELATIVE_SYSTEM_UI_AOSP_PATH)/proguard.flags \
- proguard.flags
-
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/res \
- $(SYSTEM_UI_AOSP_PATH)/res-keyguard \
- $(SYSTEM_UI_AOSP_PATH)/res
-
-ifneq ($(INCREMENTAL_BUILDS),)
- LOCAL_PROGUARD_ENABLED := disabled
- LOCAL_JACK_ENABLED := incremental
-endif
-
-LOCAL_DX_FLAGS := --multi-dex
-LOCAL_JACK_FLAGS := --multi-dex native
-
-include frameworks/base/packages/SettingsLib/common.mk
-
-LOCAL_OVERRIDES_PACKAGES := SystemUI
-
-LOCAL_AAPT_FLAGS := --extra-packages com.android.keyguard
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under, $(SYSTEM_UI_CAR_PATH))
diff --git a/packages/CarSystemUI/proguard.flags b/packages/CarSystemUI/proguard.flags
index ceb037c..a81c7e0 100644
--- a/packages/CarSystemUI/proguard.flags
+++ b/packages/CarSystemUI/proguard.flags
@@ -1 +1,3 @@
-keep class com.android.systemui.CarSystemUIFactory
+
+-include ../SystemUI/proguard.flags
diff --git a/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml b/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml
index 55d50a0..7b3333e 100644
--- a/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml
+++ b/packages/CarSystemUI/res/layout/car_top_navigation_bar.xml
@@ -54,7 +54,7 @@
android:gravity="center_vertical|start"
android:minEms="4"
android:textAppearance="@style/TextAppearance.Car.Status"
- systemui:hvacAreaId="1"
+ systemui:hvacAreaId="49"
systemui:hvacMaxText="@string/hvac_max_text"
systemui:hvacMaxValue="@dimen/hvac_max_value"
systemui:hvacMinText="@string/hvac_min_text"
@@ -136,7 +136,7 @@
android:gravity="center_vertical|end"
android:minEms="4"
android:textAppearance="@style/TextAppearance.Car.Status"
- systemui:hvacAreaId="4"
+ systemui:hvacAreaId="68"
systemui:hvacMaxText="@string/hvac_max_text"
systemui:hvacMaxValue="@dimen/hvac_max_value"
systemui:hvacMinText="@string/hvac_min_text"
diff --git a/packages/CarSystemUI/res/values/colors.xml b/packages/CarSystemUI/res/values/colors.xml
index e9ddbaf..df8f8db 100644
--- a/packages/CarSystemUI/res/values/colors.xml
+++ b/packages/CarSystemUI/res/values/colors.xml
@@ -19,7 +19,7 @@
<color name="car_accent">#356FE5</color>
<!-- colors for user switcher -->
<color name="car_user_switcher_background_color">#000000</color>
- <color name="car_user_switcher_name_text_color">@color/car_title2_light</color>
+ <color name="car_user_switcher_name_text_color">@color/car_body1_light</color>
<color name="car_user_switcher_add_user_background_color">#131313</color>
<color name="car_nav_icon_fill_color">@color/car_grey_50</color>
<!-- colors for seekbar -->
diff --git a/packages/CarSystemUI/res/values/dimens.xml b/packages/CarSystemUI/res/values/dimens.xml
index 3829aa3..07ecca2 100644
--- a/packages/CarSystemUI/res/values/dimens.xml
+++ b/packages/CarSystemUI/res/values/dimens.xml
@@ -29,7 +29,7 @@
<dimen name="car_primary_icon_size">36dp</dimen>
<!-- dimensions for the car user switcher -->
- <dimen name="car_user_switcher_name_text_size">@dimen/car_title2_size</dimen>
+ <dimen name="car_user_switcher_name_text_size">@dimen/car_body1_size</dimen>
<dimen name="car_user_switcher_vertical_spacing_between_users">124dp</dimen>
<!--These values represent MIN and MAX for hvac-->
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/AnimatedTemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/AnimatedTemperatureView.java
index 27d3106..6473f0d 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/AnimatedTemperatureView.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/AnimatedTemperatureView.java
@@ -23,8 +23,6 @@
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
-import com.android.systemui.statusbar.car.hvac.TemperatureView;
-import com.android.systemui.statusbar.car.hvac.HvacController;
import android.util.AttributeSet;
import android.util.Property;
import android.view.Gravity;
@@ -36,8 +34,8 @@
import android.widget.TextSwitcher;
import android.widget.TextView;
-import com.android.systemui.Dependency;
import com.android.systemui.R;
+import com.android.systemui.statusbar.car.hvac.TemperatureView;
/**
* Simple text display of HVAC properties, It is designed to show mTemperature and is configured in
@@ -47,8 +45,6 @@
* hvacAreaId - Example: VehicleSeat.SEAT_ROW_1_LEFT (1)
* hvacTempFormat - Example: "%.1f\u00B0" (1 decimal and the degree symbol)
* hvacOrientaion = Example: left
- * <p>
- * Note: It registers itself with {@link HvacController}
*/
public class AnimatedTemperatureView extends FrameLayout implements TemperatureView {
@@ -158,12 +154,9 @@
ViewGroup.LayoutParams.MATCH_PARENT);
typedArray.recycle();
-
- // register with controller
- HvacController hvacController = Dependency.get(HvacController.class);
- hvacController.addHvacTextView(this);
}
+
private TextView generateTextView() {
TextView textView = new TextView(getContext());
textView.setTextAppearance(mTextAppearanceRes);
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/TemperatureBackgroundAnimator.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/TemperatureBackgroundAnimator.java
index 0bc94b5..3c6d623 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/TemperatureBackgroundAnimator.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/hvac/TemperatureBackgroundAnimator.java
@@ -131,7 +131,9 @@
}
void animateOpen() {
- if (!mAnimationsReady || mCircleState == CircleState.ENTERING) {
+ if (!mAnimationsReady
+ || !mAnimatedView.isAttachedToWindow()
+ || mCircleState == CircleState.ENTERING) {
return;
}
diff --git a/packages/ExtServices/src/android/ext/services/notification/AgingHelper.java b/packages/ExtServices/src/android/ext/services/notification/AgingHelper.java
new file mode 100644
index 0000000..5782ea1
--- /dev/null
+++ b/packages/ExtServices/src/android/ext/services/notification/AgingHelper.java
@@ -0,0 +1,172 @@
+/**
+ * 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.ext.services.notification;
+
+import static android.app.NotificationManager.IMPORTANCE_MIN;
+
+import android.app.AlarmManager;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.ext.services.notification.NotificationCategorizer.Category;
+import android.net.Uri;
+import android.util.ArraySet;
+import android.util.Slog;
+
+import java.util.Set;
+
+public class AgingHelper {
+ private final static String TAG = "AgingHelper";
+ private final boolean DEBUG = false;
+
+ private static final String AGING_ACTION = AgingHelper.class.getSimpleName() + ".EVALUATE";
+ private static final int REQUEST_CODE_AGING = 1;
+ private static final String AGING_SCHEME = "aging";
+ private static final String EXTRA_KEY = "key";
+ private static final String EXTRA_CATEGORY = "category";
+
+ private static final int HOUR_MS = 1000 * 60 * 60;
+ private static final int TWO_HOURS_MS = 2 * HOUR_MS;
+
+ private Context mContext;
+ private NotificationCategorizer mNotificationCategorizer;
+ private AlarmManager mAm;
+ private Callback mCallback;
+
+ // The set of keys we've scheduled alarms for
+ private Set<String> mAging = new ArraySet<>();
+
+ public AgingHelper(Context context, NotificationCategorizer categorizer, Callback callback) {
+ mNotificationCategorizer = categorizer;
+ mContext = context;
+ mAm = mContext.getSystemService(AlarmManager.class);
+ mCallback = callback;
+
+ IntentFilter filter = new IntentFilter(AGING_ACTION);
+ filter.addDataScheme(AGING_SCHEME);
+ mContext.registerReceiver(mBroadcastReceiver, filter);
+ }
+
+ // NAS lifecycle methods
+
+ public void onNotificationSeen(NotificationEntry entry) {
+ // user has strong opinions about this notification. we can't down rank it, so don't bother.
+ if (entry.getChannel().isImportanceLocked()) {
+ return;
+ }
+
+ @Category int category = mNotificationCategorizer.getCategory(entry);
+
+ // already very low
+ if (category == NotificationCategorizer.CATEGORY_MIN) {
+ return;
+ }
+
+ if (entry.hasSeen()) {
+ if (category == NotificationCategorizer.CATEGORY_ONGOING
+ || category > NotificationCategorizer.CATEGORY_REMINDER) {
+ scheduleAging(entry.getSbn().getKey(), category, TWO_HOURS_MS);
+ } else {
+ scheduleAging(entry.getSbn().getKey(), category, HOUR_MS);
+ }
+
+ mAging.add(entry.getSbn().getKey());
+ }
+ }
+
+ public void onNotificationPosted(NotificationEntry entry) {
+ cancelAging(entry.getSbn().getKey());
+ }
+
+ public void onNotificationRemoved(String key) {
+ cancelAging(key);
+ }
+
+ public void onDestroy() {
+ mContext.unregisterReceiver(mBroadcastReceiver);
+ }
+
+ // Aging
+
+ private void scheduleAging(String key, @Category int category, long duration) {
+ if (mAging.contains(key)) {
+ // already scheduled. Don't reset aging just because the user saw the noti again.
+ return;
+ }
+ final PendingIntent pi = createPendingIntent(key, category);
+ long time = System.currentTimeMillis() + duration;
+ if (DEBUG) Slog.d(TAG, "Scheduling evaluate for " + key + " in ms: " + duration);
+ mAm.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, time, pi);
+ }
+
+ private void cancelAging(String key) {
+ final PendingIntent pi = createPendingIntent(key);
+ mAm.cancel(pi);
+ mAging.remove(key);
+ }
+
+ private Intent createBaseIntent(String key) {
+ return new Intent(AGING_ACTION)
+ .setData(new Uri.Builder().scheme(AGING_SCHEME).appendPath(key).build());
+ }
+
+ private Intent createAgingIntent(String key, @Category int category) {
+ Intent intent = createBaseIntent(key);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
+ .putExtra(EXTRA_CATEGORY, category)
+ .putExtra(EXTRA_KEY, key);
+ return intent;
+ }
+
+ private PendingIntent createPendingIntent(String key, @Category int category) {
+ return PendingIntent.getBroadcast(mContext,
+ REQUEST_CODE_AGING,
+ createAgingIntent(key, category),
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ }
+
+ private PendingIntent createPendingIntent(String key) {
+ return PendingIntent.getBroadcast(mContext,
+ REQUEST_CODE_AGING,
+ createBaseIntent(key),
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ }
+
+ private void demote(String key, @Category int category) {
+ int newImportance = IMPORTANCE_MIN;
+ // TODO: Change "aged" importance based on category
+ mCallback.sendAdjustment(key, newImportance);
+ }
+
+ protected interface Callback {
+ void sendAdjustment(String key, int newImportance);
+ }
+
+ private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (DEBUG) {
+ Slog.d(TAG, "Reposting notification");
+ }
+ if (AGING_ACTION.equals(intent.getAction())) {
+ demote(intent.getStringExtra(EXTRA_KEY), intent.getIntExtra(EXTRA_CATEGORY,
+ NotificationCategorizer.CATEGORY_EVERYTHING_ELSE));
+ }
+ }
+ };
+}
diff --git a/packages/ExtServices/src/android/ext/services/notification/Assistant.java b/packages/ExtServices/src/android/ext/services/notification/Assistant.java
index 9d19898..3333e15 100644
--- a/packages/ExtServices/src/android/ext/services/notification/Assistant.java
+++ b/packages/ExtServices/src/android/ext/services/notification/Assistant.java
@@ -16,22 +16,30 @@
package android.ext.services.notification;
+import static android.app.NotificationManager.IMPORTANCE_LOW;
import static android.app.NotificationManager.IMPORTANCE_MIN;
+import static android.service.notification.Adjustment.KEY_IMPORTANCE;
import static android.service.notification.NotificationListenerService.Ranking
.USER_SENTIMENT_NEGATIVE;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.ActivityThread;
+import android.app.AlarmManager;
import android.app.INotificationManager;
import android.app.Notification;
+import android.app.NotificationChannel;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.pm.IPackageManager;
import android.database.ContentObserver;
+import android.ext.services.notification.AgingHelper.Callback;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
+import android.os.UserHandle;
import android.os.storage.StorageManager;
import android.provider.Settings;
import android.service.notification.Adjustment;
@@ -44,6 +52,7 @@
import android.util.Slog;
import android.util.Xml;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.XmlUtils;
@@ -60,6 +69,7 @@
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
/**
@@ -84,15 +94,19 @@
private float mDismissToViewRatioLimit;
private int mStreakLimit;
private SmartActionsHelper mSmartActionsHelper;
+ private NotificationCategorizer mNotificationCategorizer;
+ private AgingHelper mAgingHelper;
// key : impressions tracker
// TODO: prune deleted channels and apps
- final ArrayMap<String, ChannelImpressions> mkeyToImpressions = new ArrayMap<>();
- // SBN key : channel id
- ArrayMap<String, String> mLiveNotifications = new ArrayMap<>();
+ private final ArrayMap<String, ChannelImpressions> mkeyToImpressions = new ArrayMap<>();
+ // SBN key : entry
+ protected ArrayMap<String, NotificationEntry> mLiveNotifications = new ArrayMap<>();
private Ranking mFakeRanking = null;
private AtomicFile mFile = null;
+ private IPackageManager mPackageManager;
+ protected SettingsObserver mSettingsObserver;
public Assistant() {
}
@@ -102,8 +116,13 @@
super.onCreate();
// Contexts are correctly hooked up by the creation step, which is required for the observer
// to be hooked up/initialized.
- new SettingsObserver(mHandler);
+ mPackageManager = ActivityThread.getPackageManager();
+ mSettingsObserver = new SettingsObserver(mHandler);
mSmartActionsHelper = new SmartActionsHelper();
+ mNotificationCategorizer = new NotificationCategorizer();
+ mAgingHelper = new AgingHelper(getContext(),
+ mNotificationCategorizer,
+ new AgingCallback());
}
private void loadFile() {
@@ -150,7 +169,7 @@
}
}
- private void saveFile() throws IOException {
+ private void saveFile() {
AsyncTask.execute(() -> {
final FileOutputStream stream;
try {
@@ -190,40 +209,56 @@
}
@Override
- public Adjustment onNotificationEnqueued(StatusBarNotification sbn) {
- if (DEBUG) Log.i(TAG, "ENQUEUED " + sbn.getKey());
+ public Adjustment onNotificationEnqueued(StatusBarNotification sbn,
+ NotificationChannel channel) {
+ if (DEBUG) Log.i(TAG, "ENQUEUED " + sbn.getKey() + " on " + channel.getId());
+ if (!isForCurrentUser(sbn)) {
+ return null;
+ }
+ NotificationEntry entry = new NotificationEntry(
+ ActivityThread.getPackageManager(), sbn, channel);
ArrayList<Notification.Action> actions =
- mSmartActionsHelper.suggestActions(this, sbn);
- ArrayList<CharSequence> replies = mSmartActionsHelper.suggestReplies(this, sbn);
- return createEnqueuedNotificationAdjustment(sbn, actions, replies);
+ mSmartActionsHelper.suggestActions(this, entry);
+ ArrayList<CharSequence> replies = mSmartActionsHelper.suggestReplies(this, entry);
+ return createEnqueuedNotificationAdjustment(entry, actions, replies);
}
/** A convenience helper for creating an adjustment for an SBN. */
@Nullable
private Adjustment createEnqueuedNotificationAdjustment(
- @NonNull StatusBarNotification statusBarNotification,
+ @NonNull NotificationEntry entry,
@NonNull ArrayList<Notification.Action> smartActions,
@NonNull ArrayList<CharSequence> smartReplies) {
- if (smartActions.isEmpty() && smartReplies.isEmpty()) {
- return null;
- }
Bundle signals = new Bundle();
- signals.putParcelableArrayList(Adjustment.KEY_SMART_ACTIONS, smartActions);
- signals.putCharSequenceArrayList(Adjustment.KEY_SMART_REPLIES, smartReplies);
+ if (!smartActions.isEmpty()) {
+ signals.putParcelableArrayList(Adjustment.KEY_SMART_ACTIONS, smartActions);
+ }
+ if (!smartReplies.isEmpty()) {
+ signals.putCharSequenceArrayList(Adjustment.KEY_SMART_REPLIES, smartReplies);
+ }
+ if (mNotificationCategorizer.shouldSilence(entry)) {
+ signals.putInt(KEY_IMPORTANCE, IMPORTANCE_LOW);
+ }
+
return new Adjustment(
- statusBarNotification.getPackageName(),
- statusBarNotification.getKey(),
+ entry.getSbn().getPackageName(),
+ entry.getSbn().getKey(),
signals,
- "smart action, reply" /* explanation */,
- statusBarNotification.getUserId());
+ "",
+ entry.getSbn().getUserId());
}
@Override
public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) {
if (DEBUG) Log.i(TAG, "POSTED " + sbn.getKey());
try {
+ if (!isForCurrentUser(sbn)) {
+ return;
+ }
Ranking ranking = getRanking(sbn.getKey(), rankingMap);
if (ranking != null && ranking.getChannel() != null) {
+ NotificationEntry entry = new NotificationEntry(mPackageManager,
+ sbn, ranking.getChannel());
String key = getKey(
sbn.getPackageName(), sbn.getUserId(), ranking.getChannel().getId());
ChannelImpressions ci = mkeyToImpressions.getOrDefault(key,
@@ -233,7 +268,8 @@
sbn.getPackageName(), sbn.getKey(), sbn.getUserId()));
}
mkeyToImpressions.put(key, ci);
- mLiveNotifications.put(sbn.getKey(), ranking.getChannel().getId());
+ mLiveNotifications.put(sbn.getKey(), entry);
+ mAgingHelper.onNotificationPosted(entry);
}
} catch (Throwable e) {
Log.e(TAG, "Error occurred processing post", e);
@@ -244,8 +280,11 @@
public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap,
NotificationStats stats, int reason) {
try {
+ if (!isForCurrentUser(sbn)) {
+ return;
+ }
boolean updatedImpressions = false;
- String channelId = mLiveNotifications.remove(sbn.getKey());
+ String channelId = mLiveNotifications.remove(sbn.getKey()).getChannel().getId();
String key = getKey(sbn.getPackageName(), sbn.getUserId(), channelId);
synchronized (mkeyToImpressions) {
ChannelImpressions ci = mkeyToImpressions.getOrDefault(key,
@@ -277,7 +316,7 @@
saveFile();
}
} catch (Throwable e) {
- Slog.e(TAG, "Error occurred processing removal", e);
+ Slog.e(TAG, "Error occurred processing removal of " + sbn, e);
}
}
@@ -287,6 +326,26 @@
}
@Override
+ public void onNotificationsSeen(List<String> keys) {
+ try {
+ if (keys == null) {
+ return;
+ }
+
+ for (String key : keys) {
+ NotificationEntry entry = mLiveNotifications.get(key);
+
+ if (entry != null) {
+ entry.setSeen();
+ mAgingHelper.onNotificationSeen(entry);
+ }
+ }
+ } catch (Throwable e) {
+ Slog.e(TAG, "Error occurred processing seen", e);
+ }
+ }
+
+ @Override
public void onListenerConnected() {
if (DEBUG) Log.i(TAG, "CONNECTED");
try {
@@ -303,6 +362,17 @@
}
}
+ @Override
+ public void onListenerDisconnected() {
+ if (mAgingHelper != null) {
+ mAgingHelper.onDestroy();
+ }
+ }
+
+ private boolean isForCurrentUser(StatusBarNotification sbn) {
+ return sbn != null && sbn.getUserId() == UserHandle.myUserId();
+ }
+
protected String getKey(String pkg, int userId, String channelId) {
return pkg + "|" + userId + "|" + channelId;
}
@@ -325,29 +395,40 @@
// for testing
- protected void setFile(AtomicFile file) {
+ @VisibleForTesting
+ public void setFile(AtomicFile file) {
mFile = file;
}
- protected void setFakeRanking(Ranking ranking) {
+ @VisibleForTesting
+ public void setFakeRanking(Ranking ranking) {
mFakeRanking = ranking;
}
- protected void setNoMan(INotificationManager noMan) {
+ @VisibleForTesting
+ public void setNoMan(INotificationManager noMan) {
mNoMan = noMan;
}
- protected void setContext(Context context) {
+ @VisibleForTesting
+ public void setContext(Context context) {
mSystemContext = context;
}
- protected ChannelImpressions getImpressions(String key) {
+ @VisibleForTesting
+ public void setPackageManager(IPackageManager pm) {
+ mPackageManager = pm;
+ }
+
+ @VisibleForTesting
+ public ChannelImpressions getImpressions(String key) {
synchronized (mkeyToImpressions) {
return mkeyToImpressions.get(key);
}
}
- protected void insertImpressions(String key, ChannelImpressions ci) {
+ @VisibleForTesting
+ public void insertImpressions(String key, ChannelImpressions ci) {
synchronized (mkeyToImpressions) {
mkeyToImpressions.put(key, ci);
}
@@ -359,10 +440,24 @@
return impressions;
}
+ protected final class AgingCallback implements Callback {
+ @Override
+ public void sendAdjustment(String key, int newImportance) {
+ NotificationEntry entry = mLiveNotifications.get(key);
+ if (entry != null) {
+ Bundle bundle = new Bundle();
+ bundle.putInt(KEY_IMPORTANCE, newImportance);
+ Adjustment adjustment = new Adjustment(entry.getSbn().getPackageName(), key, bundle,
+ "aging", entry.getSbn().getUserId());
+ adjustNotification(adjustment);
+ }
+ }
+ }
+
/**
* Observer for updates on blocking helper threshold values.
*/
- private final class SettingsObserver extends ContentObserver {
+ protected final class SettingsObserver extends ContentObserver {
private final Uri STREAK_LIMIT_URI =
Settings.Global.getUriFor(Settings.Global.BLOCKING_HELPER_STREAK_LIMIT);
private final Uri DISMISS_TO_VIEW_RATIO_LIMIT_URI =
diff --git a/packages/ExtServices/src/android/ext/services/notification/NotificationCategorizer.java b/packages/ExtServices/src/android/ext/services/notification/NotificationCategorizer.java
new file mode 100644
index 0000000..1f4ba01
--- /dev/null
+++ b/packages/ExtServices/src/android/ext/services/notification/NotificationCategorizer.java
@@ -0,0 +1,104 @@
+/**
+ * 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.ext.services.notification;
+
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.app.NotificationManager.IMPORTANCE_MIN;
+
+import android.annotation.IntDef;
+import android.app.Notification;
+import android.media.AudioAttributes;
+import android.os.Process;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Default categorizer for incoming notifications; used to determine what notifications
+ * should be silenced.
+ */
+// TODO: stop using @hide methods
+public class NotificationCategorizer {
+
+ protected static final int CATEGORY_MIN = -3;
+ protected static final int CATEGORY_EVERYTHING_ELSE = -2;
+ protected static final int CATEGORY_ONGOING = -1;
+ protected static final int CATEGORY_SYSTEM_LOW = 0;
+ protected static final int CATEGORY_EVENT = 1;
+ protected static final int CATEGORY_REMINDER = 2;
+ protected static final int CATEGORY_SYSTEM = 3;
+ protected static final int CATEGORY_PEOPLE = 4;
+ protected static final int CATEGORY_ALARM = 5;
+ protected static final int CATEGORY_CALL = 6;
+
+ /** @hide */
+ @IntDef(prefix = { "CATEGORY_" }, value = {
+ CATEGORY_MIN, CATEGORY_EVERYTHING_ELSE, CATEGORY_ONGOING, CATEGORY_CALL,
+ CATEGORY_SYSTEM_LOW, CATEGORY_EVENT, CATEGORY_REMINDER, CATEGORY_SYSTEM,
+ CATEGORY_PEOPLE, CATEGORY_ALARM
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Category {}
+
+ public boolean shouldSilence(NotificationEntry entry) {
+ return shouldSilence(getCategory(entry));
+ }
+
+ @VisibleForTesting
+ boolean shouldSilence(int category) {
+ return category < CATEGORY_EVENT;
+ }
+
+ public int getCategory(NotificationEntry entry) {
+ if (entry.getChannel() == null) {
+ return CATEGORY_EVERYTHING_ELSE;
+ }
+ if (entry.getChannel().getImportance() == IMPORTANCE_MIN) {
+ return CATEGORY_MIN;
+ }
+ if (entry.isCategory(Notification.CATEGORY_REMINDER)) {
+ return CATEGORY_REMINDER;
+ }
+ if (entry.isCategory(Notification.CATEGORY_EVENT)) {
+ return CATEGORY_EVENT;
+ }
+ if (entry.isCategory(Notification.CATEGORY_ALARM)
+ || entry.isAudioAttributesUsage(AudioAttributes.USAGE_ALARM)) {
+ return CATEGORY_ALARM;
+ }
+ // TODO: check for default phone app
+ if (entry.isCategory(Notification.CATEGORY_CALL)) {
+ return CATEGORY_CALL;
+ }
+ if (entry.involvesPeople()) {
+ return CATEGORY_PEOPLE;
+ }
+ // TODO: is from signature app
+ if (entry.getSbn().getUid() < Process.FIRST_APPLICATION_UID) {
+ if (entry.getImportance() >= IMPORTANCE_HIGH) {
+ return CATEGORY_SYSTEM;
+ } else {
+ return CATEGORY_SYSTEM_LOW;
+ }
+ }
+ if (entry.isOngoing()) {
+ return CATEGORY_ONGOING;
+ }
+ return CATEGORY_EVERYTHING_ELSE;
+ }
+}
diff --git a/packages/ExtServices/src/android/ext/services/notification/NotificationEntry.java b/packages/ExtServices/src/android/ext/services/notification/NotificationEntry.java
new file mode 100644
index 0000000..8fee822
--- /dev/null
+++ b/packages/ExtServices/src/android/ext/services/notification/NotificationEntry.java
@@ -0,0 +1,229 @@
+/*
+ * 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.ext.services.notification;
+
+import static android.app.NotificationChannel.USER_LOCKED_IMPORTANCE;
+import static android.app.NotificationManager.IMPORTANCE_DEFAULT;
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.app.NotificationManager.IMPORTANCE_LOW;
+import static android.app.NotificationManager.IMPORTANCE_MIN;
+import static android.app.NotificationManager.IMPORTANCE_UNSPECIFIED;
+
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.Person;
+import android.app.RemoteInput;
+import android.content.pm.IPackageManager;
+import android.media.AudioAttributes;
+import android.media.AudioSystem;
+import android.os.Build;
+import android.os.RemoteException;
+import android.service.notification.StatusBarNotification;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Objects;
+
+/**
+ * Holds data about notifications.
+ */
+public class NotificationEntry {
+ static final String TAG = "NotificationEntry";
+
+ private StatusBarNotification mSbn;
+ private final IPackageManager mPackageManager;
+ private int mTargetSdkVersion = Build.VERSION_CODES.N_MR1;
+ private boolean mPreChannelsNotification = true;
+ private AudioAttributes mAttributes;
+ private NotificationChannel mChannel;
+ private int mImportance;
+ private boolean mSeen;
+
+ public NotificationEntry(IPackageManager packageManager, StatusBarNotification sbn,
+ NotificationChannel channel) {
+ mSbn = sbn;
+ mChannel = channel;
+ mPackageManager = packageManager;
+ mPreChannelsNotification = isPreChannelsNotification();
+ mAttributes = calculateAudioAttributes();
+ mImportance = calculateInitialImportance();
+ }
+
+ private boolean isPreChannelsNotification() {
+ try {
+ mTargetSdkVersion = mPackageManager.getApplicationInfo(
+ mSbn.getPackageName(), 0, mSbn.getUserId()).targetSdkVersion;
+ } catch (RemoteException e) {
+ Log.w(TAG, "Couldn't look up " + mSbn.getPackageName());
+ }
+ if (NotificationChannel.DEFAULT_CHANNEL_ID.equals(getChannel().getId())) {
+ if (mTargetSdkVersion < Build.VERSION_CODES.O) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private AudioAttributes calculateAudioAttributes() {
+ final Notification n = getNotification();
+ AudioAttributes attributes = getChannel().getAudioAttributes();
+ if (attributes == null) {
+ attributes = Notification.AUDIO_ATTRIBUTES_DEFAULT;
+ }
+
+ if (mPreChannelsNotification
+ && (getChannel().getUserLockedFields()
+ & NotificationChannel.USER_LOCKED_SOUND) == 0) {
+ if (n.audioAttributes != null) {
+ // prefer audio attributes to stream type
+ attributes = n.audioAttributes;
+ } else if (n.audioStreamType >= 0
+ && n.audioStreamType < AudioSystem.getNumStreamTypes()) {
+ // the stream type is valid, use it
+ attributes = new AudioAttributes.Builder()
+ .setInternalLegacyStreamType(n.audioStreamType)
+ .build();
+ } else if (n.audioStreamType != AudioSystem.STREAM_DEFAULT) {
+ Log.w(TAG, String.format("Invalid stream type: %d", n.audioStreamType));
+ }
+ }
+ return attributes;
+ }
+
+ private int calculateInitialImportance() {
+ final Notification n = getNotification();
+ int importance = getChannel().getImportance();
+ int requestedImportance = IMPORTANCE_DEFAULT;
+
+ // Migrate notification flags to scores
+ if ((n.flags & Notification.FLAG_HIGH_PRIORITY) != 0) {
+ n.priority = Notification.PRIORITY_MAX;
+ }
+
+ n.priority = clamp(n.priority, Notification.PRIORITY_MIN,
+ Notification.PRIORITY_MAX);
+ switch (n.priority) {
+ case Notification.PRIORITY_MIN:
+ requestedImportance = IMPORTANCE_MIN;
+ break;
+ case Notification.PRIORITY_LOW:
+ requestedImportance = IMPORTANCE_LOW;
+ break;
+ case Notification.PRIORITY_DEFAULT:
+ requestedImportance = IMPORTANCE_DEFAULT;
+ break;
+ case Notification.PRIORITY_HIGH:
+ case Notification.PRIORITY_MAX:
+ requestedImportance = IMPORTANCE_HIGH;
+ break;
+ }
+
+ if (mPreChannelsNotification
+ && (importance == IMPORTANCE_UNSPECIFIED
+ || (getChannel().getUserLockedFields()
+ & USER_LOCKED_IMPORTANCE) == 0)) {
+ if (n.fullScreenIntent != null) {
+ requestedImportance = IMPORTANCE_HIGH;
+ }
+ importance = requestedImportance;
+ }
+
+ return importance;
+ }
+
+ public boolean isCategory(String category) {
+ return Objects.equals(getNotification().category, category);
+ }
+
+ public boolean isAudioAttributesUsage(int usage) {
+ return mAttributes != null && mAttributes.getUsage() == usage;
+ }
+
+ private boolean hasPerson() {
+ // TODO: cache favorite and recent contacts to check contact affinity
+ ArrayList<Person> people = getNotification().extras.getParcelableArrayList(
+ Notification.EXTRA_PEOPLE_LIST);
+ return people != null && !people.isEmpty();
+ }
+
+ protected boolean hasStyle(Class targetStyle) {
+ Class<? extends Notification.Style> style = getNotification().getNotificationStyle();
+ return targetStyle.equals(style);
+ }
+
+ protected boolean isOngoing() {
+ return (getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE) != 0;
+ }
+
+ protected boolean involvesPeople() {
+ return isMessaging()
+ || hasStyle(Notification.InboxStyle.class)
+ || hasPerson();
+ }
+
+ protected boolean isMessaging() {
+ return isCategory(Notification.CATEGORY_MESSAGE)
+ || hasStyle(Notification.MessagingStyle.class)
+ || hasInlineReply();
+ }
+
+ public boolean hasInlineReply() {
+ Notification.Action[] actions = getNotification().actions;
+ if (actions == null) {
+ return false;
+ }
+ for (Notification.Action action : actions) {
+ RemoteInput[] remoteInputs = action.getRemoteInputs();
+ if (remoteInputs == null) {
+ continue;
+ }
+ for (RemoteInput remoteInput : remoteInputs) {
+ if (remoteInput.getAllowFreeFormInput()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public void setSeen() {
+ mSeen = true;
+ }
+
+ public boolean hasSeen() {
+ return mSeen;
+ }
+
+ public StatusBarNotification getSbn() {
+ return mSbn;
+ }
+
+ public Notification getNotification() {
+ return getSbn().getNotification();
+ }
+
+ public NotificationChannel getChannel() {
+ return mChannel;
+ }
+
+ public int getImportance() {
+ return mImportance;
+ }
+
+ private int clamp(int x, int low, int high) {
+ return (x < low) ? low : ((x > high) ? high : x);
+ }
+}
diff --git a/packages/ExtServices/src/android/ext/services/notification/SmartActionsHelper.java b/packages/ExtServices/src/android/ext/services/notification/SmartActionsHelper.java
index 9d33bd9..37a98fd 100644
--- a/packages/ExtServices/src/android/ext/services/notification/SmartActionsHelper.java
+++ b/packages/ExtServices/src/android/ext/services/notification/SmartActionsHelper.java
@@ -65,8 +65,8 @@
*/
@NonNull
ArrayList<Notification.Action> suggestActions(
- @Nullable Context context, @NonNull StatusBarNotification sbn) {
- if (!isEligibleForActionAdjustment(sbn)) {
+ @Nullable Context context, @NonNull NotificationEntry entry) {
+ if (!isEligibleForActionAdjustment(entry)) {
return EMPTY_ACTION_LIST;
}
if (context == null) {
@@ -76,17 +76,17 @@
if (tcm == null) {
return EMPTY_ACTION_LIST;
}
- Notification.Action[] actions = sbn.getNotification().actions;
+ Notification.Action[] actions = entry.getNotification().actions;
int numOfExistingActions = actions == null ? 0: actions.length;
int maxSmartActions = MAX_SMART_ACTIONS - numOfExistingActions;
return suggestActionsFromText(
tcm,
- getMostSalientActionText(sbn.getNotification()), maxSmartActions);
+ getMostSalientActionText(entry.getNotification()), maxSmartActions);
}
ArrayList<CharSequence> suggestReplies(
- @Nullable Context context, @NonNull StatusBarNotification sbn) {
- if (!isEligibleForReplyAdjustment(sbn)) {
+ @Nullable Context context, @NonNull NotificationEntry entry) {
+ if (!isEligibleForReplyAdjustment(entry)) {
return EMPTY_REPLY_LIST;
}
if (context == null) {
@@ -103,56 +103,35 @@
* to fundamental phone functionality where any error would result in a very negative user
* experience.
*/
- private boolean isEligibleForActionAdjustment(@NonNull StatusBarNotification sbn) {
- Notification notification = sbn.getNotification();
- String pkg = sbn.getPackageName();
- if (!Process.myUserHandle().equals(sbn.getUser())) {
+ private boolean isEligibleForActionAdjustment(@NonNull NotificationEntry entry) {
+ Notification notification = entry.getNotification();
+ String pkg = entry.getSbn().getPackageName();
+ if (!Process.myUserHandle().equals(entry.getSbn().getUser())) {
return false;
}
if (notification.actions != null
&& notification.actions.length >= Notification.MAX_ACTION_BUTTONS) {
return false;
}
- if (0 != (notification.flags & FLAG_MASK_INELGIBILE_FOR_ACTIONS)) {
+ if ((notification.flags & FLAG_MASK_INELGIBILE_FOR_ACTIONS) != 0) {
return false;
}
if (TextUtils.isEmpty(pkg) || pkg.equals("android")) {
return false;
}
// For now, we are only interested in messages.
- return Notification.CATEGORY_MESSAGE.equals(notification.category)
- || Notification.MessagingStyle.class.equals(notification.getNotificationStyle())
- || hasInlineReply(notification);
+ return entry.isMessaging();
}
- private boolean isEligibleForReplyAdjustment(@NonNull StatusBarNotification sbn) {
+ private boolean isEligibleForReplyAdjustment(@NonNull NotificationEntry entry) {
if (!SystemProperties.getBoolean(SYS_PROP_SMART_REPLIES_EXPERIMENT, false)) {
return false;
}
- Notification notification = sbn.getNotification();
+ Notification notification = entry.getNotification();
if (notification.actions == null) {
return false;
}
- return hasInlineReply(sbn.getNotification());
- }
-
- private boolean hasInlineReply(Notification notification) {
- Notification.Action[] actions = notification.actions;
- if (actions == null) {
- return false;
- }
- for (Notification.Action action : actions) {
- RemoteInput[] remoteInputs = action.getRemoteInputs();
- if (remoteInputs == null) {
- continue;
- }
- for (RemoteInput remoteInput : remoteInputs) {
- if (remoteInput.getAllowFreeFormInput()) {
- return true;
- }
- }
- }
- return false;
+ return entry.hasInlineReply();
}
/** Returns the text most salient for action extraction in a notification. */
diff --git a/packages/ExtServices/tests/AndroidTest.xml b/packages/ExtServices/tests/AndroidTest.xml
new file mode 100644
index 0000000..c3d32de
--- /dev/null
+++ b/packages/ExtServices/tests/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Runs Tests for ExtServices">
+ <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
+ <option name="test-file-name" value="ExtServicesUnitTests.apk" />
+ </target_preparer>
+
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="framework-base-presubmit" />
+ <option name="test-tag" value="ExtServicesUnitTests" />
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="android.ext.services.tests.unit" />
+ <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+</configuration>
\ No newline at end of file
diff --git a/packages/ExtServices/tests/src/android/ext/services/notification/AgingHelperTest.java b/packages/ExtServices/tests/src/android/ext/services/notification/AgingHelperTest.java
new file mode 100644
index 0000000..b023b36
--- /dev/null
+++ b/packages/ExtServices/tests/src/android/ext/services/notification/AgingHelperTest.java
@@ -0,0 +1,153 @@
+/**
+ * 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.ext.services.notification;
+
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.app.NotificationManager.IMPORTANCE_MIN;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+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.app.AlarmManager;
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.PendingIntent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.os.Build;
+import android.os.Process;
+import android.os.UserHandle;
+import android.service.notification.StatusBarNotification;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+import android.testing.TestableContext;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidJUnit4.class)
+public class AgingHelperTest {
+ private String mPkg = "pkg";
+ private int mUid = 2018;
+
+ @Rule
+ public final TestableContext mContext =
+ new TestableContext(InstrumentationRegistry.getTargetContext(), null);
+
+ @Mock
+ private NotificationCategorizer mCategorizer;
+ @Mock
+ private AlarmManager mAlarmManager;
+ @Mock
+ private IPackageManager mPackageManager;
+ @Mock
+ private AgingHelper.Callback mCallback;
+
+ private AgingHelper mAgingHelper;
+
+ private StatusBarNotification generateSbn(String channelId) {
+ Notification n = new Notification.Builder(mContext, channelId)
+ .setContentTitle("foo")
+ .build();
+
+ return new StatusBarNotification(mPkg, mPkg, 0, "tag", mUid, mUid, n,
+ UserHandle.SYSTEM, null, 0);
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ mPkg = mContext.getPackageName();
+ mUid = Process.myUid();
+
+ ApplicationInfo info = mock(ApplicationInfo.class);
+ when(mPackageManager.getApplicationInfo(anyString(), anyInt(), anyInt()))
+ .thenReturn(info);
+ info.targetSdkVersion = Build.VERSION_CODES.P;
+
+ mContext.addMockSystemService(AlarmManager.class, mAlarmManager);
+
+ mAgingHelper = new AgingHelper(mContext, mCategorizer, mCallback);
+ }
+
+ @Test
+ public void testNoSnoozingOnPost() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ StatusBarNotification sbn = generateSbn(channel.getId());
+ NotificationEntry entry = new NotificationEntry(mPackageManager, sbn, channel);
+
+
+ mAgingHelper.onNotificationPosted(entry);
+ verify(mAlarmManager, never()).setExactAndAllowWhileIdle(anyInt(), anyLong(), any());
+ }
+
+ @Test
+ public void testPostResetsSnooze() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ StatusBarNotification sbn = generateSbn(channel.getId());
+ NotificationEntry entry = new NotificationEntry(mPackageManager, sbn, channel);
+
+
+ mAgingHelper.onNotificationPosted(entry);
+ verify(mAlarmManager, times(1)).cancel(any(PendingIntent.class));
+ }
+
+ @Test
+ public void testSnoozingOnSeen() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ StatusBarNotification sbn = generateSbn(channel.getId());
+ NotificationEntry entry = new NotificationEntry(mPackageManager, sbn, channel);
+ entry.setSeen();
+ when(mCategorizer.getCategory(entry)).thenReturn(NotificationCategorizer.CATEGORY_PEOPLE);
+
+ mAgingHelper.onNotificationSeen(entry);
+ verify(mAlarmManager, times(1)).setExactAndAllowWhileIdle(anyInt(), anyLong(), any());
+ }
+
+ @Test
+ public void testNoSnoozingOnSeenUserLocked() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ channel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
+ StatusBarNotification sbn = generateSbn(channel.getId());
+ NotificationEntry entry = new NotificationEntry(mPackageManager, sbn, channel);
+ when(mCategorizer.getCategory(entry)).thenReturn(NotificationCategorizer.CATEGORY_PEOPLE);
+
+ mAgingHelper.onNotificationSeen(entry);
+ verify(mAlarmManager, never()).setExactAndAllowWhileIdle(anyInt(), anyLong(), any());
+ }
+
+ @Test
+ public void testNoSnoozingOnSeenAlreadyLow() {
+ NotificationEntry entry = mock(NotificationEntry.class);
+ when(entry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_HIGH));
+ when(entry.getImportance()).thenReturn(IMPORTANCE_MIN);
+
+ mAgingHelper.onNotificationSeen(entry);
+ verify(mAlarmManager, never()).setExactAndAllowWhileIdle(anyInt(), anyLong(), any());
+ }
+}
diff --git a/packages/ExtServices/tests/src/android/ext/services/notification/AssistantTest.java b/packages/ExtServices/tests/src/android/ext/services/notification/AssistantTest.java
index a6b6a6b..2820232 100644
--- a/packages/ExtServices/tests/src/android/ext/services/notification/AssistantTest.java
+++ b/packages/ExtServices/tests/src/android/ext/services/notification/AssistantTest.java
@@ -20,8 +20,9 @@
import static android.app.NotificationManager.IMPORTANCE_LOW;
import static android.app.NotificationManager.IMPORTANCE_MIN;
-import static junit.framework.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
@@ -33,8 +34,10 @@
import android.app.Notification;
import android.app.NotificationChannel;
import android.content.ContentResolver;
-import android.content.IContentProvider;
import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.os.Build;
import android.os.UserHandle;
import android.provider.Settings;
import android.service.notification.Adjustment;
@@ -47,7 +50,6 @@
import android.test.ServiceTestCase;
import android.testing.TestableContext;
import android.util.AtomicFile;
-import android.util.Xml;
import com.android.internal.util.FastXmlSerializer;
@@ -57,7 +59,6 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlSerializer;
import java.io.BufferedInputStream;
@@ -84,6 +85,8 @@
@Mock INotificationManager mNoMan;
@Mock AtomicFile mFile;
+ @Mock
+ IPackageManager mPackageManager;
Assistant mAssistant;
Application mApplication;
@@ -117,6 +120,11 @@
mAssistant = getService();
mAssistant.setNoMan(mNoMan);
mAssistant.setFile(mFile);
+ mAssistant.setPackageManager(mPackageManager);
+ ApplicationInfo info = mock(ApplicationInfo.class);
+ when(mPackageManager.getApplicationInfo(anyString(), anyInt(), anyInt()))
+ .thenReturn(info);
+ info.targetSdkVersion = Build.VERSION_CODES.P;
when(mFile.startWrite()).thenReturn(mock(FileOutputStream.class));
}
@@ -435,14 +443,27 @@
Settings.Global.BLOCKING_HELPER_STREAK_LIMIT, newStreakLimit);
// Notify for the settings values we updated.
- resolver.notifyChange(
- Settings.Global.getUriFor(Settings.Global.BLOCKING_HELPER_STREAK_LIMIT), null);
- resolver.notifyChange(
- Settings.Global.getUriFor(
- Settings.Global.BLOCKING_HELPER_DISMISS_TO_VIEW_RATIO_LIMIT),
- null);
+ mAssistant.mSettingsObserver.onChange(false, Settings.Global.getUriFor(
+ Settings.Global.BLOCKING_HELPER_STREAK_LIMIT));
+ mAssistant.mSettingsObserver.onChange(false, Settings.Global.getUriFor(
+ Settings.Global.BLOCKING_HELPER_DISMISS_TO_VIEW_RATIO_LIMIT));
// With the new threshold, the blocking helper should be triggered.
assertEquals(true, ci.shouldTriggerBlock());
}
+
+ @Test
+ public void testTrimLiveNotifications() {
+ StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, "no", null);
+ mAssistant.setFakeRanking(generateRanking(sbn, P1C1));
+
+ mAssistant.onNotificationPosted(sbn, mock(RankingMap.class));
+
+ assertTrue(mAssistant.mLiveNotifications.containsKey(sbn.getKey()));
+
+ mAssistant.onNotificationRemoved(
+ sbn, mock(RankingMap.class), new NotificationStats(), 0);
+
+ assertFalse(mAssistant.mLiveNotifications.containsKey(sbn.getKey()));
+ }
}
diff --git a/packages/ExtServices/tests/src/android/ext/services/notification/NotificationCategorizerTest.java b/packages/ExtServices/tests/src/android/ext/services/notification/NotificationCategorizerTest.java
new file mode 100644
index 0000000..c37392f
--- /dev/null
+++ b/packages/ExtServices/tests/src/android/ext/services/notification/NotificationCategorizerTest.java
@@ -0,0 +1,190 @@
+/**
+ * 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.ext.services.notification;
+
+import static android.app.NotificationManager.IMPORTANCE_DEFAULT;
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.app.NotificationManager.IMPORTANCE_MIN;
+import static android.os.Process.FIRST_APPLICATION_UID;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.when;
+
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.os.Process;
+import android.service.notification.StatusBarNotification;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+import android.testing.TestableContext;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidJUnit4.class)
+public class NotificationCategorizerTest {
+ @Mock
+ private NotificationEntry mEntry;
+ @Mock
+ private StatusBarNotification mSbn;
+
+ @Rule
+ public final TestableContext mContext =
+ new TestableContext(InstrumentationRegistry.getContext(), null);
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+
+ when(mEntry.getSbn()).thenReturn(mSbn);
+ when(mSbn.getUid()).thenReturn(Process.myUid());
+ when(mSbn.getPackageName()).thenReturn(mContext.getPackageName());
+ }
+
+ @Test
+ public void testPeopleCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.involvesPeople()).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_PEOPLE, nc.getCategory(mEntry));
+ assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_PEOPLE));
+ }
+
+ @Test
+ public void testMin() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_MIN));
+ when(mEntry.involvesPeople()).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_MIN, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_MIN));
+ }
+
+ @Test
+ public void testOngoingCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.isOngoing()).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_ONGOING, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_ONGOING));
+
+ when(mEntry.isOngoing()).thenReturn(false);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE));
+ }
+
+ @Test
+ public void testAlarmCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.isCategory(Notification.CATEGORY_ALARM)).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_ALARM, nc.getCategory(mEntry));
+ assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_ALARM));
+
+ when(mEntry.isCategory(Notification.CATEGORY_ALARM)).thenReturn(false);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE));
+ }
+
+ @Test
+ public void testCallCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.isCategory(Notification.CATEGORY_CALL)).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_CALL, nc.getCategory(mEntry));
+ assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_CALL));
+
+ when(mEntry.isCategory(Notification.CATEGORY_CALL)).thenReturn(false);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE));
+ }
+
+ @Test
+ public void testReminderCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.isCategory(Notification.CATEGORY_REMINDER)).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_REMINDER, nc.getCategory(mEntry));
+ assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_REMINDER));
+
+ when(mEntry.isCategory(Notification.CATEGORY_REMINDER)).thenReturn(false);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE));
+ }
+
+ @Test
+ public void testEventCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.isCategory(Notification.CATEGORY_EVENT)).thenReturn(true);
+
+ assertEquals(NotificationCategorizer.CATEGORY_EVENT, nc.getCategory(mEntry));
+ assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_EVENT));
+
+ when(mEntry.isCategory(Notification.CATEGORY_EVENT)).thenReturn(false);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ }
+
+ @Test
+ public void testSystemCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_HIGH));
+ when(mEntry.getImportance()).thenReturn(IMPORTANCE_HIGH);
+ when(mSbn.getUid()).thenReturn(FIRST_APPLICATION_UID - 1);
+
+ assertEquals(NotificationCategorizer.CATEGORY_SYSTEM, nc.getCategory(mEntry));
+ assertFalse(nc.shouldSilence(NotificationCategorizer.CATEGORY_SYSTEM));
+
+ when(mSbn.getUid()).thenReturn(FIRST_APPLICATION_UID);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ }
+
+ @Test
+ public void testSystemLowCategory() {
+ NotificationCategorizer nc = new NotificationCategorizer();
+
+ when(mEntry.getChannel()).thenReturn(new NotificationChannel("", "", IMPORTANCE_DEFAULT));
+ when(mEntry.getImportance()).thenReturn(IMPORTANCE_DEFAULT);
+ when(mSbn.getUid()).thenReturn(FIRST_APPLICATION_UID - 1);
+
+ assertEquals(NotificationCategorizer.CATEGORY_SYSTEM_LOW, nc.getCategory(mEntry));
+ assertTrue(nc.shouldSilence(NotificationCategorizer.CATEGORY_SYSTEM_LOW));
+
+ when(mSbn.getUid()).thenReturn(FIRST_APPLICATION_UID);
+ assertEquals(NotificationCategorizer.CATEGORY_EVERYTHING_ELSE, nc.getCategory(mEntry));
+ }
+}
diff --git a/packages/ExtServices/tests/src/android/ext/services/notification/NotificationEntryTest.java b/packages/ExtServices/tests/src/android/ext/services/notification/NotificationEntryTest.java
new file mode 100644
index 0000000..9223c3d
--- /dev/null
+++ b/packages/ExtServices/tests/src/android/ext/services/notification/NotificationEntryTest.java
@@ -0,0 +1,201 @@
+/**
+ * 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.ext.services.notification;
+
+import static android.app.Notification.FLAG_CAN_COLORIZE;
+import static android.app.Notification.FLAG_FOREGROUND_SERVICE;
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.media.AudioAttributes.USAGE_ALARM;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.when;
+
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.Person;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.media.AudioAttributes;
+import android.os.Build;
+import android.os.Process;
+import android.os.UserHandle;
+import android.service.notification.StatusBarNotification;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+import android.testing.TestableContext;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.ArrayList;
+
+@RunWith(AndroidJUnit4.class)
+public class NotificationEntryTest {
+ private String mPkg = "pkg";
+ private int mUid = 2018;
+ @Mock
+ private IPackageManager mPackageManager;
+ @Mock
+ private ApplicationInfo mAppInfo;
+
+ @Rule
+ public final TestableContext mContext =
+ new TestableContext(InstrumentationRegistry.getContext(), null);
+
+ private StatusBarNotification generateSbn(String channelId) {
+ Notification n = new Notification.Builder(mContext, channelId)
+ .setContentTitle("foo")
+ .build();
+
+ return new StatusBarNotification(mPkg, mPkg, 0, "tag", mUid, mUid, n,
+ UserHandle.SYSTEM, null, 0);
+ }
+
+ private StatusBarNotification generateSbn(Notification n) {
+ return new StatusBarNotification(mPkg, mPkg, 0, "tag", mUid, mUid, n,
+ UserHandle.SYSTEM, null, 0);
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ mPkg = mContext.getPackageName();
+ mUid = Process.myUid();
+ when(mPackageManager.getApplicationInfo(anyString(), anyInt(), anyInt()))
+ .thenReturn(mAppInfo);
+ mAppInfo.targetSdkVersion = Build.VERSION_CODES.P;
+ }
+
+ @Test
+ public void testHasPerson() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ StatusBarNotification sbn = generateSbn(channel.getId());
+ ArrayList<Person> people = new ArrayList<>();
+ people.add(new Person.Builder().setKey("mailto:testing@android.com").build());
+ sbn.getNotification().extras.putParcelableArrayList(Notification.EXTRA_PEOPLE_LIST, people);
+
+ NotificationEntry entry = new NotificationEntry(mPackageManager, sbn, channel);
+ assertTrue(entry.involvesPeople());
+ }
+
+ @Test
+ public void testNotPerson() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ StatusBarNotification sbn = generateSbn(channel.getId());
+ NotificationEntry entry = new NotificationEntry(mPackageManager, sbn, channel);
+ assertFalse(entry.involvesPeople());
+ }
+
+ @Test
+ public void testIsInboxStyle() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+
+ Notification n = new Notification.Builder(mContext, channel.getId())
+ .setStyle(new Notification.InboxStyle())
+ .build();
+ NotificationEntry entry = new NotificationEntry(mPackageManager, generateSbn(n), channel);
+ assertTrue(entry.hasStyle(Notification.InboxStyle.class));
+ }
+
+ @Test
+ public void testIsMessagingStyle() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+
+ Notification n = new Notification.Builder(mContext, channel.getId())
+ .setStyle(new Notification.MessagingStyle(""))
+ .build();
+ NotificationEntry entry = new NotificationEntry(mPackageManager, generateSbn(n), channel);
+ assertTrue(entry.hasStyle(Notification.MessagingStyle.class));
+ }
+
+ @Test
+ public void testIsNotPersonStyle() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+
+ Notification n = new Notification.Builder(mContext, channel.getId())
+ .setStyle(new Notification.BigPictureStyle())
+ .build();
+ NotificationEntry entry = new NotificationEntry(mPackageManager, generateSbn(n), channel);
+ assertFalse(entry.hasStyle(Notification.InboxStyle.class));
+ assertFalse(entry.hasStyle(Notification.MessagingStyle.class));
+ }
+
+ @Test
+ public void testIsAudioAttributes() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ channel.setSound(null, new AudioAttributes.Builder().setUsage(USAGE_ALARM).build());
+
+ NotificationEntry entry = new NotificationEntry(
+ mPackageManager, generateSbn(channel.getId()), channel);
+
+ assertTrue(entry.isAudioAttributesUsage(USAGE_ALARM));
+ }
+
+ @Test
+ public void testIsNotAudioAttributes() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+ NotificationEntry entry = new NotificationEntry(
+ mPackageManager, generateSbn(channel.getId()), channel);
+
+ assertFalse(entry.isAudioAttributesUsage(USAGE_ALARM));
+ }
+
+ @Test
+ public void testIsCategory() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+
+ Notification n = new Notification.Builder(mContext, channel.getId())
+ .setCategory(Notification.CATEGORY_EMAIL)
+ .build();
+ NotificationEntry entry = new NotificationEntry(mPackageManager, generateSbn(n), channel);
+
+ assertTrue(entry.isCategory(Notification.CATEGORY_EMAIL));
+ assertFalse(entry.isCategory(Notification.CATEGORY_MESSAGE));
+ }
+
+ @Test
+ public void testIsOngoing() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+
+ Notification n = new Notification.Builder(mContext, channel.getId())
+ .setFlag(FLAG_FOREGROUND_SERVICE, true)
+ .build();
+ NotificationEntry entry = new NotificationEntry(mPackageManager, generateSbn(n), channel);
+
+ assertTrue(entry.isOngoing());
+ }
+
+ @Test
+ public void testIsNotOngoing() {
+ NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_HIGH);
+
+ Notification n = new Notification.Builder(mContext, channel.getId())
+ .setFlag(FLAG_CAN_COLORIZE, true)
+ .build();
+ NotificationEntry entry = new NotificationEntry(mPackageManager, generateSbn(n), channel);
+
+ assertFalse(entry.isOngoing());
+ }
+}
diff --git a/packages/OsuLogin/Android.mk b/packages/OsuLogin/Android.mk
new file mode 100644
index 0000000..f04227b
--- /dev/null
+++ b/packages/OsuLogin/Android.mk
@@ -0,0 +1,14 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+LOCAL_USE_AAPT2 := true
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := OsuLogin
+LOCAL_PRIVATE_PLATFORM_APIS := true
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/packages/OsuLogin/AndroidManifest.xml b/packages/OsuLogin/AndroidManifest.xml
new file mode 100644
index 0000000..bc32d10
--- /dev/null
+++ b/packages/OsuLogin/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.hotspot2">
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <application
+ android:networkSecurityConfig="@xml/network_security_config"
+ android:enabled="true"
+ android:label="@string/app_name"
+ android:configChanges="keyboardHidden|orientation|screenSize"
+ android:supportsRtl="true">
+ <activity android:name="com.android.hotspot2.osu.OsuLoginActivity">
+ <intent-filter>
+ <action android:name="android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/packages/OsuLogin/OWNERS b/packages/OsuLogin/OWNERS
new file mode 100644
index 0000000..aa7c3e6
--- /dev/null
+++ b/packages/OsuLogin/OWNERS
@@ -0,0 +1,2 @@
+satk@google.com
+etancohen@google.com
diff --git a/packages/OsuLogin/res/layout/osu_web_view.xml b/packages/OsuLogin/res/layout/osu_web_view.xml
new file mode 100644
index 0000000..4eafb39
--- /dev/null
+++ b/packages/OsuLogin/res/layout/osu_web_view.xml
@@ -0,0 +1,13 @@
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <WebView
+ android:id="@+id/webview"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true" />
+
+</FrameLayout>
diff --git a/packages/OsuLogin/res/values/dimens.xml b/packages/OsuLogin/res/values/dimens.xml
new file mode 100644
index 0000000..47c8224
--- /dev/null
+++ b/packages/OsuLogin/res/values/dimens.xml
@@ -0,0 +1,5 @@
+<resources>
+ <!-- Default screen margins, per the Android Design guidelines. -->
+ <dimen name="activity_horizontal_margin">16dp</dimen>
+ <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/packages/OsuLogin/res/values/strings.xml b/packages/OsuLogin/res/values/strings.xml
new file mode 100644
index 0000000..9fafeef
--- /dev/null
+++ b/packages/OsuLogin/res/values/strings.xml
@@ -0,0 +1,4 @@
+<resources>
+ <!-- application name [CHAR LIMIT=32] -->
+ <string name="app_name">OsuLogin</string>
+</resources>
diff --git a/packages/OsuLogin/res/values/styles.xml b/packages/OsuLogin/res/values/styles.xml
new file mode 100644
index 0000000..f6c2339
--- /dev/null
+++ b/packages/OsuLogin/res/values/styles.xml
@@ -0,0 +1,19 @@
+<resources>
+
+ <!--
+ Base application theme, dependent on API level. This theme is replaced
+ by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+ -->
+ <style name="AppBaseTheme" parent="@android:style/Theme.DeviceDefault.Settings">
+ <!--
+ Theme customizations available in newer API levels can go in
+ res/values-vXX/styles.xml, while customizations related to
+ backward-compatibility can go here.
+ -->
+ </style>
+
+ <!-- Application theme. -->
+ <style name="AppTheme" parent="AppBaseTheme">
+ <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+ </style>
+</resources>
diff --git a/packages/OsuLogin/res/xml/network_security_config.xml b/packages/OsuLogin/res/xml/network_security_config.xml
new file mode 100644
index 0000000..3ef4b84
--- /dev/null
+++ b/packages/OsuLogin/res/xml/network_security_config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+<base-config cleartextTrafficPermitted="true">
+ <trust-anchors>
+ <certificates src="system" />
+ <certificates src="wfa" />
+ </trust-anchors>
+</base-config>
+</network-security-config>
diff --git a/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java b/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java
new file mode 100644
index 0000000..6a48904
--- /dev/null
+++ b/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java
@@ -0,0 +1,216 @@
+/*
+ * 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.hotspot2.osu;
+
+import android.annotation.Nullable;
+import android.app.Activity;
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkRequest;
+import android.net.wifi.WifiManager;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.webkit.WebResourceError;
+import android.webkit.WebResourceRequest;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+
+import com.android.hotspot2.R;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Online Sign Up Login Web View launched during Provision Process of Hotspot 2.0 rel2.
+ */
+public class OsuLoginActivity extends Activity {
+ private static final String TAG = "OsuLogin";
+ private static final boolean DBG = true;
+
+ private String mUrl;
+ private String mHostName;
+ private Network mNetwork;
+ private ConnectivityManager mCm;
+ private ConnectivityManager.NetworkCallback mNetworkCallback;
+ private WifiManager mWifiManager;
+ private WebView mWebView;
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ if (DBG) {
+ Log.d(TAG, "onCreate: Opening OSU Web View");
+ }
+
+ mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
+ if (mWifiManager == null) {
+ Log.e(TAG, "Cannot get wifi service");
+ finishAndRemoveTask();
+ return;
+ }
+
+ if (getIntent() == null) {
+ Log.e(TAG, "Intent is null");
+ finishAndRemoveTask();
+ return;
+ }
+
+ mNetwork = getIntent().getParcelableExtra(WifiManager.EXTRA_OSU_NETWORK);
+ if (mNetwork == null) {
+ Log.e(TAG, "Cannot get the network instance for OSU from intent");
+ finishAndRemoveTask();
+ return;
+ }
+
+ mUrl = getIntent().getStringExtra(WifiManager.EXTRA_URL);
+ if (mUrl == null) {
+ Log.e(TAG, "Cannot get OSU server url from intent");
+ finishAndRemoveTask();
+ return;
+ }
+
+ mHostName = getHost(mUrl);
+ if (mHostName == null) {
+ Log.e(TAG, "Cannot get host from the url");
+ finishAndRemoveTask();
+ return;
+ }
+
+ mCm = (ConnectivityManager) getApplicationContext().getSystemService(
+ Context.CONNECTIVITY_SERVICE);
+ if (mCm == null) {
+ Log.e(TAG, "Cannot get connectivity service");
+ finishAndRemoveTask();
+ return;
+ }
+
+ if (!mCm.bindProcessToNetwork(mNetwork)) {
+ Log.e(TAG, "Network is no longer valid");
+ finishAndRemoveTask();
+ return;
+ }
+
+ final NetworkCapabilities networkCapabilities = mCm.getNetworkCapabilities(mNetwork);
+ if (networkCapabilities == null || !networkCapabilities.hasTransport(
+ NetworkCapabilities.TRANSPORT_WIFI)) {
+ Log.e(TAG, "WiFi is not supported for the Network");
+ finishAndRemoveTask();
+ return;
+ }
+
+ getActionBar().setDisplayShowHomeEnabled(false);
+ setContentView(R.layout.osu_web_view);
+
+ // Exit this app if network disappeared.
+ mNetworkCallback = new ConnectivityManager.NetworkCallback() {
+ @Override
+ public void onLost(Network network) {
+ if (DBG) {
+ Log.d(TAG, "Lost for the current Network, close the browser");
+ }
+ if (mNetwork.equals(network)) {
+ finishAndRemoveTask();
+ }
+ }
+ };
+
+ mCm.registerNetworkCallback(
+ new NetworkRequest.Builder().addTransportType(
+ NetworkCapabilities.TRANSPORT_WIFI).build(),
+ mNetworkCallback);
+
+ mWebView = findViewById(R.id.webview);
+ mWebView.clearCache(true);
+ WebSettings webSettings = mWebView.getSettings();
+ webSettings.setJavaScriptEnabled(true);
+ webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
+ webSettings.setUseWideViewPort(true);
+ webSettings.setLoadWithOverviewMode(true);
+ webSettings.setSupportZoom(true);
+ webSettings.setBuiltInZoomControls(true);
+ webSettings.setDisplayZoomControls(false);
+
+ mWebView.setWebViewClient(new OsuWebViewClient());
+ if (DBG) {
+ Log.d(TAG, "OSU Web View to " + mUrl);
+ }
+ mWebView.loadUrl(mUrl);
+ }
+
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ // Check if the key event was the Back button.
+ if ((keyCode == KeyEvent.KEYCODE_BACK)) {
+ // If there is a history to move back
+ if (mWebView.canGoBack()){
+ mWebView.goBack();
+ return true;
+ }
+
+ // In case of back key, it needs to disconnect current connection with OSU AP to
+ // abort current Provisioning flow.
+ if (mWifiManager != null) {
+ mWifiManager.disconnect();
+ }
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ @Override
+ protected void onDestroy() {
+ if (mNetworkCallback != null) {
+ mCm.unregisterNetworkCallback(mNetworkCallback);
+ }
+ super.onDestroy();
+ }
+
+ private String getHost(String url) {
+ try {
+ return new URL(url).getHost();
+ } catch (MalformedURLException e) {
+ Log.e(TAG, "Invalid URL " + url);
+ }
+ return null;
+ }
+
+ private class OsuWebViewClient extends WebViewClient {
+ boolean mPageError = false;
+
+ @Override
+ public void onPageFinished(WebView view, String url) {
+ // Do not show the page error on UI.
+ if (mPageError) {
+ finishAndRemoveTask();
+ }
+ }
+
+ @Override
+ public void onReceivedError(WebView view, WebResourceRequest request,
+ WebResourceError error) {
+ if (request.isForMainFrame()) {
+ // This happens right after getting HTTP redirect response from an OSU server
+ // since no more Http request is allowed to send to the OSU server.
+ mPageError = true;
+ Log.e(TAG, "onReceived Error for MainFrame: " + error.getErrorCode());
+ }
+ }
+ }
+}
diff --git a/packages/PackageInstaller/AndroidManifest.xml b/packages/PackageInstaller/AndroidManifest.xml
index 513c862..2be9311 100644
--- a/packages/PackageInstaller/AndroidManifest.xml
+++ b/packages/PackageInstaller/AndroidManifest.xml
@@ -19,7 +19,7 @@
android:label="@string/app_name"
android:icon="@drawable/ic_app_icon"
android:allowBackup="false"
- android:theme="@style/DialogWhenLarge"
+ android:theme="@style/Theme.AlertDialogActivity"
android:supportsRtl="true"
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true">
@@ -32,6 +32,7 @@
</receiver>
<activity android:name=".InstallStart"
+ android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="true"
android:excludeFromRecents="true">
<intent-filter android:priority="1">
@@ -59,13 +60,14 @@
android:exported="false" />
<activity android:name=".DeleteStagedFileOnResult"
+ android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false" />
<activity android:name=".PackageInstallerActivity"
android:exported="false" />
<activity android:name=".InstallInstalling"
- android:theme="@style/DialogWhenLargeNoAnimation"
+ android:theme="@style/Theme.AlertDialogActivity.NoAnimation"
android:exported="false" />
<receiver android:name=".InstallEventReceiver"
@@ -77,18 +79,17 @@
</receiver>
<activity android:name=".InstallSuccess"
- android:theme="@style/DialogWhenLargeNoAnimation"
+ android:theme="@style/Theme.AlertDialogActivity.NoAnimation"
android:exported="false" />
<activity android:name=".InstallFailed"
- android:theme="@style/DialogWhenLargeNoAnimation"
+ android:theme="@style/Theme.AlertDialogActivity.NoAnimation"
android:exported="false" />
<activity android:name=".UninstallerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:excludeFromRecents="true"
- android:noHistory="true"
- android:theme="@style/AlertDialogActivity">
+ android:noHistory="true">
<intent-filter android:priority="1">
<action android:name="android.intent.action.DELETE" />
<action android:name="android.intent.action.UNINSTALL_PACKAGE" />
@@ -107,7 +108,6 @@
<activity android:name=".UninstallUninstalling"
android:excludeFromRecents="true"
- android:theme="@style/AlertDialogActivity"
android:exported="false" />
<receiver android:name=".UninstallFinish"
diff --git a/packages/PackageInstaller/res/layout/install_confirm.xml b/packages/PackageInstaller/res/layout/install_confirm.xml
deleted file mode 100644
index 6be46fc..0000000
--- a/packages/PackageInstaller/res/layout/install_confirm.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 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.
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <LinearLayout android:id="@+id/app_snippet"
- android:background="?android:attr/colorPrimary"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:orientation="horizontal"
- android:elevation="@dimen/headerElevation"
- android:gravity="center_vertical">
-
- <ImageView android:id="@+id/app_icon"
- android:layout_marginStart="16dp"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:scaleType="fitCenter"
- android:src="@drawable/ic_file_download" />
-
- <TextView android:id="@+id/app_name"
- android:layout_marginStart="32dp"
- android:layout_marginEnd="16dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/titleTextStyle"
- android:singleLine="true"
- android:text="@string/app_name_unknown"
- android:ellipsize="end" />
-
- </LinearLayout>
-
- <ScrollView android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:padding="16dip">
-
- <TextView android:id="@+id/install_confirm_question"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </ScrollView>
-
- <LinearLayout style="?android:attr/buttonBarStyle"
- android:background="?android:attr/colorBackground"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:padding="8dp"
- android:measureWithLargestChild="true">
-
- <!-- spacer to push buttons to the right -->
- <View android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <Button android:id="@+id/cancel_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/cancel"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button android:id="@+id/ok_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/install"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/packages/PackageInstaller/res/layout/install_content_view.xml b/packages/PackageInstaller/res/layout/install_content_view.xml
new file mode 100644
index 0000000..5e94a29
--- /dev/null
+++ b/packages/PackageInstaller/res/layout/install_content_view.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+ -->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:theme="?android:attr/alertDialogTheme"
+ android:paddingTop="8dp"
+ android:paddingLeft="?android:attr/dialogPreferredPadding"
+ android:paddingRight="?android:attr/dialogPreferredPadding">
+
+ <LinearLayout
+ android:id="@+id/staging"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="invisible">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/message_staging" />
+
+ <ProgressBar
+ android:id="@+id/progress_indeterminate"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:indeterminate="true" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/installing"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="invisible">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/installing" />
+
+ <ProgressBar
+ android:id="@+id/progress"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ style="?android:attr/progressBarStyleHorizontal" />
+
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/install_confirm_question"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_confirm_question"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_confirm_question_update"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_confirm_question_update"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_confirm_question_update_system"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_confirm_question_update_system"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_success"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_done"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_failed"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_failed"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_failed_blocked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_failed_blocked"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_failed_conflict"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_failed_conflict"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_failed_incompatible"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_failed_incompatible"
+ android:visibility="invisible" />
+
+ <TextView
+ android:id="@+id/install_failed_invalid_apk"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:text="@string/install_failed_invalid_apk"
+ android:visibility="invisible" />
+
+</FrameLayout>
diff --git a/packages/PackageInstaller/res/layout/install_failed.xml b/packages/PackageInstaller/res/layout/install_failed.xml
deleted file mode 100644
index d000ee9..0000000
--- a/packages/PackageInstaller/res/layout/install_failed.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 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.
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <LinearLayout android:id="@+id/app_snippet"
- android:background="?android:attr/colorPrimary"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:orientation="horizontal"
- android:elevation="@dimen/headerElevation"
- android:gravity="center_vertical">
-
- <ImageView android:id="@+id/app_icon"
- android:layout_marginStart="16dp"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:scaleType="fitCenter" />
-
- <TextView android:id="@+id/app_name"
- android:layout_marginStart="32dp"
- android:layout_marginEnd="16dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/titleTextStyle"
- android:singleLine="true"
- android:ellipsize="end" />
-
- </LinearLayout>
-
- <LinearLayout android:id="@+id/simple_status_view"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:orientation="vertical"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
-
- <ImageView android:id="@+id/center_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
- android:src="@drawable/ic_report_problem_92"
- android:tint="@color/bigIconColor"
- android:contentDescription="@null" />
-
- <TextView android:id="@+id/simple_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </LinearLayout>
-
- <LinearLayout android:id="@+id/buttons_panel"
- style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:measureWithLargestChild="true"
- android:padding="8dip">
-
- <!-- spacer to push button to the right -->
- <View android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <Button android:id="@+id/done_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/done"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- </LinearLayout>
-
-</LinearLayout>
-
-
diff --git a/packages/PackageInstaller/res/layout/install_installing.xml b/packages/PackageInstaller/res/layout/install_installing.xml
deleted file mode 100644
index a043a01..0000000
--- a/packages/PackageInstaller/res/layout/install_installing.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- Copyright (C) 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <LinearLayout android:id="@+id/app_snippet"
- android:background="?android:attr/colorPrimary"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:orientation="horizontal"
- android:elevation="@dimen/headerElevation"
- android:gravity="center_vertical">
-
- <ImageView
- android:id="@+id/app_icon"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_marginStart="16dp"
- android:scaleType="fitCenter" />
-
- <TextView
- android:id="@+id/app_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="32dp"
- android:layout_marginEnd="16dp"
- android:ellipsize="end"
- android:singleLine="true"
- android:textAppearance="?android:attr/titleTextStyle" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:orientation="vertical"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
-
- <ImageView
- android:layout_width="92dp"
- android:layout_height="92dp"
- android:layout_marginBottom="12dp"
- android:contentDescription="@null"
- android:tint="@color/bigIconColor"
- android:src="@drawable/ic_file_download" />
-
- <ProgressBar
- android:id="@+id/progress_bar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="250dp"
- android:layout_height="wrap_content"
- android:indeterminate="false" />
-
- <TextView
- android:id="@+id/center_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:text="@string/installing"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/buttons_panel"
- style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:measureWithLargestChild="true"
- android:orientation="horizontal"
- android:padding="8dip">
-
- <View
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <Button
- android:id="@+id/cancel_button"
- style="?android:attr/buttonBarButtonStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:maxLines="2"
- android:text="@string/cancel" />
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/packages/PackageInstaller/res/layout/install_staging.xml b/packages/PackageInstaller/res/layout/install_staging.xml
deleted file mode 100644
index e3022e7..0000000
--- a/packages/PackageInstaller/res/layout/install_staging.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 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.
- -->
-
-<!--
- Defines the layout of the splash screen that displays the security
- settings required for an application and requests the confirmation of the
- user before it is installed.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <!-- title bar -->
- <LinearLayout android:id="@+id/app_snippet"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:background="?android:attr/colorPrimary"
- android:elevation="@dimen/headerElevation"
- android:gravity="center_vertical"
- android:orientation="horizontal">
-
- <ImageView android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_marginLeft="16dp"
- android:scaleType="fitCenter"
- android:src="@drawable/ic_file_download"
- android:tint="?android:attr/colorAccent" />
-
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="32dp"
- android:layout_marginRight="16dp"
- android:ellipsize="end"
- android:singleLine="true"
- android:text="@string/app_name_unknown"
- android:textAppearance="?android:attr/titleTextStyle" />
-
- </LinearLayout>
-
- <!-- content -->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:orientation="vertical"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
-
- <ImageView
- android:layout_width="92dp"
- android:layout_height="92dp"
- android:scaleType="fitCenter"
- android:layout_marginBottom="12dp"
- android:contentDescription="@null"
- android:tint="@color/bigIconColor"
- android:src="@drawable/ic_file_download" />
-
- <ProgressBar
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="250dp"
- android:layout_height="wrap_content"
- android:indeterminate="true" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:text="@string/message_staging"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </LinearLayout>
-
- <!-- Bottom buttons -->
- <LinearLayout style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:padding="8dp">
-
- <!-- spacer to push button to the right -->
- <View android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <Button android:id="@+id/cancel_button"
- style="?android:attr/buttonBarButtonStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:maxLines="2"
- android:text="@string/cancel" />
-
- </LinearLayout>
-
-</LinearLayout>
-
-
diff --git a/packages/PackageInstaller/res/layout/install_success.xml b/packages/PackageInstaller/res/layout/install_success.xml
deleted file mode 100644
index fee6bed..0000000
--- a/packages/PackageInstaller/res/layout/install_success.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 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.
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <LinearLayout android:id="@+id/app_snippet"
- android:background="?android:attr/colorPrimary"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:orientation="horizontal"
- android:elevation="@dimen/headerElevation"
- android:gravity="center_vertical">
-
- <ImageView android:id="@+id/app_icon"
- android:layout_marginStart="16dp"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:scaleType="fitCenter" />
-
- <TextView android:id="@+id/app_name"
- android:layout_marginStart="32dp"
- android:layout_marginEnd="16dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/titleTextStyle"
- android:singleLine="true"
- android:ellipsize="end" />
-
- </LinearLayout>
-
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="center"
- android:orientation="vertical"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
-
- <ImageView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
- android:src="@drawable/ic_done_92"
- android:tint="@color/bigIconColor"
- android:contentDescription="@null" />
-
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:text="@string/install_done"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </LinearLayout>
-
- <LinearLayout style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:measureWithLargestChild="true"
- android:padding="8dip">
-
- <!-- spacer to push buttons to the right -->
- <View android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <Button android:id="@+id/done_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/done"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button android:id="@+id/launch_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/launch"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- </LinearLayout>
-
-</LinearLayout>
-
-
diff --git a/packages/PackageInstaller/res/values-night/themes.xml b/packages/PackageInstaller/res/values-night/themes.xml
new file mode 100644
index 0000000..483b0cf
--- /dev/null
+++ b/packages/PackageInstaller/res/values-night/themes.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+ -->
+
+<resources>
+
+ <style name="Theme.AlertDialogActivity"
+ parent="@android:style/Theme.DeviceDefault.Dialog.Alert" />
+
+</resources>
diff --git a/packages/PackageInstaller/res/values/strings.xml b/packages/PackageInstaller/res/values/strings.xml
index 6c7160f..ba81278 100644
--- a/packages/PackageInstaller/res/values/strings.xml
+++ b/packages/PackageInstaller/res/values/strings.xml
@@ -36,11 +36,11 @@
<!-- Message for updating an existing app [CHAR LIMIT=NONE] -->
<string name="install_confirm_question_update">Do you want to install an update
to this existing application? Your existing data will not
- be lost. The updated application will get access to:</string>
+ be lost.</string>
<!-- Message for updating an existing system app [CHAR LIMIT=NONE] -->
<string name="install_confirm_question_update_system">Do you want to install an update
to this built-in application? Your existing data will not
- be lost. The updated application will get access to:</string>
+ be lost.</string>
<!-- [CHAR LIMIT=100] -->
<string name="install_failed">App not installed.</string>
<!-- Reason displayed when installation fails because the package was blocked
diff --git a/packages/PackageInstaller/res/values/styles.xml b/packages/PackageInstaller/res/values/styles.xml
deleted file mode 100755
index f79f98f..0000000
--- a/packages/PackageInstaller/res/values/styles.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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>
-
- <style name="MediumText"
- parent="@android:style/TextAppearance.Medium">
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- </style>
-
- <style name="SmallText"
- parent="@android:style/TextAppearance.Small">
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- </style>
-
- <style name="TitleText">
- <item name="android:fontFamily">sans-serif-medium</item>
- <item name="android:textSize">20dp</item>
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- </style>
-
- <style name="ActionBar" parent="@android:style/Widget.Material.ActionBar.Solid">
- <item name="android:contentInsetStart">72dp</item>
- </style>
-
-</resources>
diff --git a/packages/PackageInstaller/res/values/themes.xml b/packages/PackageInstaller/res/values/themes.xml
index 6df6246..6c8e4c5 100644
--- a/packages/PackageInstaller/res/values/themes.xml
+++ b/packages/PackageInstaller/res/values/themes.xml
@@ -17,25 +17,11 @@
<resources>
- <style name="DialogWhenLarge"
- parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
- <item name="android:textAppearanceMedium">@style/MediumText</item>
- <item name="android:textAppearanceSmall">@style/SmallText</item>
- <item name="android:titleTextStyle">@style/TitleText</item>
- </style>
-
- <style name="DialogWhenLargeNoAnimation" parent="DialogWhenLarge">
+ <style name="Theme.AlertDialogActivity.NoAnimation">
<item name="android:windowAnimationStyle">@null</item>
</style>
- <style name="AlertDialogActivity"
- parent="@android:style/Theme.DeviceDefault.Light.Panel">
- <item name="android:backgroundDimEnabled">true</item>
- </style>
-
- <style name="Header.Settings"
- parent="@android:style/Theme.DeviceDefault.Settings">
- </style>
-
+ <style name="Theme.AlertDialogActivity"
+ parent="@android:style/Theme.DeviceDefault.Light.Dialog.Alert" />
</resources>
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java
index 5ba2d32..54105bb 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java
@@ -30,41 +30,49 @@
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
-import android.widget.TextView;
+import android.view.View;
+
+import com.android.internal.app.AlertActivity;
import java.io.File;
/**
* Installation failed: Return status code to the caller or display failure UI to user
*/
-public class InstallFailed extends Activity {
+public class InstallFailed extends AlertActivity {
private static final String LOG_TAG = InstallFailed.class.getSimpleName();
/** Label of the app that failed to install */
private CharSequence mLabel;
/**
- * Convert an package installer status code into the user friendly label.
+ * Unhide the appropriate label for the statusCode.
*
* @param statusCode The status code from the package installer.
- *
- * @return The user friendly label for the status code
*/
- private int getExplanationFromErrorCode(int statusCode) {
+ private void setExplanationFromErrorCode(int statusCode) {
Log.d(LOG_TAG, "Installation status code: " + statusCode);
+ View viewToEnable;
switch (statusCode) {
case PackageInstaller.STATUS_FAILURE_BLOCKED:
- return R.string.install_failed_blocked;
+ viewToEnable = requireViewById(R.id.install_failed_blocked);
+ break;
case PackageInstaller.STATUS_FAILURE_CONFLICT:
- return R.string.install_failed_conflict;
+ viewToEnable = requireViewById(R.id.install_failed_conflict);
+ break;
case PackageInstaller.STATUS_FAILURE_INCOMPATIBLE:
- return R.string.install_failed_incompatible;
+ viewToEnable = requireViewById(R.id.install_failed_incompatible);
+ break;
case PackageInstaller.STATUS_FAILURE_INVALID:
- return R.string.install_failed_invalid_apk;
+ viewToEnable = requireViewById(R.id.install_failed_invalid_apk);
+ break;
default:
- return R.string.install_failed;
+ viewToEnable = requireViewById(R.id.install_failed);
+ break;
}
+
+ viewToEnable.setVisibility(View.VISIBLE);
}
@Override
@@ -89,8 +97,6 @@
.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO);
Uri packageURI = intent.getData();
- setContentView(R.layout.install_failed);
-
// Set header icon and title
PackageUtil.AppSnippet as;
PackageManager pm = getPackageManager();
@@ -106,7 +112,12 @@
// Store label for dialog
mLabel = as.label;
- PackageUtil.initSnippetForNewApp(this, as, R.id.app_snippet);
+ mAlert.setIcon(as.icon);
+ mAlert.setTitle(as.label);
+ mAlert.setView(R.layout.install_content_view);
+ mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.done),
+ (ignored, ignored2) -> finish(), null);
+ setupAlert();
// Show out of space dialog if needed
if (statusCode == PackageInstaller.STATUS_FAILURE_STORAGE) {
@@ -114,11 +125,7 @@
}
// Get status messages
- ((TextView) findViewById(R.id.simple_status)).setText(
- getExplanationFromErrorCode(statusCode));
-
- // Set up "done" button
- findViewById(R.id.done_button).setOnClickListener(view -> finish());
+ setExplanationFromErrorCode(statusCode);
}
}
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
index c2dd740..deb6163 100755
--- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
@@ -19,8 +19,8 @@
import static android.content.pm.PackageInstaller.SessionParams.UID_UNKNOWN;
import android.annotation.Nullable;
-import android.app.Activity;
import android.app.PendingIntent;
+import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInstaller;
@@ -30,9 +30,11 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
+import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
+import com.android.internal.app.AlertActivity;
import com.android.internal.content.PackageHelper;
import java.io.File;
@@ -47,7 +49,7 @@
* <p>This has two phases: First send the data to the package manager, then wait until the package
* manager processed the result.</p>
*/
-public class InstallInstalling extends Activity {
+public class InstallInstalling extends AlertActivity {
private static final String LOG_TAG = InstallInstalling.class.getSimpleName();
private static final String SESSION_ID = "com.android.packageinstaller.SESSION_ID";
@@ -78,11 +80,31 @@
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.install_installing);
-
ApplicationInfo appInfo = getIntent()
.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO);
mPackageURI = getIntent().getData();
+ final File sourceFile = new File(mPackageURI.getPath());
+ PackageUtil.AppSnippet as = PackageUtil.getAppSnippet(this, appInfo, sourceFile);
+
+ mAlert.setIcon(as.icon);
+ mAlert.setTitle(as.label);
+ mAlert.setView(R.layout.install_content_view);
+ mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel),
+ (ignored, ignored2) -> {
+ if (mInstallingTask != null) {
+ mInstallingTask.cancel(true);
+ }
+
+ if (mSessionId > 0) {
+ getPackageManager().getPackageInstaller().abandonSession(mSessionId);
+ mSessionId = 0;
+ }
+
+ setResult(RESULT_CANCELED);
+ finish();
+ }, null);
+ setupAlert();
+ requireViewById(R.id.installing).setVisibility(View.VISIBLE);
if ("package".equals(mPackageURI.getScheme())) {
try {
@@ -92,10 +114,6 @@
launchFailure(PackageManager.INSTALL_FAILED_INTERNAL_ERROR, null);
}
} else {
- final File sourceFile = new File(mPackageURI.getPath());
- PackageUtil.initSnippetForNewApp(this, PackageUtil.getAppSnippet(this, appInfo,
- sourceFile), R.id.app_snippet);
-
if (savedInstanceState != null) {
mSessionId = savedInstanceState.getInt(SESSION_ID);
mInstallId = savedInstanceState.getInt(INSTALL_ID);
@@ -153,21 +171,7 @@
}
}
- mCancelButton = (Button) findViewById(R.id.cancel_button);
-
- mCancelButton.setOnClickListener(view -> {
- if (mInstallingTask != null) {
- mInstallingTask.cancel(true);
- }
-
- if (mSessionId > 0) {
- getPackageManager().getPackageInstaller().abandonSession(mSessionId);
- mSessionId = 0;
- }
-
- setResult(RESULT_CANCELED);
- finish();
- });
+ mCancelButton = mAlert.getButton(DialogInterface.BUTTON_NEGATIVE);
mSessionCallback = new InstallSessionCallback();
}
@@ -307,7 +311,7 @@
@Override
public void onProgressChanged(int sessionId, float progress) {
if (sessionId == mSessionId) {
- ProgressBar progressBar = (ProgressBar)findViewById(R.id.progress_bar);
+ ProgressBar progressBar = requireViewById(R.id.progress);
progressBar.setMax(Integer.MAX_VALUE);
progressBar.setProgress((int) (Integer.MAX_VALUE * progress));
}
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
index 1bc9dbd..98438cd 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java
@@ -29,6 +29,9 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
+import android.view.View;
+
+import com.android.internal.app.AlertActivity;
import java.io.File;
import java.io.FileOutputStream;
@@ -40,7 +43,7 @@
* If a package gets installed from an content URI this step loads the package and turns it into
* and installation from a file. Then it re-starts the installation as usual.
*/
-public class InstallStaging extends Activity {
+public class InstallStaging extends AlertActivity {
private static final String LOG_TAG = InstallStaging.class.getSimpleName();
private static final String STAGED_FILE = "STAGED_FILE";
@@ -55,7 +58,19 @@
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.install_staging);
+ mAlert.setIcon(R.drawable.ic_file_download);
+ mAlert.setTitle(getString(R.string.app_name_unknown));
+ mAlert.setView(R.layout.install_content_view);
+ mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel),
+ (ignored, ignored2) -> {
+ if (mStagingTask != null) {
+ mStagingTask.cancel(true);
+ }
+ setResult(RESULT_CANCELED);
+ finish();
+ }, null);
+ setupAlert();
+ requireViewById(R.id.staging).setVisibility(View.VISIBLE);
if (savedInstanceState != null) {
mStagedFile = new File(savedInstanceState.getString(STAGED_FILE));
@@ -64,14 +79,6 @@
mStagedFile = null;
}
}
-
- findViewById(R.id.cancel_button).setOnClickListener(view -> {
- if (mStagingTask != null) {
- mStagingTask.cancel(true);
- }
- setResult(RESULT_CANCELED);
- finish();
- });
}
@Override
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java
index 94f6b31..705d3f4 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java
@@ -19,6 +19,7 @@
import android.annotation.Nullable;
import android.app.Activity;
import android.content.ActivityNotFoundException;
+import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
@@ -26,15 +27,18 @@
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
+import android.view.View;
import android.widget.Button;
+import com.android.internal.app.AlertActivity;
+
import java.io.File;
import java.util.List;
/**
* Finish installation: Return status code to the caller or display "success" UI to user
*/
-public class InstallSuccess extends Activity {
+public class InstallSuccess extends AlertActivity {
private static final String LOG_TAG = InstallSuccess.class.getSimpleName();
@Override
@@ -53,8 +57,6 @@
intent.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO);
Uri packageURI = intent.getData();
- setContentView(R.layout.install_success);
-
// Set header icon and title
PackageUtil.AppSnippet as;
PackageManager pm = getPackageManager();
@@ -67,16 +69,20 @@
as = PackageUtil.getAppSnippet(this, appInfo, sourceFile);
}
- PackageUtil.initSnippetForNewApp(this, as, R.id.app_snippet);
-
- // Set up "done" button
- findViewById(R.id.done_button).setOnClickListener(view -> {
- if (appInfo.packageName != null) {
- Log.i(LOG_TAG, "Finished installing " + appInfo.packageName);
- }
- finish();
- });
-
+ mAlert.setIcon(as.icon);
+ mAlert.setTitle(as.label);
+ mAlert.setView(R.layout.install_content_view);
+ mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.launch), null,
+ null);
+ mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.done),
+ (ignored, ignored2) -> {
+ if (appInfo.packageName != null) {
+ Log.i(LOG_TAG, "Finished installing " + appInfo.packageName);
+ }
+ finish();
+ }, null);
+ setupAlert();
+ requireViewById(R.id.install_success).setVisibility(View.VISIBLE);
// Enable or disable "launch" button
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(
appInfo.packageName);
@@ -89,7 +95,7 @@
}
}
- Button launchButton = (Button)findViewById(R.id.launch_button);
+ Button launchButton = mAlert.getButton(DialogInterface.BUTTON_POSITIVE);
if (enabled) {
launchButton.setOnClickListener(view -> {
try {
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/OverlayTouchActivity.java b/packages/PackageInstaller/src/com/android/packageinstaller/OverlayTouchActivity.java
deleted file mode 100644
index 1fdbd97..0000000
--- a/packages/PackageInstaller/src/com/android/packageinstaller/OverlayTouchActivity.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.packageinstaller;
-
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-class OverlayTouchActivity extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
- super.onCreate(savedInstanceState);
- }
-}
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java
index 97bafe7..580308a 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -16,6 +16,8 @@
*/
package com.android.packageinstaller;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+
import android.Manifest;
import android.annotation.NonNull;
import android.annotation.StringRes;
@@ -45,9 +47,9 @@
import android.provider.Settings;
import android.util.Log;
import android.view.View;
-import android.view.View.OnClickListener;
import android.widget.Button;
-import android.widget.TextView;
+
+import com.android.internal.app.AlertActivity;
import java.io.File;
@@ -61,7 +63,7 @@
* Based on the user response the package is then installed by launching InstallAppConfirm
* sub activity. All state transitions are handled in this activity
*/
-public class PackageInstallerActivity extends OverlayTouchActivity implements OnClickListener {
+public class PackageInstallerActivity extends AlertActivity {
private static final String TAG = "PackageInstaller";
private static final int REQUEST_TRUST_EXTERNAL_SOURCE = 1;
@@ -95,7 +97,6 @@
// Buttons to indicate user acceptance
private Button mOk;
- private Button mCancel;
private PackageUtil.AppSnippet mAppSnippet;
@@ -119,18 +120,18 @@
private boolean mEnableOk = false;
private void startInstallConfirm() {
- int msg;
+ View viewToEnable;
if (mAppInfo != null) {
- msg = (mAppInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0
- ? R.string.install_confirm_question_update_system
- : R.string.install_confirm_question_update;
+ viewToEnable = (mAppInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0
+ ? requireViewById(R.id.install_confirm_question_update_system)
+ : requireViewById(R.id.install_confirm_question_update);
} else {
// This is a new application with no permissions.
- msg = R.string.install_confirm_question;
+ viewToEnable = requireViewById(R.id.install_confirm_question);
}
- ((TextView) findViewById(R.id.install_confirm_question)).setText(msg);
+ viewToEnable.setVisibility(View.VISIBLE);
mEnableOk = true;
mOk.setEnabled(true);
@@ -280,6 +281,8 @@
@Override
protected void onCreate(Bundle icicle) {
+ getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+
super.onCreate(null);
if (icicle != null) {
@@ -344,7 +347,7 @@
// load dummy layout with OK button disabled until we override this layout in
// startInstallConfirm
- bindUi(R.layout.install_confirm);
+ bindUi();
checkIfAllowedAndInitiateInstall();
}
@@ -374,17 +377,34 @@
outState.putBoolean(ALLOW_UNKNOWN_SOURCES_KEY, mAllowUnknownSources);
}
- private void bindUi(int layout) {
- setContentView(layout);
+ private void bindUi() {
+ mAlert.setIcon(mAppSnippet.icon);
+ mAlert.setTitle(mAppSnippet.label);
+ mAlert.setView(R.layout.install_content_view);
+ mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.install),
+ (ignored, ignored2) -> {
+ if (mOk.isEnabled()) {
+ if (mSessionId != -1) {
+ mInstaller.setPermissionsResult(mSessionId, true);
+ finish();
+ } else {
+ startInstall();
+ }
+ }
+ }, null);
+ mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel),
+ (ignored, ignored2) -> {
+ // Cancel and finish
+ setResult(RESULT_CANCELED);
+ if (mSessionId != -1) {
+ mInstaller.setPermissionsResult(mSessionId, false);
+ }
+ finish();
+ }, null);
+ setupAlert();
- mOk = (Button) findViewById(R.id.ok_button);
- mCancel = (Button)findViewById(R.id.cancel_button);
- mOk.setOnClickListener(this);
- mCancel.setOnClickListener(this);
-
+ mOk = mAlert.getButton(DialogInterface.BUTTON_POSITIVE);
mOk.setEnabled(false);
-
- PackageUtil.initSnippetForNewApp(this, mAppSnippet, R.id.app_snippet);
}
/**
@@ -525,26 +545,6 @@
super.onBackPressed();
}
- public void onClick(View v) {
- if (v == mOk) {
- if (mOk.isEnabled()) {
- if (mSessionId != -1) {
- mInstaller.setPermissionsResult(mSessionId, true);
- finish();
- } else {
- startInstall();
- }
- }
- } else if (v == mCancel) {
- // Cancel and finish
- setResult(RESULT_CANCELED);
- if (mSessionId != -1) {
- mInstaller.setPermissionsResult(mSessionId, false);
- }
- finish();
- }
- }
-
private void startInstall() {
// Start subactivity to actually install the application
Intent newIntent = new Intent();
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/PackageUtil.java b/packages/PackageInstaller/src/com/android/packageinstaller/PackageUtil.java
index ba4bf8a..0e89f56 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/PackageUtil.java
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/PackageUtil.java
@@ -108,26 +108,6 @@
icon);
}
- /**
- * Utility method to display application snippet of a new package.
- * The content view should have been set on context before invoking this method.
- * appSnippet view should include R.id.app_icon and R.id.app_name
- * defined on it.
- *
- * @param pContext context of package that can load the resources
- * @param as The resources to be loaded
- * @param snippetId view id of app snippet view
- */
- @NonNull public static View initSnippetForNewApp(@NonNull Activity pContext,
- @NonNull AppSnippet as, int snippetId) {
- View appSnippet = pContext.findViewById(snippetId);
- if (as.icon != null) {
- ((ImageView) appSnippet.findViewById(R.id.app_icon)).setImageDrawable(as.icon);
- }
- ((TextView)appSnippet.findViewById(R.id.app_name)).setText(as.label);
- return appSnippet;
- }
-
static public class AppSnippet {
@NonNull public CharSequence label;
@Nullable public Drawable icon;
diff --git a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java
index ef93d4a..3cfb865 100644
--- a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java
+++ b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/RemotePrintServicePlugin.java
@@ -19,7 +19,8 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
-import androidx.core.util.Preconditions;
+
+import com.android.printservice.recommendation.util.Preconditions;
import java.net.InetAddress;
import java.util.Collections;
diff --git a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java
index 5d735a8..dece2d4 100644
--- a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java
+++ b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mdnsFilter/VendorConfig.java
@@ -22,9 +22,9 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.core.util.Preconditions;
import com.android.printservice.recommendation.R;
+import com.android.printservice.recommendation.util.Preconditions;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/MDNSFilteredDiscovery.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/MDNSFilteredDiscovery.java
index 65cef94..a6d59cb 100644
--- a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/MDNSFilteredDiscovery.java
+++ b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/MDNSFilteredDiscovery.java
@@ -24,7 +24,6 @@
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.core.util.Preconditions;
import com.android.printservice.recommendation.PrintServicePlugin;
diff --git a/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/Preconditions.java b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/Preconditions.java
new file mode 100644
index 0000000..9bba66c
--- /dev/null
+++ b/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/Preconditions.java
@@ -0,0 +1,532 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.printservice.recommendation.util;
+
+import android.text.TextUtils;
+
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+
+import java.util.Collection;
+
+/**
+ * Simple static methods to be called at the start of your own methods to verify
+ * correct arguments and state.
+ */
+public class Preconditions {
+
+ public static void checkArgument(boolean expression) {
+ if (!expression) {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ /**
+ * Ensures that an expression checking an argument is true.
+ *
+ * @param expression the expression to check
+ * @param errorMessage the exception message to use if the check fails; will
+ * be converted to a string using {@link String#valueOf(Object)}
+ * @throws IllegalArgumentException if {@code expression} is false
+ */
+ public static void checkArgument(boolean expression, final Object errorMessage) {
+ if (!expression) {
+ throw new IllegalArgumentException(String.valueOf(errorMessage));
+ }
+ }
+
+ /**
+ * Ensures that an expression checking an argument is true.
+ *
+ * @param expression the expression to check
+ * @param messageTemplate a printf-style message template to use if the check fails; will
+ * be converted to a string using {@link String#format(String, Object...)}
+ * @param messageArgs arguments for {@code messageTemplate}
+ * @throws IllegalArgumentException if {@code expression} is false
+ */
+ public static void checkArgument(boolean expression,
+ final String messageTemplate,
+ final Object... messageArgs) {
+ if (!expression) {
+ throw new IllegalArgumentException(String.format(messageTemplate, messageArgs));
+ }
+ }
+
+ /**
+ * Ensures that an string reference passed as a parameter to the calling
+ * method is not empty.
+ *
+ * @param string an string reference
+ * @return the string reference that was validated
+ * @throws IllegalArgumentException if {@code string} is empty
+ */
+ public static @NonNull <T extends CharSequence> T checkStringNotEmpty(final T string) {
+ if (TextUtils.isEmpty(string)) {
+ throw new IllegalArgumentException();
+ }
+ return string;
+ }
+
+ /**
+ * Ensures that an string reference passed as a parameter to the calling
+ * method is not empty.
+ *
+ * @param string an string reference
+ * @param errorMessage the exception message to use if the check fails; will
+ * be converted to a string using {@link String#valueOf(Object)}
+ * @return the string reference that was validated
+ * @throws IllegalArgumentException if {@code string} is empty
+ */
+ public static @NonNull <T extends CharSequence> T checkStringNotEmpty(final T string,
+ final Object errorMessage) {
+ if (TextUtils.isEmpty(string)) {
+ throw new IllegalArgumentException(String.valueOf(errorMessage));
+ }
+ return string;
+ }
+
+ /**
+ * Ensures that an object reference passed as a parameter to the calling
+ * method is not null.
+ *
+ * @param reference an object reference
+ * @return the non-null reference that was validated
+ * @throws NullPointerException if {@code reference} is null
+ */
+ public static @NonNull <T> T checkNotNull(final T reference) {
+ if (reference == null) {
+ throw new NullPointerException();
+ }
+ return reference;
+ }
+
+ /**
+ * Ensures that an object reference passed as a parameter to the calling
+ * method is not null.
+ *
+ * @param reference an object reference
+ * @param errorMessage the exception message to use if the check fails; will
+ * be converted to a string using {@link String#valueOf(Object)}
+ * @return the non-null reference that was validated
+ * @throws NullPointerException if {@code reference} is null
+ */
+ public static @NonNull <T> T checkNotNull(final T reference, final Object errorMessage) {
+ if (reference == null) {
+ throw new NullPointerException(String.valueOf(errorMessage));
+ }
+ return reference;
+ }
+
+ /**
+ * Ensures that an object reference passed as a parameter to the calling
+ * method is not null.
+ *
+ * @param reference an object reference
+ * @param messageTemplate a printf-style message template to use if the check fails; will
+ * be converted to a string using {@link String#format(String, Object...)}
+ * @param messageArgs arguments for {@code messageTemplate}
+ * @return the non-null reference that was validated
+ * @throws NullPointerException if {@code reference} is null
+ */
+ public static @NonNull <T> T checkNotNull(final T reference,
+ final String messageTemplate,
+ final Object... messageArgs) {
+ if (reference == null) {
+ throw new NullPointerException(String.format(messageTemplate, messageArgs));
+ }
+ return reference;
+ }
+
+ /**
+ * Ensures the truth of an expression involving the state of the calling
+ * instance, but not involving any parameters to the calling method.
+ *
+ * @param expression a boolean expression
+ * @param message exception message
+ * @throws IllegalStateException if {@code expression} is false
+ */
+ public static void checkState(final boolean expression, String message) {
+ if (!expression) {
+ throw new IllegalStateException(message);
+ }
+ }
+
+ /**
+ * Ensures the truth of an expression involving the state of the calling
+ * instance, but not involving any parameters to the calling method.
+ *
+ * @param expression a boolean expression
+ * @throws IllegalStateException if {@code expression} is false
+ */
+ public static void checkState(final boolean expression) {
+ checkState(expression, null);
+ }
+
+ /**
+ * Check the requested flags, throwing if any requested flags are outside
+ * the allowed set.
+ *
+ * @return the validated requested flags.
+ */
+ public static int checkFlagsArgument(final int requestedFlags, final int allowedFlags) {
+ if ((requestedFlags & allowedFlags) != requestedFlags) {
+ throw new IllegalArgumentException("Requested flags 0x"
+ + Integer.toHexString(requestedFlags) + ", but only 0x"
+ + Integer.toHexString(allowedFlags) + " are allowed");
+ }
+
+ return requestedFlags;
+ }
+
+ /**
+ * Ensures that that the argument numeric value is non-negative.
+ *
+ * @param value a numeric int value
+ * @param errorMessage the exception message to use if the check fails
+ * @return the validated numeric value
+ * @throws IllegalArgumentException if {@code value} was negative
+ */
+ public static @IntRange(from = 0) int checkArgumentNonnegative(final int value,
+ final String errorMessage) {
+ if (value < 0) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that that the argument numeric value is non-negative.
+ *
+ * @param value a numeric int value
+ *
+ * @return the validated numeric value
+ * @throws IllegalArgumentException if {@code value} was negative
+ */
+ public static @IntRange(from = 0) int checkArgumentNonnegative(final int value) {
+ if (value < 0) {
+ throw new IllegalArgumentException();
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that that the argument numeric value is non-negative.
+ *
+ * @param value a numeric long value
+ * @return the validated numeric value
+ * @throws IllegalArgumentException if {@code value} was negative
+ */
+ public static long checkArgumentNonnegative(final long value) {
+ if (value < 0) {
+ throw new IllegalArgumentException();
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that that the argument numeric value is non-negative.
+ *
+ * @param value a numeric long value
+ * @param errorMessage the exception message to use if the check fails
+ * @return the validated numeric value
+ * @throws IllegalArgumentException if {@code value} was negative
+ */
+ public static long checkArgumentNonnegative(final long value, final String errorMessage) {
+ if (value < 0) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that that the argument numeric value is positive.
+ *
+ * @param value a numeric int value
+ * @param errorMessage the exception message to use if the check fails
+ * @return the validated numeric value
+ * @throws IllegalArgumentException if {@code value} was not positive
+ */
+ public static int checkArgumentPositive(final int value, final String errorMessage) {
+ if (value <= 0) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the argument floating point value is a finite number.
+ *
+ * <p>A finite number is defined to be both representable (that is, not NaN) and
+ * not infinite (that is neither positive or negative infinity).</p>
+ *
+ * @param value a floating point value
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated floating point value
+ *
+ * @throws IllegalArgumentException if {@code value} was not finite
+ */
+ public static float checkArgumentFinite(final float value, final String valueName) {
+ if (Float.isNaN(value)) {
+ throw new IllegalArgumentException(valueName + " must not be NaN");
+ } else if (Float.isInfinite(value)) {
+ throw new IllegalArgumentException(valueName + " must not be infinite");
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the argument floating point value is within the inclusive range.
+ *
+ * <p>While this can be used to range check against +/- infinity, note that all NaN numbers
+ * will always be out of range.</p>
+ *
+ * @param value a floating point value
+ * @param lower the lower endpoint of the inclusive range
+ * @param upper the upper endpoint of the inclusive range
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated floating point value
+ *
+ * @throws IllegalArgumentException if {@code value} was not within the range
+ */
+ public static float checkArgumentInRange(float value, float lower, float upper,
+ String valueName) {
+ if (Float.isNaN(value)) {
+ throw new IllegalArgumentException(valueName + " must not be NaN");
+ } else if (value < lower) {
+ throw new IllegalArgumentException(
+ String.format(
+ "%s is out of range of [%f, %f] (too low)", valueName, lower, upper));
+ } else if (value > upper) {
+ throw new IllegalArgumentException(
+ String.format(
+ "%s is out of range of [%f, %f] (too high)", valueName, lower, upper));
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the argument int value is within the inclusive range.
+ *
+ * @param value a int value
+ * @param lower the lower endpoint of the inclusive range
+ * @param upper the upper endpoint of the inclusive range
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated int value
+ *
+ * @throws IllegalArgumentException if {@code value} was not within the range
+ */
+ public static int checkArgumentInRange(int value, int lower, int upper,
+ String valueName) {
+ if (value < lower) {
+ throw new IllegalArgumentException(
+ String.format(
+ "%s is out of range of [%d, %d] (too low)", valueName, lower, upper));
+ } else if (value > upper) {
+ throw new IllegalArgumentException(
+ String.format(
+ "%s is out of range of [%d, %d] (too high)", valueName, lower, upper));
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the argument long value is within the inclusive range.
+ *
+ * @param value a long value
+ * @param lower the lower endpoint of the inclusive range
+ * @param upper the upper endpoint of the inclusive range
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated long value
+ *
+ * @throws IllegalArgumentException if {@code value} was not within the range
+ */
+ public static long checkArgumentInRange(long value, long lower, long upper,
+ String valueName) {
+ if (value < lower) {
+ throw new IllegalArgumentException(
+ String.format(
+ "%s is out of range of [%d, %d] (too low)", valueName, lower, upper));
+ } else if (value > upper) {
+ throw new IllegalArgumentException(
+ String.format(
+ "%s is out of range of [%d, %d] (too high)", valueName, lower, upper));
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the array is not {@code null}, and none of its elements are {@code null}.
+ *
+ * @param value an array of boxed objects
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated array
+ *
+ * @throws NullPointerException if the {@code value} or any of its elements were {@code null}
+ */
+ public static <T> T[] checkArrayElementsNotNull(final T[] value, final String valueName) {
+ if (value == null) {
+ throw new NullPointerException(valueName + " must not be null");
+ }
+
+ for (int i = 0; i < value.length; ++i) {
+ if (value[i] == null) {
+ throw new NullPointerException(
+ String.format("%s[%d] must not be null", valueName, i));
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the {@link Collection} is not {@code null}, and none of its elements are
+ * {@code null}.
+ *
+ * @param value a {@link Collection} of boxed objects
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated {@link Collection}
+ *
+ * @throws NullPointerException if the {@code value} or any of its elements were {@code null}
+ */
+ public static @NonNull <C extends Collection<T>, T> C checkCollectionElementsNotNull(
+ final C value, final String valueName) {
+ if (value == null) {
+ throw new NullPointerException(valueName + " must not be null");
+ }
+
+ long ctr = 0;
+ for (T elem : value) {
+ if (elem == null) {
+ throw new NullPointerException(
+ String.format("%s[%d] must not be null", valueName, ctr));
+ }
+ ++ctr;
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that the {@link Collection} is not {@code null}, and contains at least one element.
+ *
+ * @param value a {@link Collection} of boxed elements.
+ * @param valueName the name of the argument to use if the check fails.
+
+ * @return the validated {@link Collection}
+ *
+ * @throws NullPointerException if the {@code value} was {@code null}
+ * @throws IllegalArgumentException if the {@code value} was empty
+ */
+ public static <T> Collection<T> checkCollectionNotEmpty(final Collection<T> value,
+ final String valueName) {
+ if (value == null) {
+ throw new NullPointerException(valueName + " must not be null");
+ }
+ if (value.isEmpty()) {
+ throw new IllegalArgumentException(valueName + " is empty");
+ }
+ return value;
+ }
+
+ /**
+ * Ensures that all elements in the argument floating point array are within the inclusive range
+ *
+ * <p>While this can be used to range check against +/- infinity, note that all NaN numbers
+ * will always be out of range.</p>
+ *
+ * @param value a floating point array of values
+ * @param lower the lower endpoint of the inclusive range
+ * @param upper the upper endpoint of the inclusive range
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated floating point value
+ *
+ * @throws IllegalArgumentException if any of the elements in {@code value} were out of range
+ * @throws NullPointerException if the {@code value} was {@code null}
+ */
+ public static float[] checkArrayElementsInRange(float[] value, float lower, float upper,
+ String valueName) {
+ checkNotNull(value, valueName + " must not be null");
+
+ for (int i = 0; i < value.length; ++i) {
+ float v = value[i];
+
+ if (Float.isNaN(v)) {
+ throw new IllegalArgumentException(valueName + "[" + i + "] must not be NaN");
+ } else if (v < lower) {
+ throw new IllegalArgumentException(
+ String.format("%s[%d] is out of range of [%f, %f] (too low)",
+ valueName, i, lower, upper));
+ } else if (v > upper) {
+ throw new IllegalArgumentException(
+ String.format("%s[%d] is out of range of [%f, %f] (too high)",
+ valueName, i, lower, upper));
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Ensures that all elements in the argument integer array are within the inclusive range
+ *
+ * @param value an integer array of values
+ * @param lower the lower endpoint of the inclusive range
+ * @param upper the upper endpoint of the inclusive range
+ * @param valueName the name of the argument to use if the check fails
+ *
+ * @return the validated integer array
+ *
+ * @throws IllegalArgumentException if any of the elements in {@code value} were out of range
+ * @throws NullPointerException if the {@code value} was {@code null}
+ */
+ public static int[] checkArrayElementsInRange(int[] value, int lower, int upper,
+ String valueName) {
+ checkNotNull(value, valueName + " must not be null");
+
+ for (int i = 0; i < value.length; ++i) {
+ int v = value[i];
+
+ if (v < lower) {
+ throw new IllegalArgumentException(
+ String.format("%s[%d] is out of range of [%d, %d] (too low)",
+ valueName, i, lower, upper));
+ } else if (v > upper) {
+ throw new IllegalArgumentException(
+ String.format("%s[%d] is out of range of [%d, %d] (too high)",
+ valueName, i, lower, upper));
+ }
+ }
+
+ return value;
+ }
+}
diff --git a/packages/SettingsLib/Android.bp b/packages/SettingsLib/Android.bp
new file mode 100644
index 0000000..4791517
--- /dev/null
+++ b/packages/SettingsLib/Android.bp
@@ -0,0 +1,25 @@
+android_library {
+
+ name: "SettingsLib",
+
+ libs: [
+ "androidx.annotation_annotation",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.recyclerview_recyclerview",
+ "androidx.preference_preference",
+ "androidx.appcompat_appcompat",
+ "androidx.lifecycle_lifecycle-runtime",
+ ],
+
+ // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_SHARED_JAVA_LIBRARIES
+ // LOCAL_SHARED_JAVA_LIBRARIES := androidx.lifecycle_lifecycle-common
+
+ resource_dirs: ["res"],
+
+ srcs: ["src/**/*.java"],
+
+ min_sdk_version: "21",
+
+}
+
+// For the test package.
diff --git a/packages/SettingsLib/Android.mk b/packages/SettingsLib/Android.mk
deleted file mode 100644
index 96012c1..0000000
--- a/packages/SettingsLib/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_AAPT2_ONLY := true
-
-LOCAL_MODULE := SettingsLib
-
-LOCAL_JAVA_LIBRARIES := \
- androidx.annotation_annotation
-
-LOCAL_SHARED_ANDROID_LIBRARIES := \
- androidx.legacy_legacy-support-v4 \
- androidx.recyclerview_recyclerview \
- androidx.preference_preference \
- androidx.appcompat_appcompat \
- androidx.lifecycle_lifecycle-runtime
-
-LOCAL_SHARED_JAVA_LIBRARIES := \
- androidx.lifecycle_lifecycle-common
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_JAR_EXCLUDE_FILES := none
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_MIN_SDK_VERSION := 21
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-# For the test package.
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/packages/SettingsLib/OWNERS b/packages/SettingsLib/OWNERS
index 4211c27..d188c65 100644
--- a/packages/SettingsLib/OWNERS
+++ b/packages/SettingsLib/OWNERS
@@ -8,8 +8,8 @@
evanlaird@google.com
jackqdyulei@google.com
jmonk@google.com
+leifhendrik@google.com
mfritze@google.com
-nicoya@google.com
rogerxue@google.com
virgild@google.com
zhfan@google.com
@@ -18,4 +18,4 @@
miket@google.com
# Exempt resource files (because they are in a flat directory and too hard to manage via OWNERS)
-per-file *.xml=*
\ No newline at end of file
+per-file *.xml=*
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 9bacaf33..296a135 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Totdat jy dit afskakel"</string>
<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..ab52bcb 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"እስኪያጠፉት ድረስ"</string>
<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..e8811eb 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -453,5 +453,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"إلى أن توقف الوضع يدويًا"</string>
<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..0adac28 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"আপুনি অফ নকৰা পর্যন্ত"</string>
<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..8f974fe 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Deaktiv edənə qədər"</string>
<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..1e3eba6 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -450,5 +450,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dok ne isključite"</string>
<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..42fda63 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Пакуль не выключыце"</string>
<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..a309449 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"До изключване"</string>
<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..ad4ef2f 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"যতক্ষণ না আপনি বন্ধ করছেন"</string>
<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..4332682 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -450,5 +450,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dok ne isključite"</string>
<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..7750ef2 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Fins que no ho desactivi"</string>
<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..72b3389 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dokud tuto funkci nevypnete"</string>
<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..0b7ce0d 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Indtil du deaktiverer"</string>
<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..9db490b 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Bis zur Deaktivierung"</string>
<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..2ba543e 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Μέχρι την απενεργοποίηση"</string>
<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..747fdc7 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<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..747fdc7 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<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..747fdc7 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<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..747fdc7 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<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..33b9f1d 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<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..f665b77 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Hasta que lo desactives"</string>
<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..9cdde92 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Hasta que se desactive"</string>
<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..2b44321 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Kuni välja lülitate"</string>
<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..4ad60b3 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Desaktibatu arte"</string>
<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..1d08821 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"تا زمانیکه آن را خاموش کنید"</string>
<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..7c253fc 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Kunnes poistat sen käytöstä"</string>
<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..99906ca 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Jusqu\'à la désactivation"</string>
<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..7a51faa 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Jusqu\'à la désactivation"</string>
<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..5bc6163 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Ata a desactivación"</string>
<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..b523ae2 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"તમે બંધ ન કરો ત્યાં સુધી"</string>
<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..9c83640 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -450,5 +450,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dok ne isključite"</string>
<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..25d11aa 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Kikapcsolásig"</string>
<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..f811312c 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Մինչև չանջատեք"</string>
<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..39a88e5 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Sampai Anda menonaktifkannya"</string>
<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..afb10a9 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Þar til þú slekkur"</string>
<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..24eef7a 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Fino alla disattivazione"</string>
<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..e9c44c9 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"עד הכיבוי"</string>
<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..0cc2d17 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"OFF にするまで"</string>
<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..daca5b9 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"გამორთვამდე"</string>
<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..b95d6e9e 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Өшірілгенге дейін"</string>
<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..5bf38c0 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"រហូតទាល់តែអ្នកបិទ"</string>
<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..923547f 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"ನೀವು ಆಫ್ ಮಾಡುವವರೆಗೆ"</string>
<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..9bac29d 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"사용 중지할 때까지"</string>
<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..523fabe 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Бул функция өчүрүлгөнгө чейин"</string>
<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..f85a691 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"ຈົນກວ່າທ່ານຈະປິດ"</string>
<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..fc2924f 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Kol išjungsite"</string>
<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..6ce5e8e 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -450,5 +450,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Līdz brīdim, kad izslēgsiet"</string>
<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..c6c508e 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Додека не го исклучите"</string>
<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..6b6462c 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"നിങ്ങൾ ഓഫാക്കുന്നത് വരെ"</string>
<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..56f1cc0 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Таныг унтраах хүртэл"</string>
<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..7485886 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"तुम्ही बंद करेपर्यंत"</string>
<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..fdb8702 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Sehingga anda matikan"</string>
<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..dc5d924 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"သင်ပိတ်လိုက်သည် အထိ"</string>
<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..460eb57 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Til du slår av"</string>
<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..763b60c 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"तपाईंले निष्क्रिय नपार्दासम्म"</string>
<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..fa30827 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Totdat je uitschakelt"</string>
<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..ecdc49e 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"ଆପଣ ବନ୍ଦ ନକରିବା ପର୍ଯ୍ୟନ୍ତ DND ଅନ୍ ରହିବ"</string>
<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..63c88cd 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ ਬੰਦ ਨਹੀਂ ਕਰਦੇ"</string>
<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..7c3da21 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dopóki nie wyłączysz"</string>
<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..192e532 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Até você desativar"</string>
<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..01bc0fc 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Até ser desativado"</string>
<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..192e532 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Até você desativar"</string>
<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..cc74bd3 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -450,5 +450,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Până când dezactivați"</string>
<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..5e1869f 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Пока вы не отключите"</string>
<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..1be890b 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"ඔබ ක්රියාවිරහිත කරන තුරු"</string>
<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..d1ec450 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dokiaľ túto funkciu nevypnete"</string>
<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..4632550 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Dokler ne izklopite"</string>
<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..24cdcb1 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Deri sa ta çaktivizosh"</string>
<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..ebefc65 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -450,5 +450,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Док не искључите"</string>
<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..c83438b 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Tills du inaktiverar funktionen"</string>
<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..8be74ea 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Hadi utakapoizima"</string>
<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..225005d 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"ஆஃப் செய்யும் வரை"</string>
<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..531001c 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"మీరు ఆఫ్ చేసే వరకు"</string>
<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..cf214e1 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"จนกว่าคุณจะปิด"</string>
<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..aee95ea 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Hanggang sa i-off mo"</string>
<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..e4b23f96 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Siz kapatana kadar"</string>
<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..958a3d2 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -451,5 +451,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Доки ви не вимкнете"</string>
<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..31f0a33 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"یہاں تک کہ آپ آف کر دیں"</string>
<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..7ff4588 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Bekor qilinmaguncha"</string>
<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..daa9335 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Cho đến khi bạn tắt"</string>
<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..6cb27e9 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"直到您将其关闭"</string>
<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..16039c1 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"直至您關閉為止"</string>
<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..ed68638 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"直到你關閉為止"</string>
<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..957584a 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -449,5 +449,6 @@
<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>
+ <string name="zen_mode_forever" msgid="2704305038191592967">"Uze uvale isikrini"</string>
<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/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
index 01efda5..a710410 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
@@ -42,7 +42,6 @@
private BluetoothA2dp mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
static final ParcelUuid[] SINK_UUIDS = {
@@ -71,7 +70,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "A2dpProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(A2dpProfile.this, BluetoothProfile.STATE_CONNECTED);
device.refresh();
@@ -94,14 +93,12 @@
return BluetoothProfile.A2DP;
}
- A2dpProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ A2dpProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
mContext = context;
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new A2dpServiceListener(),
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new A2dpServiceListener(),
BluetoothProfile.A2DP);
}
@@ -123,20 +120,6 @@
public boolean connect(BluetoothDevice device) {
if (mService == null) return false;
- int max_connected_devices = mLocalAdapter.getMaxConnectedAudioDevices();
- if (max_connected_devices == 1) {
- // Original behavior: disconnect currently connected device
- List<BluetoothDevice> sinks = getConnectedDevices();
- if (sinks != null) {
- for (BluetoothDevice sink : sinks) {
- if (sink.equals(device)) {
- Log.w(TAG, "Connecting to device " + device + " : disconnect skipped");
- continue;
- }
- mService.disconnect(sink);
- }
- }
- }
return mService.connect(device);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
index 2cf1d58..0c4e02b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java
@@ -38,7 +38,6 @@
private BluetoothA2dpSink mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
static final ParcelUuid[] SRC_UUIDS = {
@@ -67,7 +66,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "A2dpSinkProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(A2dpSinkProfile.this, BluetoothProfile.STATE_CONNECTED);
device.refresh();
@@ -90,13 +89,11 @@
return BluetoothProfile.A2DP_SINK;
}
- A2dpSinkProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ A2dpSinkProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new A2dpSinkServiceListener(),
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new A2dpSinkServiceListener(),
BluetoothProfile.A2DP_SINK);
}
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/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
index 6ab221e..466d02b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
@@ -55,7 +55,6 @@
private final BroadcastReceiver mProfileBroadcastReceiver = new BluetoothBroadcastReceiver();
private final Collection<BluetoothCallback> mCallbacks = new ArrayList<>();
- private LocalBluetoothProfileManager mProfileManager;
private android.os.Handler mReceiverHandler;
private Context mContext;
@@ -141,11 +140,6 @@
mProfileIntentFilter.addAction(action);
}
- // Set profile manager after construction due to circular dependency
- void setProfileManager(LocalBluetoothProfileManager manager) {
- mProfileManager = manager;
- }
-
boolean readPairedDevices() {
Set<BluetoothDevice> bondedDevices = mLocalAdapter.getBondedDevices();
if (bondedDevices == null) {
@@ -156,7 +150,7 @@
for (BluetoothDevice device : bondedDevices) {
CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device);
if (cachedDevice == null) {
- cachedDevice = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, device);
+ cachedDevice = mDeviceManager.addDevice(device);
dispatchDeviceAdded(cachedDevice);
deviceAdded = true;
}
@@ -288,7 +282,7 @@
// Skip for now, there's a bluez problem and we are not getting uuids even for 2.1.
CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device);
if (cachedDevice == null) {
- cachedDevice = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, device);
+ cachedDevice = mDeviceManager.addDevice(device);
Log.d(TAG, "DeviceFoundHandler created new CachedBluetoothDevice: "
+ cachedDevice);
}
@@ -354,8 +348,7 @@
if (cachedDevice == null) {
Log.w(TAG, "Got bonding state changed for " + device +
", but we have no record of that device.");
-
- cachedDevice = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, device);
+ cachedDevice = mDeviceManager.addDevice(device);
dispatchDeviceAdded(cachedDevice);
}
}
@@ -472,4 +465,4 @@
dispatchAudioModeChanged();
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index b90d307..c511589 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -23,7 +23,6 @@
import android.bluetooth.BluetoothUuid;
import android.content.Context;
import android.content.SharedPreferences;
-import android.media.AudioManager;
import android.os.ParcelUuid;
import android.os.SystemClock;
import android.text.TextUtils;
@@ -49,9 +48,8 @@
private static final String TAG = "CachedBluetoothDevice";
private final Context mContext;
- private final LocalBluetoothAdapter mLocalAdapter;
+ private final BluetoothAdapter mLocalAdapter;
private final LocalBluetoothProfileManager mProfileManager;
- private final AudioManager mAudioManager;
private final BluetoothDevice mDevice;
//TODO: consider remove, BluetoothDevice.getName() is already cached
private String mName;
@@ -145,7 +143,7 @@
Log.d(TAG, "onProfileStateChanged: profile " + profile +
" newProfileState " + newProfileState);
}
- if (mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_TURNING_OFF)
+ if (mLocalAdapter.getState() == BluetoothAdapter.STATE_TURNING_OFF)
{
if (BluetoothUtils.D) {
Log.d(TAG, " BT Turninig Off...Profile conn state change ignored...");
@@ -181,13 +179,11 @@
}
CachedBluetoothDevice(Context context,
- LocalBluetoothAdapter adapter,
LocalBluetoothProfileManager profileManager,
BluetoothDevice device) {
mContext = context;
- mLocalAdapter = adapter;
+ mLocalAdapter = BluetoothAdapter.getDefaultAdapter();
mProfileManager = profileManager;
- mAudioManager = context.getSystemService(AudioManager.class);
mDevice = device;
mProfileConnectionState = new HashMap<LocalBluetoothProfile, Integer>();
fillData();
@@ -1193,7 +1189,7 @@
/**
* @return {@code true} if {@code cachedBluetoothDevice} is a2dp device
*/
- public boolean isA2dpDevice() {
+ public boolean isConnectedA2dpDevice() {
A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile();
return a2dpProfile != null && a2dpProfile.getConnectionStatus(mDevice) ==
BluetoothProfile.STATE_CONNECTED;
@@ -1202,7 +1198,7 @@
/**
* @return {@code true} if {@code cachedBluetoothDevice} is HFP device
*/
- public boolean isHfpDevice() {
+ public boolean isConnectedHfpDevice() {
HeadsetProfile headsetProfile = mProfileManager.getHeadsetProfile();
return headsetProfile != null && headsetProfile.getConnectionStatus(mDevice) ==
BluetoothProfile.STATE_CONNECTED;
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
index 4104e2f..f8543fc 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
@@ -107,11 +107,10 @@
* @param device the address of the new Bluetooth device
* @return the newly created CachedBluetoothDevice object
*/
- public CachedBluetoothDevice addDevice(LocalBluetoothAdapter adapter,
- LocalBluetoothProfileManager profileManager,
- BluetoothDevice device) {
- CachedBluetoothDevice newDevice = new CachedBluetoothDevice(mContext, adapter,
- profileManager, device);
+ public CachedBluetoothDevice addDevice(BluetoothDevice device) {
+ LocalBluetoothProfileManager profileManager = mBtManager.getProfileManager();
+ CachedBluetoothDevice newDevice = new CachedBluetoothDevice(mContext, profileManager,
+ device);
if (profileManager.getHearingAidProfile() != null
&& profileManager.getHearingAidProfile().getHiSyncId(newDevice.getDevice())
!= BluetoothHearingAid.HI_SYNC_ID_INVALID) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
index 6a4d978..99f550b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
@@ -41,7 +41,6 @@
private BluetoothHeadset mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
private final LocalBluetoothProfileManager mProfileManager;
@@ -70,7 +69,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "HeadsetProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(HeadsetProfile.this,
BluetoothProfile.STATE_CONNECTED);
@@ -97,13 +96,11 @@
return BluetoothProfile.HEADSET;
}
- HeadsetProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ HeadsetProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new HeadsetServiceListener(),
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new HeadsetServiceListener(),
BluetoothProfile.HEADSET);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java
index 1747d28..6eaa620 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java
@@ -38,7 +38,6 @@
private BluetoothHearingAid mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
static final String NAME = "HearingAid";
@@ -64,7 +63,7 @@
if (V) {
Log.d(TAG, "HearingAidProfile found new device: " + nextDevice);
}
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(HearingAidProfile.this,
BluetoothProfile.STATE_CONNECTED);
@@ -92,15 +91,13 @@
return BluetoothProfile.HEARING_AID;
}
- HearingAidProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ HearingAidProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
mContext = context;
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new HearingAidServiceListener(),
- BluetoothProfile.HEARING_AID);
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context,
+ new HearingAidServiceListener(), BluetoothProfile.HEARING_AID);
}
public boolean isConnectable() {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java
index 94c84b9..4b4db75 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java
@@ -41,7 +41,6 @@
private BluetoothHeadsetClient mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
static final ParcelUuid[] SRC_UUIDS = {
@@ -71,7 +70,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "HfpClient profile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(
HfpClientProfile.this, BluetoothProfile.STATE_CONNECTED);
@@ -97,14 +96,12 @@
return BluetoothProfile.HEADSET_CLIENT;
}
- HfpClientProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ HfpClientProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new HfpClientServiceListener(),
- BluetoothProfile.HEADSET_CLIENT);
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context,
+ new HfpClientServiceListener(), BluetoothProfile.HEADSET_CLIENT);
}
@Override
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidDeviceProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidDeviceProfile.java
index 179a60d..8c4bff5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidDeviceProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidDeviceProfile.java
@@ -39,7 +39,6 @@
private static final int PREFERRED_VALUE = -1;
private static final boolean DEBUG = true;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
private final LocalBluetoothProfileManager mProfileManager;
static final String NAME = "HID DEVICE";
@@ -47,14 +46,12 @@
private BluetoothHidDevice mService;
private boolean mIsProfileReady;
- HidDeviceProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ HidDeviceProfile(Context context,CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- adapter.getProfileProxy(context, new HidDeviceServiceListener(),
- BluetoothProfile.HID_DEVICE);
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context,
+ new HidDeviceServiceListener(), BluetoothProfile.HID_DEVICE);
}
// These callbacks run on the main thread.
@@ -73,7 +70,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "HidProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
Log.d(TAG, "Connection status changed: " + device);
device.onProfileStateChanged(HidDeviceProfile.this,
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java
index da348f9..701ef00 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java
@@ -38,7 +38,6 @@
private BluetoothHidHost mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
private final LocalBluetoothProfileManager mProfileManager;
@@ -62,7 +61,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "HidProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(HidProfile.this, BluetoothProfile.STATE_CONNECTED);
device.refresh();
@@ -85,13 +84,12 @@
return BluetoothProfile.HID_HOST;
}
- HidProfile(Context context, LocalBluetoothAdapter adapter,
+ HidProfile(Context context,
CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- adapter.getProfileProxy(context, new HidHostServiceListener(),
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new HidHostServiceListener(),
BluetoothProfile.HID_HOST);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
index 5e7f6d4..8f40ab4 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
@@ -249,10 +249,6 @@
return mAdapter.getRemoteDevice(address);
}
- public int getMaxConnectedAudioDevices() {
- return mAdapter.getMaxConnectedAudioDevices();
- }
-
public List<Integer> getSupportedProfiles() {
return mAdapter.getSupportedProfiles();
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
index f91dbcf..8bb8210 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -18,6 +18,7 @@
import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothA2dpSink;
+import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothHeadsetClient;
@@ -37,6 +38,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;
@@ -77,7 +80,6 @@
}
private final Context mContext;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
private final BluetoothEventManager mEventManager;
@@ -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;
@@ -109,187 +111,113 @@
BluetoothEventManager eventManager) {
mContext = context;
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mEventManager = eventManager;
mUsePbapPce = mContext.getResources().getBoolean(R.bool.enable_pbap_pce_profile);
// MAP Client is typically used in the same situations as PBAP Client
mUseMapClient = mContext.getResources().getBoolean(R.bool.enable_pbap_pce_profile);
// pass this reference to adapter and event manager (circular dependency)
- mLocalAdapter.setProfileManager(this);
- mEventManager.setProfileManager(this);
+ adapter.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 = BluetoothAdapter.getDefaultAdapter().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, 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, 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, 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, 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, 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, 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, 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, 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, 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);
+ 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, 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,
@@ -323,10 +251,7 @@
// Called from LocalBluetoothAdapter when state changes to ON
void setBluetoothStateOn() {
- ParcelUuid[] uuids = mLocalAdapter.getUuids();
- if (uuids != null) {
- updateLocalProfiles(uuids);
- }
+ updateLocalProfiles();
mEventManager.readPairedDevices();
}
@@ -344,8 +269,7 @@
CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device);
if (cachedDevice == null) {
Log.w(TAG, "StateChangedHandler found new device: " + device);
- cachedDevice = mDeviceManager.addDevice(mLocalAdapter,
- LocalBluetoothProfileManager.this, device);
+ cachedDevice = mDeviceManager.addDevice(device);
}
onReceiveInternal(intent, cachedDevice);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapClientProfile.java
index 6aa32fc..7d334eb 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapClientProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapClientProfile.java
@@ -41,7 +41,6 @@
private BluetoothMapClient mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
private final LocalBluetoothProfileManager mProfileManager;
@@ -71,7 +70,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "MapProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(MapClientProfile.this,
BluetoothProfile.STATE_CONNECTED);
@@ -99,14 +98,12 @@
return BluetoothProfile.MAP_CLIENT;
}
- MapClientProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ MapClientProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new MapClientServiceListener(),
- BluetoothProfile.MAP_CLIENT);
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context,
+ new MapClientServiceListener(), BluetoothProfile.MAP_CLIENT);
}
public boolean isConnectable() {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapProfile.java
index c53cacc..689669f 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/MapProfile.java
@@ -41,7 +41,6 @@
private BluetoothMap mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
private final LocalBluetoothProfileManager mProfileManager;
@@ -70,7 +69,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "MapProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(MapProfile.this,
BluetoothProfile.STATE_CONNECTED);
@@ -98,13 +97,11 @@
return BluetoothProfile.MAP;
}
- MapProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ MapProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new MapServiceListener(),
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new MapServiceListener(),
BluetoothProfile.MAP);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PanProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PanProfile.java
index e204d03..02afe8d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PanProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PanProfile.java
@@ -38,7 +38,6 @@
private BluetoothPan mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
// Tethering direction for each device
private final HashMap<BluetoothDevice, Integer> mDeviceRoleMap =
@@ -74,9 +73,8 @@
return BluetoothProfile.PAN;
}
- PanProfile(Context context, LocalBluetoothAdapter adapter) {
- mLocalAdapter = adapter;
- mLocalAdapter.getProfileProxy(context, new PanServiceListener(),
+ PanProfile(Context context) {
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new PanServiceListener(),
BluetoothProfile.PAN);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java
index b735c23..ad3506f 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapClientProfile.java
@@ -39,7 +39,6 @@
private BluetoothPbapClient mService;
private boolean mIsProfileReady;
- private final LocalBluetoothAdapter mLocalAdapter;
private final CachedBluetoothDeviceManager mDeviceManager;
static final ParcelUuid[] SRC_UUIDS = {
@@ -69,7 +68,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "PbapClientProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(PbapClientProfile.this, BluetoothProfile.STATE_CONNECTED);
device.refresh();
@@ -105,14 +104,12 @@
return BluetoothProfile.PBAP_CLIENT;
}
- PbapClientProfile(Context context, LocalBluetoothAdapter adapter,
- CachedBluetoothDeviceManager deviceManager,
+ PbapClientProfile(Context context, CachedBluetoothDeviceManager deviceManager,
LocalBluetoothProfileManager profileManager) {
- mLocalAdapter = adapter;
mDeviceManager = deviceManager;
mProfileManager = profileManager;
- mLocalAdapter.getProfileProxy(context, new PbapClientServiceListener(),
- BluetoothProfile.PBAP_CLIENT);
+ BluetoothAdapter.getDefaultAdapter().getProfileProxy(context,
+ new PbapClientServiceListener(), BluetoothProfile.PBAP_CLIENT);
}
public boolean isConnectable() {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/SapProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/SapProfile.java
index 60985f3..f0e259e 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/SapProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/SapProfile.java
@@ -69,7 +69,7 @@
// we may add a new device here, but generally this should not happen
if (device == null) {
Log.w(TAG, "SapProfile found new device: " + nextDevice);
- device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice);
+ device = mDeviceManager.addDevice(nextDevice);
}
device.onProfileStateChanged(SapProfile.this,
BluetoothProfile.STATE_CONNECTED);
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java b/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java
index 2e0a94c..a3dda65 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java
@@ -31,19 +31,26 @@
/**
* Key used for placing external tiles.
*/
- public String key;
+ public final String key;
/**
* List of the category's children
*/
private List<Tile> mTiles = new ArrayList<>();
- public DashboardCategory() {
- // Empty
+ public DashboardCategory(String key) {
+ this.key = key;
}
DashboardCategory(Parcel in) {
- readFromParcel(in);
+ key = in.readString();
+
+ final int count = in.readInt();
+
+ for (int n = 0; n < count; n++) {
+ Tile tile = Tile.CREATOR.createFromParcel(in);
+ mTiles.add(tile);
+ }
}
/**
@@ -87,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;
@@ -128,18 +136,6 @@
}
}
- public void readFromParcel(Parcel in) {
- key = in.readString();
-
- final int count = in.readInt();
-
- for (int n = 0; n < count; n++) {
- Tile tile = Tile.CREATOR.createFromParcel(in);
- mTiles.add(tile);
- }
- }
-
-
public static final Creator<DashboardCategory> CREATOR = new Creator<DashboardCategory>() {
public DashboardCategory createFromParcel(Parcel source) {
return new DashboardCategory(source);
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java b/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
index 18f94b7..6d60a09 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
@@ -16,9 +16,14 @@
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.META_DATA_PREFERENCE_SUMMARY;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY_URI;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_TITLE;
import static com.android.settingslib.drawer.TileUtils.PROFILE_ALL;
import static com.android.settingslib.drawer.TileUtils.PROFILE_PRIMARY;
@@ -27,16 +32,19 @@
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.UserHandle;
import android.text.TextUtils;
+import android.util.Log;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
+import java.util.Objects;
/**
* Description of a single dashboard tile that the user can select.
@@ -46,64 +54,42 @@
private static final String TAG = "Tile";
/**
- * Title of the tile that is shown to the user.
- *
- * @attr ref android.R.styleable#PreferenceHeader_title
- */
- public CharSequence title;
-
- /**
- * Optional summary describing what this tile controls.
- *
- * @attr ref android.R.styleable#PreferenceHeader_summary
- */
- public CharSequence summary;
-
- /**
- * Whether the icon can be tinted. This should be set to true for monochrome (single-color)
- * icons that can be tinted to match the design.
- */
- public boolean isIconTintable;
-
- /**
- * 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<>();
/**
- * Category in which the tile should be placed.
- */
- public String category;
-
- /**
- * 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.
*/
- public Bundle metaData;
-
- /**
- * 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 CharSequence mSummaryOverride;
- public Tile(ActivityInfo activityInfo) {
+ private String mCategory;
+
+ public Tile(ActivityInfo activityInfo, String category) {
mActivityInfo = activityInfo;
mActivityPackage = mActivityInfo.packageName;
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);
+ 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
@@ -115,24 +101,159 @@
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(mActivityPackage);
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(category);
- dest.writeInt(priority);
- dest.writeBundle(metaData);
- dest.writeString(key);
- dest.writeBoolean(isIconTintable);
+ dest.writeString(mCategory);
+ dest.writeBundle(mMetaData);
+ }
+
+ public int getId() {
+ return Objects.hash(mActivityPackage, mActivityName);
+ }
+
+ public String getDescription() {
+ return mActivityPackage + "/" + mActivityName;
+ }
+
+ public String getPackageName() {
+ return mActivityPackage;
+ }
+
+ /**
+ * Intent to launch when the preference is selected.
+ */
+ public Intent getIntent() {
+ return mIntent;
+ }
+
+ /**
+ * Category in which the tile should be placed.
+ */
+ public String getCategory() {
+ return mCategory;
+ }
+
+ public void setCategory(String newCategoryKey) {
+ mCategory = newCategoryKey;
+ }
+
+ /**
+ * Priority of this tile, used for display ordering.
+ */
+ 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;
+ }
+
+ /**
+ * Title of the tile that is shown to the user.
+ */
+ public CharSequence getTitle(Context context) {
+ CharSequence title = null;
+ final PackageManager packageManager = context.getPackageManager();
+ if (mMetaData.containsKey(META_DATA_PREFERENCE_TITLE)) {
+ if (mMetaData.get(META_DATA_PREFERENCE_TITLE) instanceof Integer) {
+ try {
+ final Resources res =
+ packageManager.getResourcesForApplication(mActivityPackage);
+ title = res.getString(mMetaData.getInt(META_DATA_PREFERENCE_TITLE));
+ } catch (PackageManager.NameNotFoundException | Resources.NotFoundException e) {
+ Log.d(TAG, "Couldn't find info", e);
+ }
+ } else {
+ title = mMetaData.getString(META_DATA_PREFERENCE_TITLE);
+ }
+ }
+ // Set the preference title to the activity's label if no
+ // meta-data is found
+ if (title == null) {
+ title = getActivityInfo(context).loadLabel(packageManager);
+ }
+ return title;
+ }
+
+ /**
+ * Returns the raw metadata for summary, this is used for comparing 2 summary text without
+ * loading the real string.
+ */
+ public String getSummaryReference() {
+ if (mSummaryOverride != null) {
+ return mSummaryOverride.toString();
+ }
+ if (mMetaData != null && mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY)) {
+ return mMetaData.get(META_DATA_PREFERENCE_SUMMARY).toString();
+ }
+ return null;
+ }
+
+ /**
+ * Overrides the summary. This can happen when injected tile wants to provide dynamic summary.
+ */
+ public void overrideSummary(CharSequence summaryOverride) {
+ mSummaryOverride = summaryOverride;
+ }
+
+ /**
+ * Optional summary describing what this tile controls.
+ */
+ public CharSequence getSummary(Context context) {
+ if (mSummaryOverride != null) {
+ return mSummaryOverride;
+ }
+ CharSequence summary = null;
+ final PackageManager packageManager = context.getPackageManager();
+ if (mMetaData != null) {
+ if (mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY_URI)) {
+ return null;
+ }
+ if (mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY)) {
+ if (mMetaData.get(META_DATA_PREFERENCE_SUMMARY) instanceof Integer) {
+ try {
+ final Resources res =
+ packageManager.getResourcesForApplication(mActivityPackage);
+ summary = res.getString(mMetaData.getInt(META_DATA_PREFERENCE_SUMMARY));
+ } catch (PackageManager.NameNotFoundException | Resources.NotFoundException e) {
+ Log.d(TAG, "Couldn't find info", e);
+ }
+ } else {
+ summary = mMetaData.getString(META_DATA_PREFERENCE_SUMMARY);
+ }
+ }
+ }
+ return summary;
+ }
+
+ public Bundle getMetaData() {
+ return mMetaData;
+ }
+
+ /**
+ * 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);
}
/**
@@ -141,17 +262,17 @@
* @attr ref android.R.styleable#PreferenceHeader_icon
*/
public Icon getIcon(Context context) {
- if (context == null || metaData == null) {
+ if (context == null || mMetaData == null) {
return null;
}
- int iconResId = metaData.getInt(META_DATA_PREFERENCE_ICON);
+ int iconResId = mMetaData.getInt(META_DATA_PREFERENCE_ICON);
// Set the icon
if (iconResId == 0) {
// Only fallback to activityinfo.icon if metadata does not contain ICON_URI.
// ICON_URI should be loaded in app UI when need the icon object. Handling IPC at this
// level is too complex because we don't have a strong threading contract for this class
- if (!metaData.containsKey(META_DATA_PREFERENCE_ICON_URI)) {
+ if (!mMetaData.containsKey(META_DATA_PREFERENCE_ICON_URI)) {
iconResId = getActivityInfo(context).icon;
}
}
@@ -162,23 +283,19 @@
}
}
- 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);
+ /**
+ * Whether the icon can be tinted. This is true when icon needs to be monochrome (single-color)
+ */
+ public boolean isIconTintable(Context context) {
+ if (mMetaData != null
+ && mMetaData.containsKey(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE)) {
+ return mMetaData.getBoolean(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE);
}
- final int N = in.readInt();
- for (int i = 0; i < N; i++) {
- userHandle.add(UserHandle.CREATOR.createFromParcel(in));
- }
- category = in.readString();
- priority = in.readInt();
- metaData = in.readBundle();
- key = in.readString();
- isIconTintable = in.readBoolean();
+ final String pkgName = context.getPackageName();
+ // If this drawable is coming from outside Settings, tint it to match the color.
+ final ActivityInfo activityInfo = getActivityInfo(context);
+ return activityInfo != null
+ && !TextUtils.equals(pkgName, activityInfo.packageName);
}
private ActivityInfo getActivityInfo(Context context) {
@@ -205,12 +322,12 @@
};
public boolean isPrimaryProfileOnly() {
- String profile = metaData != null ?
- metaData.getString(META_DATA_KEY_PROFILE) : PROFILE_ALL;
+ String profile = mMetaData != null ?
+ mMetaData.getString(META_DATA_KEY_PROFILE) : PROFILE_ALL;
profile = (profile != null ? profile : PROFILE_ALL);
return TextUtils.equals(profile, PROFILE_PRIMARY);
}
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 6b9a08e..f222592 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
@@ -20,10 +20,8 @@
import android.content.IContentProvider;
import android.content.Intent;
import android.content.pm.ActivityInfo;
-import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
@@ -43,7 +41,6 @@
public class TileUtils {
- private static final boolean DEBUG = false;
private static final boolean DEBUG_TIMING = false;
private static final String LOG_TAG = "TileUtils";
@@ -65,20 +62,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";
+ public 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 +106,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.
*/
@@ -123,6 +123,12 @@
*/
public static final String META_DATA_PREFERENCE_ICON_BACKGROUND_HINT =
"com.android.settings.bg.hint";
+ /**
+ * Name of the meta-data item that should be set in the AndroidManifest.xml
+ * to specify the icon background color as raw ARGB.
+ */
+ public static final String META_DATA_PREFERENCE_ICON_BACKGROUND_ARGB =
+ "com.android.settings.bg.argb";
/**
* Name of the meta-data item that should be set in the AndroidManifest.xml
@@ -196,12 +202,9 @@
/**
* Build a list of DashboardCategory.
- *
- * @param extraAction additional intent filter action to be usetileutild to build the dashboard
- * categories
*/
public static List<DashboardCategory> getCategories(Context context,
- Map<Pair<String, String>, Tile> cache, String extraAction) {
+ Map<Pair<String, String>, Tile> cache) {
final long startTime = System.currentTimeMillis();
boolean setup = Global.getInt(context.getContentResolver(), Global.DEVICE_PROVISIONED, 0)
!= 0;
@@ -213,31 +216,28 @@
// Only add Settings for this user.
getTilesForAction(context, user, SETTINGS_ACTION, cache, null, tiles, true);
getTilesForAction(context, user, OPERATOR_SETTINGS, cache,
- OPERATOR_DEFAULT_CATEGORY, tiles, false, true);
+ OPERATOR_DEFAULT_CATEGORY, tiles, false);
getTilesForAction(context, user, MANUFACTURER_SETTINGS, cache,
- MANUFACTURER_DEFAULT_CATEGORY, tiles, false, true);
+ MANUFACTURER_DEFAULT_CATEGORY, tiles, false);
}
if (setup) {
getTilesForAction(context, user, EXTRA_SETTINGS_ACTION, cache, null, tiles, false);
getTilesForAction(context, user, IA_SETTINGS_ACTION, cache, null, tiles, false);
- if (extraAction != null) {
- getTilesForAction(context, user, extraAction, cache, null, tiles, false);
- }
}
}
HashMap<String, DashboardCategory> categoryMap = new HashMap<>();
for (Tile tile : tiles) {
- DashboardCategory category = categoryMap.get(tile.category);
+ final String categoryKey = tile.getCategory();
+ DashboardCategory category = categoryMap.get(categoryKey);
if (category == null) {
- category = new DashboardCategory();
- category.key = tile.category;
+ category = new DashboardCategory(categoryKey);
if (category == null) {
- Log.w(LOG_TAG, "Couldn't find category " + tile.category);
+ Log.w(LOG_TAG, "Couldn't find category " + categoryKey);
continue;
}
- categoryMap.put(category.key, category);
+ categoryMap.put(categoryKey, category);
}
category.addTile(tile);
}
@@ -253,30 +253,15 @@
return categories;
}
- private static void getTilesForAction(Context context,
+ @VisibleForTesting
+ static void getTilesForAction(Context context,
UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache,
- String defaultCategory, ArrayList<Tile> outTiles, boolean requireSettings) {
- getTilesForAction(context, user, action, addedCache, defaultCategory, outTiles,
- requireSettings, requireSettings);
- }
-
- private static void getTilesForAction(Context context,
- UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache,
- String defaultCategory, ArrayList<Tile> outTiles, boolean requireSettings,
- boolean usePriority) {
- Intent intent = new Intent(action);
+ String defaultCategory, List<Tile> outTiles, boolean requireSettings) {
+ final Intent intent = new Intent(action);
if (requireSettings) {
intent.setPackage(SETTING_PKG);
}
- getTilesForIntent(context, user, intent, addedCache, defaultCategory, outTiles,
- usePriority, true);
- }
-
- public static void getTilesForIntent(
- Context context, UserHandle user, Intent intent,
- Map<Pair<String, String>, Tile> addedCache, String defaultCategory, List<Tile> outTiles,
- boolean usePriority, boolean checkCategory) {
- PackageManager pm = context.getPackageManager();
+ final PackageManager pm = context.getPackageManager();
List<ResolveInfo> results = pm.queryIntentActivitiesAsUser(intent,
PackageManager.GET_META_DATA, user.getIdentifier());
for (ResolveInfo resolved : results) {
@@ -289,7 +274,7 @@
String categoryKey = defaultCategory;
// Load category
- if (checkCategory && ((metaData == null) || !metaData.containsKey(EXTRA_CATEGORY_KEY))
+ if ((metaData == null || !metaData.containsKey(EXTRA_CATEGORY_KEY))
&& categoryKey == null) {
Log.w(LOG_TAG, "Found " + resolved.activityInfo.name + " for intent "
+ intent + " missing metadata "
@@ -302,14 +287,7 @@
Pair<String, String> key = new Pair<>(activityInfo.packageName, activityInfo.name);
Tile tile = addedCache.get(key);
if (tile == null) {
- tile = new Tile(activityInfo);
- tile.intent = new Intent().setClassName(
- activityInfo.packageName, activityInfo.name);
- tile.category = categoryKey;
- tile.priority = usePriority ? resolved.priority : 0;
- tile.metaData = activityInfo.metaData;
- updateTileData(context, tile, activityInfo, activityInfo.applicationInfo, pm);
- if (DEBUG) Log.d(LOG_TAG, "Adding tile " + tile.title);
+ tile = new Tile(activityInfo, categoryKey);
addedCache.put(key, tile);
}
@@ -322,82 +300,6 @@
}
}
- private static boolean updateTileData(Context context, Tile tile,
- ActivityInfo activityInfo, ApplicationInfo applicationInfo, PackageManager pm) {
- if (applicationInfo.isSystemApp()) {
- boolean forceTintIcon = false;
- CharSequence title = null;
- String summary = null;
- String keyHint = null;
- boolean isIconTintable = false;
-
- // Get the activity's meta-data
- try {
- Resources res = pm.getResourcesForApplication(applicationInfo.packageName);
- Bundle metaData = activityInfo.metaData;
-
- if (!context.getPackageName().equals(applicationInfo.packageName)) {
- isIconTintable = true;
- forceTintIcon = true;
- }
-
- if (res != null && metaData != null) {
- if (metaData.containsKey(META_DATA_PREFERENCE_ICON_TINTABLE)) {
- if (forceTintIcon) {
- Log.w(LOG_TAG, "Ignoring icon tintable for " + activityInfo);
- } else {
- isIconTintable =
- metaData.getBoolean(META_DATA_PREFERENCE_ICON_TINTABLE);
- }
- }
- if (metaData.containsKey(META_DATA_PREFERENCE_TITLE)) {
- if (metaData.get(META_DATA_PREFERENCE_TITLE) instanceof Integer) {
- title = res.getString(metaData.getInt(META_DATA_PREFERENCE_TITLE));
- } else {
- title = metaData.getString(META_DATA_PREFERENCE_TITLE);
- }
- }
- if (metaData.containsKey(META_DATA_PREFERENCE_SUMMARY)) {
- if (metaData.get(META_DATA_PREFERENCE_SUMMARY) instanceof Integer) {
- summary = res.getString(metaData.getInt(META_DATA_PREFERENCE_SUMMARY));
- } else {
- 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);
- }
-
- // Set the preference title to the activity's label if no
- // meta-data is found
- if (TextUtils.isEmpty(title)) {
- title = activityInfo.loadLabel(pm).toString();
- }
-
- // 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;
- tile.isIconTintable = isIconTintable;
-
- return true;
- }
-
- return false;
- }
-
/**
* Gets the icon package name and resource id from content provider.
*
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/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
index 01df0ec..dddfa7a 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
@@ -102,17 +102,4 @@
private boolean isRectZero(Rect r) {
return r.left == 0 && r.top == 0 && r.right == 0 && r.bottom == 0;
}
-
- @Test
- public void testPlusPaint_isEqualToBoltPaint() {
- // Before setting color
- assertTrue(mBatteryDrawable.mPlusPaint.hasEqualAttributes(mBatteryDrawable.mBoltPaint));
-
- final int fakeFillColor = 123;
- final int fakeBackgrundColor = 456;
-
- // After
- mBatteryDrawable.setColors(fakeFillColor, fakeBackgrundColor);
- assertTrue(mBatteryDrawable.mPlusPaint.hasEqualAttributes(mBatteryDrawable.mBoltPaint));
- }
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingsLibRobolectricTestRunner.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingsLibRobolectricTestRunner.java
index 914d182..dde1746 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingsLibRobolectricTestRunner.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/SettingsLibRobolectricTestRunner.java
@@ -54,7 +54,7 @@
final List<ResourcePath> paths = super.getIncludedResourcePaths();
paths.add(resourcePath("file:frameworks/base/packages/SettingsLib/res"));
paths.add(resourcePath("file:frameworks/base/core/res/res"));
- paths.add(resourcePath("file:frameworks/support/appcompat/res"));
+ paths.add(resourcePath("file:out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.appcompat_appcompat-nodeps/android_common/aar/res/"));
return paths;
}
};
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java
index b2ab45c..29831a8 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java
@@ -19,11 +19,11 @@
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import android.bluetooth.BluetoothA2dp;
+import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothCodecConfig;
import android.bluetooth.BluetoothCodecStatus;
import android.bluetooth.BluetoothDevice;
@@ -33,21 +33,23 @@
import com.android.settingslib.R;
import com.android.settingslib.SettingsLibRobolectricTestRunner;
+import com.android.settingslib.testutils.shadow.ShadowBluetoothAdapter;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(shadows = {ShadowBluetoothAdapter.class})
public class A2dpProfileTest {
@Mock
Context mContext;
@Mock
- LocalBluetoothAdapter mAdapter;
- @Mock
CachedBluetoothDeviceManager mDeviceManager;
@Mock
LocalBluetoothProfileManager mProfileManager;
@@ -58,20 +60,14 @@
BluetoothProfile.ServiceListener mServiceListener;
A2dpProfile mProfile;
+ private ShadowBluetoothAdapter mShadowBluetoothAdapter;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
-
- // Capture the A2dpServiceListener our A2dpProfile will pass during its constructor, so that
- // we can call its onServiceConnected method and get it to use our mock BluetoothA2dp
- // object.
- doAnswer((invocation) -> {
- mServiceListener = (BluetoothProfile.ServiceListener) invocation.getArguments()[1];
- return null;
- }).when(mAdapter).getProfileProxy(any(Context.class), any(), eq(BluetoothProfile.A2DP));
-
- mProfile = new A2dpProfile(mContext, mAdapter, mDeviceManager, mProfileManager);
+ mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter());
+ mProfile = new A2dpProfile(mContext, mDeviceManager, mProfileManager);
+ mServiceListener = mShadowBluetoothAdapter.getServiceListener();
mServiceListener.onServiceConnected(BluetoothProfile.A2DP, mBluetoothA2dp);
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java
index c904384..7baded8 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManagerTest.java
@@ -21,7 +21,6 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
-import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
@@ -51,7 +50,6 @@
private final static String DEVICE_ADDRESS_3 = "AA:BB:CC:DD:EE:33";
private final static String DEVICE_SUMMARY_1 = "summary 1";
private final static String DEVICE_SUMMARY_2 = "summary 2";
- private final static String DEVICE_SUMMARY_3 = "summary 3";
private final static long HISYNCID1 = 10;
private final static long HISYNCID2 = 11;
private final BluetoothClass DEVICE_CLASS_1 =
@@ -59,8 +57,6 @@
private final BluetoothClass DEVICE_CLASS_2 =
new BluetoothClass(BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE);
@Mock
- private LocalBluetoothAdapter mLocalAdapter;
- @Mock
private LocalBluetoothProfileManager mLocalProfileManager;
@Mock
private LocalBluetoothManager mLocalBluetoothManager;
@@ -85,11 +81,6 @@
private CachedBluetoothDevice mCachedDevice3;
private CachedBluetoothDeviceManager mCachedDeviceManager;
private Context mContext;
- private String[] mActiveDeviceStringsArray;
- private String mActiveDeviceStringNone;
- private String mActiveDeviceStringAll;
- private String mActiveDeviceStringMedia;
- private String mActiveDeviceStringPhone;
@Before
public void setUp() {
@@ -109,18 +100,18 @@
when(mDevice3.getBluetoothClass()).thenReturn(DEVICE_CLASS_2);
when(mLocalBluetoothManager.getEventManager()).thenReturn(mBluetoothEventManager);
- when(mLocalAdapter.getBluetoothState()).thenReturn(BluetoothAdapter.STATE_ON);
+ when(mLocalBluetoothManager.getProfileManager()).thenReturn(mLocalProfileManager);
when(mHfpProfile.isProfileReady()).thenReturn(true);
when(mA2dpProfile.isProfileReady()).thenReturn(true);
when(mPanProfile.isProfileReady()).thenReturn(true);
when(mHearingAidProfile.isProfileReady()).thenReturn(true);
mCachedDeviceManager = new CachedBluetoothDeviceManager(mContext, mLocalBluetoothManager);
mCachedDevice1 = spy(
- new CachedBluetoothDevice(mContext, mLocalAdapter, mLocalProfileManager, mDevice1));
+ new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice1));
mCachedDevice2 = spy(
- new CachedBluetoothDevice(mContext, mLocalAdapter, mLocalProfileManager, mDevice2));
+ new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice2));
mCachedDevice3 = spy(
- new CachedBluetoothDevice(mContext, mLocalAdapter, mLocalProfileManager, mDevice3));
+ new CachedBluetoothDevice(mContext, mLocalProfileManager, mDevice3));
}
/**
@@ -128,11 +119,9 @@
*/
@Test
public void testAddDevice_validCachedDevices_devicesAdded() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
Collection<CachedBluetoothDevice> devices = mCachedDeviceManager.getCachedDevicesCopy();
@@ -148,8 +137,7 @@
*/
@Test
public void testGetName_validCachedDevice_nameFound() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
assertThat(mCachedDeviceManager.getName(mDevice1)).isEqualTo(DEVICE_ALIAS_1);
}
@@ -159,8 +147,7 @@
*/
@Test
public void testOnDeviceNameUpdated_validName_nameUpdated() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
assertThat(cachedDevice1.getName()).isEqualTo(DEVICE_ALIAS_1);
@@ -175,11 +162,9 @@
*/
@Test
public void testClearNonBondedDevices_bondedAndNonBondedDevices_nonBondedDevicesCleared() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
@@ -230,11 +215,9 @@
*/
@Test
public void testOnHiSyncIdChanged_sameHiSyncId_populateInDifferentLists() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
// Since both devices do not have hiSyncId, they should be added in mCachedDevices.
@@ -265,11 +248,9 @@
*/
@Test
public void testOnHiSyncIdChanged_sameHiSyncIdAndOneConnected_chooseConnectedDevice() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
cachedDevice1.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
cachedDevice2.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
@@ -302,11 +283,9 @@
*/
@Test
public void testOnHiSyncIdChanged_differentHiSyncId_populateInSameList() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
// Since both devices do not have hiSyncId, they should be added in mCachedDevices.
@@ -338,8 +317,7 @@
*/
@Test
public void testOnProfileConnectionStateChanged_singleDeviceConnected_visible() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
cachedDevice1.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
@@ -376,11 +354,9 @@
*/
@Test
public void testOnProfileConnectionStateChanged_twoDevicesConnected_oneDeviceVisible() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
cachedDevice1.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
cachedDevice2.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
@@ -430,11 +406,9 @@
*/
@Test
public void testOnProfileConnectionStateChanged_twoDevicesDisconnected_oneDeviceVisible() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
cachedDevice1.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
cachedDevice2.onProfileStateChanged(mHearingAidProfile, BluetoothProfile.STATE_CONNECTED);
@@ -485,11 +459,9 @@
*/
@Test
public void testOnDeviceUnpaired_bothHearingAidsPaired_removesItsPairFromList() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
cachedDevice1.setHiSyncId(HISYNCID1);
@@ -517,14 +489,11 @@
*/
@Test
public void testOnDeviceUnpaired_bothHearingAidsNotPaired_doesNotRemoveAnyDeviceFromList() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
- CachedBluetoothDevice cachedDevice3 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice3);
+ CachedBluetoothDevice cachedDevice3 = mCachedDeviceManager.addDevice(mDevice3);
assertThat(cachedDevice2).isNotNull();
cachedDevice1.setHiSyncId(HISYNCID1);
@@ -569,8 +538,7 @@
doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1);
doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice2);
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
// The first hearing aid device should be populated in mCachedDevice and
// mCachedDevicesMapForHearingAids.
@@ -580,8 +548,7 @@
assertThat(mCachedDeviceManager.mCachedDevicesMapForHearingAids.values())
.contains(cachedDevice1);
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
// The second hearing aid device should be populated in mHearingAidDevicesNotAddedInCache.
assertThat(mCachedDeviceManager.getCachedDevicesCopy()).hasSize(1);
@@ -598,8 +565,7 @@
.getHearingAidProfile();
doAnswer((invocation) -> HISYNCID1).when(mHearingAidProfile).getHiSyncId(mDevice1);
doAnswer((invocation) -> HISYNCID2).when(mHearingAidProfile).getHiSyncId(mDevice2);
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
// The first hearing aid device should be populated in mCachedDevice and
// mCachedDevicesMapForHearingAids.
@@ -609,8 +575,7 @@
assertThat(mCachedDeviceManager.mCachedDevicesMapForHearingAids.values())
.contains(cachedDevice1);
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
// The second hearing aid device should also be populated in mCachedDevice
// and mCachedDevicesMapForHearingAids as its not a pair of the first one.
@@ -679,8 +644,7 @@
*/
@Test
public void testOnBtClassChanged_validBtClass_classChanged() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
assertThat(cachedDevice1.getBtClass()).isEqualTo(DEVICE_CLASS_1);
@@ -695,8 +659,7 @@
*/
@Test
public void testOnDeviceDisappeared_deviceBondedUnbonded_unbondedDeviceDisappeared() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
@@ -711,11 +674,9 @@
*/
@Test
public void testOnActiveDeviceChanged_connectedDevices_activeDeviceChanged() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
@@ -776,11 +737,9 @@
*/
@Test
public void testOnActiveDeviceChanged_withA2dpAndHearingAid() {
- CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice1);
+ CachedBluetoothDevice cachedDevice1 = mCachedDeviceManager.addDevice(mDevice1);
assertThat(cachedDevice1).isNotNull();
- CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mLocalAdapter,
- mLocalProfileManager, mDevice2);
+ CachedBluetoothDevice cachedDevice2 = mCachedDeviceManager.addDevice(mDevice2);
assertThat(cachedDevice2).isNotNull();
when(mDevice1.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
index c39fb85..5e417c3 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
@@ -26,7 +26,6 @@
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
-import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
@@ -49,8 +48,6 @@
private final static String DEVICE_ADDRESS = "AA:BB:CC:DD:EE:FF";
private final static String DEVICE_ALIAS_NEW = "TestAliasNew";
@Mock
- private LocalBluetoothAdapter mAdapter;
- @Mock
private LocalBluetoothProfileManager mProfileManager;
@Mock
private HeadsetProfile mHfpProfile;
@@ -73,13 +70,11 @@
mContext = RuntimeEnvironment.application;
mShadowAudioManager = shadowOf(mContext.getSystemService(AudioManager.class));
when(mDevice.getAddress()).thenReturn(DEVICE_ADDRESS);
- when(mAdapter.getBluetoothState()).thenReturn(BluetoothAdapter.STATE_ON);
when(mHfpProfile.isProfileReady()).thenReturn(true);
when(mA2dpProfile.isProfileReady()).thenReturn(true);
when(mPanProfile.isProfileReady()).thenReturn(true);
when(mHearingAidProfile.isProfileReady()).thenReturn(true);
- mCachedDevice = spy(
- new CachedBluetoothDevice(mContext, mAdapter, mProfileManager, mDevice));
+ mCachedDevice = spy(new CachedBluetoothDevice(mContext, mProfileManager, mDevice));
doAnswer((invocation) -> mBatteryLevel).when(mCachedDevice).getBatteryLevel();
}
@@ -477,7 +472,7 @@
when(mDevice.getAliasName()).thenReturn(DEVICE_ALIAS);
when(mDevice.getName()).thenReturn(DEVICE_NAME);
CachedBluetoothDevice cachedBluetoothDevice =
- new CachedBluetoothDevice(mContext, mAdapter, mProfileManager, mDevice);
+ new CachedBluetoothDevice(mContext, mProfileManager, mDevice);
// Verify alias is returned on getName
assertThat(cachedBluetoothDevice.getName()).isEqualTo(DEVICE_ALIAS);
// Verify device is visible
@@ -487,7 +482,7 @@
@Test
public void testDeviceName_testNameNotAvailable() {
CachedBluetoothDevice cachedBluetoothDevice =
- new CachedBluetoothDevice(mContext, mAdapter, mProfileManager, mDevice);
+ new CachedBluetoothDevice(mContext, mProfileManager, mDevice);
// Verify device address is returned on getName
assertThat(cachedBluetoothDevice.getName()).isEqualTo(DEVICE_ADDRESS);
// Verify device is not visible
@@ -504,7 +499,7 @@
}).when(mDevice).setAlias(anyString());
when(mDevice.getName()).thenReturn(DEVICE_NAME);
CachedBluetoothDevice cachedBluetoothDevice =
- new CachedBluetoothDevice(mContext, mAdapter, mProfileManager, mDevice);
+ new CachedBluetoothDevice(mContext, mProfileManager, mDevice);
// Verify alias is returned on getName
assertThat(cachedBluetoothDevice.getName()).isEqualTo(DEVICE_ALIAS);
// Verify null name does not get set
@@ -543,7 +538,7 @@
when(mA2dpProfile.getConnectionStatus(mDevice)).
thenReturn(BluetoothProfile.STATE_CONNECTED);
- assertThat(mCachedDevice.isA2dpDevice()).isTrue();
+ assertThat(mCachedDevice.isConnectedA2dpDevice()).isTrue();
}
@Test
@@ -552,7 +547,7 @@
when(mA2dpProfile.getConnectionStatus(mDevice)).
thenReturn(BluetoothProfile.STATE_DISCONNECTING);
- assertThat(mCachedDevice.isA2dpDevice()).isFalse();
+ assertThat(mCachedDevice.isConnectedA2dpDevice()).isFalse();
}
@Test
@@ -561,7 +556,7 @@
when(mHfpProfile.getConnectionStatus(mDevice)).
thenReturn(BluetoothProfile.STATE_CONNECTED);
- assertThat(mCachedDevice.isHfpDevice()).isTrue();
+ assertThat(mCachedDevice.isConnectedHfpDevice()).isTrue();
}
@Test
@@ -570,7 +565,7 @@
when(mHfpProfile.getConnectionStatus(mDevice)).
thenReturn(BluetoothProfile.STATE_DISCONNECTING);
- assertThat(mCachedDevice.isHfpDevice()).isFalse();
+ assertThat(mCachedDevice.isConnectedHfpDevice()).isFalse();
}
@Test
@@ -595,14 +590,14 @@
public void isConnectedHfpDevice_profileIsNull_returnFalse() {
when(mProfileManager.getHeadsetProfile()).thenReturn(null);
- assertThat(mCachedDevice.isHfpDevice()).isFalse();
+ assertThat(mCachedDevice.isConnectedHfpDevice()).isFalse();
}
@Test
public void isConnectedA2dpDevice_profileIsNull_returnFalse() {
when(mProfileManager.getA2dpProfile()).thenReturn(null);
- assertThat(mCachedDevice.isA2dpDevice()).isFalse();
+ assertThat(mCachedDevice.isConnectedA2dpDevice()).isFalse();
}
@Test
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/HeadsetProfileTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/HeadsetProfileTest.java
index bc8be4d..c0a1f0c 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/HeadsetProfileTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/HeadsetProfileTest.java
@@ -2,18 +2,17 @@
import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
+import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
import com.android.settingslib.SettingsLibRobolectricTestRunner;
+import com.android.settingslib.testutils.shadow.ShadowBluetoothAdapter;
import org.junit.Before;
import org.junit.Test;
@@ -21,13 +20,14 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(shadows = {ShadowBluetoothAdapter.class})
public class HeadsetProfileTest {
@Mock
- private LocalBluetoothAdapter mAdapter;
- @Mock
private CachedBluetoothDeviceManager mDeviceManager;
@Mock
private LocalBluetoothProfileManager mProfileManager;
@@ -39,19 +39,18 @@
private BluetoothDevice mBluetoothDevice;
private BluetoothProfile.ServiceListener mServiceListener;
private HeadsetProfile mProfile;
+ private ShadowBluetoothAdapter mShadowBluetoothAdapter;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
Context context = spy(RuntimeEnvironment.application);
+ mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter());
- doAnswer((invocation) -> {
- mServiceListener = (BluetoothProfile.ServiceListener) invocation.getArguments()[1];
- return null;
- }).when(mAdapter).getProfileProxy(any(Context.class), any(), eq(BluetoothProfile.HEADSET));
when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
- mProfile = new HeadsetProfile(context, mAdapter, mDeviceManager, mProfileManager);
+ mProfile = new HeadsetProfile(context, mDeviceManager, mProfileManager);
+ mServiceListener = mShadowBluetoothAdapter.getServiceListener();
mServiceListener.onServiceConnected(BluetoothProfile.HEADSET, mService);
}
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..f223176 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;
@@ -37,6 +38,7 @@
import android.os.ParcelUuid;
import com.android.settingslib.SettingsLibRobolectricTestRunner;
+import com.android.settingslib.testutils.shadow.ShadowBluetoothAdapter;
import org.junit.Before;
import org.junit.Test;
@@ -44,34 +46,38 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
import java.util.ArrayList;
import java.util.List;
@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(shadows = {ShadowBluetoothAdapter.class})
public class LocalBluetoothProfileManagerTest {
@Mock
private CachedBluetoothDeviceManager mDeviceManager;
@Mock
private BluetoothEventManager mEventManager;
@Mock
- private LocalBluetoothAdapter mAdapter;
- @Mock
private BluetoothDevice mDevice;
@Mock
private CachedBluetoothDevice mCachedBluetoothDevice;
private Context mContext;
- private LocalBluetoothProfileManager mProfileManager;
private Intent mIntent;
+ private LocalBluetoothAdapter mLocalBluetoothAdapter;
+ private LocalBluetoothProfileManager mProfileManager;
+ private ShadowBluetoothAdapter mShadowBluetoothAdapter;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(RuntimeEnvironment.application);
- mEventManager = spy(new BluetoothEventManager(mAdapter,
- mDeviceManager, mContext));
- when(mAdapter.getBluetoothState()).thenReturn(BluetoothAdapter.STATE_ON);
+ mLocalBluetoothAdapter = LocalBluetoothAdapter.getInstance();
+ mEventManager = spy(new BluetoothEventManager(mLocalBluetoothAdapter, mDeviceManager,
+ mContext));
+ mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter());
when(mDeviceManager.findDevice(mDevice)).thenReturn(mCachedBluetoothDevice);
}
@@ -80,8 +86,10 @@
*/
@Test
public void constructor_initiateHidAndHidDeviceProfile() {
- mProfileManager =
- new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager, mEventManager);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.HID_HOST, BluetoothProfile.HID_DEVICE}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
assertThat(mProfileManager.getHidProfile()).isNotNull();
assertThat(mProfileManager.getHidDeviceProfile()).isNotNull();
@@ -92,14 +100,14 @@
*/
@Test
public void updateLocalProfiles_addA2dpToLocalProfiles() {
- mProfileManager =
- new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager, mEventManager);
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
assertThat(mProfileManager.getA2dpProfile()).isNull();
assertThat(mProfileManager.getHeadsetProfile()).isNull();
- ParcelUuid[] uuids = mAdapter.getUuids();
- mProfileManager.updateLocalProfiles(uuids);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.A2DP}));
+ mProfileManager.updateLocalProfiles();
assertThat(mProfileManager.getA2dpProfile()).isNotNull();
assertThat(mProfileManager.getHeadsetProfile()).isNull();
@@ -110,8 +118,10 @@
*/
@Test
public void updateProfiles_addHidProfileForRemoteDevice() {
- mProfileManager =
- new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager, mEventManager);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.HID_HOST}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
ParcelUuid[] uuids = new ParcelUuid[]{BluetoothUuid.Hid};
ParcelUuid[] localUuids = new ParcelUuid[]{};
List<LocalBluetoothProfile> profiles = new ArrayList<>();
@@ -131,9 +141,10 @@
*/
@Test
public void stateChangedHandler_receiveA2dpConnectionStateChanged_shouldDispatchCallback() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
- mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
- mEventManager);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.A2DP}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
// LocalBluetoothProfileManager created.
mEventManager.setReceiverHandler(null);
@@ -154,9 +165,10 @@
*/
@Test
public void stateChangedHandler_receiveHeadsetConnectionStateChanged_shouldDispatchCallback() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.Handsfree_AG});
- mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
- mEventManager);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.HEADSET}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
// LocalBluetoothProfileManager created.
mEventManager.setReceiverHandler(null);
@@ -177,12 +189,10 @@
*/
@Test
public void stateChangedHandler_receiveHAPConnectionStateChanged_shouldDispatchCallback() {
- ArrayList<Integer> supportProfiles = new ArrayList<>();
- supportProfiles.add(BluetoothProfile.HEARING_AID);
- when(mAdapter.getSupportedProfiles()).thenReturn(supportProfiles);
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.HearingAid});
- mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
- mEventManager);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.HEARING_AID}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
// LocalBluetoothProfileManager created.
mEventManager.setReceiverHandler(null);
@@ -203,9 +213,10 @@
*/
@Test
public void stateChangedHandler_receivePanConnectionStateChanged_shouldNotDispatchCallback() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
- mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
- mEventManager);
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.PAN}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
// LocalBluetoothProfileManager created.
mEventManager.setReceiverHandler(null);
@@ -225,10 +236,34 @@
* handler and refresh CachedBluetoothDevice
*/
@Test
- public void stateChangedHandler_receivePanConnectionStateChangedWithoutUuid_shouldNotRefresh() {
- when(mAdapter.getUuids()).thenReturn(null);
- mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
- mEventManager);
+ public void stateChangedHandler_receivePanConnectionStateChangedWithoutProfile_shouldNotRefresh
+ () {
+ mShadowBluetoothAdapter.setSupportedProfiles(null);
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ 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() {
+ mShadowBluetoothAdapter.setSupportedProfiles(generateList(
+ new int[] {BluetoothProfile.PAN}));
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
+ mDeviceManager, mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
// LocalBluetoothProfileManager created.
mEventManager.setReceiverHandler(null);
@@ -242,25 +277,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 a9e5aae..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,20 +31,21 @@
public void setUp() {
mActivityInfo = new ActivityInfo();
mActivityInfo.packageName = RuntimeEnvironment.application.getPackageName();
+ mActivityInfo.name = "abc";
mActivityInfo.icon = R.drawable.ic_plus;
- mTile = new Tile(mActivityInfo);
- mTile.metaData = new Bundle();
+ mActivityInfo.metaData = new Bundle();
+ mTile = new Tile(mActivityInfo, "category");
}
@Test
public void isPrimaryProfileOnly_profilePrimary_shouldReturnTrue() {
- mTile.metaData.putString(META_DATA_KEY_PROFILE, PROFILE_PRIMARY);
+ mActivityInfo.metaData.putString(META_DATA_KEY_PROFILE, PROFILE_PRIMARY);
assertThat(mTile.isPrimaryProfileOnly()).isTrue();
}
@Test
public void isPrimaryProfileOnly_profileAll_shouldReturnFalse() {
- mTile.metaData.putString(META_DATA_KEY_PROFILE, PROFILE_ALL);
+ mActivityInfo.metaData.putString(META_DATA_KEY_PROFILE, PROFILE_ALL);
assertThat(mTile.isPrimaryProfileOnly()).isFalse();
}
@@ -54,27 +56,28 @@
@Test
public void isPrimaryProfileOnly_nullMetadata_shouldReturnFalse() {
- mTile.metaData = null;
+ mActivityInfo.metaData = null;
assertThat(mTile.isPrimaryProfileOnly()).isFalse();
}
@Test
public void getIcon_noContextOrMetadata_returnNull() {
- final Tile tile = new Tile(new ActivityInfo());
+ mActivityInfo.metaData = null;
+ final Tile tile = new Tile(mActivityInfo, "category");
assertThat(tile.getIcon(null)).isNull();
assertThat(tile.getIcon(RuntimeEnvironment.application)).isNull();
}
@Test
public void getIcon_providedByUri_returnNull() {
- mTile.metaData.putString(META_DATA_PREFERENCE_ICON_URI, "content://foobar/icon");
+ mActivityInfo.metaData.putString(META_DATA_PREFERENCE_ICON_URI, "content://foobar/icon");
assertThat(mTile.getIcon(RuntimeEnvironment.application)).isNull();
}
@Test
public void getIcon_hasIconMetadata_returnIcon() {
- mTile.metaData.putInt(META_DATA_PREFERENCE_ICON, R.drawable.ic_info);
+ mActivityInfo.metaData.putInt(META_DATA_PREFERENCE_ICON, R.drawable.ic_info);
assertThat(mTile.getIcon(RuntimeEnvironment.application).getResId())
.isEqualTo(R.drawable.ic_info);
@@ -82,9 +85,65 @@
@Test
public void getIcon_noIconMetadata_returnActivityIcon() {
- mTile.metaData.putInt(META_DATA_PREFERENCE_ICON, 0);
+ mActivityInfo.metaData.putInt(META_DATA_PREFERENCE_ICON, 0);
assertThat(mTile.getIcon(RuntimeEnvironment.application).getResId())
.isEqualTo(mActivityInfo.icon);
}
+
+ @Test
+ public void isIconTintable_hasMetadata_shouldReturnIconTintableMetadata() {
+ final Tile tile = new Tile(mActivityInfo, "category");
+
+ mActivityInfo.metaData.putBoolean(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE, false);
+ assertThat(tile.isIconTintable(RuntimeEnvironment.application)).isFalse();
+
+ mActivityInfo.metaData.putBoolean(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE, true);
+ assertThat(tile.isIconTintable(RuntimeEnvironment.application)).isTrue();
+ }
+
+ @Test
+ public void isIconTintable_noIcon_shouldReturnFalse() {
+ final Tile tile = new Tile(mActivityInfo, "category");
+
+ assertThat(tile.isIconTintable(RuntimeEnvironment.application)).isFalse();
+ }
+
+ @Test
+ public void isIconTintable_noMetadata_shouldReturnPackageNameCheck() {
+ final Tile tile1 = new Tile(mActivityInfo, "category");
+ assertThat(tile1.isIconTintable(RuntimeEnvironment.application)).isFalse();
+
+ 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 0b6acde..8e06f157 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,13 @@
package com.android.settingslib.drawer;
+import static com.android.settingslib.drawer.TileUtils.IA_SETTINGS_ACTION;
+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;
@@ -33,7 +40,6 @@
import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.IContentProvider;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
@@ -41,13 +47,10 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
-import android.net.Uri;
import android.os.Bundle;
-import android.os.RemoteException;
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;
@@ -75,8 +78,6 @@
@Mock
private UserManager mUserManager;
@Mock
- private IContentProvider mIContentProvider;
- @Mock
private ContentResolver mContentResolver;
private static final String URI_GET_SUMMARY = "content://authority/text/summary";
@@ -99,81 +100,54 @@
@Test
public void getTilesForIntent_shouldParseCategory() {
final String testCategory = "category1";
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
info.add(newInfo(true, testCategory));
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* usePriority */);
assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).category).isEqualTo(testCategory);
+ assertThat(outTiles.get(0).getCategory()).isEqualTo(testCategory);
}
@Test
public void getTilesForIntent_shouldParseKeyHintForSystemApp() {
String keyHint = "key";
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
ResolveInfo resolveInfo = newInfo(true, null /* category */, keyHint);
info.add(resolveInfo);
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* requiresSettings */);
- assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).key).isEqualTo(keyHint);
+ assertThat(outTiles).hasSize(1);
+ assertThat(outTiles.get(0).getKey(mContext)).isEqualTo(keyHint);
}
@Test
public void getTilesForIntent_shouldSkipNonSystemApp() {
final String testCategory = "category1";
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
info.add(newInfo(false, testCategory));
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION,
+ addedCache, null /* defaultCategory */, outTiles, false /* requiresSettings */);
- assertThat(outTiles.isEmpty()).isTrue();
- }
-
- @Test
- public void getCategories_shouldHandleExtraIntentAction() {
- final String testCategory = "category1";
- final String testAction = "action1";
- Map<Pair<String, String>, Tile> cache = new ArrayMap<>();
- List<ResolveInfo> info = new ArrayList<>();
- info.add(newInfo(true, testCategory));
- Global.putInt(mContext.getContentResolver(), Global.DEVICE_PROVISIONED, 1);
- when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
- List<UserHandle> userHandleList = new ArrayList<>();
- userHandleList.add(UserHandle.CURRENT);
- when(mUserManager.getUserProfiles()).thenReturn(userHandleList);
-
- when(mPackageManager.queryIntentActivitiesAsUser(argThat(
- event -> testAction.equals(event.getAction())), anyInt(), anyInt()))
- .thenReturn(info);
-
- List<DashboardCategory> categoryList = TileUtils.getCategories(mContext, cache, testAction);
- assertThat(categoryList.get(0).getTile(0).category).isEqualTo(testCategory);
+ assertThat(outTiles).isEmpty();
}
@Test
@@ -187,7 +161,7 @@
userHandleList.add(new UserHandle(ActivityManager.getCurrentUser()));
when(mUserManager.getUserProfiles()).thenReturn(userHandleList);
- TileUtils.getCategories(mContext, cache, null /* action */);
+ TileUtils.getCategories(mContext, cache);
verify(mPackageManager, atLeastOnce()).queryIntentActivitiesAsUser(
intentCaptor.capture(), anyInt(), anyInt());
@@ -197,7 +171,6 @@
@Test
public void getTilesForIntent_shouldReadMetadataTitleAsString() {
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
@@ -205,20 +178,18 @@
URI_GET_SUMMARY, "my title", 0);
info.add(resolveInfo);
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* usePriority */);
assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).title).isEqualTo("my title");
+ assertThat(outTiles.get(0).getTitle(mContext)).isEqualTo("my title");
}
@Test
public void getTilesForIntent_shouldReadMetadataTitleFromResource() {
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
@@ -226,27 +197,24 @@
URI_GET_SUMMARY, null, 123);
info.add(resolveInfo);
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
when(mResources.getString(eq(123)))
.thenReturn("my localized title");
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
-
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* usePriority */);
assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).title).isEqualTo("my localized title");
+ assertThat(outTiles.get(0).getTitle(mContext)).isEqualTo("my localized title");
// Icon should be tintable because the tile is not from settings package, and
// "forceTintExternalIcon" is set
- assertThat(outTiles.get(0).isIconTintable).isTrue();
+ assertThat(outTiles.get(0).isIconTintable(mContext)).isTrue();
}
@Test
public void getTilesForIntent_shouldNotTintIconIfInSettingsPackage() {
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
@@ -256,20 +224,17 @@
resolveInfo.activityInfo.applicationInfo.packageName = "com.android.settings";
info.add(resolveInfo);
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* usePriority */);
- assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).isIconTintable).isFalse();
+ assertThat(outTiles.get(0).isIconTintable(mContext)).isFalse();
}
@Test
public void getTilesForIntent_shouldMarkIconTintableIfMetadataSet() {
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
@@ -279,61 +244,17 @@
.putBoolean(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE, true);
info.add(resolveInfo);
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* usePriority */);
- assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).isIconTintable).isTrue();
- }
-
- @Test
- public void getTilesForIntent_shouldNotProcessInvalidUriContentSystemApp()
- throws RemoteException {
- Intent intent = new Intent();
- Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
- List<Tile> outTiles = new ArrayList<>();
- List<ResolveInfo> info = new ArrayList<>();
- ResolveInfo resolveInfo = newInfo(true, null /* category */, null, null, URI_GET_SUMMARY);
- info.add(resolveInfo);
-
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
- .thenReturn(info);
-
- // Case 1: No provider associated with the uri specified.
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
-
- assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).getIcon(mContext).getResId()).isEqualTo(314159);
- assertThat(outTiles.get(0).summary).isEqualTo("static-summary");
-
- // Case 2: Empty bundle.
- Bundle bundle = new Bundle();
- when(mIContentProvider.call(anyString(),
- eq(TileUtils.getMethodFromUri(Uri.parse(URI_GET_SUMMARY))), eq(URI_GET_SUMMARY),
- any())).thenReturn(bundle);
- when(mContentResolver.acquireUnstableProvider(anyString()))
- .thenReturn(mIContentProvider);
- when(mContentResolver.acquireUnstableProvider(any(Uri.class)))
- .thenReturn(mIContentProvider);
-
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
-
- assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).getIcon(mContext).getResId()).isEqualTo(314159);
- assertThat(outTiles.get(0).summary).isEqualTo("static-summary");
+ assertThat(outTiles.get(0).isIconTintable(mContext)).isTrue();
}
@Test
public void getTilesForIntent_shouldProcessUriContentForSystemApp() {
- Intent intent = new Intent();
Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
@@ -341,12 +262,11 @@
URI_GET_SUMMARY);
info.add(resolveInfo);
- when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt()))
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(info);
- TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
- null /* defaultCategory */, outTiles, false /* usePriority */,
- false /* checkCategory */);
+ TileUtils.getTilesForAction(mContext, UserHandle.CURRENT, IA_SETTINGS_ACTION, addedCache,
+ null /* defaultCategory */, outTiles, false /* usePriority */);
assertThat(outTiles.size()).isEqualTo(1);
}
@@ -374,16 +294,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);
@@ -396,16 +316,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/SettingsLib/tests/robotests/src/com/android/settingslib/testutils/shadow/ShadowBluetoothAdapter.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/testutils/shadow/ShadowBluetoothAdapter.java
new file mode 100644
index 0000000..9b8c230
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/testutils/shadow/ShadowBluetoothAdapter.java
@@ -0,0 +1,53 @@
+/*
+ * 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.settingslib.testutils.shadow;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothProfile;
+import android.content.Context;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+import java.util.List;
+
+@Implements(value = BluetoothAdapter.class, inheritImplementationMethods = true)
+public class ShadowBluetoothAdapter extends org.robolectric.shadows.ShadowBluetoothAdapter {
+
+ private List<Integer> mSupportedProfiles;
+ private BluetoothProfile.ServiceListener mServiceListener;
+
+ @Implementation
+ public boolean getProfileProxy(Context context, BluetoothProfile.ServiceListener listener,
+ int profile) {
+ mServiceListener = listener;
+ return true;
+ }
+
+ public BluetoothProfile.ServiceListener getServiceListener() {
+ return mServiceListener;
+ }
+
+ @Implementation
+ public List<Integer> getSupportedProfiles() {
+ return mSupportedProfiles;
+ }
+
+ public void setSupportedProfiles(List<Integer> supportedProfiles) {
+ mSupportedProfiles = supportedProfiles;
+ }
+}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 007e140..c6ea480 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -1791,13 +1791,13 @@
Settings.Secure.DOZE_ALWAYS_ON,
SecureSettingsProto.Doze.ALWAYS_ON);
dumpSetting(s, p,
- Settings.Secure.DOZE_PULSE_ON_PICK_UP,
+ Settings.Secure.DOZE_PICK_UP_GESTURE,
SecureSettingsProto.Doze.PULSE_ON_PICK_UP);
dumpSetting(s, p,
Settings.Secure.DOZE_PULSE_ON_LONG_PRESS,
SecureSettingsProto.Doze.PULSE_ON_LONG_PRESS);
dumpSetting(s, p,
- Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
+ Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
SecureSettingsProto.Doze.PULSE_ON_DOUBLE_TAP);
p.end(dozeToken);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 1c13395..500199f 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -3242,9 +3242,9 @@
getSettingLocked(Settings.Secure.DOZE_ENABLED).getValue());
if (dozeExplicitlyDisabled) {
- secureSettings.insertSettingLocked(Settings.Secure.DOZE_PULSE_ON_PICK_UP,
+ secureSettings.insertSettingLocked(Settings.Secure.DOZE_PICK_UP_GESTURE,
"0", null, true, SettingsState.SYSTEM_PACKAGE_NAME);
- secureSettings.insertSettingLocked(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
+ secureSettings.insertSettingLocked(Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
"0", null, true, SettingsState.SYSTEM_PACKAGE_NAME);
}
currentVersion = 131;
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
new file mode 100644
index 0000000..c9ba268
--- /dev/null
+++ b/packages/SystemUI/Android.bp
@@ -0,0 +1,101 @@
+//
+// 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.
+//
+
+java_library {
+ name: "SystemUI-proto",
+
+ srcs: ["src/**/*.proto"],
+
+ proto: {
+ type: "nano",
+ },
+}
+
+java_library {
+ name: "SystemUI-tags",
+ srcs: ["src/com/android/systemui/EventLogTags.logtags"],
+}
+
+android_library {
+ name: "SystemUI-core",
+ srcs: [
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ],
+ resource_dirs: [
+ "res-keyguard",
+ "res",
+ ],
+ static_libs: [
+ "SystemUIPluginLib",
+ "SystemUISharedLib",
+ "SettingsLib",
+ "androidx.car_car",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.recyclerview_recyclerview",
+ "androidx.preference_preference",
+ "androidx.appcompat_appcompat",
+ "androidx.mediarouter_mediarouter",
+ "androidx.palette_palette",
+ "androidx.legacy_legacy-preference-v14",
+ "androidx.leanback_leanback",
+ "androidx.slice_slice-core",
+ "androidx.slice_slice-view",
+ "androidx.slice_slice-builders",
+ "androidx.arch.core_core-runtime",
+ "androidx.lifecycle_lifecycle-extensions",
+ "SystemUI-tags",
+ "SystemUI-proto",
+ ],
+ manifest: "AndroidManifest.xml",
+
+ libs: [
+ "telephony-common",
+ "android.car",
+ ],
+
+ aaptflags: [
+ "--extra-packages",
+ "com.android.keyguard",
+ ],
+}
+
+android_app {
+ name: "SystemUI",
+ static_libs: [
+ "SystemUI-core",
+ ],
+
+ platform_apis: true,
+ certificate: "platform",
+ privileged: true,
+
+ optimize: {
+ proguard_flags_files: ["proguard.flags"],
+ },
+
+ libs: [
+ "telephony-common",
+ "android.car",
+ ],
+
+ dxflags: ["--multi-dex"],
+ aaptflags: [
+ "--extra-packages",
+ "com.android.keyguard",
+ ],
+
+}
diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk
deleted file mode 100644
index d9ec0fd0..0000000
--- a/packages/SystemUI/Android.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := SystemUI-proto
-
-LOCAL_SRC_FILES := $(call all-proto-files-under,src)
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := nano
-LOCAL_PROTO_JAVA_OUTPUT_PARAMS := optional_field_style=accessors
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := SystemUI-tags
-
-LOCAL_SRC_FILES := src/com/android/systemui/EventLogTags.logtags
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-# ------------------
-
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_MODULE_TAGS := optional
-
-RELATIVE_FINGERPRINT_PATH := ../../core/java/android/hardware/fingerprint
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- $(call all-Iaidl-files-under, src) \
- $(call all-Iaidl-files-under, $(RELATIVE_FINGERPRINT_PATH))
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- SystemUIPluginLib \
- SystemUISharedLib \
- androidx.car_car \
- androidx.legacy_legacy-support-v4 \
- androidx.recyclerview_recyclerview \
- androidx.preference_preference \
- androidx.appcompat_appcompat \
- androidx.mediarouter_mediarouter \
- androidx.palette_palette \
- androidx.legacy_legacy-preference-v14 \
- androidx.leanback_leanback \
- androidx.slice_slice-core \
- androidx.slice_slice-view \
- androidx.slice_slice-builders \
- androidx.arch.core_core-runtime \
- androidx.lifecycle_lifecycle-extensions \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- SystemUI-tags \
- SystemUI-proto
-
-LOCAL_JAVA_LIBRARIES := telephony-common \
- android.car
-
-LOCAL_PACKAGE_NAME := SystemUI
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res-keyguard $(LOCAL_PATH)/res
-
-ifneq ($(INCREMENTAL_BUILDS),)
- LOCAL_PROGUARD_ENABLED := disabled
- LOCAL_JACK_ENABLED := incremental
- LOCAL_DX_FLAGS := --multi-dex
- LOCAL_JACK_FLAGS := --multi-dex native
-endif
-
-include frameworks/base/packages/SettingsLib/common.mk
-
-LOCAL_AAPT_FLAGS := --extra-packages com.android.keyguard
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/SystemUI/docs/plugin_hooks.md b/packages/SystemUI/docs/plugin_hooks.md
index 5b08bfc..9fe2e18 100644
--- a/packages/SystemUI/docs/plugin_hooks.md
+++ b/packages/SystemUI/docs/plugin_hooks.md
@@ -51,6 +51,10 @@
Use: Control over swipes/input for notification views, can be used to control what happens when you swipe/long-press
+### Action: com.android.systemui.action.PLUGIN_CLOCK
+Expected interface: [ClockPlugin](/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java)
+
+Use: Allows replacement of the keyguard main clock.
# Global plugin dependencies
These classes can be accessed by any plugin using PluginDependency as long as they @Requires them.
diff --git a/packages/SystemUI/plugin/Android.bp b/packages/SystemUI/plugin/Android.bp
new file mode 100644
index 0000000..b38059d
--- /dev/null
+++ b/packages/SystemUI/plugin/Android.bp
@@ -0,0 +1,37 @@
+// Copyright (C) 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.
+
+java_library {
+
+ name: "SystemUIPluginLib",
+
+ srcs: ["src/**/*.java"],
+
+
+}
+
+android_app {
+
+ // Dummy to generate .toc files.
+ name: "PluginDummyLib",
+ platform_apis: true,
+ srcs: ["src/**/*.java"],
+
+ libs: ["SystemUIPluginLib"],
+
+ optimize: {
+ enabled: false,
+ },
+
+}
diff --git a/packages/SystemUI/plugin/Android.mk b/packages/SystemUI/plugin/Android.mk
deleted file mode 100644
index 8634684..0000000
--- a/packages/SystemUI/plugin/Android.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := SystemUIPluginLib
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_JAR_EXCLUDE_FILES := none
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-
-# Dummy to generate .toc files.
-LOCAL_PACKAGE_NAME := PluginDummyLib
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := SystemUIPluginLib
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)
diff --git a/packages/SystemUI/plugin/ExamplePlugin/Android.bp b/packages/SystemUI/plugin/ExamplePlugin/Android.bp
new file mode 100644
index 0000000..a0eaf14
--- /dev/null
+++ b/packages/SystemUI/plugin/ExamplePlugin/Android.bp
@@ -0,0 +1,14 @@
+android_app {
+
+ name: "ExamplePlugin",
+
+ libs: ["SystemUIPluginLib"],
+
+ certificate: "platform",
+ optimize: {
+ enabled: false,
+ },
+
+ srcs: ["src/**/*.java"],
+
+}
diff --git a/packages/SystemUI/plugin/ExamplePlugin/Android.mk b/packages/SystemUI/plugin/ExamplePlugin/Android.mk
deleted file mode 100644
index 4c82c75..0000000
--- a/packages/SystemUI/plugin/ExamplePlugin/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_PACKAGE_NAME := ExamplePlugin
-
-LOCAL_JAVA_LIBRARIES := SystemUIPluginLib
-
-LOCAL_CERTIFICATE := platform
-LOCAL_PROGUARD_ENABLED := disabled
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_PACKAGE)
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java
new file mode 100644
index 0000000..b4fc820
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java
@@ -0,0 +1,47 @@
+/*
+ * 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.plugins;
+
+import com.android.systemui.plugins.annotations.ProvidesInterface;
+
+import android.graphics.Paint.Style;
+import android.view.View;
+
+/**
+ * This plugin is used to replace main clock in keyguard.
+ */
+@ProvidesInterface(action = ClockPlugin.ACTION, version = ClockPlugin.VERSION)
+public interface ClockPlugin extends Plugin {
+
+ String ACTION = "com.android.systemui.action.PLUGIN_CLOCK";
+ int VERSION = 1;
+
+ /**
+ * Get clock view.
+ * @return clock view from plugin.
+ */
+ View getView();
+
+ /**
+ * Set clock paint style.
+ * @param style The new style to set in the paint.
+ */
+ void setStyle(Style style);
+
+ /**
+ * Set clock text color.
+ * @param color A color value.
+ */
+ void setTextColor(int color);
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
index 61f7fe8..bf4374a 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
@@ -43,7 +43,7 @@
boolean isAvailable();
void setTileSpec(String tileSpec);
- void clearState();
+ @Deprecated default void clearState() {}
void refreshState();
void addCallback(Callback callback);
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
new file mode 100644
index 0000000..89b873e
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
@@ -0,0 +1,38 @@
+<?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 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.
+*/
+-->
+
+<!-- This is a view that shows clock information in Keyguard. -->
+<com.android.keyguard.KeyguardClockSwitch
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_alignParentTop="true">
+ <TextClock
+ android:id="@+id/default_clock_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:letterSpacing="0.03"
+ android:textColor="?attr/wallpaperTextColor"
+ android:singleLine="true"
+ style="@style/widget_big_thin"
+ android:format12Hour="@string/keyguard_widget_12_hours_format"
+ android:format24Hour="@string/keyguard_widget_24_hours_format" />
+</com.android.keyguard.KeyguardClockSwitch>
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml b/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
index 87983b9..a795442 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
@@ -38,19 +38,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top">
- <TextClock
- android:id="@+id/clock_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:letterSpacing="0.03"
- android:textColor="?attr/wallpaperTextColor"
- android:singleLine="true"
- style="@style/widget_big_thin"
- android:format12Hour="@string/keyguard_widget_12_hours_format"
- android:format24Hour="@string/keyguard_widget_24_hours_format" />
+ <include layout="@layout/keyguard_clock_switch"
+ android:id="@+id/clock_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
<View
android:id="@+id/clock_separator"
android:layout_width="@dimen/widget_separator_width"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
index ba05ccf..4ae2d41 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
@@ -55,19 +55,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top">
- <TextClock
- android:id="@+id/clock_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:letterSpacing="0.03"
- android:textColor="?attr/wallpaperTextColor"
- android:singleLine="true"
- style="@style/widget_big_thin"
- android:format12Hour="@string/keyguard_widget_12_hours_format"
- android:format24Hour="@string/keyguard_widget_24_hours_format" />
+ <include layout="@layout/keyguard_clock_switch"
+ android:id="@+id/clock_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
<View
android:id="@+id/clock_separator"
android:layout_width="@dimen/widget_separator_width"
diff --git a/packages/SystemUI/res-keyguard/values/alias.xml b/packages/SystemUI/res-keyguard/values/alias.xml
index f06b450..1c63c79 100644
--- a/packages/SystemUI/res-keyguard/values/alias.xml
+++ b/packages/SystemUI/res-keyguard/values/alias.xml
@@ -25,9 +25,6 @@
<!-- Alias used to reference framework "OK" string in keyguard. -->
<item type="string" name="ok">@*android:string/ok</item>
- <!-- Alias used to reference framework "OK" string in keyguard. -->
- <item type="string" name="system_ui_date_pattern">@*android:string/system_ui_date_pattern</item>
-
<!-- Alias used to reference framework configuration for screen rotation. -->
<item type="bool" name="config_enableLockScreenRotation">@*android:bool/config_enableLockScreenRotation</item>
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/drawable-hdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index 95e5778..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime_carmode.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime_carmode.png
deleted file mode 100644
index 6421146..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_home_carmode.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_home_carmode.png
deleted file mode 100644
index 151d5fe..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_home_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index b954aa7..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index 61d5db6..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index 7b98c1f..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index aad1320..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl/ic_sysbar_back_carmode.xml b/packages/SystemUI/res/drawable-ldrtl/ic_sysbar_back_carmode.xml
new file mode 100644
index 0000000..f91190b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-ldrtl/ic_sysbar_back_carmode.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="44dp"
+ android:height="44dp"
+ android:viewportWidth="44.0"
+ android:viewportHeight="44.0">
+ <path
+ android:pathData="M35,21.94C35,22.78 34.49,23.58 33.64,24.05L12.44,36.13C11.43,36.7 10.58,36.51 10.11,36.25C9.08,35.67 9,34.56 9,34.09L9,9.91C9,9.35 9.08,8.31 10.09,7.75C10.54,7.49 11.34,7.31 12.33,7.86L33.74,19.95C34.51,20.39 35,21.13 35,21.94L35,21.94ZM12.5,32L30.5,21.96L12.5,12L12.5,32Z"
+ android:strokeColor="#00000000"
+ android:fillType="evenOdd"
+ android:fillColor="#F8F9FA"
+ android:strokeWidth="1"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index 754b2d9..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_carmode.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_carmode.png
deleted file mode 100644
index 873ed7f..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_home_carmode.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_home_carmode.png
deleted file mode 100644
index 7696d87..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_home_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index c98f55e..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime_carmode.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime_carmode.png
deleted file mode 100644
index 187a566..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_home_carmode.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_home_carmode.png
deleted file mode 100644
index c66f8be..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_home_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index 3a3a119..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_ime_carmode.png b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_ime_carmode.png
deleted file mode 100644
index 7198c82..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_ime_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home_carmode.png b/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home_carmode.png
deleted file mode 100644
index b1fc02e..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_back_carmode.png b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_back_carmode.png
deleted file mode 100644
index c06bfda..0000000
--- a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_back_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_back_ime_carmode.png b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_back_ime_carmode.png
deleted file mode 100644
index a8c76bf..0000000
--- a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_back_ime_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_home_carmode.png b/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_home_carmode.png
deleted file mode 100644
index b798e3d..0000000
--- a/packages/SystemUI/res/drawable-xxxhdpi/ic_sysbar_home_carmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_back_carmode.xml b/packages/SystemUI/res/drawable/ic_sysbar_back_carmode.xml
new file mode 100644
index 0000000..5844b2e
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_back_carmode.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="44dp"
+ android:height="44dp"
+ android:viewportWidth="44.0"
+ android:viewportHeight="44.0">
+ <path
+ android:pathData="M9,22.06C9,21.22 9.51,20.42 10.36,19.95L31.56,7.87C32.57,7.3 33.42,7.49 33.89,7.75C34.92,8.33 35,9.44 35,9.91L35,34.09C35,34.65 34.92,35.69 33.91,36.25C33.46,36.51 32.66,36.69 31.67,36.14L10.26,24.05C9.49,23.61 9,22.87 9,22.06L9,22.06ZM31.5,12L13.5,22.04L31.5,32L31.5,12Z"
+ android:strokeColor="#00000000"
+ android:fillType="evenOdd"
+ android:fillColor="#F8F9FA"
+ android:strokeWidth="1"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_back_ime_carmode.xml b/packages/SystemUI/res/drawable/ic_sysbar_back_ime_carmode.xml
new file mode 100644
index 0000000..542ba9b
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_back_ime_carmode.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="44dp"
+ android:height="44dp"
+ android:viewportWidth="44.0"
+ android:viewportHeight="44.0">
+ <path
+ android:pathData="M22.06,35C21.22,35 20.42,34.49 19.95,33.64L7.87,12.44C7.3,11.43 7.49,10.58 7.75,10.11C8.33,9.08 9.44,9 9.91,9L34.09,9C34.65,9 35.69,9.08 36.25,10.09C36.51,10.54 36.69,11.34 36.14,12.33L24.05,33.74C23.61,34.51 22.87,35 22.06,35L22.06,35ZM12,12.5L22.04,30.5L32,12.5L12,12.5Z"
+ android:strokeColor="#00000000"
+ android:fillType="evenOdd"
+ android:fillColor="#F8F9FA"
+ android:strokeWidth="1"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_home.xml b/packages/SystemUI/res/drawable/ic_sysbar_home.xml
index a960af7..da23937 100644
--- a/packages/SystemUI/res/drawable/ic_sysbar_home.xml
+++ b/packages/SystemUI/res/drawable/ic_sysbar_home.xml
@@ -14,13 +14,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval"
- android:useLevel="false">
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="28dp"
+ android:height="28dp"
+ android:viewportWidth="28"
+ android:viewportHeight="28">
- <solid android:color="?attr/singleToneColor" />
-
- <size
- android:height="14dp"
- android:width="14dp" />
-</shape>
+ <path
+ android:fillColor="?attr/singleToneColor"
+ android:pathData="M 14 7 C 17.8659932488 7 21 10.1340067512 21 14 C 21 17.8659932488 17.8659932488 21 14 21 C 10.1340067512 21 7 17.8659932488 7 14 C 7 10.1340067512 10.1340067512 7 14 7 Z" />
+</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_home_carmode.xml b/packages/SystemUI/res/drawable/ic_sysbar_home_carmode.xml
new file mode 100644
index 0000000..e07bf6f
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_home_carmode.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="44dp"
+ android:height="44dp"
+ android:viewportWidth="44.0"
+ android:viewportHeight="44.0">
+ <path
+ android:pathData="M22.39,22.39m-14.54,0a14.54,14.54 0,1 1,29.07 0a14.54,14.54 0,1 1,-29.07 0"
+ android:fillType="evenOdd"
+ android:strokeColor="#F8F9FA"
+ android:fillColor="#00000000"
+ android:strokeWidth="4"/>
+</vector>
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/layout/menu_ime.xml b/packages/SystemUI/res/layout/menu_ime.xml
index 8a3a0b1..b047efb 100644
--- a/packages/SystemUI/res/layout/menu_ime.xml
+++ b/packages/SystemUI/res/layout/menu_ime.xml
@@ -19,6 +19,7 @@
android:id="@+id/menu_container"
android:layout_width="@dimen/navigation_key_width"
android:layout_height="match_parent"
+ android:focusable="false"
android:importantForAccessibility="no"
>
<!-- Use nav button width & height=match_parent for parent FrameLayout and buttons because they
diff --git a/packages/SystemUI/res/layout/navigation_layout.xml b/packages/SystemUI/res/layout/navigation_layout.xml
index baaf699..d72021e 100644
--- a/packages/SystemUI/res/layout/navigation_layout.xml
+++ b/packages/SystemUI/res/layout/navigation_layout.xml
@@ -18,14 +18,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/rounded_corner_content_padding"
+ android:layout_marginEnd="@dimen/rounded_corner_content_padding"
+ android:paddingStart="@dimen/nav_content_padding"
+ android:paddingEnd="@dimen/nav_content_padding">
<com.android.systemui.statusbar.phone.NearestTouchFrame
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingStart="@dimen/rounded_corner_content_padding"
- android:paddingEnd="@dimen/rounded_corner_content_padding"
android:clipChildren="false"
android:clipToPadding="false">
@@ -34,8 +36,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
- android:paddingStart="@dimen/nav_content_padding"
- android:paddingEnd="@dimen/nav_content_padding"
android:clipToPadding="false"
android:clipChildren="false" />
@@ -46,8 +46,6 @@
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
- android:paddingStart="@dimen/nav_content_padding"
- android:paddingEnd="@dimen/nav_content_padding"
android:clipToPadding="false"
android:clipChildren="false" />
diff --git a/packages/SystemUI/res/layout/navigation_layout_rot90.xml b/packages/SystemUI/res/layout/navigation_layout_rot90.xml
index 6d5b7788..24a0c71 100644
--- a/packages/SystemUI/res/layout/navigation_layout_rot90.xml
+++ b/packages/SystemUI/res/layout/navigation_layout_rot90.xml
@@ -18,14 +18,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:layout_marginTop="@dimen/rounded_corner_content_padding"
+ android:layout_marginBottom="@dimen/rounded_corner_content_padding"
+ android:paddingTop="@dimen/nav_content_padding"
+ android:paddingBottom="@dimen/nav_content_padding">
<com.android.systemui.statusbar.phone.NearestTouchFrame
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="@dimen/rounded_corner_content_padding"
- android:paddingBottom="@dimen/rounded_corner_content_padding"
android:clipChildren="false"
android:clipToPadding="false">
@@ -34,10 +36,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingTop="@dimen/nav_content_padding"
- android:paddingBottom="@dimen/nav_content_padding"
- android:clipChildren="false"
- android:clipToPadding="false" />
+ android:clipToPadding="false"
+ android:clipChildren="false" />
<com.android.systemui.statusbar.phone.ReverseLinearLayout
android:id="@+id/center_group"
@@ -45,10 +45,8 @@
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
- android:paddingTop="@dimen/nav_content_padding"
- android:paddingBottom="@dimen/nav_content_padding"
- android:clipChildren="false"
- android:clipToPadding="false" />
+ android:clipToPadding="false"
+ android:clipChildren="false" />
</com.android.systemui.statusbar.phone.NearestTouchFrame>
diff --git a/packages/SystemUI/res/layout/notification_snooze.xml b/packages/SystemUI/res/layout/notification_snooze.xml
index fae759a..ffe2eee 100644
--- a/packages/SystemUI/res/layout/notification_snooze.xml
+++ b/packages/SystemUI/res/layout/notification_snooze.xml
@@ -22,7 +22,7 @@
android:orientation="vertical"
android:clickable="true"
android:background="@color/notification_guts_bg_color"
- android:theme="@*android:style/Theme.DeviceDefault.Light">
+ android:theme="@style/Theme.SystemUI">
<RelativeLayout
android:id="@+id/notification_snooze"
@@ -36,7 +36,7 @@
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:paddingStart="@*android:dimen/notification_content_margin_start"
- android:textColor="@color/notification_primary_text_color"
+ android:textColor="?android:attr/textColorPrimary"
android:paddingEnd="4dp"/>
<ImageView
diff --git a/packages/SystemUI/res/layout/notification_snooze_option.xml b/packages/SystemUI/res/layout/notification_snooze_option.xml
index aaf45f3..f203839 100644
--- a/packages/SystemUI/res/layout/notification_snooze_option.xml
+++ b/packages/SystemUI/res/layout/notification_snooze_option.xml
@@ -22,4 +22,4 @@
android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
android:gravity="center_vertical"
android:textSize="14sp"
- android:textColor="#DD000000"/>
\ No newline at end of file
+ android:textColor="?android:attr/textColorSecondary"/>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-af/strings_car.xml b/packages/SystemUI/res/values-af/strings_car.xml
index 407ddcb..0127af8 100644
--- a/packages/SystemUI/res/values-af/strings_car.xml
+++ b/packages/SystemUI/res/values-af/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">"Gas"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gas"</string>
<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..cc709de 100644
--- a/packages/SystemUI/res/values-am/strings_car.xml
+++ b/packages/SystemUI/res/values-am/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">"እንግዳ"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"እንግዳ"</string>
<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..54b7e1d 100644
--- a/packages/SystemUI/res/values-ar/strings_car.xml
+++ b/packages/SystemUI/res/values-ar/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">"ضيف"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ضيف"</string>
<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..b8031a5d 100644
--- a/packages/SystemUI/res/values-as/strings_car.xml
+++ b/packages/SystemUI/res/values-as/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">"অতিথি"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"অতিথি"</string>
<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..d64f4c2 100644
--- a/packages/SystemUI/res/values-az/strings_car.xml
+++ b/packages/SystemUI/res/values-az/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">"Qonaq"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Qonaq"</string>
<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.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index 47eb266..da236a8 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -375,7 +375,7 @@
<string name="quick_step_accessibility_toggle_overview" msgid="7171470775439860480">"Uključi/isključi pregled"</string>
<string name="expanded_header_battery_charged" msgid="5945855970267657951">"Napunjena je"</string>
<string name="expanded_header_battery_charging" msgid="205623198487189724">"Punjenje"</string>
- <string name="expanded_header_battery_charging_with_time" msgid="457559884275395376">"<xliff:g id="CHARGING_TIME">%s</xliff:g> dok se ne napuni"</string>
+ <string name="expanded_header_battery_charging_with_time" msgid="457559884275395376">"<xliff:g id="CHARGING_TIME">%s</xliff:g> do kraja punjenja"</string>
<string name="expanded_header_battery_not_charging" msgid="4798147152367049732">"Ne puni se"</string>
<string name="ssl_ca_cert_warning" msgid="9005954106902053641">"Mreža se možda\nnadgleda"</string>
<string name="description_target_search" msgid="3091587249776033139">"Pretraga"</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..3cf7e2e 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,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">"Gost"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gost"</string>
<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..d665bf1 100644
--- a/packages/SystemUI/res/values-be/strings_car.xml
+++ b/packages/SystemUI/res/values-be/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">"Госць"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Госць"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-bg/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-bg/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-bg/strings_car.xml b/packages/SystemUI/res/values-bg/strings_car.xml
index fe159ea..39e19b5 100644
--- a/packages/SystemUI/res/values-bg/strings_car.xml
+++ b/packages/SystemUI/res/values-bg/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">"Гост"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Гост"</string>
<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..b40ccdd 100644
--- a/packages/SystemUI/res/values-bn/strings_car.xml
+++ b/packages/SystemUI/res/values-bn/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">"অতিথি"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"অতিথি"</string>
<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..cb2f427 100644
--- a/packages/SystemUI/res/values-bs/strings_car.xml
+++ b/packages/SystemUI/res/values-bs/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">"Gost"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gost"</string>
<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..80df882 100644
--- a/packages/SystemUI/res/values-ca/strings_car.xml
+++ b/packages/SystemUI/res/values-ca/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">"Convidat"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Convidat"</string>
<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..0f09aca 100644
--- a/packages/SystemUI/res/values-cs/strings_car.xml
+++ b/packages/SystemUI/res/values-cs/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">"Host"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Host"</string>
<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..f0d14a0 100644
--- a/packages/SystemUI/res/values-da/strings_car.xml
+++ b/packages/SystemUI/res/values-da/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">"Gæst"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gæst"</string>
<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..b55a2e5 100644
--- a/packages/SystemUI/res/values-de/strings_car.xml
+++ b/packages/SystemUI/res/values-de/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">"Gast"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gast"</string>
<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..7b67ed5 100644
--- a/packages/SystemUI/res/values-el/strings_car.xml
+++ b/packages/SystemUI/res/values-el/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">"Επισκέπτης"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Επισκέπτης"</string>
<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..5ff5a52 100644
--- a/packages/SystemUI/res/values-en-rAU/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rAU/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-en-rCA/strings_car.xml b/packages/SystemUI/res/values-en-rCA/strings_car.xml
index e058c5b..5ff5a52 100644
--- a/packages/SystemUI/res/values-en-rCA/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rCA/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-en-rGB/strings_car.xml b/packages/SystemUI/res/values-en-rGB/strings_car.xml
index e058c5b..5ff5a52 100644
--- a/packages/SystemUI/res/values-en-rGB/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rGB/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-en-rIN/strings_car.xml b/packages/SystemUI/res/values-en-rIN/strings_car.xml
index e058c5b..5ff5a52 100644
--- a/packages/SystemUI/res/values-en-rIN/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rIN/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-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..7187bef 100644
--- a/packages/SystemUI/res/values-es-rUS/strings_car.xml
+++ b/packages/SystemUI/res/values-es-rUS/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">"Invitado"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Invitado"</string>
<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..7758113 100644
--- a/packages/SystemUI/res/values-es/strings_car.xml
+++ b/packages/SystemUI/res/values-es/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">"Invitado"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Invitado"</string>
<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..fd93f94 100644
--- a/packages/SystemUI/res/values-et/strings_car.xml
+++ b/packages/SystemUI/res/values-et/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">"Külaline"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Külaline"</string>
<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..3e645ce 100644
--- a/packages/SystemUI/res/values-eu/strings_car.xml
+++ b/packages/SystemUI/res/values-eu/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">"Gonbidatua"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gonbidatua"</string>
<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..97657b9 100644
--- a/packages/SystemUI/res/values-fa/strings_car.xml
+++ b/packages/SystemUI/res/values-fa/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">"مهمان"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"مهمان"</string>
<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..d062d67 100644
--- a/packages/SystemUI/res/values-fi/strings_car.xml
+++ b/packages/SystemUI/res/values-fi/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">"Vieras"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Vieras"</string>
<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..c100828 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings_car.xml
+++ b/packages/SystemUI/res/values-fr-rCA/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">"Invité"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Invité"</string>
<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..0b65fa6 100644
--- a/packages/SystemUI/res/values-fr/strings_car.xml
+++ b/packages/SystemUI/res/values-fr/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">"Invité"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Invité"</string>
<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..24304dc 100644
--- a/packages/SystemUI/res/values-gl/strings_car.xml
+++ b/packages/SystemUI/res/values-gl/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">"Convidado"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Convidado"</string>
<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..44f4a09 100644
--- a/packages/SystemUI/res/values-hr/strings_car.xml
+++ b/packages/SystemUI/res/values-hr/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">"Gost"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gost"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-hu/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-hu/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-hu/strings_car.xml b/packages/SystemUI/res/values-hu/strings_car.xml
index 1eb17ce..d0f00ba 100644
--- a/packages/SystemUI/res/values-hu/strings_car.xml
+++ b/packages/SystemUI/res/values-hu/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">"Vendég"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Vendég"</string>
<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..85af3c8 100644
--- a/packages/SystemUI/res/values-hy/strings_car.xml
+++ b/packages/SystemUI/res/values-hy/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">"Հյուր"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Հյուր"</string>
<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..7423a1c 100644
--- a/packages/SystemUI/res/values-in/strings_car.xml
+++ b/packages/SystemUI/res/values-in/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">"Tamu"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Tamu"</string>
<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..9300e36 100644
--- a/packages/SystemUI/res/values-is/strings_car.xml
+++ b/packages/SystemUI/res/values-is/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">"Gestur"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gestur"</string>
<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..e79adda 100644
--- a/packages/SystemUI/res/values-it/strings_car.xml
+++ b/packages/SystemUI/res/values-it/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">"Ospite"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Ospite"</string>
<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..19bd19d 100644
--- a/packages/SystemUI/res/values-iw/strings_car.xml
+++ b/packages/SystemUI/res/values-iw/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">"אורח"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"אורח"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-ja/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-ja/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-ja/strings_car.xml b/packages/SystemUI/res/values-ja/strings_car.xml
index 5a2872d..7aa4389 100644
--- a/packages/SystemUI/res/values-ja/strings_car.xml
+++ b/packages/SystemUI/res/values-ja/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">"ゲスト"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ゲスト"</string>
<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..4a6dfbd 100644
--- a/packages/SystemUI/res/values-ka/strings_car.xml
+++ b/packages/SystemUI/res/values-ka/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">"სტუმარი"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"სტუმარი"</string>
<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..9915d98 100644
--- a/packages/SystemUI/res/values-kk/strings_car.xml
+++ b/packages/SystemUI/res/values-kk/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">"Қонақ"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Қонақ"</string>
<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..cae300d 100644
--- a/packages/SystemUI/res/values-km/strings_car.xml
+++ b/packages/SystemUI/res/values-km/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">"ភ្ញៀវ"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ភ្ញៀវ"</string>
<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..2b07ac2 100644
--- a/packages/SystemUI/res/values-kn/strings_car.xml
+++ b/packages/SystemUI/res/values-kn/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">"ಅತಿಥಿ"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ಅತಿಥಿ"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-ko/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-ko/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-ko/strings_car.xml b/packages/SystemUI/res/values-ko/strings_car.xml
index 1af18aa..31cb38f 100644
--- a/packages/SystemUI/res/values-ko/strings_car.xml
+++ b/packages/SystemUI/res/values-ko/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">"게스트"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"게스트"</string>
<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..237e638 100644
--- a/packages/SystemUI/res/values-ky/strings_car.xml
+++ b/packages/SystemUI/res/values-ky/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">"Конок"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Конок"</string>
<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..43067f5 100644
--- a/packages/SystemUI/res/values-lo/strings_car.xml
+++ b/packages/SystemUI/res/values-lo/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">"ແຂກ"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ແຂກ"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-lt/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-lt/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-lt/strings_car.xml b/packages/SystemUI/res/values-lt/strings_car.xml
index 7b7856f..ae9f24a 100644
--- a/packages/SystemUI/res/values-lt/strings_car.xml
+++ b/packages/SystemUI/res/values-lt/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">"Svečias"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Svečias"</string>
<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..b884614 100644
--- a/packages/SystemUI/res/values-lv/strings_car.xml
+++ b/packages/SystemUI/res/values-lv/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">"Viesis"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Viesis"</string>
<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..8372fb5 100644
--- a/packages/SystemUI/res/values-mk/strings_car.xml
+++ b/packages/SystemUI/res/values-mk/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">"Гостин"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Гостин"</string>
<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..26afb0d 100644
--- a/packages/SystemUI/res/values-ml/strings_car.xml
+++ b/packages/SystemUI/res/values-ml/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">"അതിഥി"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"അതിഥി"</string>
<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..5bc1f57 100644
--- a/packages/SystemUI/res/values-mn/strings_car.xml
+++ b/packages/SystemUI/res/values-mn/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">"Зочин"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Зочин"</string>
<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..f8b9627 100644
--- a/packages/SystemUI/res/values-mr/strings_car.xml
+++ b/packages/SystemUI/res/values-mr/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">"अतिथी"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"अतिथी"</string>
<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..a41eacf 100644
--- a/packages/SystemUI/res/values-ms/strings_car.xml
+++ b/packages/SystemUI/res/values-ms/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">"Tetamu"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Tetamu"</string>
<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..fdb4998 100644
--- a/packages/SystemUI/res/values-my/strings_car.xml
+++ b/packages/SystemUI/res/values-my/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">"ဧည့်သည်"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ဧည့်သည်"</string>
<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..09593f1 100644
--- a/packages/SystemUI/res/values-nb/strings_car.xml
+++ b/packages/SystemUI/res/values-nb/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">"Gjest"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gjest"</string>
<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..40d6f7d 100644
--- a/packages/SystemUI/res/values-ne/strings_car.xml
+++ b/packages/SystemUI/res/values-ne/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">"अतिथि"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"अतिथि"</string>
<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..86da413 100644
--- a/packages/SystemUI/res/values-nl/strings_car.xml
+++ b/packages/SystemUI/res/values-nl/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">"Gast"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gast"</string>
<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..a9be075 100644
--- a/packages/SystemUI/res/values-or/strings_car.xml
+++ b/packages/SystemUI/res/values-or/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">"ଅତିଥି"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ଅତିଥି"</string>
<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..92c5f05 100644
--- a/packages/SystemUI/res/values-pl/strings_car.xml
+++ b/packages/SystemUI/res/values-pl/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">"Gość"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gość"</string>
<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..e252e8d 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings_car.xml
+++ b/packages/SystemUI/res/values-pt-rBR/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">"Visitante"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Visitante"</string>
<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..386496d 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings_car.xml
+++ b/packages/SystemUI/res/values-pt-rPT/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">"Convidado"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Convidado"</string>
<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..e252e8d 100644
--- a/packages/SystemUI/res/values-pt/strings_car.xml
+++ b/packages/SystemUI/res/values-pt/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">"Visitante"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Visitante"</string>
<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..ba23df6 100644
--- a/packages/SystemUI/res/values-ro/strings_car.xml
+++ b/packages/SystemUI/res/values-ro/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">"Invitat"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Invitat"</string>
<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..0ccf16e 100644
--- a/packages/SystemUI/res/values-ru/strings_car.xml
+++ b/packages/SystemUI/res/values-ru/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">"Гость"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Гость"</string>
<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..0796d27 100644
--- a/packages/SystemUI/res/values-si/strings_car.xml
+++ b/packages/SystemUI/res/values-si/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">"අමුත්තා"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"අමුත්තා"</string>
<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..408c55c 100644
--- a/packages/SystemUI/res/values-sk/strings_car.xml
+++ b/packages/SystemUI/res/values-sk/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">"Hosť"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Hosť"</string>
<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..1efe69f 100644
--- a/packages/SystemUI/res/values-sl/strings_car.xml
+++ b/packages/SystemUI/res/values-sl/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">"Gost"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gost"</string>
<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..e2bfc00 100644
--- a/packages/SystemUI/res/values-sq/strings_car.xml
+++ b/packages/SystemUI/res/values-sq/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">"I ftuar"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"I ftuar"</string>
<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.xml b/packages/SystemUI/res/values-sr/strings.xml
index da30392..2ecac35 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -375,7 +375,7 @@
<string name="quick_step_accessibility_toggle_overview" msgid="7171470775439860480">"Укључи/искључи преглед"</string>
<string name="expanded_header_battery_charged" msgid="5945855970267657951">"Напуњена је"</string>
<string name="expanded_header_battery_charging" msgid="205623198487189724">"Пуњење"</string>
- <string name="expanded_header_battery_charging_with_time" msgid="457559884275395376">"<xliff:g id="CHARGING_TIME">%s</xliff:g> док се не напуни"</string>
+ <string name="expanded_header_battery_charging_with_time" msgid="457559884275395376">"<xliff:g id="CHARGING_TIME">%s</xliff:g> до краја пуњења"</string>
<string name="expanded_header_battery_not_charging" msgid="4798147152367049732">"Не пуни се"</string>
<string name="ssl_ca_cert_warning" msgid="9005954106902053641">"Мрежа се можда\nнадгледа"</string>
<string name="description_target_search" msgid="3091587249776033139">"Претрага"</string>
diff --git a/packages/SystemUI/res/values-sr/strings_car.xml b/packages/SystemUI/res/values-sr/strings_car.xml
index d25f0e7..2ee8b01 100644
--- a/packages/SystemUI/res/values-sr/strings_car.xml
+++ b/packages/SystemUI/res/values-sr/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">"Гост"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Гост"</string>
<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..754d628 100644
--- a/packages/SystemUI/res/values-sv/strings_car.xml
+++ b/packages/SystemUI/res/values-sv/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">"Gäst"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Gäst"</string>
<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..0c664ac 100644
--- a/packages/SystemUI/res/values-sw/strings_car.xml
+++ b/packages/SystemUI/res/values-sw/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">"Mgeni"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Mgeni"</string>
<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-sw720dp/donottranslate.xml b/packages/SystemUI/res/values-sw720dp/donottranslate.xml
deleted file mode 100644
index 0996067..0000000
--- a/packages/SystemUI/res/values-sw720dp/donottranslate.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. %1$s is DOW, %2$s is date.
- We show both (DOW on one line, then the date) but this can be overridden for locales as
- necessary.
- -->
- <string name="status_bar_date_formatter">%1$s\n%2$s</string>
-
-</resources>
-
diff --git a/packages/SystemUI/res/values-ta/strings_car.xml b/packages/SystemUI/res/values-ta/strings_car.xml
index 0187c94..226e3d9 100644
--- a/packages/SystemUI/res/values-ta/strings_car.xml
+++ b/packages/SystemUI/res/values-ta/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">"விருந்தினர்"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"விருந்தினர்"</string>
<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..0fc29bc 100644
--- a/packages/SystemUI/res/values-te/strings_car.xml
+++ b/packages/SystemUI/res/values-te/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">"అతిథి"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"అతిథి"</string>
<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-television/styles.xml b/packages/SystemUI/res/values-television/styles.xml
index 53dc4aa..b59f007 100644
--- a/packages/SystemUI/res/values-television/styles.xml
+++ b/packages/SystemUI/res/values-television/styles.xml
@@ -15,5 +15,6 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="Theme.SystemUI.Dialog" parent="@android:style/Theme.DeviceDefault.Dialog" />
<style name="Theme.SystemUI.Dialog.Alert" parent="@*android:style/Theme.DeviceDefault.Dialog.Alert" />
</resources>
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..44b2e62 100644
--- a/packages/SystemUI/res/values-th/strings_car.xml
+++ b/packages/SystemUI/res/values-th/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">"ผู้มาเยือน"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"ผู้มาเยือน"</string>
<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..7458f28 100644
--- a/packages/SystemUI/res/values-tl/strings_car.xml
+++ b/packages/SystemUI/res/values-tl/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">"Bisita"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Bisita"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-tr/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-tr/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-tr/strings_car.xml b/packages/SystemUI/res/values-tr/strings_car.xml
index f54498b..1ccb206 100644
--- a/packages/SystemUI/res/values-tr/strings_car.xml
+++ b/packages/SystemUI/res/values-tr/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">"Misafir"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Misafir"</string>
<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..d0f9954 100644
--- a/packages/SystemUI/res/values-uk/strings_car.xml
+++ b/packages/SystemUI/res/values-uk/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">"Гість"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Гість"</string>
<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..557c232 100644
--- a/packages/SystemUI/res/values-ur/strings_car.xml
+++ b/packages/SystemUI/res/values-ur/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">"مہمان"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"مہمان"</string>
<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..2916a00 100644
--- a/packages/SystemUI/res/values-uz/strings_car.xml
+++ b/packages/SystemUI/res/values-uz/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">"Mehmon"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Mehmon"</string>
<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..f3f8d5f 100644
--- a/packages/SystemUI/res/values-vi/strings_car.xml
+++ b/packages/SystemUI/res/values-vi/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">"Khách"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Khách"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-zh-rCN/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-zh-rCN/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings_car.xml b/packages/SystemUI/res/values-zh-rCN/strings_car.xml
index e29397a..a600429 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings_car.xml
+++ b/packages/SystemUI/res/values-zh-rCN/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">"访客"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"访客"</string>
<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..7c4bf30 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings_car.xml
+++ b/packages/SystemUI/res/values-zh-rHK/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">"訪客"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"訪客"</string>
<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/donottranslate.xml b/packages/SystemUI/res/values-zh-rTW/donottranslate.xml
deleted file mode 100644
index dcf434d..0000000
--- a/packages/SystemUI/res/values-zh-rTW/donottranslate.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2009, 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
- but this may be overridden on a per-locale basis if necessary. -->
- <string name="status_bar_date_formatter">%2$s\n%1$s</string>
-
-</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings_car.xml b/packages/SystemUI/res/values-zh-rTW/strings_car.xml
index 6772d37..41b7222 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings_car.xml
+++ b/packages/SystemUI/res/values-zh-rTW/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">"訪客"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"訪客"</string>
<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..c82c3b8 100644
--- a/packages/SystemUI/res/values-zu/strings_car.xml
+++ b/packages/SystemUI/res/values-zu/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">"Isivakashi"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Isivakashi"</string>
<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..412e89a 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>
@@ -942,9 +945,9 @@
<dimen name="bottom_padding">48dp</dimen>
<dimen name="edge_margin">8dp</dimen>
- <dimen name="rounded_corner_radius">0dp</dimen>
- <dimen name="rounded_corner_radius_top">0dp</dimen>
- <dimen name="rounded_corner_radius_bottom">0dp</dimen>
+ <dimen name="rounded_corner_radius">@*android:dimen/rounded_corner_radius</dimen>
+ <dimen name="rounded_corner_radius_top">@*android:dimen/rounded_corner_radius_top</dimen>
+ <dimen name="rounded_corner_radius_bottom">@*android:dimen/rounded_corner_radius_bottom</dimen>
<dimen name="rounded_corner_content_padding">0dp</dimen>
<dimen name="nav_content_padding">0dp</dimen>
<dimen name="nav_quick_scrub_track_edge_padding">24dp</dimen>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 915fc6e..9a64c60 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -1929,23 +1929,17 @@
<!-- Accessibility description of a QS tile while editing positions [CHAR LIMIT=NONE] -->
<string name="accessibility_qs_edit_add_tile_label"><xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g>. Double tap to add.</string>
- <!-- Accessibility description of a place to drop a tile while editing positions [CHAR LIMIT=NONE] -->
- <string name="accessibility_qs_edit_position_label">Position <xliff:g id="position" example="2">%1$d</xliff:g>. Double tap to select.</string>
-
<!-- Accessibility description of option to move QS tile [CHAR LIMIT=NONE] -->
<string name="accessibility_qs_edit_move_tile">Move <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g></string>
<!-- Accessibility description of option to remove QS tile [CHAR LIMIT=NONE] -->
<string name="accessibility_qs_edit_remove_tile">Remove <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g></string>
- <!-- Accessibility action when QS tile is added [CHAR LIMIT=NONE] -->
- <string name="accessibility_qs_edit_tile_added"><xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> is added to position <xliff:g id="position" example="5">%2$d</xliff:g></string>
+ <!-- Accessibility action when QS tile is to be added [CHAR LIMIT=NONE] -->
+ <string name="accessibility_qs_edit_tile_add">Add <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> to position <xliff:g id="position" example="5">%2$d</xliff:g></string>
- <!-- Accessibility action when QS tile is removed [CHAR LIMIT=NONE] -->
- <string name="accessibility_qs_edit_tile_removed"><xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> is removed</string>
-
- <!-- Accessibility action when QS tile is moved [CHAR LIMIT=NONE] -->
- <string name="accessibility_qs_edit_tile_moved"><xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> moved to position <xliff:g id="position" example="5">%2$d</xliff:g></string>
+ <!-- Accessibility action when QS tile is to be moved [CHAR LIMIT=NONE] -->
+ <string name="accessibility_qs_edit_tile_move">Move <xliff:g id="tile_name" example="Wi-Fi">%1$s</xliff:g> to position <xliff:g id="position" example="5">%2$d</xliff:g></string>
<!-- Accessibility label for window when QS editing is happening [CHAR LIMIT=NONE] -->
<string name="accessibility_desc_quick_settings_edit">Quick settings editor.</string>
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/Android.bp b/packages/SystemUI/shared/Android.bp
new file mode 100644
index 0000000..0fb1200
--- /dev/null
+++ b/packages/SystemUI/shared/Android.bp
@@ -0,0 +1,40 @@
+// Copyright (C) 2017 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.
+
+android_library {
+
+ name: "SystemUISharedLib",
+ srcs: [
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ],
+
+}
+
+android_app {
+
+ name: "SysUISharedLib",
+ platform_apis: true,
+ srcs: [
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ],
+
+ static_libs: ["SystemUISharedLib"],
+
+ optimize: {
+ enabled: false,
+ },
+
+}
diff --git a/packages/SystemUI/shared/Android.mk b/packages/SystemUI/shared/Android.mk
deleted file mode 100644
index f20df0c..0000000
--- a/packages/SystemUI/shared/Android.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2017 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := SystemUISharedLib
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_JAR_EXCLUDE_FILES := none
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_PACKAGE_NAME := SysUISharedLib
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := SystemUISharedLib
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
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/shared/tests/Android.mk b/packages/SystemUI/shared/tests/Android.mk
index 4e7cbbf..02774c9 100644
--- a/packages/SystemUI/shared/tests/Android.mk
+++ b/packages/SystemUI/shared/tests/Android.mk
@@ -30,10 +30,10 @@
LOCAL_COMPATIBILITY_SUITE := device-tests
# Add local path sources as well as shared lib sources
-LOCAL_SRC_FILES := $(call all-java-files-under, src) \
- $(call all-java-files-under, ../src)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
+ SystemUISharedLib \
metrics-helper-lib \
android-support-test \
mockito-target-inline-minus-junit4 \
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/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
new file mode 100644
index 0000000..5bbbc52
--- /dev/null
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -0,0 +1,155 @@
+package com.android.keyguard;
+
+import android.content.Context;
+import android.graphics.Paint;
+import android.graphics.Paint.Style;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.TextClock;
+
+import androidx.annotation.VisibleForTesting;
+
+import com.android.systemui.Dependency;
+import com.android.systemui.plugins.ClockPlugin;
+import com.android.systemui.plugins.PluginListener;
+import com.android.systemui.plugins.PluginManager;
+
+/**
+ * Switch to show plugin clock when plugin is connected, otherwise it will show default clock.
+ */
+public class KeyguardClockSwitch extends FrameLayout {
+ /**
+ * Optional/alternative clock injected via plugin.
+ */
+ private ClockPlugin mClockPlugin;
+ /**
+ * Default clock.
+ */
+ private TextClock mClockView;
+
+ private final PluginListener<ClockPlugin> mClockPluginListener =
+ new PluginListener<ClockPlugin>() {
+ @Override
+ public void onPluginConnected(ClockPlugin plugin, Context pluginContext) {
+ View view = plugin.getView();
+ if (view != null) {
+ mClockPlugin = plugin;
+ addView(view, -1,
+ new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ initPluginParams();
+ mClockView.setVisibility(View.GONE);
+ }
+ }
+
+ @Override
+ public void onPluginDisconnected(ClockPlugin plugin) {
+ View view = plugin.getView();
+ if (view != null) {
+ mClockPlugin = null;
+ removeView(view);
+ mClockView.setVisibility(View.VISIBLE);
+ }
+ }
+ };
+
+ public KeyguardClockSwitch(Context context) {
+ this(context, null);
+ }
+
+ public KeyguardClockSwitch(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+ mClockView = findViewById(R.id.default_clock_view);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ Dependency.get(PluginManager.class).addPluginListener(mClockPluginListener,
+ ClockPlugin.class);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ Dependency.get(PluginManager.class).removePluginListener(mClockPluginListener);
+ }
+
+ /**
+ * It will also update plugin setStyle if plugin is connected.
+ */
+ public void setStyle(Style style) {
+ mClockView.getPaint().setStyle(style);
+ if (mClockPlugin != null) {
+ mClockPlugin.setStyle(style);
+ }
+ }
+
+ /**
+ * It will also update plugin setTextColor if plugin is connected.
+ */
+ public void setTextColor(int color) {
+ mClockView.setTextColor(color);
+ if (mClockPlugin != null) {
+ mClockPlugin.setTextColor(color);
+ }
+ }
+
+ public void setShowCurrentUserTime(boolean showCurrentUserTime) {
+ mClockView.setShowCurrentUserTime(showCurrentUserTime);
+ }
+
+ public void setElegantTextHeight(boolean elegant) {
+ mClockView.setElegantTextHeight(elegant);
+ }
+
+ public void setTextSize(int unit, float size) {
+ mClockView.setTextSize(unit, size);
+ }
+
+ public void setFormat12Hour(CharSequence format) {
+ mClockView.setFormat12Hour(format);
+ }
+
+ public void setFormat24Hour(CharSequence format) {
+ mClockView.setFormat24Hour(format);
+ }
+
+ public Paint getPaint() {
+ return mClockView.getPaint();
+ }
+
+ public int getCurrentTextColor() {
+ return mClockView.getCurrentTextColor();
+ }
+
+ public float getTextSize() {
+ return mClockView.getTextSize();
+ }
+
+ public void refresh() {
+ mClockView.refresh();
+ }
+
+ /**
+ * When plugin changes, set all kept parameters into newer plugin.
+ */
+ private void initPluginParams() {
+ if (mClockPlugin != null) {
+ mClockPlugin.setStyle(getPaint().getStyle());
+ mClockPlugin.setTextColor(getCurrentTextColor());
+ }
+ }
+
+ @VisibleForTesting (otherwise = VisibleForTesting.NONE)
+ PluginListener getClockPluginListener() {
+ return mClockPluginListener;
+ }
+}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
index f4acc0c..b159b39 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -15,7 +15,6 @@
*/
package com.android.keyguard;
-import android.R.style;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.admin.DevicePolicyManager;
@@ -27,7 +26,6 @@
import android.util.Log;
import android.util.Slog;
import android.util.StatsLog;
-import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
@@ -212,7 +210,7 @@
if (messageId != 0) {
final String message = mContext.getString(messageId,
- KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(userId),
+ mLockPatternUtils.getCurrentFailedPasswordAttempts(userId),
timeoutInSeconds);
showDialog(null, message);
}
@@ -257,8 +255,8 @@
}
private void reportFailedUnlockAttempt(int userId, int timeoutMs) {
- final KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- final int failedAttempts = monitor.getFailedUnlockAttempts(userId) + 1; // +1 for this time
+ // +1 for this time
+ final int failedAttempts = mLockPatternUtils.getCurrentFailedPasswordAttempts(userId) + 1;
if (DEBUG) Log.d(TAG, "reportFailedPatternAttempt: #" + failedAttempts);
@@ -292,7 +290,6 @@
showWipeDialog(failedAttempts, userType);
}
}
- monitor.reportFailedStrongAuthUnlockAttempt(userId);
mLockPatternUtils.reportFailedPasswordAttempt(userId);
if (timeoutMs > 0) {
mLockPatternUtils.reportPasswordLockout(timeoutMs, userId);
@@ -436,7 +433,6 @@
if (success) {
StatsLog.write(StatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED,
StatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED__RESULT__SUCCESS);
- monitor.clearFailedUnlockAttempts();
mLockPatternUtils.reportSuccessfulPasswordAttempt(userId);
} else {
StatsLog.write(StatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED,
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index 6517a9d..7479152 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -16,6 +16,8 @@
package com.android.keyguard;
+import static android.app.slice.Slice.HINT_LIST_ITEM;
+
import android.animation.LayoutTransition;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
@@ -27,6 +29,7 @@
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.net.Uri;
+import android.os.Trace;
import android.provider.Settings;
import android.text.Layout;
import android.text.TextUtils;
@@ -63,6 +66,7 @@
import androidx.slice.core.SliceQuery;
import androidx.slice.widget.ListContent;
import androidx.slice.widget.RowContent;
+import androidx.slice.widget.SliceContent;
import androidx.slice.widget.SliceLiveData;
/**
@@ -148,6 +152,7 @@
}
private void showSlice() {
+ Trace.beginSection("KeyguardSliceView#showSlice");
if (mPulsing || mSlice == null) {
mTitle.setVisibility(GONE);
mRow.setVisibility(GONE);
@@ -157,12 +162,13 @@
return;
}
- ListContent lc = new ListContent(getContext(), mSlice, null, 0, 0);
- mHasHeader = lc.hasHeader();
- List<SliceItem> subItems = new ArrayList<SliceItem>();
+ ListContent lc = new ListContent(getContext(), mSlice);
+ SliceContent headerContent = lc.getHeader();
+ mHasHeader = headerContent != null && !headerContent.getSliceItem().hasHint(HINT_LIST_ITEM);
+ List<SliceContent> subItems = new ArrayList<SliceContent>();
for (int i = 0; i < lc.getRowItems().size(); i++) {
- SliceItem subItem = lc.getRowItems().get(i);
- String itemUri = subItem.getSlice().getUri().toString();
+ SliceContent subItem = lc.getRowItems().get(i);
+ String itemUri = subItem.getSliceItem().getSlice().getUri().toString();
// Filter out the action row
if (!KeyguardSliceProvider.KEYGUARD_ACTION_URI.equals(itemUri)) {
subItems.add(subItem);
@@ -173,9 +179,7 @@
} else {
mTitle.setVisibility(VISIBLE);
- // If there's a header it'll be the first subitem
- RowContent header = new RowContent(getContext(), subItems.get(0),
- true /* showStartItem */);
+ RowContent header = lc.getHeader();
SliceItem mainTitle = header.getTitleItem();
CharSequence title = mainTitle != null ? mainTitle.getText() : null;
mTitle.setText(title);
@@ -187,8 +191,8 @@
final int startIndex = mHasHeader ? 1 : 0; // First item is header; skip it
mRow.setVisibility(subItemsCount > 0 ? VISIBLE : GONE);
for (int i = startIndex; i < subItemsCount; i++) {
- SliceItem item = subItems.get(i);
- RowContent rc = new RowContent(getContext(), item, true /* showStartItem */);
+ RowContent rc = (RowContent) subItems.get(i);
+ SliceItem item = rc.getSliceItem();
final Uri itemTag = item.getSlice().getUri();
// Try to reuse the view if already exists in the layout
KeyguardSliceButton button = mRow.findViewWithTag(itemTag);
@@ -236,6 +240,7 @@
if (mContentChangeListener != null) {
mContentChangeListener.run();
}
+ Trace.endSection();
}
public void setPulsing(boolean pulsing, boolean animate) {
@@ -383,8 +388,23 @@
}
public void refresh() {
- Slice slice = SliceViewManager.getInstance(getContext()).bindSlice(mKeyguardSliceUri);
+ Slice slice;
+ Trace.beginSection("KeyguardSliceView#refresh");
+ // We can optimize performance and avoid binder calls when we know that we're bound
+ // to a Slice on the same process.
+ if (KeyguardSliceProvider.KEYGUARD_SLICE_URI.equals(mKeyguardSliceUri.toString())) {
+ KeyguardSliceProvider instance = KeyguardSliceProvider.getAttachedInstance();
+ if (instance != null) {
+ slice = instance.onBindSlice(mKeyguardSliceUri);
+ } else {
+ Log.w(TAG, "Keyguard slice not bound yet?");
+ slice = null;
+ }
+ } else {
+ slice = SliceViewManager.getInstance(getContext()).bindSlice(mKeyguardSliceUri);
+ }
onChanged(slice);
+ Trace.endSection();
}
public static class Row extends LinearLayout {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
index 6da143c..6d1313c 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
@@ -39,7 +39,6 @@
import android.view.View;
import android.widget.GridLayout;
import android.widget.RelativeLayout;
-import android.widget.TextClock;
import android.widget.TextView;
import com.android.internal.widget.LockPatternUtils;
@@ -64,7 +63,7 @@
private final float mSmallClockScale;
private TextView mLogoutView;
- private TextClock mClockView;
+ private KeyguardClockSwitch mClockView;
private View mClockSeparator;
private TextView mOwnerInfo;
private KeyguardSliceView mKeyguardSlice;
@@ -248,7 +247,7 @@
.scaleX(clockScale)
.scaleY(clockScale)
.withEndAction(() -> {
- mClockView.getPaint().setStyle(style);
+ mClockView.setStyle(style);
mClockView.invalidate();
})
.start();
@@ -256,7 +255,7 @@
mClockView.setY(top);
mClockView.setScaleX(clockScale);
mClockView.setScaleY(clockScale);
- mClockView.getPaint().setStyle(style);
+ mClockView.setStyle(style);
mClockView.invalidate();
}
} else if (view == mClockSeparator) {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index fa7e814..3e534d1 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;
@@ -211,9 +215,6 @@
// Battery status
private BatteryStatus mBatteryStatus;
- // Password attempts
- private SparseIntArray mFailedAttempts = new SparseIntArray();
-
private final StrongAuthTracker mStrongAuthTracker;
private final ArrayList<WeakReference<KeyguardUpdateMonitorCallback>>
@@ -344,6 +345,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 +966,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 +1475,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 +1841,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 +1870,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 +1902,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 +1912,8 @@
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
Log.w(TAG, "invalid subId in handleServiceStateChange()");
return;
+ } else {
+ updateTelephonyCapable(true);
}
mServiceStates.put(subId, serviceState);
@@ -2035,6 +2077,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);
@@ -2095,22 +2138,10 @@
return mDeviceProvisioned;
}
- public void clearFailedUnlockAttempts() {
- mFailedAttempts.delete(sCurrentUser);
- }
-
public ServiceState getServiceState(int subId) {
return mServiceStates.get(subId);
}
- public int getFailedUnlockAttempts(int userId) {
- return mFailedAttempts.get(userId, 0);
- }
-
- public void reportFailedStrongAuthUnlockAttempt(int userId) {
- mFailedAttempts.put(userId, getFailedUnlockAttempts(userId) + 1);
- }
-
public void clearBiometricRecognized() {
mUserFingerprintAuthenticated.clear();
mUserFaceAuthenticated.clear();
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/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 86e0e1f..e7fc3c9 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -55,7 +55,7 @@
import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.phone.StatusBarIconControllerImpl;
-import com.android.systemui.statusbar.phone.StatusBarWindowManager;
+import com.android.systemui.statusbar.phone.StatusBarWindowController;
import com.android.systemui.statusbar.policy.AccessibilityController;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.BatteryController;
@@ -258,8 +258,8 @@
mProviders.put(TunerService.class, () ->
new TunerServiceImpl(mContext));
- mProviders.put(StatusBarWindowManager.class, () ->
- new StatusBarWindowManager(mContext));
+ mProviders.put(StatusBarWindowController.class, () ->
+ new StatusBarWindowController(mContext));
mProviders.put(DarkIconDispatcher.class, () ->
new DarkIconDispatcherImpl(mContext));
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 50d862d..39e3155 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -30,6 +30,7 @@
import android.util.Log;
import android.view.Display;
import android.view.DisplayInfo;
+import android.view.DisplayListCanvas;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.WindowManager;
@@ -366,7 +367,12 @@
protected Bitmap doInBackground(Void... params) {
Throwable exception;
try {
- return mWallpaperManager.getBitmap(true /* hardware */);
+ Bitmap wallpaper = mWallpaperManager.getBitmap(true /* hardware */);
+ if (wallpaper != null
+ && wallpaper.getByteCount() > DisplayListCanvas.MAX_BITMAP_SIZE) {
+ throw new RuntimeException("Wallpaper is too large to draw!");
+ }
+ return wallpaper;
} catch (RuntimeException | OutOfMemoryError e) {
exception = e;
}
diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
index 3c44eb4..0864ff0 100644
--- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
@@ -55,6 +55,7 @@
import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE;
import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP;
+import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_SHOW_OVERVIEW_BUTTON;
import static com.android.systemui.shared.system.NavigationBarCompat.InteractionType;
/**
@@ -69,6 +70,10 @@
private static final long BACKOFF_MILLIS = 1000;
private static final long DEFERRED_CALLBACK_MILLIS = 5000;
+ // Default interaction flags if swipe up is disabled before connecting to launcher
+ private static final int DEFAULT_DISABLE_SWIPE_UP_STATE = FLAG_DISABLE_SWIPE_UP
+ | FLAG_SHOW_OVERVIEW_BUTTON;
+
private final Context mContext;
private final Handler mHandler;
private final Runnable mConnectionRunnable = this::internalConnectToCurrentUser;
@@ -220,7 +225,7 @@
// When launcher service is disabled, reset interaction flags because it is inactive
if (!isEnabled()) {
- mInteractionFlags = 0;
+ mInteractionFlags = getDefaultInteractionFlags();
Prefs.remove(mContext, Prefs.Key.QUICK_STEP_INTERACTION_FLAGS);
}
@@ -300,7 +305,8 @@
com.android.internal.R.string.config_recentsComponentName));
mQuickStepIntent = new Intent(ACTION_QUICKSTEP)
.setPackage(mRecentsComponentName.getPackageName());
- mInteractionFlags = Prefs.getInt(mContext, Prefs.Key.QUICK_STEP_INTERACTION_FLAGS, 0);
+ mInteractionFlags = Prefs.getInt(mContext, Prefs.Key.QUICK_STEP_INTERACTION_FLAGS,
+ getDefaultInteractionFlags());
// Listen for the package update changes.
if (SystemServicesProxy.getInstance(context)
@@ -397,6 +403,15 @@
}
}
+ private int getDefaultInteractionFlags() {
+ // If there is no settings available use device default or get it from settings
+ final boolean defaultState = getSwipeUpDefaultValue();
+ final boolean swipeUpEnabled = getSwipeUpSettingAvailable()
+ ? getSwipeUpEnabledFromSettings(defaultState)
+ : defaultState;
+ return swipeUpEnabled ? 0 : DEFAULT_DISABLE_SWIPE_UP_STATE;
+ }
+
private void notifyBackButtonAlphaChanged(float alpha, boolean animate) {
for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate);
@@ -427,6 +442,21 @@
ActivityManagerWrapper.getInstance().getCurrentUserId()) != null;
}
+ private boolean getSwipeUpDefaultValue() {
+ return mContext.getResources()
+ .getBoolean(com.android.internal.R.bool.config_swipe_up_gesture_default);
+ }
+
+ private boolean getSwipeUpSettingAvailable() {
+ return mContext.getResources()
+ .getBoolean(com.android.internal.R.bool.config_swipe_up_gesture_setting_available);
+ }
+
+ private boolean getSwipeUpEnabledFromSettings(boolean defaultValue) {
+ return Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.SWIPE_UP_TO_SWITCH_APPS_ENABLED, defaultValue ? 1 : 0) == 1;
+ }
+
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(TAG_OPS + " state:");
@@ -440,12 +470,10 @@
pw.print(" quickStepIntent="); pw.println(mQuickStepIntent);
pw.print(" quickStepIntentResolved="); pw.println(isEnabled());
- final int swipeUpDefaultValue = mContext.getResources()
- .getBoolean(com.android.internal.R.bool.config_swipe_up_gesture_default) ? 1 : 0;
- final int swipeUpEnabled = Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.SWIPE_UP_TO_SWITCH_APPS_ENABLED, swipeUpDefaultValue);
- pw.print(" swipeUpSetting="); pw.println(swipeUpEnabled != 0);
- pw.print(" swipeUpSettingDefault="); pw.println(swipeUpDefaultValue != 0);
+ final boolean swipeUpDefaultValue = getSwipeUpDefaultValue();
+ final boolean swipeUpEnabled = getSwipeUpEnabledFromSettings(swipeUpDefaultValue);
+ pw.print(" swipeUpSetting="); pw.println(swipeUpEnabled);
+ pw.print(" swipeUpSettingDefault="); pw.println(swipeUpDefaultValue);
}
public interface OverviewProxyListener {
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 520e40a..044cc5c 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 =
@@ -87,9 +94,9 @@
private DisplayManager mDisplayManager;
private DisplayManager.DisplayListener mDisplayListener;
- private int mRoundedDefault;
- private int mRoundedDefaultTop;
- private int mRoundedDefaultBottom;
+ @VisibleForTesting protected int mRoundedDefault;
+ @VisibleForTesting protected int mRoundedDefaultTop;
+ @VisibleForTesting protected int mRoundedDefaultBottom;
private View mOverlay;
private View mBottomOverlay;
private float mDensity;
@@ -99,26 +106,30 @@
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() {
+ mRotation = RotationUtils.getExactRotation(mContext);
mWindowManager = mContext.getSystemService(WindowManager.class);
- mRoundedDefault = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_radius);
- mRoundedDefaultTop = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_radius_top);
- mRoundedDefaultBottom = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_radius_bottom);
+ updateRoundedCornerRadii();
if (hasRoundedCorners() || shouldDrawCutout()) {
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 +143,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,19 +153,24 @@
// - 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();
}
};
- mRotation = -1;
mDisplayManager = (DisplayManager) mContext.getSystemService(
Context.DISPLAY_SERVICE);
- mDisplayManager.registerDisplayListener(mDisplayListener, null);
+ mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
+ updateOrientation();
}
private void setupDecorations() {
@@ -184,10 +200,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 +216,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 +234,11 @@
.start();
}
});
+
+ mOverlay.getViewTreeObserver().addOnPreDrawListener(
+ new ValidatingPreDrawListener(mOverlay));
+ mBottomOverlay.getViewTreeObserver().addOnPreDrawListener(
+ new ValidatingPreDrawListener(mBottomOverlay));
}
private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@@ -246,14 +268,29 @@
@Override
protected void onConfigurationChanged(Configuration newConfig) {
- mPendingRotationChange = false;
- updateOrientation();
- if (shouldDrawCutout() && mOverlay == null) {
- setupDecorations();
- }
+ mHandler.post(() -> {
+ int oldRotation = mRotation;
+ mPendingRotationChange = false;
+ updateOrientation();
+ updateRoundedCornerRadii();
+ 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;
}
@@ -268,6 +305,26 @@
}
}
+ private void updateRoundedCornerRadii() {
+ final int newRoundedDefault = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_radius);
+ final int newRoundedDefaultTop = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_radius_top);
+ final int newRoundedDefaultBottom = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_radius_bottom);
+
+ final boolean roundedCornersChanged = mRoundedDefault != newRoundedDefault
+ || mRoundedDefaultBottom != newRoundedDefaultBottom
+ || mRoundedDefaultTop != newRoundedDefaultTop;
+
+ if (roundedCornersChanged) {
+ mRoundedDefault = newRoundedDefault;
+ mRoundedDefaultTop = newRoundedDefaultTop;
+ mRoundedDefaultBottom = newRoundedDefaultBottom;
+ onTuningChanged(SIZE, null);
+ }
+ }
+
private void updateViews() {
View topLeft = mOverlay.findViewById(R.id.left);
View topRight = mOverlay.findViewById(R.id.right);
@@ -333,7 +390,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 +471,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 +555,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 +795,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/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 4e7c3ab..b96a604 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -36,7 +36,7 @@
import com.android.systemui.plugins.PluginListener;
import com.android.systemui.plugins.PluginManager;
import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.StatusBarWindowManager;
+import com.android.systemui.statusbar.phone.StatusBarWindowController;
import com.android.systemui.util.NotificationChannels;
import java.util.HashMap;
@@ -210,9 +210,9 @@
if (mOverlays == null) mOverlays = new ArraySet<>();
if (plugin.holdStatusBarOpen()) {
mOverlays.add(plugin);
- Dependency.get(StatusBarWindowManager.class).setStateListener(b ->
+ Dependency.get(StatusBarWindowController.class).setStateListener(b ->
mOverlays.forEach(o -> o.setCollapseDesired(b)));
- Dependency.get(StatusBarWindowManager.class).setForcePluginOpen(
+ Dependency.get(StatusBarWindowController.class).setForcePluginOpen(
mOverlays.size() != 0);
}
@@ -221,7 +221,7 @@
@Override
public void onPluginDisconnected(OverlayPlugin plugin) {
mOverlays.remove(plugin);
- Dependency.get(StatusBarWindowManager.class).setForcePluginOpen(
+ Dependency.get(StatusBarWindowController.class).setForcePluginOpen(
mOverlays.size() != 0);
}
}, OverlayPlugin.class, true /* Allow multiple plugins */);
diff --git a/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java b/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java
index f8b73a1..d6472b7 100644
--- a/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java
+++ b/packages/SystemUI/src/com/android/systemui/analytics/SensorLoggerSession.java
@@ -101,31 +101,31 @@
public Session toProto() {
Session proto = new Session();
- proto.setStartTimestampMillis(mStartTimestampMillis);
- proto.setDurationMillis(mEndTimestampMillis - mStartTimestampMillis);
- proto.setBuild(Build.FINGERPRINT);
- proto.setResult(mResult);
- proto.setType(mType);
+ proto.startTimestampMillis = mStartTimestampMillis;
+ proto.durationMillis = mEndTimestampMillis - mStartTimestampMillis;
+ proto.build = Build.FINGERPRINT;
+ proto.result = mResult;
+ proto.type = mType;
proto.sensorEvents = mSensorEvents.toArray(proto.sensorEvents);
proto.touchEvents = mMotionEvents.toArray(proto.touchEvents);
proto.phoneEvents = mPhoneEvents.toArray(proto.phoneEvents);
- proto.setTouchAreaWidth(mTouchAreaWidth);
- proto.setTouchAreaHeight(mTouchAreaHeight);
+ proto.touchAreaWidth = mTouchAreaWidth;
+ proto.touchAreaHeight = mTouchAreaHeight;
return proto;
}
private PhoneEvent phoneEventToProto(int eventType, long sysTimeNanos) {
PhoneEvent proto = new PhoneEvent();
- proto.setType(eventType);
- proto.setTimeOffsetNanos(sysTimeNanos - mStartSystemTimeNanos);
+ proto.type = eventType;
+ proto.timeOffsetNanos = sysTimeNanos - mStartSystemTimeNanos;
return proto;
}
private SensorEvent sensorEventToProto(android.hardware.SensorEvent ev, long sysTimeNanos) {
SensorEvent proto = new SensorEvent();
- proto.setType(ev.sensor.getType());
- proto.setTimeOffsetNanos(sysTimeNanos - mStartSystemTimeNanos);
- proto.setTimestamp(ev.timestamp);
+ proto.type = ev.sensor.getType();
+ proto.timeOffsetNanos = sysTimeNanos - mStartSystemTimeNanos;
+ proto.timestamp = ev.timestamp;
proto.values = ev.values.clone();
return proto;
}
@@ -133,17 +133,17 @@
private TouchEvent motionEventToProto(MotionEvent ev) {
int count = ev.getPointerCount();
TouchEvent proto = new TouchEvent();
- proto.setTimeOffsetNanos(ev.getEventTimeNano() - mStartSystemTimeNanos);
- proto.setAction(ev.getActionMasked());
- proto.setActionIndex(ev.getActionIndex());
+ proto.timeOffsetNanos = ev.getEventTimeNano() - mStartSystemTimeNanos;
+ proto.action = ev.getActionMasked();
+ proto.actionIndex = ev.getActionIndex();
proto.pointers = new TouchEvent.Pointer[count];
for (int i = 0; i < count; i++) {
TouchEvent.Pointer p = new TouchEvent.Pointer();
- p.setX(ev.getX(i));
- p.setY(ev.getY(i));
- p.setSize(ev.getSize(i));
- p.setPressure(ev.getPressure(i));
- p.setId(ev.getPointerId(i));
+ p.x = ev.getX(i);
+ p.y = ev.getY(i);
+ p.size = ev.getSize(i);
+ p.pressure = ev.getPressure(i);
+ p.id = ev.getPointerId(i);
proto.pointers[i] = p;
}
return proto;
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
index 79de48a..51cc4a1 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
@@ -35,7 +35,7 @@
private static final int SIZE = Build.IS_DEBUGGABLE ? 400 : 50;
static final SimpleDateFormat FORMAT = new SimpleDateFormat("MM-dd HH:mm:ss.SSS");
- private static final int PULSE_REASONS = 6;
+ private static final int PULSE_REASONS = 7;
public static final int PULSE_REASON_NONE = -1;
public static final int PULSE_REASON_INTENT = 0;
@@ -44,6 +44,7 @@
public static final int PULSE_REASON_SENSOR_PICKUP = 3;
public static final int PULSE_REASON_SENSOR_DOUBLE_TAP = 4;
public static final int PULSE_REASON_SENSOR_LONG_PRESS = 5;
+ public static final int PULSE_REASON_SENSOR_REACH = 6;
private static boolean sRegisterKeyguardCallback = true;
@@ -62,10 +63,10 @@
private static SummaryStats sEmergencyCallStats;
private static SummaryStats[][] sProxStats; // [reason][near/far]
- public static void tracePickupPulse(Context context, boolean withinVibrationThreshold) {
+ public static void tracePickupWakeUp(Context context, boolean withinVibrationThreshold) {
if (!ENABLED) return;
init(context);
- log("pickupPulse withinVibrationThreshold=" + withinVibrationThreshold);
+ log("pickupWakeUp withinVibrationThreshold=" + withinVibrationThreshold);
(withinVibrationThreshold ? sPickupPulseNearVibrationStats
: sPickupPulseNotNearVibrationStats).append();
}
@@ -169,6 +170,11 @@
log("state " + state);
}
+ public static void traceReachWakeUp() {
+ if (!ENABLED) return;
+ log("reachWakeUp");
+ }
+
public static void traceProximityResult(Context context, boolean near, long millis,
int pulseReason) {
if (!ENABLED) return;
@@ -186,6 +192,7 @@
case PULSE_REASON_SENSOR_PICKUP: return "pickup";
case PULSE_REASON_SENSOR_DOUBLE_TAP: return "doubletap";
case PULSE_REASON_SENSOR_LONG_PRESS: return "longpress";
+ case PULSE_REASON_SENSOR_REACH: return "reach";
default: throw new IllegalArgumentException("bad reason: " + pulseReason);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
index e87bd09..045a98c 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
@@ -91,13 +91,13 @@
false /* touchscreen */),
mPickupSensor = new TriggerSensor(
mSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE),
- Settings.Secure.DOZE_PULSE_ON_PICK_UP,
- config.pulseOnPickupAvailable(),
+ Settings.Secure.DOZE_PICK_UP_GESTURE,
+ config.dozePickupSensorAvailable(),
DozeLog.PULSE_REASON_SENSOR_PICKUP, false /* touchCoords */,
false /* touchscreen */),
new TriggerSensor(
findSensorWithType(config.doubleTapSensorType()),
- Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP,
+ Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
true /* configured */,
DozeLog.PULSE_REASON_SENSOR_DOUBLE_TAP,
dozeParameters.doubleTapReportsTouchCoordinates(),
@@ -110,6 +110,13 @@
DozeLog.PULSE_REASON_SENSOR_LONG_PRESS,
true /* reports touch coordinates */,
true /* touchscreen */),
+ new TriggerSensor(
+ findSensorWithType(config.reachSensorType()),
+ Settings.Secure.DOZE_REACH_GESTURE,
+ true /* configured */,
+ DozeLog.PULSE_REASON_SENSOR_REACH,
+ false /* reports touch coordinates */,
+ false /* touchscreen */),
};
mProxSensor = new ProxSensor(policy);
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
index be3e322..73cbd7d 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
@@ -128,8 +128,11 @@
boolean isDoubleTap = pulseReason == DozeLog.PULSE_REASON_SENSOR_DOUBLE_TAP;
boolean isPickup = pulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP;
boolean isLongPress = pulseReason == DozeLog.PULSE_REASON_SENSOR_LONG_PRESS;
+ boolean isReach = pulseReason == DozeLog.PULSE_REASON_SENSOR_REACH;
- if (mConfig.alwaysOnEnabled(UserHandle.USER_CURRENT) && !isLongPress) {
+ if (isLongPress) {
+ requestPulse(pulseReason, sensorPerformedProxCheck);
+ } else {
proximityCheckThenCall((result) -> {
if (result == ProximityCheck.RESULT_NEAR) {
// In pocket, drop event.
@@ -138,13 +141,13 @@
if (isDoubleTap) {
mDozeHost.onDoubleTap(screenX, screenY);
mMachine.wakeUp();
+ } else if (isPickup || isReach) {
+ mMachine.wakeUp();
} else {
mDozeHost.extendPulse();
}
}, sensorPerformedProxCheck, pulseReason);
return;
- } else {
- requestPulse(pulseReason, sensorPerformedProxCheck);
}
if (isPickup) {
@@ -152,7 +155,9 @@
SystemClock.elapsedRealtime() - mNotificationPulseTime;
final boolean withinVibrationThreshold =
timeSinceNotification < mDozeParameters.getPickupVibrationThreshold();
- DozeLog.tracePickupPulse(mContext, withinVibrationThreshold);
+ DozeLog.tracePickupWakeUp(mContext, withinVibrationThreshold);
+ } else if (isReach) {
+ DozeLog.traceReachWakeUp();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 6c94aa4..a195fc9 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -1399,6 +1399,7 @@
private final ColorExtractor mColorExtractor;
private boolean mKeyguardShowing;
private boolean mShouldDisplaySeparatedButton;
+ private boolean mShowing;
public ActionsDialog(Context context, OnClickListener clickListener, MyAdapter adapter,
OnItemLongClickListener longClickListener, boolean shouldDisplaySeparatedButton) {
@@ -1507,6 +1508,7 @@
@Override
public void show() {
super.show();
+ mShowing = true;
mGradientDrawable.setAlpha(0);
mHardwareLayout.setTranslationX(getAnimTranslation());
mHardwareLayout.setAlpha(0);
@@ -1526,6 +1528,10 @@
@Override
public void dismiss() {
+ if (!mShowing) {
+ return;
+ }
+ mShowing = false;
mHardwareLayout.setTranslationX(0);
mHardwareLayout.setAlpha(1);
mHardwareLayout.animate()
@@ -1544,6 +1550,7 @@
void dismissImmediately() {
super.dismiss();
+ mShowing = false;
}
private float getAnimTranslation() {
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
index 81d700c..76a1acc 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
@@ -318,8 +318,7 @@
private CachedBluetoothDevice getCachedBluetoothDevice(BluetoothDevice d) {
CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(d);
if (cachedDevice == null) {
- cachedDevice = mCachedDeviceManager.addDevice(
- mLocalBluetoothAdapter, mProfileManager, d);
+ cachedDevice = mCachedDeviceManager.addDevice(d);
}
return cachedDevice;
}
@@ -599,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/keyguard/KeyguardSliceProvider.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
index fe8ea34..82b79ac 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
@@ -30,6 +30,7 @@
import android.icu.text.DisplayContext;
import android.net.Uri;
import android.os.Handler;
+import android.os.Trace;
import android.provider.Settings;
import android.service.notification.ZenModeConfig;
import android.text.TextUtils;
@@ -45,6 +46,7 @@
import java.util.Locale;
import java.util.concurrent.TimeUnit;
+import androidx.core.graphics.drawable.IconCompat;
import androidx.slice.Slice;
import androidx.slice.SliceProvider;
import androidx.slice.builders.ListBuilder;
@@ -71,6 +73,8 @@
@VisibleForTesting
static final int ALARM_VISIBILITY_HOURS = 12;
+ private static KeyguardSliceProvider sInstance;
+
protected final Uri mSliceUri;
protected final Uri mDateUri;
protected final Uri mAlarmUri;
@@ -88,6 +92,7 @@
protected AlarmManager mAlarmManager;
protected ContentResolver mContentResolver;
private AlarmManager.AlarmClockInfo mNextAlarmInfo;
+ private PendingIntent mPendingIntent;
/**
* Receiver responsible for time ticking and updating the date format.
@@ -116,6 +121,10 @@
this(new Handler());
}
+ public static KeyguardSliceProvider getAttachedInstance() {
+ return KeyguardSliceProvider.sInstance;
+ }
+
@VisibleForTesting
KeyguardSliceProvider(Handler handler) {
mHandler = handler;
@@ -127,23 +136,26 @@
@Override
public Slice onBindSlice(Uri sliceUri) {
- ListBuilder builder = new ListBuilder(getContext(), mSliceUri);
- builder.addRow(new RowBuilder(builder, mDateUri).setTitle(mLastText));
+ Trace.beginSection("KeyguardSliceProvider#onBindSlice");
+ ListBuilder builder = new ListBuilder(getContext(), mSliceUri, ListBuilder.INFINITY);
+ builder.addRow(new RowBuilder(mDateUri).setTitle(mLastText));
addNextAlarm(builder);
addZenMode(builder);
addPrimaryAction(builder);
- return builder.build();
+ Slice slice = builder.build();
+ Trace.endSection();
+ return slice;
}
protected void addPrimaryAction(ListBuilder builder) {
// Add simple action because API requires it; Keyguard handles presenting
// its own slices so this action + icon are actually never used.
- PendingIntent pi = PendingIntent.getActivity(getContext(), 0, new Intent(), 0);
- Icon icon = Icon.createWithResource(getContext(), R.drawable.ic_access_alarms_big);
- SliceAction action = new SliceAction(pi, icon, mLastText);
-
- RowBuilder primaryActionRow = new RowBuilder(builder, Uri.parse(KEYGUARD_ACTION_URI))
- .setPrimaryAction(action);
+ IconCompat icon = IconCompat.createWithResource(getContext(),
+ R.drawable.ic_access_alarms_big);
+ SliceAction action = SliceAction.createDeeplink(mPendingIntent, icon,
+ ListBuilder.ICON_IMAGE, mLastText);
+ RowBuilder primaryActionRow = new RowBuilder(Uri.parse(KEYGUARD_ACTION_URI))
+ .setPrimaryAction(action);
builder.addRow(primaryActionRow);
}
@@ -151,11 +163,11 @@
if (TextUtils.isEmpty(mNextAlarm)) {
return;
}
-
- Icon alarmIcon = Icon.createWithResource(getContext(), R.drawable.ic_access_alarms_big);
- RowBuilder alarmRowBuilder = new RowBuilder(builder, mAlarmUri)
+ IconCompat alarmIcon = IconCompat.createWithResource(getContext(),
+ R.drawable.ic_access_alarms_big);
+ RowBuilder alarmRowBuilder = new RowBuilder(mAlarmUri)
.setTitle(mNextAlarm)
- .addEndItem(alarmIcon);
+ .addEndItem(alarmIcon, ListBuilder.ICON_IMAGE);
builder.addRow(alarmRowBuilder);
}
@@ -167,10 +179,11 @@
if (!isDndSuppressingNotifications()) {
return;
}
- RowBuilder dndBuilder = new RowBuilder(builder, mDndUri)
+ RowBuilder dndBuilder = new RowBuilder(mDndUri)
.setContentDescription(getContext().getResources()
.getString(R.string.accessibility_quick_settings_dnd))
- .addEndItem(Icon.createWithResource(getContext(), R.drawable.stat_sys_dnd));
+ .addEndItem(IconCompat.createWithResource(getContext(), R.drawable.stat_sys_dnd),
+ ListBuilder.ICON_IMAGE);
builder.addRow(dndBuilder);
}
@@ -193,6 +206,8 @@
mZenModeController = new ZenModeControllerImpl(getContext(), mHandler);
mZenModeController.addCallback(this);
mDatePattern = getContext().getString(R.string.system_ui_aod_date_pattern);
+ mPendingIntent = PendingIntent.getActivity(getContext(), 0, new Intent(), 0);
+ KeyguardSliceProvider.sInstance = this;
registerClockUpdate();
updateClock();
return true;
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 4763fa9..4977ff7 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1655,7 +1655,6 @@
resetKeyguardDonePendingLocked();
}
- mUpdateMonitor.clearFailedUnlockAttempts();
mUpdateMonitor.clearBiometricRecognized();
if (mGoingToSleep) {
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/AutoAddTracker.java b/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java
index 2a2bc09..dfd3f73 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java
@@ -72,6 +72,12 @@
}
}
+ public void setTileRemoved(String tile) {
+ if (mAutoAdded.remove(tile)) {
+ saveTiles();
+ }
+ }
+
public void destroy() {
mContext.getContentResolver().unregisterContentObserver(mObserver);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
index f13f489..f1b7eec 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
@@ -55,7 +55,6 @@
private Scroller mScroller;
private AnimatorSet mBounceAnimatorSet;
- private int mAnimatingToPage = -1;
private float mLastExpansion;
public PagedTileLayout(Context context, AttributeSet attrs) {
@@ -95,40 +94,16 @@
}
@Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- // Suppress all touch event during reveal animation.
- if (mAnimatingToPage != -1) {
- return true;
- }
- return super.onInterceptTouchEvent(ev);
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent ev) {
- // Suppress all touch event during reveal animation.
- if (mAnimatingToPage != -1) {
- return true;
- }
- return super.onTouchEvent(ev);
- }
-
- @Override
public void computeScroll() {
if (!mScroller.isFinished() && mScroller.computeScrollOffset()) {
- scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
- float pageFraction = (float) getScrollX() / getWidth();
- int position = (int) pageFraction;
- float positionOffset = pageFraction - position;
- mOnPageChangeListener.onPageScrolled(position, positionOffset, getScrollX());
+ fakeDragBy(getScrollX() - mScroller.getCurrX());
// Keep on drawing until the animation has finished.
postInvalidateOnAnimation();
return;
- }
- if (mAnimatingToPage != -1) {
- setCurrentItem(mAnimatingToPage, true);
+ } else if (isFakeDragging()) {
+ endFakeDrag();
mBounceAnimatorSet.start();
setOffscreenPageLimit(1);
- mAnimatingToPage = -1;
}
super.computeScroll();
}
@@ -287,7 +262,7 @@
}
public void startTileReveal(Set<String> tileSpecs, final Runnable postAnimation) {
- if (tileSpecs.isEmpty() || mPages.size() < 2 || getScrollX() != 0) {
+ if (tileSpecs.isEmpty() || mPages.size() < 2 || getScrollX() != 0 || !beginFakeDrag()) {
// Do not start the reveal animation unless there are tiles to animate, multiple
// TilePages available and the user has not already started dragging.
return;
@@ -305,6 +280,7 @@
if (bounceAnims.isEmpty()) {
// All tileSpecs are on the first page. Nothing to do.
// TODO: potentially show a bounce animation for first page QS tiles
+ endFakeDrag();
return;
}
@@ -317,10 +293,10 @@
postAnimation.run();
}
});
- mAnimatingToPage = lastPageNumber;
- setOffscreenPageLimit(mAnimatingToPage); // Ensure the page to reveal has been inflated.
- mScroller.startScroll(getScrollX(), getScrollY(), getWidth() * mAnimatingToPage, 0,
- REVEAL_SCROLL_DURATION_MILLIS);
+ setOffscreenPageLimit(lastPageNumber); // Ensure the page to reveal has been inflated.
+ int dx = getWidth() * lastPageNumber;
+ mScroller.startScroll(getScrollX(), getScrollY(), isLayoutRtl() ? -dx : dx, 0,
+ REVEAL_SCROLL_DURATION_MILLIS);
postInvalidateOnAnimation();
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java b/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java
index a1c2577..87c64c7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PseudoGridView.java
@@ -47,16 +47,12 @@
final int N = a.getIndexCount();
for (int i = 0; i < N; i++) {
int attr = a.getIndex(i);
- switch (attr) {
- case R.styleable.PseudoGridView_numColumns:
- mNumColumns = a.getInt(attr, 3);
- break;
- case R.styleable.PseudoGridView_verticalSpacing:
- mVerticalSpacing = a.getDimensionPixelSize(attr, 0);
- break;
- case R.styleable.PseudoGridView_horizontalSpacing:
- mHorizontalSpacing = a.getDimensionPixelSize(attr, 0);
- break;
+ if (attr == R.styleable.PseudoGridView_numColumns) {
+ mNumColumns = a.getInt(attr, 3);
+ } else if (attr == R.styleable.PseudoGridView_verticalSpacing) {
+ mVerticalSpacing = a.getDimensionPixelSize(attr, 0);
+ } else if (attr == R.styleable.PseudoGridView_horizontalSpacing) {
+ mHorizontalSpacing = a.getDimensionPixelSize(attr, 0);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
index 80b6c73..feff5d4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
@@ -70,7 +70,6 @@
mBackgroundGradient = findViewById(R.id.quick_settings_gradient_view);
mSideMargins = getResources().getDimensionPixelSize(R.dimen.notification_side_paddings);
- setClickable(true);
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
setMargins();
}
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/qs/QSHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSHost.java
index 84524a6..84fa700 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSHost.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSHost.java
@@ -32,6 +32,7 @@
void removeCallback(Callback callback);
TileServices getTileServices();
void removeTile(String tileSpec);
+ void unmarkTileAsAutoAdded(String tileSpec);
int indexOf(String tileSpec);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 0876a5d..3fc258b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -285,9 +285,6 @@
updatePageIndicator();
- for (TileRecord r : mRecords) {
- r.tile.clearState();
- }
if (mListening) {
refreshAllTiles();
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java
index bb69b7a..86e69e3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java
@@ -231,6 +231,11 @@
changeTileSpecs(tileSpecs-> tileSpecs.remove(spec));
}
+ @Override
+ public void unmarkTileAsAutoAdded(String spec) {
+ mAutoTiles.unmarkTileAsAutoAdded(spec);
+ }
+
public void addTile(String spec) {
changeTileSpecs(tileSpecs-> tileSpecs.add(spec));
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index 78e9f36..10b92f7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -88,6 +88,7 @@
private Holder mCurrentDrag;
private int mAccessibilityAction = ACTION_NONE;
private int mAccessibilityFromIndex;
+ private CharSequence mAccessibilityFromLabel;
private QSTileHost mHost;
public TileAdapter(Context context) {
@@ -241,7 +242,8 @@
holder.mTileView.setVisibility(View.VISIBLE);
holder.mTileView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
holder.mTileView.setContentDescription(mContext.getString(
- R.string.accessibility_qs_edit_position_label, position + 1));
+ R.string.accessibility_qs_edit_tile_add, mAccessibilityFromLabel,
+ position + 1));
holder.mTileView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@@ -270,9 +272,12 @@
if (position > mEditIndex) {
info.state.contentDescription = mContext.getString(
R.string.accessibility_qs_edit_add_tile_label, info.state.label);
- } else if (mAccessibilityAction != ACTION_NONE) {
+ } else if (mAccessibilityAction == ACTION_ADD) {
info.state.contentDescription = mContext.getString(
- R.string.accessibility_qs_edit_position_label, position + 1);
+ R.string.accessibility_qs_edit_tile_add, mAccessibilityFromLabel, position + 1);
+ } else if (mAccessibilityAction == ACTION_MOVE) {
+ info.state.contentDescription = mContext.getString(
+ R.string.accessibility_qs_edit_tile_move, mAccessibilityFromLabel, position + 1);
} else {
info.state.contentDescription = mContext.getString(
R.string.accessibility_qs_edit_tile_label, position + 1, info.state.label);
@@ -351,6 +356,7 @@
private void startAccessibleAdd(int position) {
mAccessibilityFromIndex = position;
+ mAccessibilityFromLabel = mTiles.get(position).state.label;
mAccessibilityAction = ACTION_ADD;
// Add placeholder for last slot.
mTiles.add(mEditIndex++, null);
@@ -360,6 +366,7 @@
private void startAccessibleMove(int position) {
mAccessibilityFromIndex = position;
+ mAccessibilityFromLabel = mTiles.get(position).state.label;
mAccessibilityAction = ACTION_MOVE;
notifyDataSetChanged();
}
@@ -385,15 +392,11 @@
strip(mTiles.get(to)));
MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_ADD,
to);
- v.announceForAccessibility(mContext.getString(R.string.accessibility_qs_edit_tile_added,
- fromLabel, (to + 1)));
} else {
MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_MOVE_SPEC,
strip(mTiles.get(to)));
MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_MOVE,
to);
- v.announceForAccessibility(mContext.getString(R.string.accessibility_qs_edit_tile_moved,
- fromLabel, (to + 1)));
}
saveSpecs(mHost);
return true;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 53a576d..591e9e0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -95,7 +95,6 @@
continue;
}
tile.setListening(this, true);
- tile.clearState();
tile.refreshState();
tile.setListening(this, false);
tile.setTileSpec(spec);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
index 6bc3bee..b6a776f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java
@@ -211,10 +211,6 @@
mHandler.obtainMessage(H.REFRESH_STATE, arg).sendToTarget();
}
- public void clearState() {
- mHandler.sendEmptyMessage(H.CLEAR_STATE);
- }
-
public void userSwitch(int newUserId) {
mHandler.obtainMessage(H.USER_SWITCH, newUserId, 0).sendToTarget();
}
@@ -266,11 +262,6 @@
public abstract Intent getLongClickIntent();
- protected void handleClearState() {
- mTmpState = newTileState();
- mState = newTileState();
- }
-
protected void handleRefreshState(Object arg) {
handleUpdateState(mTmpState, arg);
final boolean changed = mTmpState.copyTo(mState);
@@ -409,11 +400,10 @@
private static final int TOGGLE_STATE_CHANGED = 8;
private static final int SCAN_STATE_CHANGED = 9;
private static final int DESTROY = 10;
- private static final int CLEAR_STATE = 11;
- private static final int REMOVE_CALLBACKS = 12;
- private static final int REMOVE_CALLBACK = 13;
- private static final int SET_LISTENING = 14;
- private static final int STALE = 15;
+ private static final int REMOVE_CALLBACKS = 11;
+ private static final int REMOVE_CALLBACK = 12;
+ private static final int SET_LISTENING = 13;
+ private static final int STALE = 14;
@VisibleForTesting
protected H(Looper looper) {
@@ -467,9 +457,6 @@
} else if (msg.what == DESTROY) {
name = "handleDestroy";
handleDestroy();
- } else if (msg.what == CLEAR_STATE) {
- name = "handleClearState";
- handleClearState();
} else if (msg.what == SET_LISTENING) {
name = "handleSetListeningInternal";
handleSetListeningInternal(msg.obj, msg.arg1 != 0);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index f523196..50c8698 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -145,7 +145,9 @@
int zenDuration = Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ZEN_DURATION, 0);
boolean showOnboarding = Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0;
+ Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0
+ && Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.ZEN_SETTINGS_UPDATED, 0) != 1;
if (showOnboarding) {
// don't show on-boarding again or notification ever
Settings.Secure.putInt(mContext.getContentResolver(),
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java
index 1e9a618..ad7d1b6 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailItemView.java
@@ -69,13 +69,10 @@
final int N = a.getIndexCount();
for (int i = 0; i < N; i++) {
int attr = a.getIndex(i);
- switch (attr) {
- case R.styleable.UserDetailItemView_regularFontFamily:
- mRegularTypeface = Typeface.create(a.getString(attr), 0 /* style */);
- break;
- case R.styleable.UserDetailItemView_activatedFontFamily:
- mActivatedTypeface = Typeface.create(a.getString(attr), 0 /* style */);
- break;
+ if (attr == R.styleable.UserDetailItemView_regularFontFamily) {
+ mRegularTypeface = Typeface.create(a.getString(attr), 0 /* style */);
+ } else if (attr == R.styleable.UserDetailItemView_activatedFontFamily) {
+ mActivatedTypeface = Typeface.create(a.getString(attr), 0 /* style */);
}
}
a.recycle();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
index 5bab3e8..3109dea 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
@@ -78,6 +78,7 @@
@Override
public void onManagedProfileRemoved() {
mHost.removeTile(getTileSpec());
+ mHost.unmarkTileAsAutoAdded(getTileSpec());
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index 3eb3160..98925b9 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -226,22 +226,16 @@
public boolean performAccessibilityAction(View host, int action, Bundle args) {
int currentPosition = getCurrentPosition();
SnapTarget nextTarget = null;
- switch (action) {
- case R.id.action_move_tl_full:
- nextTarget = mSnapAlgorithm.getDismissEndTarget();
- break;
- case R.id.action_move_tl_70:
- nextTarget = mSnapAlgorithm.getLastSplitTarget();
- break;
- case R.id.action_move_tl_50:
- nextTarget = mSnapAlgorithm.getMiddleTarget();
- break;
- case R.id.action_move_tl_30:
- nextTarget = mSnapAlgorithm.getFirstSplitTarget();
- break;
- case R.id.action_move_rb_full:
- nextTarget = mSnapAlgorithm.getDismissStartTarget();
- break;
+ if (action == R.id.action_move_tl_full) {
+ nextTarget = mSnapAlgorithm.getDismissEndTarget();
+ } else if (action == R.id.action_move_tl_70) {
+ nextTarget = mSnapAlgorithm.getLastSplitTarget();
+ } else if (action == R.id.action_move_tl_50) {
+ nextTarget = mSnapAlgorithm.getMiddleTarget();
+ } else if (action == R.id.action_move_tl_30) {
+ nextTarget = mSnapAlgorithm.getFirstSplitTarget();
+ } else if (action == R.id.action_move_rb_full) {
+ nextTarget = mSnapAlgorithm.getDismissStartTarget();
}
if (nextTarget != null) {
startDragging(true /* animate */, false /* touching */);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java
new file mode 100644
index 0000000..c017104
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java
@@ -0,0 +1,317 @@
+/*
+ * 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.statusbar;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.SystemClock;
+import android.util.ArrayMap;
+import android.util.ArraySet;
+import android.util.Log;
+import android.view.accessibility.AccessibilityEvent;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.statusbar.notification.NotificationData;
+
+import java.util.stream.Stream;
+
+/**
+ * A manager which contains notification alerting functionality, providing methods to add and
+ * remove notifications that appear on screen for a period of time and dismiss themselves at the
+ * appropriate time. These include heads up notifications and ambient pulses.
+ */
+public abstract class AlertingNotificationManager {
+ private static final String TAG = "AlertNotifManager";
+ protected final Clock mClock = new Clock();
+ protected final ArrayMap<String, AlertEntry> mAlertEntries = new ArrayMap<>();
+ protected int mMinimumDisplayTime;
+ protected int mAutoDismissNotificationDecay;
+ @VisibleForTesting
+ public Handler mHandler = new Handler(Looper.getMainLooper());
+
+ /**
+ * Called when posting a new notification that should alert the user and appear on screen.
+ * Adds the notification to be managed.
+ * @param entry entry to show
+ */
+ public void showNotification(@NonNull NotificationData.Entry entry) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "showNotification");
+ }
+ addAlertEntry(entry);
+ updateNotification(entry.key, true /* alert */);
+ entry.setInterruption();
+ }
+
+ /**
+ * Try to remove the notification. May not succeed if the notification has not been shown long
+ * enough and needs to be kept around.
+ * @param key the key of the notification to remove
+ * @param releaseImmediately force a remove regardless of earliest removal time
+ * @return true if notification is removed, false otherwise
+ */
+ public boolean removeNotification(@NonNull String key, boolean releaseImmediately) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "removeNotification");
+ }
+ AlertEntry alertEntry = mAlertEntries.get(key);
+ if (alertEntry == null) {
+ return true;
+ }
+ if (releaseImmediately || alertEntry.wasShownLongEnough()) {
+ removeAlertEntry(key);
+ } else {
+ alertEntry.removeAsSoonAsPossible();
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Called when the notification state has been updated.
+ * @param key the key of the entry that was updated
+ * @param alert whether the notification should alert again and force reevaluation of
+ * removal time
+ */
+ public void updateNotification(@NonNull String key, boolean alert) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "updateNotification");
+ }
+
+ AlertEntry alertEntry = mAlertEntries.get(key);
+ if (alertEntry == null) {
+ // the entry was released before this update (i.e by a listener) This can happen
+ // with the groupmanager
+ return;
+ }
+
+ alertEntry.mEntry.row.sendAccessibilityEvent(
+ AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+ if (alert) {
+ alertEntry.updateEntry(true /* updatePostTime */);
+ }
+ }
+
+ /**
+ * Clears all managed notifications.
+ */
+ public void releaseAllImmediately() {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "releaseAllImmediately");
+ }
+ // A copy is necessary here as we are changing the underlying map. This would cause
+ // undefined behavior if we iterated over the key set directly.
+ ArraySet<String> keysToRemove = new ArraySet<>(mAlertEntries.keySet());
+ for (String key : keysToRemove) {
+ removeAlertEntry(key);
+ }
+ }
+
+ /**
+ * Returns the entry if it is managed by this manager.
+ * @param key key of notification
+ * @return the entry
+ */
+ @Nullable
+ public NotificationData.Entry getEntry(@NonNull String key) {
+ AlertEntry entry = mAlertEntries.get(key);
+ return entry != null ? entry.mEntry : null;
+ }
+
+ /**
+ * Returns the stream of all current notifications managed by this manager.
+ * @return all entries
+ */
+ @NonNull
+ public Stream<NotificationData.Entry> getAllEntries() {
+ return mAlertEntries.values().stream().map(headsUpEntry -> headsUpEntry.mEntry);
+ }
+
+ /**
+ * Whether or not there are any active alerting notifications.
+ * @return true if there is an alert, false otherwise
+ */
+ public boolean hasNotifications() {
+ return !mAlertEntries.isEmpty();
+ }
+
+ /**
+ * Whether or not the given notification is alerting and managed by this manager.
+ * @return true if the notification is alerting
+ */
+ public boolean contains(@NonNull String key) {
+ return mAlertEntries.containsKey(key);
+ }
+
+ /**
+ * Add a new entry and begin managing it.
+ * @param entry the entry to add
+ */
+ protected final void addAlertEntry(@NonNull NotificationData.Entry entry) {
+ AlertEntry alertEntry = createAlertEntry();
+ alertEntry.setEntry(entry);
+ mAlertEntries.put(entry.key, alertEntry);
+ onAlertEntryAdded(alertEntry);
+ entry.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+ }
+
+ /**
+ * Manager-specific logic that should occur when an entry is added.
+ * @param alertEntry alert entry added
+ */
+ protected abstract void onAlertEntryAdded(@NonNull AlertEntry alertEntry);
+
+ /**
+ * Remove a notification and reset the alert entry.
+ * @param key key of notification to remove
+ */
+ protected final void removeAlertEntry(@NonNull String key) {
+ AlertEntry alertEntry = mAlertEntries.get(key);
+ if (alertEntry == null) {
+ return;
+ }
+ NotificationData.Entry entry = alertEntry.mEntry;
+ mAlertEntries.remove(key);
+ onAlertEntryRemoved(alertEntry);
+ entry.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+ alertEntry.reset();
+ }
+
+ /**
+ * Manager-specific logic that should occur when an alert entry is removed.
+ * @param alertEntry alert entry removed
+ */
+ protected abstract void onAlertEntryRemoved(@NonNull AlertEntry alertEntry);
+
+ /**
+ * Returns a new alert entry instance.
+ * @return a new AlertEntry
+ */
+ protected AlertEntry createAlertEntry() {
+ return new AlertEntry();
+ }
+
+ protected class AlertEntry implements Comparable<AlertEntry> {
+ @Nullable public NotificationData.Entry mEntry;
+ public long mPostTime;
+ public long mEarliestRemovaltime;
+
+ @Nullable protected Runnable mRemoveAlertRunnable;
+
+ public void setEntry(@Nullable final NotificationData.Entry entry) {
+ setEntry(entry, () -> removeAlertEntry(entry.key));
+ }
+
+ public void setEntry(@Nullable final NotificationData.Entry entry,
+ @Nullable Runnable removeAlertRunnable) {
+ mEntry = entry;
+ mRemoveAlertRunnable = removeAlertRunnable;
+
+ mPostTime = calculatePostTime();
+ updateEntry(true /* updatePostTime */);
+ }
+
+ /**
+ * Updates an entry's removal time.
+ * @param updatePostTime whether or not to refresh the post time
+ */
+ public void updateEntry(boolean updatePostTime) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "updateEntry");
+ }
+
+ long currentTime = mClock.currentTimeMillis();
+ mEarliestRemovaltime = currentTime + mMinimumDisplayTime;
+ if (updatePostTime) {
+ mPostTime = Math.max(mPostTime, currentTime);
+ }
+ removeAutoRemovalCallbacks();
+
+ if (!isSticky()) {
+ long finishTime = mPostTime + mAutoDismissNotificationDecay;
+ long removeDelay = Math.max(finishTime - currentTime, mMinimumDisplayTime);
+ mHandler.postDelayed(mRemoveAlertRunnable, removeDelay);
+ }
+ }
+
+ /**
+ * Whether or not the notification is "sticky" i.e. should stay on screen regardless
+ * of the timer and should be removed externally.
+ * @return true if the notification is sticky
+ */
+ protected boolean isSticky() {
+ return false;
+ }
+
+ /**
+ * Whether the notification has been on screen long enough and can be removed.
+ * @return true if the notification has been on screen long enough
+ */
+ public boolean wasShownLongEnough() {
+ return mEarliestRemovaltime < mClock.currentTimeMillis();
+ }
+
+ @Override
+ public int compareTo(@NonNull AlertEntry alertEntry) {
+ return (mPostTime < alertEntry.mPostTime)
+ ? 1 : ((mPostTime == alertEntry.mPostTime)
+ ? mEntry.key.compareTo(alertEntry.mEntry.key) : -1);
+ }
+
+ public void reset() {
+ mEntry = null;
+ removeAutoRemovalCallbacks();
+ mRemoveAlertRunnable = null;
+ }
+
+ /**
+ * Clear any pending removal runnables.
+ */
+ public void removeAutoRemovalCallbacks() {
+ if (mRemoveAlertRunnable != null) {
+ mHandler.removeCallbacks(mRemoveAlertRunnable);
+ }
+ }
+
+ /**
+ * Remove the alert at the earliest allowed removal time.
+ */
+ public void removeAsSoonAsPossible() {
+ if (mRemoveAlertRunnable != null) {
+ removeAutoRemovalCallbacks();
+ mHandler.postDelayed(mRemoveAlertRunnable,
+ mEarliestRemovaltime - mClock.currentTimeMillis());
+ }
+ }
+
+ /**
+ * Calculate what the post time of a notification is at some current time.
+ * @return the post time
+ */
+ protected long calculatePostTime() {
+ return mClock.currentTimeMillis();
+ }
+ }
+
+ protected final static class Clock {
+ public long currentTimeMillis() {
+ return SystemClock.elapsedRealtime();
+ }
+ }
+}
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..6c9ca70 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -18,9 +18,9 @@
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
+import android.car.user.CarUserManagerHelper;
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;
@@ -29,7 +29,6 @@
import android.view.WindowManager;
import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.settingslib.users.UserManagerHelper;
import com.android.systemui.BatteryMeterView;
import com.android.systemui.Dependency;
import com.android.systemui.Prefs;
@@ -42,6 +41,7 @@
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.car.hvac.HvacController;
+import com.android.systemui.statusbar.car.hvac.TemperatureView;
import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.policy.BatteryController;
@@ -51,14 +51,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;
@@ -84,6 +83,7 @@
private ActivityManagerWrapper mActivityManagerWrapper;
private DeviceProvisionedController mDeviceProvisionedController;
private boolean mDeviceIsProvisioned = true;
+ private HvacController mHvacController;
@Override
public void start() {
@@ -97,10 +97,8 @@
createBatteryController();
mCarBatteryController.startListening();
- if (ENABLE_HVAC_CONNECTION) {
- Log.d(TAG, "Connecting to HVAC service");
- Dependency.get(HvacController.class).connectToCarService();
- }
+ mHvacController.connectToCarService();
+
mCarFacetButtonController = Dependency.get(CarFacetButtonController.class);
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
mDeviceIsProvisioned = mDeviceProvisionedController.isDeviceProvisioned();
@@ -122,10 +120,11 @@
* before and after the device is provisioned
*/
private void restartNavBars() {
+ // remove and reattach all hvac components such that we don't keep a reference to unused
+ // ui elements
+ mHvacController.removeAllComponents();
+ addTemperatureViewToController(mStatusBarWindow);
mCarFacetButtonController.removeAll();
- if (ENABLE_HVAC_CONNECTION) {
- Dependency.get(HvacController.class).removeAllComponents();
- }
if (mNavigationBarWindow != null) {
mNavigationBarWindow.removeAllViews();
mNavigationBarView = null;
@@ -140,14 +139,27 @@
mRightNavigationBarWindow.removeAllViews();
mRightNavigationBarView = null;
}
+
buildNavBarContent();
}
+ private void addTemperatureViewToController(View v) {
+ if (v instanceof TemperatureView) {
+ Log.d(TAG, "addTemperatureViewToController: found ");
+ mHvacController.addHvacTextView((TemperatureView) v);
+ } else if (v instanceof ViewGroup) {
+ ViewGroup viewGroup = (ViewGroup) v;
+ for (int i = 0; i < viewGroup.getChildCount(); i++) {
+ addTemperatureViewToController(viewGroup.getChildAt(i));
+ }
+ }
+ }
+
/**
* 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);
}
@@ -217,6 +229,7 @@
@Override
protected void makeStatusBarView() {
super.makeStatusBarView();
+ mHvacController = Dependency.get(HvacController.class);
mNotificationPanelBackground = getDefaultWallpaper();
mScrimController.setScrimBehindDrawable(mNotificationPanelBackground);
@@ -229,6 +242,7 @@
// when a device has connected by bluetooth.
mBatteryMeterView.setVisibility(View.GONE);
});
+ addTemperatureViewToController(mStatusBarWindow);
}
private BatteryController createBatteryController() {
@@ -267,13 +281,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,
@@ -345,6 +358,7 @@
throw new RuntimeException("Unable to build botom nav bar due to missing layout");
}
mNavigationBarView.setStatusBar(this);
+ addTemperatureViewToController(mNavigationBarView);
}
private void buildLeft(int layout) {
@@ -355,6 +369,7 @@
throw new RuntimeException("Unable to build left nav bar due to missing layout");
}
mLeftNavigationBarView.setStatusBar(this);
+ addTemperatureViewToController(mLeftNavigationBarView);
}
@@ -365,6 +380,8 @@
Log.e(TAG, "CarStatusBar failed inflate for R.layout.car_navigation_bar");
throw new RuntimeException("Unable to build right nav bar due to missing layout");
}
+ mRightNavigationBarView.setStatusBar(this);
+ addTemperatureViewToController(mRightNavigationBarView);
}
@Override
@@ -378,10 +395,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 +419,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 +468,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
@@ -484,7 +506,7 @@
@Override
public void updateKeyguardState(boolean goingToFullShade, boolean fromShadeLocked) {
super.updateKeyguardState(goingToFullShade, fromShadeLocked);
- UserManagerHelper helper = new UserManagerHelper(mContext);
+ CarUserManagerHelper helper = new CarUserManagerHelper(mContext);
if (!helper.isHeadlessSystemUser()) {
showUserSwitcher();
}
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..67a76fd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
@@ -18,15 +18,13 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
+import android.car.user.CarUserManagerHelper;
import android.content.Context;
-import android.content.pm.UserInfo;
-import android.util.Log;
import android.view.View;
import android.view.ViewStub;
import androidx.recyclerview.widget.GridLayoutManager;
-import com.android.settingslib.users.UserManagerHelper;
import com.android.systemui.R;
import com.android.systemui.statusbar.phone.StatusBar;
@@ -39,8 +37,7 @@
private final UserGridRecyclerView mUserGridView;
private final int mShortAnimDuration;
private final StatusBar mStatusBar;
- private final UserManagerHelper mUserManagerHelper;
- private int mCurrentForegroundUserId;
+ private final CarUserManagerHelper mCarUserManagerHelper;
private boolean mShowing;
public FullscreenUserSwitcher(StatusBar statusBar, ViewStub containerStub, Context context) {
@@ -54,15 +51,14 @@
mUserGridView.buildAdapter();
mUserGridView.setUserSelectionListener(this::onUserSelected);
- mUserManagerHelper = new UserManagerHelper(context);
- updateCurrentForegroundUser();
+ mCarUserManagerHelper = new CarUserManagerHelper(context);
mShortAnimDuration = mContainer.getResources()
.getInteger(android.R.integer.config_shortAnimTime);
}
public void show() {
- if (mUserManagerHelper.isHeadlessSystemUser()) {
+ if (mCarUserManagerHelper.isHeadlessSystemUser()) {
showUserGrid();
}
if (mShowing) {
@@ -78,30 +74,17 @@
}
public void onUserSwitched(int newUserId) {
- // The logic for foreground user change is needed here to exclude the reboot case. On
- // reboot, system fires ACTION_USER_SWITCHED change from -1 to 0 user. This is not an actual
- // user switch. We only want to trigger keyguard dismissal when foreground user changes.
- if (foregroundUserChanged()) {
- toggleSwitchInProgress(false);
- updateCurrentForegroundUser();
- mParent.post(this::dismissKeyguard);
- }
- }
-
- private boolean foregroundUserChanged() {
- return mCurrentForegroundUserId != mUserManagerHelper.getForegroundUserId();
- }
-
- private void updateCurrentForegroundUser() {
- mCurrentForegroundUserId = mUserManagerHelper.getForegroundUserId();
+ toggleSwitchInProgress(false);
+ mParent.post(this::dismissKeyguard);
}
private void onUserSelected(UserGridRecyclerView.UserRecord record) {
- if (mUserManagerHelper.isHeadlessSystemUser()) {
+ if (mCarUserManagerHelper.isHeadlessSystemUser()) {
hideUserGrid();
}
- if (record.mIsForeground) {
+ if (record.mIsForeground || (record.mIsStartGuestSession
+ && mCarUserManagerHelper.isForegroundUserGuest())) {
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..b376c00 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
@@ -22,6 +22,7 @@
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
+import android.car.user.CarUserManagerHelper;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.UserInfo;
@@ -42,7 +43,6 @@
import androidx.recyclerview.widget.RecyclerView;
import com.android.internal.util.UserIcons;
-import com.android.settingslib.users.UserManagerHelper;
import com.android.systemui.R;
import com.android.systemui.statusbar.phone.SystemUIDialog;
@@ -54,16 +54,16 @@
* One of the uses of this is for the lock screen in auto.
*/
public class UserGridRecyclerView extends PagedListView implements
- UserManagerHelper.OnUsersUpdateListener {
+ CarUserManagerHelper.OnUsersUpdateListener {
private UserSelectionListener mUserSelectionListener;
private UserAdapter mAdapter;
- private UserManagerHelper mUserManagerHelper;
+ private CarUserManagerHelper mCarUserManagerHelper;
private Context mContext;
public UserGridRecyclerView(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
- mUserManagerHelper = new UserManagerHelper(mContext);
+ mCarUserManagerHelper = new CarUserManagerHelper(mContext);
}
/**
@@ -72,7 +72,7 @@
@Override
public void onFinishInflate() {
super.onFinishInflate();
- mUserManagerHelper.registerOnUsersUpdateListener(this);
+ mCarUserManagerHelper.registerOnUsersUpdateListener(this);
}
/**
@@ -81,7 +81,7 @@
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
- mUserManagerHelper.unregisterOnUsersUpdateListener();
+ mCarUserManagerHelper.unregisterOnUsersUpdateListener(this);
}
/**
@@ -90,7 +90,7 @@
* @return the adapter
*/
public void buildAdapter() {
- List<UserRecord> userRecords = createUserRecords(mUserManagerHelper
+ List<UserRecord> userRecords = createUserRecords(mCarUserManagerHelper
.getAllUsers());
mAdapter = new UserAdapter(mContext, userRecords);
super.setAdapter(mAdapter);
@@ -103,20 +103,20 @@
// Don't display guests in the switcher.
continue;
}
- boolean isForeground = mUserManagerHelper.getForegroundUserId() == userInfo.id;
+
+ boolean isForeground =
+ mCarUserManagerHelper.getCurrentForegroundUserId() == userInfo.id;
UserRecord record = new UserRecord(userInfo, false /* isStartGuestSession */,
false /* isAddUser */, isForeground);
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());
+ if (mCarUserManagerHelper.canForegroundUserAddUsers()) {
+ userRecords.add(createAddUserRecord());
}
return userRecords;
@@ -125,17 +125,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 */,
@@ -149,7 +149,7 @@
@Override
public void onUsersUpdate() {
mAdapter.clearUsers();
- mAdapter.updateUsers(createUserRecords(mUserManagerHelper.getAllUsers()));
+ mAdapter.updateUsers(createUserRecords(mCarUserManagerHelper.getAllUsers()));
mAdapter.notifyDataSetChanged();
}
@@ -157,7 +157,7 @@
* Adapter to populate the grid layout with the available user profiles
*/
public final class UserAdapter extends RecyclerView.Adapter<UserAdapter.UserAdapterViewHolder>
- implements Dialog.OnClickListener {
+ implements Dialog.OnClickListener, Dialog.OnCancelListener {
private final Context mContext;
private List<UserRecord> mUsers;
@@ -210,11 +210,9 @@
return;
}
-
- // If the user selects Guest, start the guest session.
if (userRecord.mIsStartGuestSession) {
notifyUserSelected(userRecord);
- mUserManagerHelper.startNewGuestSession(mGuestName);
+ mCarUserManagerHelper.startNewGuestSession(mGuestName);
return;
}
@@ -235,6 +233,7 @@
.setMessage(message)
.setNegativeButton(android.R.string.cancel, this)
.setPositiveButton(android.R.string.ok, this)
+ .setOnCancelListener(this)
.create();
// Sets window flags for the SysUI dialog
SystemUIDialog.applyFlags(mDialog);
@@ -243,7 +242,7 @@
}
// If the user doesn't want to be a guest or add a user, switch to the user selected
notifyUserSelected(userRecord);
- mUserManagerHelper.switchToUser(userRecord.mInfo);
+ mCarUserManagerHelper.switchToUser(userRecord.mInfo);
});
}
@@ -257,7 +256,7 @@
private Bitmap getUserRecordIcon(UserRecord userRecord) {
if (userRecord.mIsStartGuestSession) {
- return mUserManagerHelper.getGuestDefaultIcon();
+ return mCarUserManagerHelper.getGuestDefaultIcon();
}
if (userRecord.mIsAddUser) {
@@ -265,7 +264,7 @@
.getDrawable(R.drawable.car_add_circle_round));
}
- return mUserManagerHelper.getUserIcon(userRecord.mInfo);
+ return mCarUserManagerHelper.getUserIcon(userRecord.mInfo);
}
@Override
@@ -281,11 +280,19 @@
}
}
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ // Enable the add button again if user cancels dialog by clicking outside the dialog
+ if (mAddUserView != null) {
+ mAddUserView.setEnabled(true);
+ }
+ }
+
private class AddNewUserTask extends AsyncTask<String, Void, UserInfo> {
@Override
protected UserInfo doInBackground(String... userNames) {
- return mUserManagerHelper.createNewUser(userNames[0]);
+ return mCarUserManagerHelper.createNewNonAdminUser(userNames[0]);
}
@Override
@@ -295,7 +302,7 @@
@Override
protected void onPostExecute(UserInfo user) {
if (user != null) {
- mUserManagerHelper.switchToUser(user);
+ mCarUserManagerHelper.switchToUser(user);
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/HvacController.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/HvacController.java
index 32fd054..6c924e3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/HvacController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/HvacController.java
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.car.hvac;
import android.car.Car;
-import android.car.CarNotConnectedException;
import android.car.hardware.CarPropertyValue;
import android.car.hardware.hvac.CarHvacManager;
import android.car.hardware.hvac.CarHvacManager.CarHvacEventCallback;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/TemperatureTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/TemperatureTextView.java
index 8143c13..4d8ce43 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/TemperatureTextView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/hvac/TemperatureTextView.java
@@ -21,7 +21,6 @@
import android.util.AttributeSet;
import android.widget.TextView;
-import com.android.systemui.Dependency;
import com.android.systemui.R;
/**
@@ -31,8 +30,6 @@
* hvacPropertyId - Example: CarHvacManager.ID_ZONED_TEMP_SETPOINT (16385)
* hvacAreaId - Example: VehicleSeat.SEAT_ROW_1_LEFT (1)
* hvacTempFormat - Example: "%.1f\u00B0" (1 decimal and the degree symbol)
- *
- * Note: It registers itself with {@link HvacController}
*/
public class TemperatureTextView extends TextView implements TemperatureView {
@@ -47,10 +44,6 @@
mPropertyId = typedArray.getInt(R.styleable.TemperatureView_hvacPropertyId, -1);
String format = typedArray.getString(R.styleable.TemperatureView_hvacTempFormat);
mTempFormat = (format == null) ? "%.1f\u00B0" : format;
-
- // register with controller
- HvacController hvacController = Dependency.get(HvacController.class);
- hvacController.addHvacTextView(this);
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
index dc58cab..b655a6b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
@@ -414,7 +414,9 @@
} else if (mListContainer.hasPulsingNotifications()) {
dismissalSurface = NotificationStats.DISMISSAL_AOD;
}
- mBarService.onNotificationClear(pkg, tag, id, userId, n.getKey(), dismissalSurface, nv);
+ int dismissalSentiment = NotificationStats.DISMISS_SENTIMENT_NEUTRAL;
+ mBarService.onNotificationClear(pkg, tag, id, userId, n.getKey(), dismissalSurface,
+ dismissalSentiment, nv);
removeNotification(n.getKey(), null);
} catch (RemoteException ex) {
@@ -487,7 +489,7 @@
public void removeNotification(String key, NotificationListenerService.RankingMap ranking) {
boolean deferRemoval = false;
abortExistingInflation(key);
- if (mHeadsUpManager.isHeadsUp(key)) {
+ if (mHeadsUpManager.contains(key)) {
// A cancel() in response to a remote input shouldn't be delayed, as it makes the
// sending look longer than it takes.
// Also we should not defer the removal if reordering isn't allowed since otherwise
@@ -678,9 +680,15 @@
entry.row.getNotificationChildren();
for (int i = 0; i < notificationChildren.size(); i++) {
ExpandableNotificationRow row = notificationChildren.get(i);
- if ((row.getStatusBarNotification().getNotification().flags
- & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
- // the child is a foreground service notification which we can't remove!
+ NotificationData.Entry childEntry = row.getEntry();
+ boolean isForeground = (row.getStatusBarNotification().getNotification().flags
+ & Notification.FLAG_FOREGROUND_SERVICE) != 0;
+ boolean keepForReply = FORCE_REMOTE_INPUT_HISTORY
+ && (shouldKeepForRemoteInput(childEntry)
+ || shouldKeepForSmartReply(childEntry));
+ if (isForeground || keepForReply) {
+ // the child is a foreground service notification which we can't remove or it's
+ // a child we're keeping around for reply!
continue;
}
row.setKeepInParent(true);
@@ -1060,7 +1068,7 @@
// We don't want this to be interrupting anymore, lets remove it
mHeadsUpManager.removeNotification(key, false /* ignoreEarliestRemovalTime */);
} else {
- mHeadsUpManager.updateNotification(entry, alertAgain);
+ mHeadsUpManager.updateNotification(entry.key, alertAgain);
}
} else if (shouldPeek && alertAgain) {
// This notification was updated to be a heads-up, show it!
@@ -1069,7 +1077,7 @@
}
protected boolean isHeadsUp(String key) {
- return mHeadsUpManager.isHeadsUp(key);
+ return mHeadsUpManager.contains(key);
}
public boolean isNotificationKeptForRemoteInput(String key) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
index 767b07f..e96e176 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
@@ -62,6 +62,8 @@
protected IStatusBarService mBarService;
private long mLastVisibilityReportUptimeMs;
private NotificationListContainer mListContainer;
+ private Object mDozingLock = new Object();
+ private boolean mDozing;
protected final OnChildLocationsChangedListener mNotificationLocationsChangedListener =
new OnChildLocationsChangedListener() {
@@ -174,6 +176,12 @@
mNotificationLocationsChangedListener.onChildLocationsChanged();
}
+ public void setDozing(boolean dozing) {
+ synchronized (mDozingLock) {
+ mDozing = dozing;
+ }
+ }
+
private void logNotificationVisibilityChanges(
Collection<NotificationVisibility> newlyVisible,
Collection<NotificationVisibility> noLongerVisible) {
@@ -190,19 +198,25 @@
// Ignore.
}
- final int N = newlyVisible.size();
+ final int N = newlyVisibleAr.length;
if (N > 0) {
String[] newlyVisibleKeyAr = new String[N];
for (int i = 0; i < N; i++) {
newlyVisibleKeyAr[i] = newlyVisibleAr[i].key;
}
- // TODO: Call NotificationEntryManager to do this, once it exists.
- // TODO: Consider not catching all runtime exceptions here.
- try {
- mNotificationListener.setNotificationsShown(newlyVisibleKeyAr);
- } catch (RuntimeException e) {
- Log.d(TAG, "failed setNotificationsShown: ", e);
+ synchronized (mDozingLock) {
+ // setNotificationsShown should only be called if we are confident that
+ // the user has seen the notification, aka not when ambient display is on
+ if (!mDozing) {
+ // TODO: Call NotificationEntryManager to do this, once it exists.
+ // TODO: Consider not catching all runtime exceptions here.
+ try {
+ mNotificationListener.setNotificationsShown(newlyVisibleKeyAr);
+ } catch (RuntimeException e) {
+ Log.d(TAG, "failed setNotificationsShown: ", e);
+ }
+ }
}
}
recycleAllVisibilityObjects(newlyVisibleAr);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 67967d4..67db68d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -1307,6 +1307,7 @@
}
setDismissed(fromAccessibility);
if (isClearable()) {
+ // TODO: track dismiss sentiment
if (mOnDismissRunnable != null) {
mOnDismissRunnable.run();
}
@@ -2772,16 +2773,18 @@
case AccessibilityNodeInfo.ACTION_LONG_CLICK:
doLongClickCallback();
return true;
- case R.id.action_snooze:
- NotificationMenuRowPlugin provider = getProvider();
- if (provider == null) {
- provider = createMenu();
+ default:
+ if (action == R.id.action_snooze) {
+ NotificationMenuRowPlugin provider = getProvider();
+ if (provider == null) {
+ provider = createMenu();
+ }
+ MenuItem snoozeMenu = provider.getSnoozeMenuItem(getContext());
+ if (snoozeMenu != null) {
+ doLongClickCallback(getWidth() / 2, getHeight() / 2, snoozeMenu);
+ }
+ return true;
}
- MenuItem snoozeMenu = provider.getSnoozeMenuItem(getContext());
- if (snoozeMenu != null) {
- doLongClickCallback(getWidth() / 2, getHeight() / 2, snoozeMenu);
- }
- return true;
}
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
index ef0be880..e635976 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
@@ -28,12 +28,10 @@
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.net.Uri;
-import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.provider.Settings;
import android.service.notification.StatusBarNotification;
-import androidx.annotation.VisibleForTesting;
import android.util.ArraySet;
import android.util.Log;
import android.view.HapticFeedbackConstants;
@@ -45,15 +43,17 @@
import com.android.systemui.Dependency;
import com.android.systemui.Dumpable;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
-import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
+import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.phone.StatusBar;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import androidx.annotation.VisibleForTesting;
+
/**
* Handles various NotificationGuts related tasks, such as binding guts to a row, opening and
* closing guts, and keeping track of the currently exposed notification guts.
@@ -147,15 +147,15 @@
}
}
- public void bindGuts(final ExpandableNotificationRow row) {
- bindGuts(row, mGutsMenuItem);
+ public boolean bindGuts(final ExpandableNotificationRow row) {
+ row.inflateGuts();
+ return bindGuts(row, mGutsMenuItem);
}
- private void bindGuts(final ExpandableNotificationRow row,
+ private boolean bindGuts(final ExpandableNotificationRow row,
NotificationMenuRowPlugin.MenuItem item) {
StatusBarNotification sbn = row.getStatusBarNotification();
- row.inflateGuts();
row.setGutsView(item);
row.setTag(sbn.getPackageName());
row.getGuts().setClosedListener((NotificationGuts g) -> {
@@ -176,12 +176,18 @@
});
View gutsView = item.getGutsView();
- if (gutsView instanceof NotificationSnooze) {
- initializeSnoozeView(row, (NotificationSnooze) gutsView);
- } else if (gutsView instanceof AppOpsInfo) {
- initializeAppOpsInfo(row, (AppOpsInfo) gutsView);
- } else if (gutsView instanceof NotificationInfo) {
- initializeNotificationInfo(row, (NotificationInfo) gutsView);
+ try {
+ if (gutsView instanceof NotificationSnooze) {
+ initializeSnoozeView(row, (NotificationSnooze) gutsView);
+ } else if (gutsView instanceof AppOpsInfo) {
+ initializeAppOpsInfo(row, (AppOpsInfo) gutsView);
+ } else if (gutsView instanceof NotificationInfo) {
+ initializeNotificationInfo(row, (NotificationInfo) gutsView);
+ }
+ return true;
+ } catch (Exception e) {
+ Log.e(TAG, "error binding guts", e);
+ return false;
}
}
@@ -240,7 +246,7 @@
@VisibleForTesting
void initializeNotificationInfo(
final ExpandableNotificationRow row,
- NotificationInfo notificationInfoView) {
+ NotificationInfo notificationInfoView) throws Exception {
NotificationGuts guts = row.getGuts();
StatusBarNotification sbn = row.getStatusBarNotification();
String packageName = sbn.getPackageName();
@@ -269,23 +275,21 @@
};
}
- try {
- notificationInfoView.bindNotification(
- pmUser,
- iNotificationManager,
- packageName,
- row.getEntry().channel,
- row.getNumUniqueChannels(),
- sbn,
- mCheckSaveListener,
- onSettingsClick,
- onAppSettingsClick,
- row.getIsNonblockable(),
- isForBlockingHelper,
- row.getEntry().userSentiment == USER_SENTIMENT_NEGATIVE);
- } catch (RemoteException e) {
- Log.e(TAG, e.toString());
- }
+ notificationInfoView.bindNotification(
+ pmUser,
+ iNotificationManager,
+ packageName,
+ row.getEntry().channel,
+ row.getNumUniqueChannels(),
+ sbn,
+ mCheckSaveListener,
+ onSettingsClick,
+ onAppSettingsClick,
+ mPresenter.isDeviceProvisioned(),
+ row.getIsNonblockable(),
+ isForBlockingHelper,
+ row.getEntry().userSentiment == USER_SENTIMENT_NEGATIVE);
+
}
/**
@@ -355,8 +359,15 @@
true /* resetMenu */);
return false;
}
- bindGuts(row, menuItem);
+
+ row.inflateGuts();
NotificationGuts guts = row.getGuts();
+ mNotificationGutsExposed = guts;
+ if (!bindGuts(row, menuItem)) {
+ // exception occurred trying to fill in all the data, bail.
+ return false;
+ }
+
// Assume we are a status_bar_notification_row
if (guts == null) {
@@ -377,9 +388,6 @@
+ "window");
return;
}
- closeAndSaveGuts(true /* removeLeavebehind */, true /* force */,
- true /* removeControls */, -1 /* x */, -1 /* y */,
- false /* resetMenu */);
guts.setVisibility(View.VISIBLE);
final boolean needsFalsingProtection =
@@ -395,7 +403,6 @@
row.closeRemoteInput();
mListContainer.onHeightChanged(row, true /* needsAnimation */);
- mNotificationGutsExposed = guts;
mGutsMenuItem = menuItem;
}
});
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java
index 3e380d1..9e2331f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java
@@ -81,6 +81,7 @@
private StatusBarNotification mSbn;
private AnimatorSet mExpandAnimation;
private boolean mIsForeground;
+ private boolean mIsDeviceProvisioned;
private CheckSaveListener mCheckSaveListener;
private OnSettingsClickListener mOnSettingsClickListener;
@@ -143,12 +144,13 @@
final CheckSaveListener checkSaveListener,
final OnSettingsClickListener onSettingsClick,
final OnAppSettingsClickListener onAppSettingsClick,
+ boolean isDeviceProvisioned,
boolean isNonblockable)
throws RemoteException {
bindNotification(pm, iNotificationManager, pkg, notificationChannel,
numUniqueChannelsInRow, sbn, checkSaveListener, onSettingsClick,
- onAppSettingsClick, isNonblockable, false /* isBlockingHelper */,
- false /* isUserSentimentNegative */);
+ onAppSettingsClick, isDeviceProvisioned, isNonblockable,
+ false /* isBlockingHelper */, false /* isUserSentimentNegative */);
}
public void bindNotification(
@@ -161,6 +163,7 @@
CheckSaveListener checkSaveListener,
OnSettingsClickListener onSettingsClick,
OnAppSettingsClickListener onAppSettingsClick,
+ boolean isDeviceProvisioned,
boolean isNonblockable,
boolean isForBlockingHelper,
boolean isUserSentimentNegative)
@@ -183,6 +186,7 @@
(mSbn.getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE) != 0;
mIsForBlockingHelper = isForBlockingHelper;
mAppUid = mSbn.getUid();
+ mIsDeviceProvisioned = isDeviceProvisioned;
int numTotalChannels = mINotificationManager.getNumNotificationChannelsForPackage(
pkg, mAppUid, false /* includeDeleted */);
@@ -246,7 +250,7 @@
// Settings button.
final View settingsButton = findViewById(R.id.info);
- if (mAppUid >= 0 && mOnSettingsClickListener != null) {
+ if (mAppUid >= 0 && mOnSettingsClickListener != null && mIsDeviceProvisioned) {
settingsButton.setVisibility(View.VISIBLE);
final int appUidF = mAppUid;
settingsButton.setOnClickListener(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
index 446a1d4..ab58660 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
@@ -96,6 +96,10 @@
Dependency.get(ColorDisplayController.class).setListener(null);
}
+ public void unmarkTileAsAutoAdded(String tabSpec) {
+ mAutoTracker.setTileRemoved(tabSpec);
+ }
+
private final ManagedProfileController.Callback mProfileCallback =
new ManagedProfileController.Callback() {
@Override
@@ -104,8 +108,6 @@
if (Dependency.get(ManagedProfileController.class).hasActiveProfile()) {
mHost.addTile(WORK);
mAutoTracker.setTileAdded(WORK);
- mHandler.post(() -> Dependency.get(ManagedProfileController.class)
- .removeCallback(mProfileCallback));
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 2087a16..b57a366 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -101,7 +101,7 @@
private KeyguardUpdateMonitor mUpdateMonitor;
private int mMode;
private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
- private StatusBarWindowManager mStatusBarWindowManager;
+ private StatusBarWindowController mStatusBarWindowController;
private DozeScrimController mDozeScrimController;
private KeyguardViewMediator mKeyguardViewMediator;
private ScrimController mScrimController;
@@ -125,7 +125,7 @@
mUpdateMonitor.registerCallback(this);
Dependency.get(WakefulnessLifecycle.class).addObserver(mWakefulnessObserver);
Dependency.get(ScreenLifecycle.class).addObserver(mScreenObserver);
- mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
+ mStatusBarWindowController = Dependency.get(StatusBarWindowController.class);
mDozeScrimController = dozeScrimController;
mKeyguardViewMediator = keyguardViewMediator;
mScrimController = scrimController;
@@ -214,7 +214,7 @@
// notifications would light up first, creating an unpleasant animation.
// Defer changing the screen brightness by forcing doze brightness on our window
// until the clock and the notifications are faded out.
- mStatusBarWindowManager.setForceDozeBrightness(true);
+ mStatusBarWindowController.setForceDozeBrightness(true);
}
// During wake and unlock, we need to draw black before waking up to avoid abrupt
// brightness changes due to display state transitions.
@@ -269,7 +269,7 @@
Trace.beginSection("MODE_WAKE_AND_UNLOCK_FROM_DREAM");
mUpdateMonitor.awakenFromDream();
}
- mStatusBarWindowManager.setStatusBarFocusable(false);
+ mStatusBarWindowController.setStatusBarFocusable(false);
if (delayWakeUp) {
mHandler.postDelayed(wakeUp, 50);
} else {
@@ -384,7 +384,7 @@
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
- mStatusBarWindowManager.setForceDozeBrightness(false);
+ mStatusBarWindowController.setForceDozeBrightness(false);
}
}, StatusBar.FADE_KEYGUARD_DURATION_PULSING);
}
@@ -395,7 +395,7 @@
private void resetMode() {
mMode = MODE_NONE;
- mStatusBarWindowManager.setForceDozeBrightness(false);
+ mStatusBarWindowController.setForceDozeBrightness(false);
if (mStatusBar.getNavigationBarView() != null) {
mStatusBar.getNavigationBarView().setWakeAndUnlocking(false);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
index 894ea62..f48c3f5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
@@ -134,6 +134,9 @@
((ButtonInterface) mViews.get(i)).setImageDrawable(mImageDrawable);
}
}
+ if (mImageDrawable != null) {
+ mImageDrawable.setCallback(mCurrentView);
+ }
}
public void setVisibility(int visibility) {
@@ -266,6 +269,9 @@
public void setCurrentView(View currentView) {
mCurrentView = currentView.findViewById(mId);
+ if (mImageDrawable != null) {
+ mImageDrawable.setCallback(mCurrentView);
+ }
}
public void setVertical(boolean vertical) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
index 8f552e3..92a9efe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
@@ -40,6 +40,8 @@
public static final String DOZE_SENSORS_WAKE_UP_FULLY = "doze_sensors_wake_up_fully";
public static final boolean FORCE_NO_BLANKING =
SystemProperties.getBoolean("debug.force_no_blanking", false);
+ public static final boolean FORCE_BLANKING =
+ SystemProperties.getBoolean("debug.force_blanking", false);
private static IntInOutMatcher sPickupSubtypePerformsProxMatcher;
private static DozeParameters sInstance;
@@ -183,7 +185,7 @@
* @return {@code true} if screen needs to be completely black before a power transition.
*/
public boolean getDisplayNeedsBlanking() {
- return !FORCE_NO_BLANKING && mContext.getResources().getBoolean(
+ return FORCE_BLANKING || !FORCE_NO_BLANKING && mContext.getResources().getBoolean(
com.android.internal.R.bool.config_displayBlanksAfterDoze);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java
index 89107bb..81066f3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java
@@ -31,7 +31,6 @@
import android.view.View;
import android.view.ViewTreeObserver;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.ScreenDecorations;
@@ -55,7 +54,6 @@
ViewTreeObserver.OnComputeInternalInsetsListener, VisualStabilityManager.Callback,
OnHeadsUpChangedListener, ConfigurationController.ConfigurationListener {
private static final String TAG = "HeadsUpManagerPhone";
- private static final boolean DEBUG = false;
private final View mStatusBarWindowView;
private final NotificationGroupManager mGroupManager;
@@ -114,7 +112,9 @@
addListener(new OnHeadsUpChangedListener() {
@Override
public void onHeadsUpPinnedModeChanged(boolean hasPinnedNotification) {
- if (DEBUG) Log.w(TAG, "onHeadsUpPinnedModeChanged");
+ if (Log.isLoggable(TAG, Log.WARN)) {
+ Log.w(TAG, "onHeadsUpPinnedModeChanged");
+ }
updateTouchableRegionListener();
}
});
@@ -153,7 +153,7 @@
*/
public boolean shouldSwallowClick(@NonNull String key) {
HeadsUpManager.HeadsUpEntry entry = getHeadsUpEntry(key);
- return entry != null && mClock.currentTimeMillis() < entry.postTime;
+ return entry != null && mClock.currentTimeMillis() < entry.mPostTime;
}
public void onExpandingFinished() {
@@ -162,9 +162,9 @@
mReleaseOnExpandFinish = false;
} else {
for (NotificationData.Entry entry : mEntriesToRemoveAfterExpand) {
- if (isHeadsUp(entry.key)) {
+ if (contains(entry.key)) {
// Maybe the heads-up was removed already
- removeHeadsUpEntry(entry);
+ removeAlertEntry(entry.key);
}
}
}
@@ -235,13 +235,6 @@
}
}
- @VisibleForTesting
- public void removeMinimumDisplayTimeForTesting() {
- mMinimumDisplayTime = 0;
- mHeadsUpNotificationDecay = 0;
- mTouchAcceptanceDelay = 0;
- }
-
///////////////////////////////////////////////////////////////////////////////////////////////
// HeadsUpManager public methods overrides:
@@ -250,12 +243,6 @@
return mTrackingHeadsUp;
}
- @Override
- public void snooze() {
- super.snooze();
- mReleaseOnExpandFinish = true;
- }
-
/**
* React to the removal of the notification in the heads up.
*
@@ -263,14 +250,15 @@
* for a bit since it wasn't shown long enough
*/
@Override
- public boolean removeNotification(@NonNull String key, boolean ignoreEarliestRemovalTime) {
- if (wasShownLongEnough(key) || ignoreEarliestRemovalTime) {
- return super.removeNotification(key, ignoreEarliestRemovalTime);
- } else {
- HeadsUpEntryPhone entry = getHeadsUpEntryPhone(key);
- entry.removeAsSoonAsPossible();
- return false;
- }
+ public boolean removeNotification(@NonNull String key, boolean releaseImmediately) {
+ return super.removeNotification(key, canRemoveImmediately(key)
+ || releaseImmediately);
+ }
+
+ @Override
+ public void snooze() {
+ super.snooze();
+ mReleaseOnExpandFinish = true;
}
public void addSwipedOutNotification(@NonNull String key) {
@@ -354,9 +342,9 @@
public void onReorderingAllowed() {
mBar.getNotificationScrollLayout().setHeadsUpGoingAwayAnimationsAllowed(false);
for (NotificationData.Entry entry : mEntriesToRemoveWhenReorderingAllowed) {
- if (isHeadsUp(entry.key)) {
+ if (contains(entry.key)) {
// Maybe the heads-up was removed already
- removeHeadsUpEntry(entry);
+ removeAlertEntry(entry.key);
}
}
mEntriesToRemoveWhenReorderingAllowed.clear();
@@ -367,14 +355,14 @@
// HeadsUpManager utility (protected) methods overrides:
@Override
- protected HeadsUpEntry createHeadsUpEntry() {
+ protected HeadsUpEntry createAlertEntry() {
return mEntryPool.acquire();
}
@Override
- protected void releaseHeadsUpEntry(HeadsUpEntry entry) {
- entry.reset();
- mEntryPool.release((HeadsUpEntryPhone) entry);
+ protected void onAlertEntryRemoved(AlertEntry alertEntry) {
+ super.onAlertEntryRemoved(alertEntry);
+ mEntryPool.release((HeadsUpEntryPhone) alertEntry);
}
@Override
@@ -394,7 +382,7 @@
@Nullable
private HeadsUpEntryPhone getHeadsUpEntryPhone(@NonNull String key) {
- return (HeadsUpEntryPhone) getHeadsUpEntry(key);
+ return (HeadsUpEntryPhone) mAlertEntries.get(key);
}
@Nullable
@@ -402,7 +390,7 @@
return (HeadsUpEntryPhone) getTopHeadsUpEntry();
}
- private boolean wasShownLongEnough(@NonNull String key) {
+ private boolean canRemoveImmediately(@NonNull String key) {
if (mSwipedOutKeys.contains(key)) {
// We always instantly dismiss views being manually swiped out.
mSwipedOutKeys.remove(key);
@@ -461,33 +449,29 @@
mVisualStabilityManager.addReorderingAllowedCallback(
HeadsUpManagerPhone.this);
} else if (!mTrackingHeadsUp) {
- removeHeadsUpEntry(entry);
+ removeAlertEntry(entry.key);
} else {
mEntriesToRemoveAfterExpand.add(entry);
}
};
- super.setEntry(entry, removeHeadsUpRunnable);
- }
-
- public boolean wasShownLongEnough() {
- return earliestRemovaltime < mClock.currentTimeMillis();
+ setEntry(entry, removeHeadsUpRunnable);
}
@Override
public void updateEntry(boolean updatePostTime) {
super.updateEntry(updatePostTime);
- if (mEntriesToRemoveAfterExpand.contains(entry)) {
- mEntriesToRemoveAfterExpand.remove(entry);
+ if (mEntriesToRemoveAfterExpand.contains(mEntry)) {
+ mEntriesToRemoveAfterExpand.remove(mEntry);
}
- if (mEntriesToRemoveWhenReorderingAllowed.contains(entry)) {
- mEntriesToRemoveWhenReorderingAllowed.remove(entry);
+ if (mEntriesToRemoveWhenReorderingAllowed.contains(mEntry)) {
+ mEntriesToRemoveWhenReorderingAllowed.remove(mEntry);
}
}
@Override
- public void expanded(boolean expanded) {
+ public void setExpanded(boolean expanded) {
if (this.expanded == expanded) {
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index f3e100d..40c8fde 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -181,6 +181,9 @@
public void onQuickStepStarted() {
// Use navbar dragging as a signal to hide the rotate button
setRotateSuggestionButtonState(false);
+
+ // Hide the notifications panel when quick step starts
+ mStatusBar.collapsePanel(true /* animate */);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
index ed1ae10..8c02e1f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
@@ -75,7 +75,6 @@
private int mTouchDownY;
private boolean mDownOnRecents;
private VelocityTracker mVelocityTracker;
- private boolean mNotificationsVisibleOnDown;
private boolean mDockWindowEnabled;
private boolean mDockWindowTouchSlopExceeded;
@@ -108,9 +107,6 @@
}
public boolean onInterceptTouchEvent(MotionEvent event) {
- if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
- mNotificationsVisibleOnDown = !mStatusBar.isPresenterFullyCollapsed();
- }
if (!canHandleGestures()) {
return false;
}
@@ -275,7 +271,7 @@
}
private boolean canHandleGestures() {
- return !mStatusBar.isKeyguardShowing() && !mNotificationsVisibleOnDown;
+ return !mStatusBar.isKeyguardShowing();
}
private int calculateDragMode() {
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..3e41cd2 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;
@@ -263,13 +265,11 @@
@Override
public boolean performAccessibilityAction(View host, int action, Bundle args) {
- switch (action) {
- case R.id.action_toggle_overview:
- SysUiServiceProvider.getComponent(getContext(), Recents.class)
- .toggleRecentApps();
- break;
- default:
- return super.performAccessibilityAction(host, action, args);
+ if (action == R.id.action_toggle_overview) {
+ SysUiServiceProvider.getComponent(getContext(), Recents.class)
+ .toggleRecentApps();
+ } else {
+ return super.performAccessibilityAction(host, action, args);
}
return true;
}
@@ -483,14 +483,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 +507,9 @@
updateCarModeIcons(ctx);
}
}
+ if (orientationChange || densityChange || dirChange) {
+ mBackIcon = getBackDrawable(lightContext, darkContext);
+ }
}
public KeyButtonDrawable getBackDrawable(Context lightContext, Context darkContext) {
@@ -519,17 +523,33 @@
final boolean quickStepEnabled = mOverviewProxyService.shouldShowSwipeUpUI();
KeyButtonDrawable drawable = quickStepEnabled
? getDrawable(lightContext, darkContext, R.drawable.ic_sysbar_home_quick_step)
- : getDrawable(lightContext, darkContext, R.drawable.ic_sysbar_home,
- false /* hasShadow */);
+ : getDrawable(lightContext, darkContext, R.drawable.ic_sysbar_home);
orientHomeButton(drawable);
return drawable;
}
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) {
@@ -771,8 +791,19 @@
showSwipeUpUI ? mQuickStepAccessibilityDelegate : null);
}
+ public boolean isNotificationsFullyCollapsed() {
+ return mPanelView.isFullyCollapsed();
+ }
+
+ /**
+ * Updates the {@link WindowManager.LayoutParams.FLAG_SLIPPERY} state dependent on if swipe up
+ * is enabled, or the notifications is fully opened without being in an animated state. If
+ * slippery is enabled, touch events will leave the nav bar window and enter into the fullscreen
+ * app/home window, if not nav bar will receive a cancelled touch event once gesture leaves bar.
+ */
public void updateSlippery() {
- setSlippery(!isQuickStepSwipeUpEnabled() || mPanelView.isFullyExpanded());
+ setSlippery(!isQuickStepSwipeUpEnabled() ||
+ (mPanelView.isFullyExpanded() && !mPanelView.isCollapsing()));
}
private void setSlippery(boolean slippery) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NearestTouchFrame.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NearestTouchFrame.java
index 09833d4..7b9ed88 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NearestTouchFrame.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NearestTouchFrame.java
@@ -98,6 +98,7 @@
return mClickableChildren
.stream()
.filter(v -> v.isAttachedToWindow())
+ .filter(v -> v.isFocusable())
.map(v -> new Pair<>(distance(v, event), v))
.min(Comparator.comparingInt(f -> f.first))
.get().second;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
index 37c2fdf..c27ccea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
@@ -171,7 +171,7 @@
*/
private void cleanUpHeadsUpStatesOnAdd(NotificationGroup group, boolean addIsPending) {
if (!addIsPending && group.hunSummaryOnNextAddition) {
- if (!mHeadsUpManager.isHeadsUp(group.summary.key)) {
+ if (!mHeadsUpManager.contains(group.summary.key)) {
mHeadsUpManager.showNotification(group.summary);
}
group.hunSummaryOnNextAddition = false;
@@ -208,15 +208,17 @@
NotificationData.Entry entry = children.get(i);
if (onlySummaryAlerts(entry) && entry.row.isHeadsUp()) {
releasedChild = true;
- mHeadsUpManager.releaseImmediately(entry.key);
+ mHeadsUpManager.removeNotification(
+ entry.key, true /* releaseImmediately */);
}
}
if (isolatedChild != null && onlySummaryAlerts(isolatedChild)
&& isolatedChild.row.isHeadsUp()) {
releasedChild = true;
- mHeadsUpManager.releaseImmediately(isolatedChild.key);
+ mHeadsUpManager.removeNotification(
+ isolatedChild.key, true /* releaseImmediately */);
}
- if (releasedChild && !mHeadsUpManager.isHeadsUp(group.summary.key)) {
+ if (releasedChild && !mHeadsUpManager.contains(group.summary.key)) {
boolean notifyImmediately = (numChildren - numPendingChildren) > 1;
if (notifyImmediately) {
mHeadsUpManager.showNotification(group.summary);
@@ -546,8 +548,8 @@
// the notification is actually already removed, no need to do heads-up on it.
return;
}
- if (mHeadsUpManager.isHeadsUp(child.key)) {
- mHeadsUpManager.updateNotification(child, true);
+ if (mHeadsUpManager.contains(child.key)) {
+ mHeadsUpManager.updateNotification(child.key, true /* alert */);
} else {
if (onlySummaryAlerts(entry)) {
notificationGroup.lastHeadsUpTransfer = SystemClock.elapsedRealtime();
@@ -556,7 +558,7 @@
}
}
}
- mHeadsUpManager.releaseImmediately(entry.key);
+ mHeadsUpManager.removeNotification(entry.key, true /* releaseImmediately */);
}
private boolean onlySummaryAlerts(NotificationData.Entry entry) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
index 0db408c..0a724bd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java
@@ -536,7 +536,8 @@
return 0;
}
- int translation = (int) (mLastVisibleIconState.xTranslation + mIconSize);
+ int translation = (int) (isLayoutRtl() ? getWidth() - mLastVisibleIconState.xTranslation
+ : mLastVisibleIconState.xTranslation + mIconSize);
// There's a chance that last translation goes beyond the edge maybe
return Math.min(getWidth(), translation);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index be8bf02..7476963 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -92,6 +92,21 @@
private static final boolean DEBUG = false;
+ /**
+ * Fling expanding QS.
+ */
+ public static final int FLING_EXPAND = 0;
+
+ /**
+ * Fling collapsing QS, potentially stopping when QS becomes QQS.
+ */
+ public static final int FLING_COLLAPSE = 1;
+
+ /**
+ * Fing until QS is completely hidden.
+ */
+ public static final int FLING_HIDE = 2;
+
// Cap and total height of Roboto font. Needs to be adjusted when font for the big clock is
// changed.
private static final int CAP_HEIGHT = 1456;
@@ -623,7 +638,7 @@
}
@Override
- public void resetViews() {
+ public void resetViews(boolean animate) {
mIsLaunchTransitionFinished = false;
mBlockTouches = false;
mUnlockIconActive = false;
@@ -631,11 +646,15 @@
mAffordanceHelper.reset(false);
mLastCameraLaunchSource = KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_AFFORDANCE;
}
- closeQs();
mStatusBar.getGutsManager().closeAndSaveGuts(true /* leavebehind */, true /* force */,
true /* controls */, -1 /* x */, -1 /* y */, true /* resetMenu */);
- mNotificationStackScroller.setOverScrollAmount(0f, true /* onTop */, false /* animate */,
- true /* cancelAnimators */);
+ if (animate) {
+ animateCloseQs(true /* animateAway */);
+ } else {
+ closeQs();
+ }
+ mNotificationStackScroller.setOverScrollAmount(0f, true /* onTop */, animate,
+ !animate /* cancelAnimators */);
mNotificationStackScroller.resetScrollPosition();
}
@@ -657,7 +676,13 @@
setQsExpansion(mQsMinExpansionHeight);
}
- public void animateCloseQs() {
+ /**
+ * Animate QS closing by flinging it.
+ * If QS is expanded, it will collapse into QQS and stop.
+ *
+ * @param animateAway Do not stop when QS becomes QQS. Fling until QS isn't visible anymore.
+ */
+ public void animateCloseQs(boolean animateAway) {
if (mQsExpansionAnimator != null) {
if (!mQsAnimatorExpand) {
return;
@@ -666,14 +691,7 @@
mQsExpansionAnimator.cancel();
setQsExpansion(height);
}
- flingSettings(0 /* vel */, false);
- }
-
- public void openQs() {
- cancelQsAnimation();
- if (mQsExpansionEnabled) {
- setQsExpansion(mQsMaxExpansionHeight);
- }
+ flingSettings(0 /* vel */, animateAway ? FLING_HIDE : FLING_COLLAPSE);
}
public void expandWithQs() {
@@ -686,7 +704,7 @@
public void expandWithoutQs() {
if (isQsExpanded()) {
- flingSettings(0 /* velocity */, false /* expand */);
+ flingSettings(0 /* velocity */, FLING_COLLAPSE);
} else {
expand(true /* animate */);
}
@@ -830,7 +848,7 @@
if (expandsQs) {
logQsSwipeDown(y);
}
- flingSettings(vel, expandsQs && !isCancelMotionEvent);
+ flingSettings(vel, expandsQs && !isCancelMotionEvent ? FLING_EXPAND : FLING_COLLAPSE);
}
private void logQsSwipeDown(float y) {
@@ -1099,7 +1117,8 @@
mLastOverscroll = 0f;
mQsExpansionFromOverscroll = false;
setQsExpansion(mQsExpansionHeight);
- flingSettings(!mQsExpansionEnabled && open ? 0f : velocity, open && mQsExpansionEnabled,
+ flingSettings(!mQsExpansionEnabled && open ? 0f : velocity,
+ open && mQsExpansionEnabled ? FLING_EXPAND : FLING_COLLAPSE,
new Runnable() {
@Override
public void run() {
@@ -1466,13 +1485,35 @@
}
}
- public void flingSettings(float vel, boolean expand) {
- flingSettings(vel, expand, null, false /* isClick */);
+ /**
+ * @see #flingSettings(float, int, Runnable, boolean)
+ */
+ public void flingSettings(float vel, int type) {
+ flingSettings(vel, type, null, false /* isClick */);
}
- protected void flingSettings(float vel, boolean expand, final Runnable onFinishRunnable,
+ /**
+ * Animates QS or QQS as if the user had swiped up or down.
+ *
+ * @param vel Finger velocity or 0 when not initiated by touch events.
+ * @param type Either {@link #FLING_EXPAND}, {@link #FLING_COLLAPSE} or {@link #FLING_HIDE}.
+ * @param onFinishRunnable Runnable to be executed at the end of animation.
+ * @param isClick If originated by click (different interpolator and duration.)
+ */
+ protected void flingSettings(float vel, int type, final Runnable onFinishRunnable,
boolean isClick) {
- float target = expand ? mQsMaxExpansionHeight : mQsMinExpansionHeight;
+ float target;
+ switch (type) {
+ case FLING_EXPAND:
+ target = mQsMaxExpansionHeight;
+ break;
+ case FLING_COLLAPSE:
+ target = mQsMinExpansionHeight;
+ break;
+ case FLING_HIDE:
+ default:
+ target = 0;
+ }
if (target == mQsExpansionHeight) {
if (onFinishRunnable != null) {
onFinishRunnable.run();
@@ -1482,7 +1523,8 @@
// If we move in the opposite direction, reset velocity and use a different duration.
boolean oppositeDirection = false;
- if (vel > 0 && !expand || vel < 0 && expand) {
+ boolean expanding = type == FLING_EXPAND;
+ if (vel > 0 && !expanding || vel < 0 && expanding) {
vel = 0;
oppositeDirection = true;
}
@@ -1496,11 +1538,8 @@
if (oppositeDirection) {
animator.setDuration(350);
}
- animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- setQsExpansion((Float) animation.getAnimatedValue());
- }
+ animator.addUpdateListener(animation -> {
+ setQsExpansion((Float) animation.getAnimatedValue());
});
animator.addListener(new AnimatorListenerAdapter() {
@Override
@@ -1514,7 +1553,7 @@
});
animator.start();
mQsExpansionAnimator = animator;
- mQsAnimatorExpand = expand;
+ mQsAnimatorExpand = expanding;
}
/**
@@ -2000,10 +2039,12 @@
public void onClick(View v) {
onQsExpansionStarted();
if (mQsExpanded) {
- flingSettings(0 /* vel */, false /* expand */, null, true /* isClick */);
+ flingSettings(0 /* vel */, FLING_COLLAPSE, null /* onFinishRunnable */,
+ true /* isClick */);
} else if (mQsExpansionEnabled) {
mLockscreenGestureLogger.write(MetricsEvent.ACTION_SHADE_QS_TAP, 0, 0);
- flingSettings(0 /* vel */, true /* expand */, null, true /* isClick */);
+ flingSettings(0 /* vel */, FLING_EXPAND, null /* onFinishRunnable */,
+ true /* isClick */);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
index 5d23494..deac669e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java
@@ -194,7 +194,7 @@
pv.collapse(delayed, speedUpFactor);
waiting = true;
} else {
- pv.resetViews();
+ pv.resetViews(false /* animate */);
pv.setExpandedFraction(0); // just in case
pv.cancelPeek();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index e4eeec1..1f09835 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -1240,7 +1240,7 @@
));
}
- public abstract void resetViews();
+ public abstract void resetViews(boolean animate);
protected abstract float getPeekHeight();
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
index 6cc88bb..a13bebd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
@@ -45,9 +45,6 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManagerGlobal;
-import android.view.animation.DecelerateInterpolator;
-import android.view.animation.Interpolator;
-import androidx.annotation.DimenRes;
import com.android.systemui.Dependency;
import com.android.systemui.OverviewProxyService;
import com.android.systemui.R;
@@ -72,6 +69,7 @@
private boolean mQuickScrubActive;
private boolean mAllowGestureDetection;
private boolean mQuickStepStarted;
+ private boolean mNotificationsVisibleOnDown;
private int mTouchDownX;
private int mTouchDownY;
private boolean mDragPositive;
@@ -190,7 +188,7 @@
mNavigationBarView.getDownHitTarget() == HIT_TARGET_DEAD_ZONE;
if (mOverviewEventSender.getProxy() == null || (!mNavigationBarView.isQuickScrubEnabled()
&& !mNavigationBarView.isQuickStepSwipeUpEnabled())) {
- return false;
+ return deadZoneConsumed;
}
mNavigationBarView.requestUnbufferedDispatch(event);
@@ -221,6 +219,7 @@
mNavigationBarView.transformMatrixToLocal(mTransformLocalMatrix);
mQuickStepStarted = false;
mAllowGestureDetection = true;
+ mNotificationsVisibleOnDown = !mNavigationBarView.isNotificationsFullyCollapsed();
break;
}
case MotionEvent.ACTION_MOVE: {
@@ -257,7 +256,8 @@
// Decide to start quickstep if dragging away from the navigation bar, otherwise in
// the parallel direction, decide to start quickscrub. Only one may run.
if (!mQuickScrubActive && exceededSwipeUpTouchSlop) {
- if (mNavigationBarView.isQuickStepSwipeUpEnabled()) {
+ if (mNavigationBarView.isQuickStepSwipeUpEnabled()
+ && !mNotificationsVisibleOnDown) {
startQuickStep(event);
}
break;
@@ -303,15 +303,28 @@
break;
}
- // Proxy motion events to launcher if not handled by quick scrub
- // Proxy motion events up/cancel that would be sent after long press on any nav button
- if (!mQuickScrubActive && !mIsInScreenPinning && (mAllowGestureDetection
- || action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP)) {
+ if (shouldProxyEvents(action)) {
proxyMotionEvents(event);
}
return mQuickScrubActive || mQuickStepStarted || deadZoneConsumed;
}
+ private boolean shouldProxyEvents(int action) {
+ if (!mQuickScrubActive && !mIsInScreenPinning) {
+ // Allow down, cancel and up events, move and other events are passed if notifications
+ // are not showing and disabled gestures (such as long press) are not executed
+ switch (action) {
+ case MotionEvent.ACTION_DOWN:
+ case MotionEvent.ACTION_CANCEL:
+ case MotionEvent.ACTION_UP:
+ return true;
+ default:
+ return !mNotificationsVisibleOnDown && mAllowGestureDetection;
+ }
+ }
+ return false;
+ }
+
@Override
public void onDraw(Canvas canvas) {
if (!mNavigationBarView.isQuickScrubEnabled()) {
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/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 4c91a9d..dcd794d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -56,7 +56,6 @@
import android.app.StatusBarManager;
import android.app.TaskStackBuilder;
import android.app.UiModeManager;
-import android.app.WallpaperColors;
import android.app.WallpaperInfo;
import android.app.WallpaperManager;
import android.app.admin.DevicePolicyManager;
@@ -67,8 +66,6 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentSender;
-import android.content.om.IOverlayManager;
-import android.content.om.OverlayInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -373,7 +370,7 @@
protected StatusBarWindowView mStatusBarWindow;
protected PhoneStatusBarView mStatusBarView;
private int mStatusBarWindowState = WINDOW_STATE_SHOWING;
- protected StatusBarWindowManager mStatusBarWindowManager;
+ protected StatusBarWindowController mStatusBarWindowController;
protected UnlockMethodCache mUnlockMethodCache;
private DozeServiceHost mDozeServiceHost = new DozeServiceHost();
private boolean mWakeUpComingFromTouch;
@@ -518,7 +515,7 @@
final boolean supportsAmbientMode = info != null &&
info.supportsAmbientMode();
- mStatusBarWindowManager.setWallpaperSupportsAmbientMode(supportsAmbientMode);
+ mStatusBarWindowController.setWallpaperSupportsAmbientMode(supportsAmbientMode);
mScrimController.setWallpaperSupportsAmbientMode(supportsAmbientMode);
}
};
@@ -960,8 +957,8 @@
scrimBehind, scrimInFront, mLockscreenWallpaper,
(state, alpha, color) -> mLightBarController.setScrimState(state, alpha, color),
scrimsVisible -> {
- if (mStatusBarWindowManager != null) {
- mStatusBarWindowManager.setScrimsVisibility(scrimsVisible);
+ if (mStatusBarWindowController != null) {
+ mStatusBarWindowController.setScrimsVisibility(scrimsVisible);
}
}, DozeParameters.getInstance(mContext),
mContext.getSystemService(AlarmManager.class));
@@ -1414,7 +1411,7 @@
@Override
public void onPerformRemoveNotification(StatusBarNotification n) {
if (mStackScroller.hasPulsingNotifications() &&
- !mHeadsUpManager.hasHeadsUpNotifications()) {
+ !mHeadsUpManager.hasNotifications()) {
// We were showing a pulse for a notification, but no notifications are pulsing anymore.
// Finish the pulse.
mDozeScrimController.pulseOutNow();
@@ -1705,7 +1702,7 @@
mBackdrop.animate().cancel();
mBackdrop.setAlpha(1f);
}
- mStatusBarWindowManager.setBackdropShowing(true);
+ mStatusBarWindowController.setBackdropShowing(true);
metaDataChanged = true;
if (DEBUG_MEDIA) {
Log.v(TAG, "DEBUG_MEDIA: Fading in album artwork");
@@ -1765,9 +1762,9 @@
// We are unlocking directly - no animation!
mBackdrop.setVisibility(View.GONE);
mBackdropBack.setImageDrawable(null);
- mStatusBarWindowManager.setBackdropShowing(false);
+ mStatusBarWindowController.setBackdropShowing(false);
} else {
- mStatusBarWindowManager.setBackdropShowing(false);
+ mStatusBarWindowController.setBackdropShowing(false);
mBackdrop.animate()
.alpha(SRC_MIN_ALPHA)
.setInterpolator(Interpolators.ACCELERATE_DECELERATE)
@@ -1921,7 +1918,7 @@
}
public void setQsExpanded(boolean expanded) {
- mStatusBarWindowManager.setQsExpanded(expanded);
+ mStatusBarWindowController.setQsExpanded(expanded);
mNotificationPanel.setStatusAccessibilityImportance(expanded
? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
: View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
@@ -2004,31 +2001,31 @@
@Override
public void onHeadsUpPinnedModeChanged(boolean inPinnedMode) {
if (inPinnedMode) {
- mStatusBarWindowManager.setHeadsUpShowing(true);
- mStatusBarWindowManager.setForceStatusBarVisible(true);
+ mStatusBarWindowController.setHeadsUpShowing(true);
+ mStatusBarWindowController.setForceStatusBarVisible(true);
if (mNotificationPanel.isFullyCollapsed()) {
// We need to ensure that the touchable region is updated before the window will be
// resized, in order to not catch any touches. A layout will ensure that
// onComputeInternalInsets will be called and after that we can resize the layout. Let's
// make sure that the window stays small for one frame until the touchableRegion is set.
mNotificationPanel.requestLayout();
- mStatusBarWindowManager.setForceWindowCollapsed(true);
+ mStatusBarWindowController.setForceWindowCollapsed(true);
mNotificationPanel.post(() -> {
- mStatusBarWindowManager.setForceWindowCollapsed(false);
+ mStatusBarWindowController.setForceWindowCollapsed(false);
});
}
} else {
if (!mNotificationPanel.isFullyCollapsed() || mNotificationPanel.isTracking()) {
// We are currently tracking or is open and the shade doesn't need to be kept
// open artificially.
- mStatusBarWindowManager.setHeadsUpShowing(false);
+ mStatusBarWindowController.setHeadsUpShowing(false);
} else {
// we need to keep the panel open artificially, let's wait until the animation
// is finished.
mHeadsUpManager.setHeadsUpGoingAway(true);
mStackScroller.runAfterAnimationFinished(() -> {
if (!mHeadsUpManager.hasPinnedHeadsUp()) {
- mStatusBarWindowManager.setHeadsUpShowing(false);
+ mStatusBarWindowController.setHeadsUpShowing(false);
mHeadsUpManager.setHeadsUpGoingAway(false);
}
mRemoteInputManager.removeRemoteInputEntriesKeptUntilCollapsed();
@@ -2068,7 +2065,7 @@
public void setPanelExpanded(boolean isExpanded) {
mPanelExpanded = isExpanded;
updateHideIconsForBouncer(false /* animate */);
- mStatusBarWindowManager.setPanelExpanded(isExpanded);
+ mStatusBarWindowController.setPanelExpanded(isExpanded);
mVisualStabilityManager.setPanelExpanded(isExpanded);
if (isExpanded && getBarState() != StatusBarState.KEYGUARD) {
if (DEBUG) {
@@ -2239,7 +2236,8 @@
mNotificationPanel.expand(true /* animate */);
mMetricsLogger.count(NotificationPanelView.COUNTER_PANEL_OPEN, 1);
} else if (!mNotificationPanel.isInSettings() && !mNotificationPanel.isExpanding()){
- mNotificationPanel.flingSettings(0 /* velocity */, true /* expand */);
+ mNotificationPanel.flingSettings(0 /* velocity */,
+ NotificationPanelView.FLING_EXPAND);
mMetricsLogger.count(NotificationPanelView.COUNTER_PANEL_OPEN_QS, 1);
}
}
@@ -2276,7 +2274,7 @@
// Expand the window to encompass the full screen in anticipation of the drag.
// This is only possible to do atomically because the status bar is at the top of the screen!
- mStatusBarWindowManager.setPanelVisible(true);
+ mStatusBarWindowController.setPanelVisible(true);
visibilityChanged(true);
recomputeDisableFlags(!force /* animate */);
@@ -2350,7 +2348,7 @@
+ mNotificationPanel.canPanelBeCollapsed());
if (mStatusBarWindow != null && mNotificationPanel.canPanelBeCollapsed()) {
// release focus immediately to kick off focus change transition
- mStatusBarWindowManager.setStatusBarFocusable(false);
+ mStatusBarWindowController.setStatusBarFocusable(false);
mStatusBarWindow.cancelExpandHelper();
mStatusBarView.collapsePanel(true /* animate */, delayed, speedUpFactor);
@@ -2422,8 +2420,8 @@
visibilityChanged(false);
// Shrink the window to the size of the status bar only
- mStatusBarWindowManager.setPanelVisible(false);
- mStatusBarWindowManager.setForceStatusBarVisible(false);
+ mStatusBarWindowController.setPanelVisible(false);
+ mStatusBarWindowController.setForceStatusBarVisible(false);
// Close any guts that might be visible
mGutsManager.closeAndSaveGuts(true /* removeLeavebehind */, true /* force */,
@@ -2896,7 +2894,7 @@
private void addStatusBarWindow() {
makeStatusBarView();
- mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
+ mStatusBarWindowController = Dependency.get(StatusBarWindowController.class);
mRemoteInputManager.setUpWithPresenter(this, mEntryManager, this,
new RemoteInputController.Delegate() {
public void setRemoteInputActive(NotificationData.Entry entry,
@@ -2913,8 +2911,8 @@
mStackScroller.requestDisallowDismiss();
}
});
- mRemoteInputManager.getController().addCallback(mStatusBarWindowManager);
- mStatusBarWindowManager.add(mStatusBarWindow, getStatusBarHeight());
+ mRemoteInputManager.getController().addCallback(mStatusBarWindowController);
+ mStatusBarWindowController.add(mStatusBarWindow, getStatusBarHeight());
}
// called by makeStatusbar and also by PhoneStatusBarView
@@ -3224,8 +3222,8 @@
int oldBarHeight = mNaturalBarHeight;
mNaturalBarHeight = res.getDimensionPixelSize(
com.android.internal.R.dimen.status_bar_height);
- if (mStatusBarWindowManager != null && mNaturalBarHeight != oldBarHeight) {
- mStatusBarWindowManager.setBarHeight(mNaturalBarHeight);
+ if (mStatusBarWindowController != null && mNaturalBarHeight != oldBarHeight) {
+ mStatusBarWindowController.setBarHeight(mNaturalBarHeight);
}
mMaxAllowedKeyguardNotifications = res.getInteger(
R.integer.keyguard_max_notification_count);
@@ -3689,7 +3687,7 @@
Log.w(TAG, "Launch transition: Timeout!");
mNotificationPanel.onAffordanceLaunchEnded();
releaseGestureWakeLock();
- mNotificationPanel.resetViews();
+ mNotificationPanel.resetViews(false /* animate */);
}
private void runLaunchTransitionEndRunnable() {
@@ -3842,7 +3840,9 @@
Trace.beginSection("StatusBar#updateKeyguardState");
if (mState == StatusBarState.KEYGUARD) {
mKeyguardIndicationController.setVisible(true);
- mNotificationPanel.resetViews();
+ boolean dozingAnimated = mDozingRequested
+ && DozeParameters.getInstance(mContext).shouldControlScreenOff();
+ mNotificationPanel.resetViews(dozingAnimated);
if (mKeyguardUserSwitcher != null) {
mKeyguardUserSwitcher.setKeyguard(true, fromShadeLocked);
}
@@ -3881,7 +3881,7 @@
* Switches theme from light to dark and vice-versa.
*/
protected void updateTheme() {
- final boolean inflated = mStackScroller != null && mStatusBarWindowManager != null;
+ final boolean inflated = mStackScroller != null && mStatusBarWindowController != null;
// Lock wallpaper defines the color of the majority of the views, hence we'll use it
// to set our default theme.
@@ -3907,7 +3907,7 @@
mStackScroller.updateDecorViews(useDarkText);
// Make sure we have the correct navbar/statusbar colors.
- mStatusBarWindowManager.setKeyguardDark(useDarkText);
+ mStatusBarWindowController.setKeyguardDark(useDarkText);
}
}
@@ -3924,6 +3924,7 @@
mDozeScrimController.setDozing(mDozing);
mKeyguardIndicationController.setDozing(mDozing);
mNotificationPanel.setDozing(mDozing, animate);
+ mNotificationLogger.setDozing(mDozing);
updateQsExpansionEnabled();
Trace.endSection();
}
@@ -3987,7 +3988,7 @@
if (mNotificationPanel.isQsDetailShowing()) {
mNotificationPanel.closeQsDetail();
} else {
- mNotificationPanel.animateCloseQs();
+ mNotificationPanel.animateCloseQs(false /* animateAway */);
}
return true;
}
@@ -4070,7 +4071,7 @@
mGroupManager.setStatusBarState(state);
mHeadsUpManager.setStatusBarState(state);
mFalsingManager.setStatusBarState(state);
- mStatusBarWindowManager.setStatusBarState(state);
+ mStatusBarWindowController.setStatusBarState(state);
mStackScroller.setStatusBarState(state);
updateReportRejectedTouchVisibility();
updateDozing();
@@ -4100,7 +4101,7 @@
if (!isPresenterFullyCollapsed()) {
// if we set it not to be focusable when collapsing, we have to undo it when we aborted
// the closing
- mStatusBarWindowManager.setStatusBarFocusable(true);
+ mStatusBarWindowController.setStatusBarFocusable(true);
}
}
@@ -4717,7 +4718,7 @@
if (mDozing != dozing) {
mDozing = dozing;
mKeyguardViewMediator.setAodShowing(mDozing);
- mStatusBarWindowManager.setDozing(mDozing);
+ mStatusBarWindowController.setDozing(mDozing);
mStatusBarKeyguardViewManager.setDozing(mDozing);
if (mAmbientIndicationContainer instanceof DozeReceiver) {
((DozeReceiver) mAmbientIndicationContainer).setDozing(mDozing);
@@ -4832,7 +4833,7 @@
@Override
public void onPulseStarted() {
callback.onPulseStarted();
- if (mHeadsUpManager.hasHeadsUpNotifications()) {
+ if (mHeadsUpManager.hasNotifications()) {
// Only pulse the stack scroller if there's actually something to show.
// Otherwise just show the always-on screen.
setPulsing(true);
@@ -4947,7 +4948,7 @@
@Override
public void setDozeScreenBrightness(int value) {
- mStatusBarWindowManager.setDozeScreenBrightness(value);
+ mStatusBarWindowController.setDozeScreenBrightness(value);
}
@Override
@@ -5105,7 +5106,7 @@
final boolean wasOccluded = mIsOccluded;
dismissKeyguardThenExecute(() -> {
// TODO: Some of this code may be able to move to NotificationEntryManager.
- if (mHeadsUpManager != null && mHeadsUpManager.isHeadsUp(notificationKey)) {
+ if (mHeadsUpManager != null && mHeadsUpManager.contains(notificationKey)) {
// Release the HUN notification to the shade.
if (isPresenterFullyCollapsed()) {
@@ -5114,7 +5115,8 @@
//
// In most cases, when FLAG_AUTO_CANCEL is set, the notification will
// become canceled shortly by NoMan, but we can't assume that.
- mHeadsUpManager.releaseImmediately(notificationKey);
+ mHeadsUpManager.removeNotification(sbn.getKey(),
+ true /* releaseImmediately */);
}
StatusBarNotification parentToCancel = null;
if (shouldAutoCancel(sbn) && mGroupManager.isOnlyChildInGroup(sbn)) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index c4424d8..9bc0252 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -74,7 +74,7 @@
private static String TAG = "StatusBarKeyguardViewManager";
protected final Context mContext;
- private final StatusBarWindowManager mStatusBarWindowManager;
+ private final StatusBarWindowController mStatusBarWindowController;
private final BouncerExpansionCallback mExpansionCallback = new BouncerExpansionCallback() {
@Override
public void onFullyShown() {
@@ -135,7 +135,7 @@
mContext = context;
mViewMediatorCallback = callback;
mLockPatternUtils = lockPatternUtils;
- mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
+ mStatusBarWindowController = Dependency.get(StatusBarWindowController.class);
KeyguardUpdateMonitor.getInstance(context).registerCallback(mUpdateMonitorCallback);
}
@@ -190,7 +190,7 @@
*/
public void show(Bundle options) {
mShowing = true;
- mStatusBarWindowManager.setKeyguardShowing(true);
+ mStatusBarWindowController.setKeyguardShowing(true);
reset(true /* hideBouncerWhenShowing */);
StatsLog.write(StatsLog.KEYGUARD_STATE_CHANGED,
StatsLog.KEYGUARD_STATE_CHANGED__STATE__SHOWN);
@@ -342,11 +342,11 @@
}
public void setNeedsInput(boolean needsInput) {
- mStatusBarWindowManager.setKeyguardNeedsInput(needsInput);
+ mStatusBarWindowController.setKeyguardNeedsInput(needsInput);
}
public boolean isUnlockWithWallpaper() {
- return mStatusBarWindowManager.isShowingWallpaper();
+ return mStatusBarWindowController.isShowingWallpaper();
}
public void setOccluded(boolean occluded, boolean animate) {
@@ -360,7 +360,7 @@
new Runnable() {
@Override
public void run() {
- mStatusBarWindowManager.setKeyguardOccluded(mOccluded);
+ mStatusBarWindowController.setKeyguardOccluded(mOccluded);
reset(true /* hideBouncerWhenShowing */);
}
});
@@ -375,7 +375,7 @@
if (mShowing) {
mStatusBar.updateMediaMetaData(false, animate && !occluded);
}
- mStatusBarWindowManager.setKeyguardOccluded(occluded);
+ mStatusBarWindowController.setKeyguardOccluded(occluded);
// setDozing(false) will call reset once we stop dozing.
if (!mDozing) {
@@ -425,8 +425,8 @@
mStatusBar.fadeKeyguardAfterLaunchTransition(new Runnable() {
@Override
public void run() {
- mStatusBarWindowManager.setKeyguardShowing(false);
- mStatusBarWindowManager.setKeyguardFadingAway(true);
+ mStatusBarWindowController.setKeyguardShowing(false);
+ mStatusBarWindowController.setKeyguardFadingAway(true);
hideBouncer(true /* destroyView */);
updateStates();
}
@@ -434,7 +434,7 @@
@Override
public void run() {
mStatusBar.hideKeyguard();
- mStatusBarWindowManager.setKeyguardFadingAway(false);
+ mStatusBarWindowController.setKeyguardFadingAway(false);
mViewMediatorCallback.keyguardGone();
executeAfterKeyguardGoneAction();
}
@@ -456,7 +456,7 @@
} else {
boolean staying = mStatusBar.hideKeyguard();
if (!staying) {
- mStatusBarWindowManager.setKeyguardFadingAway(true);
+ mStatusBarWindowController.setKeyguardFadingAway(true);
wakeAndUnlockDejank();
} else {
mStatusBar.finishKeyguardFadingAway();
@@ -464,7 +464,7 @@
}
}
updateStates();
- mStatusBarWindowManager.setKeyguardShowing(false);
+ mStatusBarWindowController.setKeyguardShowing(false);
mViewMediatorCallback.keyguardGone();
}
StatsLog.write(StatsLog.KEYGUARD_STATE_CHANGED,
@@ -481,7 +481,7 @@
}
public void onKeyguardFadedAway() {
- mContainer.postDelayed(() -> mStatusBarWindowManager.setKeyguardFadingAway(false),
+ mContainer.postDelayed(() -> mStatusBarWindowController.setKeyguardFadingAway(false),
100);
mStatusBar.finishKeyguardFadingAway();
mBiometricUnlockController.finishKeyguardFadingAway();
@@ -599,7 +599,7 @@
}
if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) {
- mStatusBarWindowManager.setBouncerShowing(bouncerShowing);
+ mStatusBarWindowController.setBouncerShowing(bouncerShowing);
mStatusBar.setBouncerShowing(bouncerShowing);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
similarity index 93%
rename from packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
rename to packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
index a38328a..4d60121 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
@@ -36,6 +36,7 @@
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.keyguard.R;
import com.android.systemui.Dumpable;
import com.android.systemui.keyguard.KeyguardViewMediator;
@@ -49,9 +50,9 @@
/**
* Encapsulates all logic for the status bar window state management.
*/
-public class StatusBarWindowManager implements RemoteInputController.Callback, Dumpable {
+public class StatusBarWindowController implements RemoteInputController.Callback, Dumpable {
- private static final String TAG = "StatusBarWindowManager";
+ private static final String TAG = "StatusBarWindowController";
private final Context mContext;
private final WindowManager mWindowManager;
@@ -68,12 +69,19 @@
private final State mCurrentState = new State();
private OtherwisedCollapsedListener mListener;
- public StatusBarWindowManager(Context context) {
+ public StatusBarWindowController(Context context) {
+ this(context, context.getSystemService(WindowManager.class), ActivityManager.getService(),
+ DozeParameters.getInstance(context));
+ }
+
+ @VisibleForTesting
+ StatusBarWindowController(Context context, WindowManager windowManager,
+ IActivityManager activityManager, DozeParameters dozeParameters) {
mContext = context;
- mWindowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
- mActivityManager = ActivityManager.getService();
+ mWindowManager = windowManager;
+ mActivityManager = activityManager;
mKeyguardScreenRotation = shouldEnableKeyguardScreenRotation();
- mDozeParameters = DozeParameters.getInstance(mContext);
+ mDozeParameters = dozeParameters;
mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze();
}
@@ -149,6 +157,12 @@
} else {
mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
}
+
+ if (state.dozing) {
+ mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+ } else {
+ mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+ }
}
private void adjustScreenOrientation(State state) {
@@ -180,12 +194,12 @@
mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
}
- private void applyExpandedFlag(State state) {
- if (state.panelExpanded || state.isKeyguardShowingAndNotOccluded() || state.bouncerShowing
+ private void applyForceShowNavigationFlag(State state) {
+ if (state.panelExpanded || state.bouncerShowing
|| ENABLE_REMOTE_INPUT && state.remoteInputActive) {
- mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+ mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
} else {
- mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+ mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
}
}
@@ -243,7 +257,7 @@
applyKeyguardFlags(state);
applyForceStatusBarVisibleFlag(state);
applyFocusableFlag(state);
- applyExpandedFlag(state);
+ applyForceShowNavigationFlag(state);
adjustScreenOrientation(state);
applyHeight(state);
applyUserActivityTimeout(state);
@@ -433,7 +447,7 @@
}
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
- pw.println("StatusBarWindowManager state:");
+ pw.println("StatusBarWindowController state:");
pw.println(mCurrentState);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java
index dc1b35d..2ed2edb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UserAvatarView.java
@@ -45,25 +45,18 @@
final int N = a.getIndexCount();
for (int i = 0; i < N; i++) {
int attr = a.getIndex(i);
- switch (attr) {
- case R.styleable.UserAvatarView_avatarPadding:
- setAvatarPadding(a.getDimension(attr, 0));
- break;
- case R.styleable.UserAvatarView_frameWidth:
- setFrameWidth(a.getDimension(attr, 0));
- break;
- case R.styleable.UserAvatarView_framePadding:
- setFramePadding(a.getDimension(attr, 0));
- break;
- case R.styleable.UserAvatarView_frameColor:
- setFrameColor(a.getColorStateList(attr));
- break;
- case R.styleable.UserAvatarView_badgeDiameter:
- setBadgeDiameter(a.getDimension(attr, 0));
- break;
- case R.styleable.UserAvatarView_badgeMargin:
- setBadgeMargin(a.getDimension(attr, 0));
- break;
+ if (attr == R.styleable.UserAvatarView_avatarPadding) {
+ setAvatarPadding(a.getDimension(attr, 0));
+ } else if (attr == R.styleable.UserAvatarView_frameWidth) {
+ setFrameWidth(a.getDimension(attr, 0));
+ } else if (attr == R.styleable.UserAvatarView_framePadding) {
+ setFramePadding(a.getDimension(attr, 0));
+ } else if (attr == R.styleable.UserAvatarView_frameColor) {
+ setFrameColor(a.getColorStateList(attr));
+ } else if (attr == R.styleable.UserAvatarView_badgeDiameter) {
+ setBadgeDiameter(a.getDimension(attr, 0));
+ } else if (attr == R.styleable.UserAvatarView_badgeMargin) {
+ setBadgeMargin(a.getDimension(attr, 0));
}
}
a.recycle();
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/CastControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java
index 2bf62bb..533bd86 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java
@@ -30,6 +30,7 @@
import android.util.ArraySet;
import android.util.Log;
+import com.android.internal.annotations.GuardedBy;
import com.android.systemui.R;
import java.io.FileDescriptor;
@@ -41,12 +42,16 @@
import static android.media.MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY;
+import androidx.annotation.VisibleForTesting;
+
+
/** Platform implementation of the cast controller. **/
public class CastControllerImpl implements CastController {
private static final String TAG = "CastController";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private final Context mContext;
+ @GuardedBy("mCallbacks")
private final ArrayList<Callback> mCallbacks = new ArrayList<Callback>();
private final MediaRouter mMediaRouter;
private final ArrayMap<String, RouteInfo> mRoutes = new ArrayMap<>();
@@ -72,7 +77,7 @@
pw.println("CastController state:");
pw.print(" mDiscovering="); pw.println(mDiscovering);
pw.print(" mCallbackRegistered="); pw.println(mCallbackRegistered);
- pw.print(" mCallbacks.size="); pw.println(mCallbacks.size());
+ pw.print(" mCallbacks.size="); synchronized (mCallbacks) {pw.println(mCallbacks.size());}
pw.print(" mRoutes.size="); pw.println(mRoutes.size());
for (int i = 0; i < mRoutes.size(); i++) {
final RouteInfo route = mRoutes.valueAt(i);
@@ -83,7 +88,9 @@
@Override
public void addCallback(Callback callback) {
- mCallbacks.add(callback);
+ synchronized (mCallbacks) {
+ mCallbacks.add(callback);
+ }
fireOnCastDevicesChanged(callback);
synchronized (mDiscoveringLock) {
handleDiscoveryChangeLocked();
@@ -92,7 +99,9 @@
@Override
public void removeCallback(Callback callback) {
- mCallbacks.remove(callback);
+ synchronized (mCallbacks) {
+ mCallbacks.remove(callback);
+ }
synchronized (mDiscoveringLock) {
handleDiscoveryChangeLocked();
}
@@ -117,10 +126,16 @@
mMediaRouter.addCallback(ROUTE_TYPE_REMOTE_DISPLAY, mMediaCallback,
MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
mCallbackRegistered = true;
- } else if (mCallbacks.size() != 0) {
- mMediaRouter.addCallback(ROUTE_TYPE_REMOTE_DISPLAY, mMediaCallback,
- MediaRouter.CALLBACK_FLAG_PASSIVE_DISCOVERY);
- mCallbackRegistered = true;
+ } else {
+ boolean hasCallbacks = false;
+ synchronized (mCallbacks) {
+ hasCallbacks = mCallbacks.isEmpty();
+ }
+ if (!hasCallbacks) {
+ mMediaRouter.addCallback(ROUTE_TYPE_REMOTE_DISPLAY, mMediaCallback,
+ MediaRouter.CALLBACK_FLAG_PASSIVE_DISCOVERY);
+ mCallbackRegistered = true;
+ }
}
}
@@ -248,12 +263,17 @@
}
}
- private void fireOnCastDevicesChanged() {
- for (Callback callback : mCallbacks) {
- fireOnCastDevicesChanged(callback);
+ @VisibleForTesting
+ void fireOnCastDevicesChanged() {
+ synchronized (mCallbacks) {
+ for (Callback callback : mCallbacks) {
+ fireOnCastDevicesChanged(callback);
+ }
+
}
}
+
private void fireOnCastDevicesChanged(Callback callback) {
callback.onCastDevicesChanged();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 677dd73..d477587 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -21,56 +21,44 @@
import android.content.Context;
import android.content.res.Resources;
import android.database.ContentObserver;
-import android.os.SystemClock;
-import android.os.Handler;
-import android.os.Looper;
import android.util.ArrayMap;
import android.provider.Settings;
import android.util.Log;
-import android.view.accessibility.AccessibilityEvent;
import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
+import com.android.systemui.statusbar.AlertingNotificationManager;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.NotificationData;
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.stream.Stream;
-import java.util.HashMap;
import java.util.HashSet;
/**
* A manager which handles heads up notifications which is a special mode where
* they simply peek from the top of the screen.
*/
-public class HeadsUpManager {
+public abstract class HeadsUpManager extends AlertingNotificationManager {
private static final String TAG = "HeadsUpManager";
- private static final boolean DEBUG = false;
private static final String SETTING_HEADS_UP_SNOOZE_LENGTH_MS = "heads_up_snooze_length_ms";
- protected final Clock mClock = new Clock();
protected final HashSet<OnHeadsUpChangedListener> mListeners = new HashSet<>();
- protected final Handler mHandler = new Handler(Looper.getMainLooper());
protected final Context mContext;
- protected int mHeadsUpNotificationDecay;
- protected int mMinimumDisplayTime;
protected int mTouchAcceptanceDelay;
protected int mSnoozeLengthMs;
protected boolean mHasPinnedNotification;
protected int mUser;
- private final HashMap<String, HeadsUpEntry> mHeadsUpEntries = new HashMap<>();
private final ArrayMap<String, Long> mSnoozedPackages;
public HeadsUpManager(@NonNull final Context context) {
mContext = context;
Resources resources = context.getResources();
mMinimumDisplayTime = resources.getInteger(R.integer.heads_up_notification_minimum_time);
- mHeadsUpNotificationDecay = resources.getInteger(R.integer.heads_up_notification_decay);
+ mAutoDismissNotificationDecay = resources.getInteger(R.integer.heads_up_notification_decay);
mTouchAcceptanceDelay = resources.getInteger(R.integer.touch_acceptance_delay);
mSnoozedPackages = new ArrayMap<>();
int defaultSnoozeLengthMs =
@@ -85,7 +73,9 @@
context.getContentResolver(), SETTING_HEADS_UP_SNOOZE_LENGTH_MS, -1);
if (packageSnoozeLengthMs > -1 && packageSnoozeLengthMs != mSnoozeLengthMs) {
mSnoozeLengthMs = packageSnoozeLengthMs;
- if (DEBUG) Log.v(TAG, "mSnoozeLengthMs = " + mSnoozeLengthMs);
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "mSnoozeLengthMs = " + mSnoozeLengthMs);
+ }
}
}
};
@@ -108,49 +98,14 @@
mListeners.remove(listener);
}
- /**
- * Called when posting a new notification to the heads up.
- */
- public void showNotification(@NonNull NotificationData.Entry headsUp) {
- if (DEBUG) Log.v(TAG, "showNotification");
- addHeadsUpEntry(headsUp);
- updateNotification(headsUp, true);
- headsUp.setInterruption();
- }
-
- /**
- * Called when updating or posting a notification to the heads up.
- */
- public void updateNotification(@NonNull NotificationData.Entry headsUp, boolean alert) {
- if (DEBUG) Log.v(TAG, "updateNotification");
-
- headsUp.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
-
- if (alert) {
- HeadsUpEntry headsUpEntry = mHeadsUpEntries.get(headsUp.key);
- if (headsUpEntry == null) {
- // the entry was released before this update (i.e by a listener) This can happen
- // with the groupmanager
- return;
- }
- headsUpEntry.updateEntry(true /* updatePostTime */);
- setEntryPinned(headsUpEntry, shouldHeadsUpBecomePinned(headsUp));
+ public void updateNotification(@NonNull String key, boolean alert) {
+ super.updateNotification(key, alert);
+ AlertEntry alertEntry = getHeadsUpEntry(key);
+ if (alert && alertEntry != null) {
+ setEntryPinned((HeadsUpEntry) alertEntry, shouldHeadsUpBecomePinned(alertEntry.mEntry));
}
}
- private void addHeadsUpEntry(@NonNull NotificationData.Entry entry) {
- HeadsUpEntry headsUpEntry = createHeadsUpEntry();
- // This will also add the entry to the sortedList
- headsUpEntry.setEntry(entry);
- mHeadsUpEntries.put(entry.key, headsUpEntry);
- entry.row.setHeadsUp(true);
- setEntryPinned(headsUpEntry, shouldHeadsUpBecomePinned(entry));
- for (OnHeadsUpChangedListener listener : mListeners) {
- listener.onHeadsUpStateChanged(entry, true);
- }
- entry.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
- }
-
protected boolean shouldHeadsUpBecomePinned(@NonNull NotificationData.Entry entry) {
return hasFullScreenIntent(entry);
}
@@ -161,8 +116,10 @@
protected void setEntryPinned(
@NonNull HeadsUpManager.HeadsUpEntry headsUpEntry, boolean isPinned) {
- if (DEBUG) Log.v(TAG, "setEntryPinned: " + isPinned);
- ExpandableNotificationRow row = headsUpEntry.entry.row;
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "setEntryPinned: " + isPinned);
+ }
+ ExpandableNotificationRow row = headsUpEntry.mEntry.row;
if (row.isPinned() != isPinned) {
row.setPinned(isPinned);
updatePinnedMode();
@@ -176,20 +133,24 @@
}
}
- protected void removeHeadsUpEntry(@NonNull NotificationData.Entry entry) {
- HeadsUpEntry remove = mHeadsUpEntries.remove(entry.key);
- onHeadsUpEntryRemoved(remove);
+ @Override
+ protected void onAlertEntryAdded(AlertEntry alertEntry) {
+ NotificationData.Entry entry = alertEntry.mEntry;
+ entry.row.setHeadsUp(true);
+ setEntryPinned((HeadsUpEntry) alertEntry, shouldHeadsUpBecomePinned(entry));
+ for (OnHeadsUpChangedListener listener : mListeners) {
+ listener.onHeadsUpStateChanged(entry, true);
+ }
}
- protected void onHeadsUpEntryRemoved(@NonNull HeadsUpEntry remove) {
- NotificationData.Entry entry = remove.entry;
- entry.row.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+ @Override
+ protected void onAlertEntryRemoved(AlertEntry alertEntry) {
+ NotificationData.Entry entry = alertEntry.mEntry;
entry.row.setHeadsUp(false);
- setEntryPinned(remove, false /* isPinned */);
+ setEntryPinned((HeadsUpEntry) alertEntry, false /* isPinned */);
for (OnHeadsUpChangedListener listener : mListeners) {
listener.onHeadsUpStateChanged(entry, false);
}
- releaseHeadsUpEntry(remove);
}
protected void updatePinnedMode() {
@@ -197,7 +158,7 @@
if (hasPinnedNotification == mHasPinnedNotification) {
return;
}
- if (DEBUG) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "Pinned mode changed: " + mHasPinnedNotification + " -> " +
hasPinnedNotification);
}
@@ -211,50 +172,6 @@
}
/**
- * React to the removal of the notification in the heads up.
- *
- * @return true if the notification was removed and false if it still needs to be kept around
- * for a bit since it wasn't shown long enough
- */
- public boolean removeNotification(@NonNull String key, boolean ignoreEarliestRemovalTime) {
- if (DEBUG) Log.v(TAG, "removeNotification");
- releaseImmediately(key);
- return true;
- }
-
- /**
- * Returns if the given notification is in the Heads Up Notification list or not.
- */
- public boolean isHeadsUp(@NonNull String key) {
- return mHeadsUpEntries.containsKey(key);
- }
-
- /**
- * Pushes any current Heads Up notification down into the shade.
- */
- public void releaseAllImmediately() {
- if (DEBUG) Log.v(TAG, "releaseAllImmediately");
- Iterator<HeadsUpEntry> iterator = mHeadsUpEntries.values().iterator();
- while (iterator.hasNext()) {
- HeadsUpEntry entry = iterator.next();
- iterator.remove();
- onHeadsUpEntryRemoved(entry);
- }
- }
-
- /**
- * Pushes the given Heads Up notification down into the shade.
- */
- public void releaseImmediately(@NonNull String key) {
- HeadsUpEntry headsUpEntry = getHeadsUpEntry(key);
- if (headsUpEntry == null) {
- return;
- }
- NotificationData.Entry shadeEntry = headsUpEntry.entry;
- removeHeadsUpEntry(shadeEntry);
- }
-
- /**
* Returns if the given notification is snoozed or not.
*/
public boolean isSnoozed(@NonNull String packageName) {
@@ -262,7 +179,9 @@
Long snoozedUntil = mSnoozedPackages.get(key);
if (snoozedUntil != null) {
if (snoozedUntil > mClock.currentTimeMillis()) {
- if (DEBUG) Log.v(TAG, key + " snoozed");
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, key + " snoozed");
+ }
return true;
}
mSnoozedPackages.remove(packageName);
@@ -274,9 +193,9 @@
* Snoozes all current Heads Up Notifications.
*/
public void snooze() {
- for (String key : mHeadsUpEntries.keySet()) {
- HeadsUpEntry entry = mHeadsUpEntries.get(key);
- String packageName = entry.entry.notification.getPackageName();
+ for (String key : mAlertEntries.keySet()) {
+ AlertEntry entry = getHeadsUpEntry(key);
+ String packageName = entry.mEntry.notification.getPackageName();
mSnoozedPackages.put(snoozeKey(packageName, mUser),
mClock.currentTimeMillis() + mSnoozeLengthMs);
}
@@ -289,53 +208,27 @@
@Nullable
protected HeadsUpEntry getHeadsUpEntry(@NonNull String key) {
- return mHeadsUpEntries.get(key);
+ return (HeadsUpEntry) mAlertEntries.get(key);
}
/**
- * Returns the entry of given Heads Up Notification.
- *
- * @param key Key of heads up notification
- */
- @Nullable
- public NotificationData.Entry getEntry(@NonNull String key) {
- HeadsUpEntry entry = mHeadsUpEntries.get(key);
- return entry != null ? entry.entry : null;
- }
-
- /**
- * Returns the stream of all current Heads Up Notifications.
- */
- @NonNull
- public Stream<NotificationData.Entry> getAllEntries() {
- return mHeadsUpEntries.values().stream().map(headsUpEntry -> headsUpEntry.entry);
- }
-
- /**
- * Returns the top Heads Up Notification, which appeares to show at first.
+ * Returns the top Heads Up Notification, which appears to show at first.
*/
@Nullable
public NotificationData.Entry getTopEntry() {
HeadsUpEntry topEntry = getTopHeadsUpEntry();
- return (topEntry != null) ? topEntry.entry : null;
- }
-
- /**
- * Returns if any heads up notification is available or not.
- */
- public boolean hasHeadsUpNotifications() {
- return !mHeadsUpEntries.isEmpty();
+ return (topEntry != null) ? topEntry.mEntry : null;
}
@Nullable
protected HeadsUpEntry getTopHeadsUpEntry() {
- if (mHeadsUpEntries.isEmpty()) {
+ if (mAlertEntries.isEmpty()) {
return null;
}
HeadsUpEntry topEntry = null;
- for (HeadsUpEntry entry: mHeadsUpEntries.values()) {
+ for (AlertEntry entry: mAlertEntries.values()) {
if (topEntry == null || entry.compareTo(topEntry) < 0) {
- topEntry = entry;
+ topEntry = (HeadsUpEntry) entry;
}
}
return topEntry;
@@ -359,8 +252,8 @@
pw.print(" mSnoozeLengthMs="); pw.println(mSnoozeLengthMs);
pw.print(" now="); pw.println(mClock.currentTimeMillis());
pw.print(" mUser="); pw.println(mUser);
- for (HeadsUpEntry entry: mHeadsUpEntries.values()) {
- pw.print(" HeadsUpEntry="); pw.println(entry.entry);
+ for (AlertEntry entry: mAlertEntries.values()) {
+ pw.print(" HeadsUpEntry="); pw.println(entry.mEntry);
}
int N = mSnoozedPackages.size();
pw.println(" snoozed packages: " + N);
@@ -378,9 +271,9 @@
}
private boolean hasPinnedNotificationInternal() {
- for (String key : mHeadsUpEntries.keySet()) {
- HeadsUpEntry entry = mHeadsUpEntries.get(key);
- if (entry.entry.row.isPinned()) {
+ for (String key : mAlertEntries.keySet()) {
+ AlertEntry entry = getHeadsUpEntry(key);
+ if (entry.mEntry.row.isPinned()) {
return true;
}
}
@@ -392,16 +285,16 @@
* @param userUnPinned The unpinned action is trigger by user real operation.
*/
public void unpinAll(boolean userUnPinned) {
- for (String key : mHeadsUpEntries.keySet()) {
- HeadsUpEntry entry = mHeadsUpEntries.get(key);
+ for (String key : mAlertEntries.keySet()) {
+ HeadsUpEntry entry = getHeadsUpEntry(key);
setEntryPinned(entry, false /* isPinned */);
// maybe it got un sticky
entry.updateEntry(false /* updatePostTime */);
// when the user unpinned all of HUNs by moving one HUN, all of HUNs should not stay
// on the screen.
- if (userUnPinned && entry.entry != null && entry.entry.row != null) {
- ExpandableNotificationRow row = entry.entry.row;
+ if (userUnPinned && entry.mEntry != null && entry.mEntry.row != null) {
+ ExpandableNotificationRow row = entry.mEntry.row;
if (row.mustStayOnScreen()) {
row.setHeadsUpIsVisible();
}
@@ -425,8 +318,8 @@
* one should be ranked higher and 0 if they are equal.
*/
public int compare(@NonNull NotificationData.Entry a, @NonNull NotificationData.Entry b) {
- HeadsUpEntry aEntry = getHeadsUpEntry(a.key);
- HeadsUpEntry bEntry = getHeadsUpEntry(b.key);
+ AlertEntry aEntry = getHeadsUpEntry(a.key);
+ AlertEntry bEntry = getHeadsUpEntry(b.key);
if (aEntry == null || bEntry == null) {
return aEntry == null ? 1 : -1;
}
@@ -438,21 +331,18 @@
* until it's collapsed again.
*/
public void setExpanded(@NonNull NotificationData.Entry entry, boolean expanded) {
- HeadsUpManager.HeadsUpEntry headsUpEntry = mHeadsUpEntries.get(entry.key);
+ HeadsUpEntry headsUpEntry = getHeadsUpEntry(entry.key);
if (headsUpEntry != null && entry.row.isPinned()) {
- headsUpEntry.expanded(expanded);
+ headsUpEntry.setExpanded(expanded);
}
}
@NonNull
- protected HeadsUpEntry createHeadsUpEntry() {
+ @Override
+ protected HeadsUpEntry createAlertEntry() {
return new HeadsUpEntry();
}
- protected void releaseHeadsUpEntry(@NonNull HeadsUpEntry entry) {
- entry.reset();
- }
-
public void onDensityOrFontScaleChanged() {
}
@@ -460,108 +350,58 @@
* This represents a notification and how long it is in a heads up mode. It also manages its
* lifecycle automatically when created.
*/
- protected class HeadsUpEntry implements Comparable<HeadsUpEntry> {
- @Nullable public NotificationData.Entry entry;
- public long postTime;
+ protected class HeadsUpEntry extends AlertEntry {
public boolean remoteInputActive;
- public long earliestRemovaltime;
- public boolean expanded;
+ protected boolean expanded;
- @Nullable private Runnable mRemoveHeadsUpRunnable;
-
- public void setEntry(@Nullable final NotificationData.Entry entry) {
- setEntry(entry, null);
- }
-
- public void setEntry(@Nullable final NotificationData.Entry entry,
- @Nullable Runnable removeHeadsUpRunnable) {
- this.entry = entry;
- this.mRemoveHeadsUpRunnable = removeHeadsUpRunnable;
-
- // The actual post time will be just after the heads-up really slided in
- postTime = mClock.currentTimeMillis() + mTouchAcceptanceDelay;
- updateEntry(true /* updatePostTime */);
- }
-
- public void updateEntry(boolean updatePostTime) {
- if (DEBUG) Log.v(TAG, "updateEntry");
-
- long currentTime = mClock.currentTimeMillis();
- earliestRemovaltime = currentTime + mMinimumDisplayTime;
- if (updatePostTime) {
- postTime = Math.max(postTime, currentTime);
- }
- removeAutoRemovalCallbacks();
-
- if (!isSticky()) {
- long finishTime = postTime + mHeadsUpNotificationDecay;
- long removeDelay = Math.max(finishTime - currentTime, mMinimumDisplayTime);
- mHandler.postDelayed(mRemoveHeadsUpRunnable, removeDelay);
- }
- }
-
- private boolean isSticky() {
- return (entry.row.isPinned() && expanded)
- || remoteInputActive || hasFullScreenIntent(entry);
+ @Override
+ protected boolean isSticky() {
+ return (mEntry.row.isPinned() && expanded)
+ || remoteInputActive || hasFullScreenIntent(mEntry);
}
@Override
- public int compareTo(@NonNull HeadsUpEntry o) {
- boolean isPinned = entry.row.isPinned();
- boolean otherPinned = o.entry.row.isPinned();
+ public int compareTo(@NonNull AlertEntry alertEntry) {
+ HeadsUpEntry headsUpEntry = (HeadsUpEntry) alertEntry;
+ boolean isPinned = mEntry.row.isPinned();
+ boolean otherPinned = headsUpEntry.mEntry.row.isPinned();
if (isPinned && !otherPinned) {
return -1;
} else if (!isPinned && otherPinned) {
return 1;
}
- boolean selfFullscreen = hasFullScreenIntent(entry);
- boolean otherFullscreen = hasFullScreenIntent(o.entry);
+ boolean selfFullscreen = hasFullScreenIntent(mEntry);
+ boolean otherFullscreen = hasFullScreenIntent(headsUpEntry.mEntry);
if (selfFullscreen && !otherFullscreen) {
return -1;
} else if (!selfFullscreen && otherFullscreen) {
return 1;
}
- if (remoteInputActive && !o.remoteInputActive) {
+ if (remoteInputActive && !headsUpEntry.remoteInputActive) {
return -1;
- } else if (!remoteInputActive && o.remoteInputActive) {
+ } else if (!remoteInputActive && headsUpEntry.remoteInputActive) {
return 1;
}
- return postTime < o.postTime ? 1
- : postTime == o.postTime ? entry.key.compareTo(o.entry.key)
- : -1;
+ return super.compareTo(headsUpEntry);
}
- public void expanded(boolean expanded) {
+ public void setExpanded(boolean expanded) {
this.expanded = expanded;
}
+ @Override
public void reset() {
- entry = null;
+ super.reset();
expanded = false;
remoteInputActive = false;
- removeAutoRemovalCallbacks();
- mRemoveHeadsUpRunnable = null;
}
- public void removeAutoRemovalCallbacks() {
- if (mRemoveHeadsUpRunnable != null)
- mHandler.removeCallbacks(mRemoveHeadsUpRunnable);
- }
-
- public void removeAsSoonAsPossible() {
- if (mRemoveHeadsUpRunnable != null) {
- removeAutoRemovalCallbacks();
- mHandler.postDelayed(mRemoveHeadsUpRunnable,
- earliestRemovaltime - mClock.currentTimeMillis());
- }
- }
- }
-
- public static class Clock {
- public long currentTimeMillis() {
- return SystemClock.elapsedRealtime();
+ @Override
+ protected long calculatePostTime() {
+ // The actual post time will be just after the heads-up really slided in
+ return super.calculatePostTime() + mTouchAcceptanceDelay;
}
}
}
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/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 8dbdd21..cf39404 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -979,7 +979,7 @@
private SubscriptionInfo addSignalController(int id, int simSlotIndex) {
SubscriptionInfo info = new SubscriptionInfo(id, "", simSlotIndex, "", "", 0, 0, "", 0,
- null, null, null, "");
+ null, null, null, "", false, null, null);
MobileSignalController controller = new MobileSignalController(mContext,
mConfig, mHasMobileDataFeature, mPhone, mCallbackHandler, this, info,
mSubDefaults, mReceiverHandler.getLooper());
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
index c76a4b5..dd03162 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
@@ -127,19 +127,14 @@
final int length = arr.getIndexCount();
for (int i = 0; i < length; i++) {
int attr = arr.getIndex(i);
- switch (attr) {
- case R.styleable.SmartReplyView_spacing:
- spacing = arr.getDimensionPixelSize(i, 0);
- break;
- case R.styleable.SmartReplyView_singleLineButtonPaddingHorizontal:
- singleLineButtonPaddingHorizontal = arr.getDimensionPixelSize(i, 0);
- break;
- case R.styleable.SmartReplyView_doubleLineButtonPaddingHorizontal:
- doubleLineButtonPaddingHorizontal = arr.getDimensionPixelSize(i, 0);
- break;
- case R.styleable.SmartReplyView_buttonStrokeWidth:
- strokeWidth = arr.getDimensionPixelSize(i, 0);
- break;
+ if (attr == R.styleable.SmartReplyView_spacing) {
+ spacing = arr.getDimensionPixelSize(i, 0);
+ } else if (attr == R.styleable.SmartReplyView_singleLineButtonPaddingHorizontal) {
+ singleLineButtonPaddingHorizontal = arr.getDimensionPixelSize(i, 0);
+ } else if (attr == R.styleable.SmartReplyView_doubleLineButtonPaddingHorizontal) {
+ doubleLineButtonPaddingHorizontal = arr.getDimensionPixelSize(i, 0);
+ } else if (attr == R.styleable.SmartReplyView_buttonStrokeWidth) {
+ strokeWidth = arr.getDimensionPixelSize(i, 0);
}
}
arr.recycle();
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/src/com/android/systemui/volume/SafetyWarningDialog.java b/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java
index d7c4bbf..c97095e 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/SafetyWarningDialog.java
@@ -21,11 +21,13 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.res.Resources.NotFoundException;
import android.media.AudioManager;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManager;
+
import com.android.systemui.statusbar.phone.SystemUIDialog;
abstract public class SafetyWarningDialog extends SystemUIDialog
@@ -40,12 +42,18 @@
private long mShowTime;
private boolean mNewVolumeUp;
+ private boolean mDisableOnVolumeUp;
public SafetyWarningDialog(Context context, AudioManager audioManager) {
super(context);
mContext = context;
mAudioManager = audioManager;
-
+ try {
+ mDisableOnVolumeUp = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_safe_media_disable_on_volume_up);
+ } catch (NotFoundException e) {
+ mDisableOnVolumeUp = true;
+ }
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
setShowForAllUsers(true);
setMessage(mContext.getString(com.android.internal.R.string.safe_media_volume_warning));
@@ -63,7 +71,8 @@
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && event.getRepeatCount() == 0) {
+ if (mDisableOnVolumeUp && keyCode == KeyEvent.KEYCODE_VOLUME_UP
+ && event.getRepeatCount() == 0) {
mNewVolumeUp = true;
}
return super.onKeyDown(keyCode, event);
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 02babac..13c43f7 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -1195,7 +1195,7 @@
@Override
public boolean onTouchEvent(MotionEvent event) {
- if (isShowing()) {
+ if (mShowing) {
if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
dismissH(Events.DISMISS_REASON_TOUCH_OUTSIDE);
return true;
diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk
index a4120c4..9ee5532 100644
--- a/packages/SystemUI/tests/Android.mk
+++ b/packages/SystemUI/tests/Android.mk
@@ -30,37 +30,17 @@
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
- $(call all-Iaidl-files-under, src) \
- $(call all-java-files-under, ../src)
+ $(call all-Iaidl-files-under, src)
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \
- frameworks/base/packages/SystemUI/res \
- frameworks/base/packages/SystemUI/res-keyguard \
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_STATIC_ANDROID_LIBRARIES := \
- SystemUIPluginLib \
- SystemUISharedLib \
- androidx.car_car \
- androidx.legacy_legacy-support-v4 \
- androidx.recyclerview_recyclerview \
- androidx.preference_preference \
- androidx.appcompat_appcompat \
- androidx.mediarouter_mediarouter \
- androidx.palette_palette \
- androidx.legacy_legacy-preference-v14 \
- androidx.leanback_leanback \
- androidx.slice_slice-core \
- androidx.slice_slice-view \
- androidx.slice_slice-builders \
- androidx.arch.core_core-runtime \
- androidx.lifecycle_lifecycle-extensions \
+ SystemUI-core
LOCAL_STATIC_JAVA_LIBRARIES := \
metrics-helper-lib \
android-support-test \
mockito-target-inline-minus-junit4 \
- SystemUI-proto \
- SystemUI-tags \
testables \
truth-prebuilt \
@@ -70,7 +50,6 @@
libdexmakerjvmtiagent \
libmultiplejvmtiagentsinterferenceagent
-
LOCAL_JAVA_LIBRARIES := \
android.test.runner \
telephony-common \
@@ -112,8 +91,6 @@
LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.systemui.*
LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := com.android.systemui.tests.*,$(jacoco_exclude)
-include frameworks/base/packages/SettingsLib/common.mk
-
ifeq ($(EXCLUDE_SYSTEMUI_TESTS),)
include $(BUILD_PACKAGE)
endif
diff --git a/packages/SystemUI/tests/AndroidManifest.xml b/packages/SystemUI/tests/AndroidManifest.xml
index 1be8322..64f96da 100644
--- a/packages/SystemUI/tests/AndroidManifest.xml
+++ b/packages/SystemUI/tests/AndroidManifest.xml
@@ -15,6 +15,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
package="com.android.systemui.tests">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
@@ -49,6 +51,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" />
@@ -63,6 +66,25 @@
<action android:name="com.android.systemui.action.TEST_ACTION" />
</intent-filter>
</receiver>
+
+ <provider
+ android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
+ tools:replace="android:authorities"
+ android:authorities="${applicationId}.lifecycle-tests"
+ android:exported="false"
+ android:multiprocess="true" />
+ <provider android:name="com.android.systemui.keyguard.KeyguardSliceProvider"
+ android:authorities="com.android.systemui.test.keyguard.disabled"
+ android:enabled="false"
+ tools:replace="android:authorities"
+ tools:node="remove" />
+
+ <provider
+ android:name="androidx.core.content.FileProvider"
+ android:authorities="com.android.systemui.test.fileprovider"
+ android:exported="false"
+ tools:replace="android:authorities"
+ android:grantUriPermissions="true" />
</application>
<instrumentation android:name="android.testing.TestableInstrumentation"
diff --git a/packages/SystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java b/packages/SystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
index 6792bc0..7f83ed6 100644
--- a/packages/SystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
+++ b/packages/SystemUI/tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java
@@ -19,6 +19,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
+import android.content.pm.PackageManager;
import android.support.test.filters.LargeTest;
import android.support.test.filters.MediumTest;
import android.support.test.filters.SmallTest;
@@ -115,6 +116,13 @@
filter.add(new ExternalClassNameFilter());
filter.add(s -> s.startsWith("com.android.systemui")
|| s.startsWith("com.android.keyguard"));
+
+
+ if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
+ // If it's not automotive target, exclude automotive classes from the test.
+ excludeAutomotiveClasses(filter);
+ }
+
try {
return scanner.getClassPathEntries(filter);
} catch (IOException e) {
@@ -123,6 +131,13 @@
return Collections.emptyList();
}
+ private void excludeAutomotiveClasses(ChainedClassNameFilter filter) {
+ // Modifies the passed in filter.
+ filter.add(s -> !s.startsWith("com.android.systemui.statusbar.car."));
+ filter.add(s -> !s.startsWith("com.android.systemui.qs.car."));
+ filter.add(s -> !s.startsWith("com.android.systemui.car."));
+ }
+
private String getClsStr() {
return TextUtils.join(",", Arrays.asList(BASE_CLS_WHITELIST)
.stream().map(cls -> cls.getSimpleName()).toArray());
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java
new file mode 100644
index 0000000..e6e4857
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java
@@ -0,0 +1,169 @@
+/*
+ * 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.keyguard;
+
+import static android.view.View.GONE;
+import static android.view.View.VISIBLE;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+import android.graphics.Color;
+import android.graphics.Paint.Style;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper.RunWithLooper;
+import android.text.TextPaint;
+import android.view.LayoutInflater;
+import android.view.ViewGroup;
+import android.widget.TextClock;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.ClockPlugin;
+import com.android.systemui.plugins.PluginListener;
+import com.android.systemui.plugins.PluginManager;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@SmallTest
+@RunWithLooper(setAsMainLooper = true)
+@RunWith(AndroidTestingRunner.class)
+public class KeyguardClockSwitchTest extends SysuiTestCase {
+ private PluginManager mPluginManager;
+
+ @Mock
+ TextClock mClockView;
+ @InjectMocks
+ KeyguardClockSwitch mKeyguardClockSwitch;
+
+ @Before
+ public void setUp() {
+ mPluginManager = mDependency.injectMockDependency(PluginManager.class);
+ LayoutInflater layoutInflater = LayoutInflater.from(getContext());
+ mKeyguardClockSwitch =
+ (KeyguardClockSwitch) layoutInflater.inflate(R.layout.keyguard_clock_switch, null);
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void onAttachToWindow_addPluginListener() {
+ mKeyguardClockSwitch.onAttachedToWindow();
+
+ ArgumentCaptor<PluginListener> listener = ArgumentCaptor.forClass(PluginListener.class);
+ verify(mPluginManager).addPluginListener(listener.capture(), eq(ClockPlugin.class));
+ }
+
+ @Test
+ public void onDetachToWindow_removePluginListener() {
+ mKeyguardClockSwitch.onDetachedFromWindow();
+
+ ArgumentCaptor<PluginListener> listener = ArgumentCaptor.forClass(PluginListener.class);
+ verify(mPluginManager).removePluginListener(listener.capture());
+ }
+
+ @Test
+ public void onPluginConnected_showPluginClock() {
+ ClockPlugin plugin = mock(ClockPlugin.class);
+ TextClock pluginView = new TextClock(getContext());
+ when(plugin.getView()).thenReturn(pluginView);
+ TextPaint paint = mock(TextPaint.class);
+ doReturn(paint).when(mClockView).getPaint();
+ PluginListener listener = mKeyguardClockSwitch.getClockPluginListener();
+
+ listener.onPluginConnected(plugin, null);
+
+ verify(mClockView).setVisibility(GONE);
+ assertThat(plugin.getView().getParent()).isEqualTo(mKeyguardClockSwitch);
+ }
+
+ @Test
+ public void onPluginDisconnected_showDefaultClock() {
+ ClockPlugin plugin = mock(ClockPlugin.class);
+ TextClock pluginView = new TextClock(getContext());
+ when(plugin.getView()).thenReturn(pluginView);
+ mClockView.setVisibility(GONE);
+ mKeyguardClockSwitch.addView(plugin.getView(), -1,
+ new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT));
+ PluginListener listener = mKeyguardClockSwitch.getClockPluginListener();
+
+ listener.onPluginDisconnected(plugin);
+
+ verify(mClockView).setVisibility(VISIBLE);
+ assertThat(plugin.getView().getParent()).isNull();
+ }
+
+ @Test
+ public void setTextColor_defaultClockSetTextColor() {
+ mKeyguardClockSwitch.setTextColor(Color.YELLOW);
+
+ verify(mClockView).setTextColor(Color.YELLOW);
+ }
+
+ @Test
+ public void setTextColor_pluginClockSetTextColor() {
+ ClockPlugin plugin = mock(ClockPlugin.class);
+ TextClock pluginView = new TextClock(getContext());
+ when(plugin.getView()).thenReturn(pluginView);
+ TextPaint paint = mock(TextPaint.class);
+ doReturn(paint).when(mClockView).getPaint();
+ PluginListener listener = mKeyguardClockSwitch.getClockPluginListener();
+ listener.onPluginConnected(plugin, null);
+
+ mKeyguardClockSwitch.setTextColor(Color.WHITE);
+
+ verify(plugin).setTextColor(Color.WHITE);
+ }
+
+ @Test
+ public void setStyle_defaultClockSetStyle() {
+ TextPaint paint = mock(TextPaint.class);
+ Style style = mock(Style.class);
+ doReturn(paint).when(mClockView).getPaint();
+
+ mKeyguardClockSwitch.setStyle(style);
+
+ verify(paint).setStyle(style);
+ }
+
+ @Test
+ public void setStyle_pluginClockSetStyle() {
+ ClockPlugin plugin = mock(ClockPlugin.class);
+ TextClock pluginView = new TextClock(getContext());
+ when(plugin.getView()).thenReturn(pluginView);
+ TextPaint paint = mock(TextPaint.class);
+ doReturn(paint).when(mClockView).getPaint();
+ Style style = mock(Style.class);
+ PluginListener listener = mKeyguardClockSwitch.getClockPluginListener();
+ listener.onPluginConnected(plugin, null);
+
+ mKeyguardClockSwitch.setStyle(style);
+
+ verify(plugin).setStyle(style);
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
index d2e8371..4ec30fd 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
@@ -55,7 +55,7 @@
@Test
public void showSlice_notifiesListener() {
- ListBuilder builder = new ListBuilder(getContext(), mSliceUri);
+ ListBuilder builder = new ListBuilder(getContext(), mSliceUri, ListBuilder.INFINITY);
AtomicBoolean notified = new AtomicBoolean();
mKeyguardSliceView.setContentChangeListener(()-> notified.set(true));
mKeyguardSliceView.onChanged(builder.build());
@@ -74,13 +74,11 @@
@Test
public void hasHeader_readsSliceData() {
- ListBuilder builder = new ListBuilder(getContext(), mSliceUri);
+ ListBuilder builder = new ListBuilder(getContext(), mSliceUri, ListBuilder.INFINITY);
mKeyguardSliceView.onChanged(builder.build());
Assert.assertFalse("View should not have a header", mKeyguardSliceView.hasHeader());
- builder.setHeader((ListBuilder.HeaderBuilder headerBuilder) -> {
- headerBuilder.setTitle("header title!");
- });
+ builder.setHeader(new ListBuilder.HeaderBuilder().setTitle("header title!"));
mKeyguardSliceView.onChanged(builder.build());
Assert.assertTrue("View should have a header", mKeyguardSliceView.hasHeader());
}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java
index 1d8de2f..9e96df2 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java
@@ -22,7 +22,6 @@
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper.RunWithLooper;
import android.view.LayoutInflater;
-import android.widget.TextClock;
import com.android.systemui.SysuiTestCase;
@@ -40,7 +39,7 @@
@Mock
KeyguardSliceView mKeyguardSlice;
@Mock
- TextClock mClockView;
+ KeyguardClockSwitch mClockView;
@InjectMocks
KeyguardStatusView mKeyguardStatusView;
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..cc96917 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
@@ -21,6 +21,7 @@
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
@@ -34,8 +35,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 +63,7 @@
@SmallTest
public class ScreenDecorationsTest extends SysuiTestCase {
+ private TestableLooper mTestableLooper;
private ScreenDecorations mScreenDecorations;
private StatusBar mStatusBar;
private WindowManager mWindowManager;
@@ -71,6 +75,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 +96,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();
@@ -195,4 +227,17 @@
verify(padding).destroy();
}
+ @Test
+ public void testUpdateRoundedCorners() {
+ mContext.getOrCreateTestableResources().addOverride(
+ com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout, false);
+ mContext.getOrCreateTestableResources().addOverride(dimen.rounded_corner_radius, 20);
+
+ mScreenDecorations.start();
+ assertEquals(mScreenDecorations.mRoundedDefault, 20);
+
+ mContext.getOrCreateTestableResources().addOverride(dimen.rounded_corner_radius, 5);
+ mScreenDecorations.onConfigurationChanged(null);
+ assertEquals(mScreenDecorations.mRoundedDefault, 5);
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationUtil.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationUtil.java
index 62d80ac..f45500a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationUtil.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationUtil.java
@@ -45,12 +45,12 @@
boolean[] doneHolder = new boolean[1];
AmbientDisplayConfiguration config = mock(AmbientDisplayConfiguration.class,
noDefaultAnswer(doneHolder));
- when(config.pulseOnDoubleTapEnabled(anyInt())).thenReturn(false);
- when(config.pulseOnPickupEnabled(anyInt())).thenReturn(false);
+ when(config.doubleTapGestureEnabled(anyInt())).thenReturn(false);
+ when(config.pickupGestureEnabled(anyInt())).thenReturn(false);
when(config.pulseOnNotificationEnabled(anyInt())).thenReturn(true);
when(config.doubleTapSensorType()).thenReturn(null);
- when(config.pulseOnPickupAvailable()).thenReturn(false);
+ when(config.dozePickupSensorAvailable()).thenReturn(false);
doneHolder[0] = true;
return config;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
index 46e2bfb..a26b1b5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
@@ -137,7 +137,8 @@
@Test
public void addZenMode_addedToSlice() {
- ListBuilder listBuilder = spy(new ListBuilder(getContext(), mProvider.getUri()));
+ ListBuilder listBuilder = spy(new ListBuilder(getContext(), mProvider.getUri(),
+ ListBuilder.INFINITY));
mProvider.addZenMode(listBuilder);
verify(listBuilder, never()).addRow(any(ListBuilder.RowBuilder.class));
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/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java
new file mode 100644
index 0000000..f04a115
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/AlertingNotificationManagerTest.java
@@ -0,0 +1,176 @@
+/*
+ * 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.statusbar;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import static org.junit.Assert.assertEquals;
+
+import android.app.ActivityManager;
+import android.app.Notification;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.UserHandle;
+import android.service.notification.StatusBarNotification;
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.AlertingNotificationManager;
+import com.android.systemui.statusbar.notification.NotificationData;
+import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
+
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+public class AlertingNotificationManagerTest extends SysuiTestCase {
+ @Rule
+ public MockitoRule rule = MockitoJUnit.rule();
+
+ private static final String TEST_PACKAGE_NAME = "test";
+ private static final int TEST_UID = 0;
+
+ private static final int TEST_MINIMUM_DISPLAY_TIME = 200;
+ private static final int TEST_AUTO_DISMISS_TIME = 500;
+ // Number of notifications to use in tests requiring multiple notifications
+ private static final int TEST_NUM_NOTIFICATIONS = 4;
+ private static final int TEST_TIMEOUT_TIME = 10000;
+ private final Runnable TEST_TIMEOUT_RUNNABLE = () -> mTimedOut = true;
+
+ private AlertingNotificationManager mAlertingNotificationManager;
+
+ protected NotificationData.Entry mEntry;
+ protected Handler mTestHandler;
+ private StatusBarNotification mSbn;
+ private boolean mTimedOut = false;
+
+ @Mock protected ExpandableNotificationRow mRow;
+
+ private final class TestableAlertingNotificationManager extends AlertingNotificationManager {
+ private TestableAlertingNotificationManager() {
+ mMinimumDisplayTime = TEST_MINIMUM_DISPLAY_TIME;
+ mAutoDismissNotificationDecay = TEST_AUTO_DISMISS_TIME;
+ mHandler = mTestHandler;
+ }
+
+ @Override
+ protected void onAlertEntryAdded(AlertEntry alertEntry) {}
+
+ @Override
+ protected void onAlertEntryRemoved(AlertEntry alertEntry) {}
+ }
+
+ protected AlertingNotificationManager createAlertingNotificationManager() {
+ return new TestableAlertingNotificationManager();
+ }
+
+ private StatusBarNotification createNewNotification(int id) {
+ Notification.Builder n = new Notification.Builder(mContext, "")
+ .setSmallIcon(R.drawable.ic_person)
+ .setContentTitle("Title")
+ .setContentText("Text");
+ return new StatusBarNotification(
+ TEST_PACKAGE_NAME /* pkg */,
+ TEST_PACKAGE_NAME,
+ id,
+ null /* tag */,
+ TEST_UID,
+ 0 /* initialPid */,
+ n.build(),
+ new UserHandle(ActivityManager.getCurrentUser()),
+ null /* overrideGroupKey */,
+ 0 /* postTime */);
+ }
+
+ @Before
+ public void setUp() {
+ mTestHandler = Handler.createAsync(Looper.myLooper());
+ mSbn = createNewNotification(0 /* id */);
+ mEntry = new NotificationData.Entry(mSbn);
+ mEntry.row = mRow;
+
+ mAlertingNotificationManager = createAlertingNotificationManager();
+ }
+
+ @Test
+ public void testShowNotification_addsEntry() {
+ mAlertingNotificationManager.showNotification(mEntry);
+
+ assertTrue(mAlertingNotificationManager.contains(mEntry.key));
+ assertTrue(mAlertingNotificationManager.hasNotifications());
+ assertEquals(mEntry, mAlertingNotificationManager.getEntry(mEntry.key));
+ }
+
+ @Test
+ public void testShowNotification_autoDismisses() {
+ mAlertingNotificationManager.showNotification(mEntry);
+ mTestHandler.postDelayed(TEST_TIMEOUT_RUNNABLE, TEST_TIMEOUT_TIME);
+
+ // Wait for remove runnable and then process it immediately
+ TestableLooper.get(this).processMessages(1);
+
+ assertFalse("Test timed out", mTimedOut);
+ assertFalse(mAlertingNotificationManager.contains(mEntry.key));
+ }
+
+ @Test
+ public void testRemoveNotification_removeDeferred() {
+ mAlertingNotificationManager.showNotification(mEntry);
+
+ // Try to remove but defer, since the notification has not been shown long enough.
+ mAlertingNotificationManager.removeNotification(mEntry.key, false /* releaseImmediately */);
+
+ assertTrue(mAlertingNotificationManager.contains(mEntry.key));
+ }
+
+ @Test
+ public void testRemoveNotification_forceRemove() {
+ mAlertingNotificationManager.showNotification(mEntry);
+
+ //Remove forcibly with releaseImmediately = true.
+ mAlertingNotificationManager.removeNotification(mEntry.key, true /* releaseImmediately */);
+
+ assertFalse(mAlertingNotificationManager.contains(mEntry.key));
+ }
+
+ @Test
+ public void testReleaseAllImmediately() {
+ for (int i = 0; i < TEST_NUM_NOTIFICATIONS; i++) {
+ StatusBarNotification sbn = createNewNotification(i);
+ NotificationData.Entry entry = new NotificationData.Entry(sbn);
+ entry.row = mRow;
+ mAlertingNotificationManager.showNotification(entry);
+ }
+
+ mAlertingNotificationManager.releaseAllImmediately();
+
+ assertEquals(0, mAlertingNotificationManager.getAllEntries().count());
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java
index 9121473..8129b01 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java
@@ -33,7 +33,7 @@
import com.android.systemui.statusbar.notification.row.NotificationInfo;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
-import com.android.systemui.statusbar.phone.StatusBarWindowManager;
+import com.android.systemui.statusbar.phone.StatusBarWindowController;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import org.junit.Before;
@@ -96,6 +96,6 @@
viewHierarchyManager.setUpWithPresenter(mPresenter, entryManager, mListContainer);
notificationListener.setUpWithPresenter(mPresenter, entryManager);
- assertFalse(mDependency.hasInstantiatedDependency(StatusBarWindowManager.class));
+ assertFalse(mDependency.hasInstantiatedDependency(StatusBarWindowController.class));
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java
index e56ccef..676cb61 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java
@@ -286,6 +286,7 @@
any(NotificationInfo.OnSettingsClickListener.class),
any(NotificationInfo.OnAppSettingsClickListener.class),
eq(false),
+ eq(false),
eq(true) /* isForBlockingHelper */,
eq(true) /* isUserSentimentNegative */);
}
@@ -312,6 +313,35 @@
any(NotificationInfo.OnSettingsClickListener.class),
any(NotificationInfo.OnAppSettingsClickListener.class),
eq(false),
+ eq(false),
+ eq(false) /* isForBlockingHelper */,
+ eq(true) /* isUserSentimentNegative */);
+ }
+
+ @Test
+ public void testInitializeNotificationInfoView_PassesAlongProvisionedState() throws Exception {
+ NotificationInfo notificationInfoView = mock(NotificationInfo.class);
+ ExpandableNotificationRow row = spy(mHelper.createRow());
+ row.setBlockingHelperShowing(false);
+ row.getEntry().userSentiment = USER_SENTIMENT_NEGATIVE;
+ when(row.getIsNonblockable()).thenReturn(false);
+ StatusBarNotification statusBarNotification = row.getStatusBarNotification();
+ when(mPresenter.isDeviceProvisioned()).thenReturn(true);
+
+ mGutsManager.initializeNotificationInfo(row, notificationInfoView);
+
+ verify(notificationInfoView).bindNotification(
+ any(PackageManager.class),
+ any(INotificationManager.class),
+ eq(statusBarNotification.getPackageName()),
+ any(NotificationChannel.class),
+ anyInt(),
+ eq(statusBarNotification),
+ any(NotificationInfo.CheckSaveListener.class),
+ any(NotificationInfo.OnSettingsClickListener.class),
+ any(NotificationInfo.OnAppSettingsClickListener.class),
+ eq(true),
+ eq(false),
eq(false) /* isForBlockingHelper */,
eq(true) /* isUserSentimentNegative */);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationInfoTest.java
index 5ce53cf..c236fbe 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationInfoTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationInfoTest.java
@@ -167,7 +167,7 @@
public void testBindNotification_SetsTextApplicationName() throws Exception {
when(mMockPackageManager.getApplicationLabel(any())).thenReturn("App Name");
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final TextView textView = mNotificationInfo.findViewById(R.id.pkgname);
assertTrue(textView.getText().toString().contains("App Name"));
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
@@ -179,7 +179,7 @@
when(mMockPackageManager.getApplicationIcon(any(ApplicationInfo.class)))
.thenReturn(iconDrawable);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final ImageView iconView = mNotificationInfo.findViewById(R.id.pkgicon);
assertEquals(iconDrawable, iconView.getDrawable());
}
@@ -187,7 +187,7 @@
@Test
public void testBindNotification_GroupNameHiddenIfNoGroup() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final TextView groupNameView = mNotificationInfo.findViewById(R.id.group_name);
assertEquals(GONE, groupNameView.getVisibility());
final TextView groupDividerView = mNotificationInfo.findViewById(R.id.pkg_group_divider);
@@ -203,7 +203,7 @@
eq("test_group_id"), eq(TEST_PACKAGE_NAME), eq(TEST_UID)))
.thenReturn(notificationChannelGroup);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final TextView groupNameView = mNotificationInfo.findViewById(R.id.group_name);
assertEquals(View.VISIBLE, groupNameView.getVisibility());
assertEquals("Test Group Name", groupNameView.getText());
@@ -214,7 +214,7 @@
@Test
public void testBindNotification_SetsTextChannelName() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final TextView textView = mNotificationInfo.findViewById(R.id.channel_name);
assertEquals(TEST_CHANNEL_NAME, textView.getText());
}
@@ -222,7 +222,8 @@
@Test
public void testBindNotification_DefaultChannelDoesNotUseChannelName() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mDefaultNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mDefaultNotificationChannel, 1, mSbn, null, null, null, true,
+ false);
final TextView textView = mNotificationInfo.findViewById(R.id.channel_name);
assertEquals(GONE, textView.getVisibility());
}
@@ -234,7 +235,8 @@
when(mMockINotificationManager.getNumNotificationChannelsForPackage(
eq(TEST_PACKAGE_NAME), eq(TEST_UID), anyBoolean())).thenReturn(10);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mDefaultNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mDefaultNotificationChannel, 1, mSbn, null, null, null, true,
+ false);
final TextView textView = mNotificationInfo.findViewById(R.id.channel_name);
assertEquals(VISIBLE, textView.getVisibility());
}
@@ -242,7 +244,7 @@
@Test
public void testBindNotification_UnblockablePackageUsesChannelName() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
final TextView textView = mNotificationInfo.findViewById(R.id.channel_name);
assertEquals(VISIBLE, textView.getVisibility());
}
@@ -250,7 +252,7 @@
@Test
public void testBindNotification_BlockButton() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final View block = mNotificationInfo.findViewById(R.id.block);
final View minimize = mNotificationInfo.findViewById(R.id.minimize);
assertEquals(VISIBLE, block.getVisibility());
@@ -261,7 +263,7 @@
public void testBindNotification_MinButton() throws Exception {
mSbn.getNotification().flags = Notification.FLAG_FOREGROUND_SERVICE;
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
final View block = mNotificationInfo.findViewById(R.id.block);
final View minimize = mNotificationInfo.findViewById(R.id.minimize);
assertEquals(GONE, block.getVisibility());
@@ -276,7 +278,7 @@
(View v, NotificationChannel c, int appUid) -> {
assertEquals(mNotificationChannel, c);
latch.countDown();
- }, null, false);
+ }, null, true, false);
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
settingsButton.performClick();
@@ -287,7 +289,19 @@
@Test
public void testBindNotification_SettingsButtonInvisibleWhenNoClickListener() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
+ final View settingsButton = mNotificationInfo.findViewById(R.id.info);
+ assertTrue(settingsButton.getVisibility() != View.VISIBLE);
+ }
+
+ @Test
+ public void testBindNotification_SettingsButtonInvisibleWhenDeviceUnprovisioned()
+ throws Exception {
+ mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null,
+ (View v, NotificationChannel c, int appUid) -> {
+ assertEquals(mNotificationChannel, c);
+ }, null, false, false);
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
assertTrue(settingsButton.getVisibility() != View.VISIBLE);
}
@@ -295,11 +309,11 @@
@Test
public void testBindNotification_SettingsButtonReappearsAfterSecondBind() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null,
(View v, NotificationChannel c, int appUid) -> {
- }, null, false);
+ }, null, true, false);
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
assertEquals(View.VISIBLE, settingsButton.getVisibility());
}
@@ -307,7 +321,7 @@
@Test
public void testLogBlockingHelperCounter_doesntLogForNormalGutsView() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.logBlockingHelperCounter("HowCanNotifsBeRealIfAppsArent");
verify(mMetricsLogger, times(0)).count(anyString(), anyInt());
}
@@ -316,7 +330,7 @@
public void testLogBlockingHelperCounter_logsForBlockingHelper() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false, true,
- true);
+ true, true);
mNotificationInfo.logBlockingHelperCounter("HowCanNotifsBeRealIfAppsArent");
verify(mMetricsLogger, times(1)).count(anyString(), anyInt());
}
@@ -329,7 +343,7 @@
(View v, NotificationChannel c, int appUid) -> {
assertEquals(null, c);
latch.countDown();
- }, null, true);
+ }, null, true, true);
mNotificationInfo.findViewById(R.id.info).performClick();
// Verify that listener was triggered.
@@ -342,7 +356,7 @@
throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, MULTIPLE_CHANNEL_COUNT, mSbn, null, null,
- null, true);
+ null, true, true);
final TextView channelNameView =
mNotificationInfo.findViewById(R.id.channel_name);
assertEquals(GONE, channelNameView.getVisibility());
@@ -353,7 +367,7 @@
public void testStopInvisibleIfBundleFromDifferentChannels() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, MULTIPLE_CHANNEL_COUNT, mSbn, null, null,
- null, true);
+ null, true, true);
final TextView blockView = mNotificationInfo.findViewById(R.id.block);
assertEquals(GONE, blockView.getVisibility());
}
@@ -362,7 +376,7 @@
public void testbindNotification_BlockingHelper() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false, false,
- true);
+ true, true);
final TextView view = mNotificationInfo.findViewById(R.id.block_prompt);
assertEquals(View.VISIBLE, view.getVisibility());
assertEquals(mContext.getString(R.string.inline_blocking_helper), view.getText());
@@ -371,7 +385,7 @@
@Test
public void testbindNotification_UnblockableTextVisibleWhenAppUnblockable() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
final TextView view = mNotificationInfo.findViewById(R.id.block_prompt);
assertEquals(View.VISIBLE, view.getVisibility());
assertEquals(mContext.getString(R.string.notification_unblockable_desc),
@@ -381,7 +395,7 @@
@Test
public void testBindNotification_DoesNotUpdateNotificationChannel() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mTestableLooper.processAllMessages();
verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
anyString(), eq(TEST_UID), any());
@@ -391,7 +405,7 @@
public void testDoesNotUpdateNotificationChannelAfterImportanceChanged() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.findViewById(R.id.block).performClick();
mTestableLooper.processAllMessages();
@@ -404,7 +418,7 @@
throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.findViewById(R.id.minimize).performClick();
mTestableLooper.processAllMessages();
@@ -417,7 +431,7 @@
throws Exception {
int originalImportance = mNotificationChannel.getImportance();
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.handleCloseControls(true, false);
mTestableLooper.processAllMessages();
@@ -431,7 +445,7 @@
throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_UNSPECIFIED);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.handleCloseControls(true, false);
@@ -449,7 +463,7 @@
TEST_PACKAGE_NAME, mNotificationChannel /* notificationChannel */,
10 /* numUniqueChannelsInRow */, mSbn, null /* checkSaveListener */,
null /* onSettingsClick */, null /* onAppSettingsClick */ ,
- false /* isNonblockable */);
+ true, false /* isNonblockable */);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -470,7 +484,7 @@
TEST_PACKAGE_NAME, mNotificationChannel /* notificationChannel */,
10 /* numUniqueChannelsInRow */, mSbn, null /* checkSaveListener */,
null /* onSettingsClick */, null /* onAppSettingsClick */ ,
- false /* isNonblockable */);
+ true, false /* isNonblockable */);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -489,6 +503,7 @@
TEST_PACKAGE_NAME, mNotificationChannel /* notificationChannel */,
10 /* numUniqueChannelsInRow */, mSbn, null /* checkSaveListener */,
null /* onSettingsClick */, null /* onAppSettingsClick */ ,
+ true /* provisioned */,
false /* isNonblockable */, true /* isForBlockingHelper */,
true /* isUserSentimentNegative */);
@@ -516,7 +531,7 @@
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel /* notificationChannel */,
10 /* numUniqueChannelsInRow */, mSbn, listener /* checkSaveListener */,
- null /* onSettingsClick */, null /* onAppSettingsClick */ ,
+ null /* onSettingsClick */, null /* onAppSettingsClick */ , true /* provisioned */,
false /* isNonblockable */, true /* isForBlockingHelper */,
true /* isUserSentimentNegative */);
@@ -546,7 +561,7 @@
10 /* numUniqueChannelsInRow */, mSbn, listener /* checkSaveListener */,
null /* onSettingsClick */, null /* onAppSettingsClick */ ,
false /* isNonblockable */, true /* isForBlockingHelper */,
- true /* isUserSentimentNegative */);
+ true, true /* isUserSentimentNegative */);
mNotificationInfo.handleCloseControls(true /* save */, false /* force */);
@@ -562,7 +577,8 @@
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel /* notificationChannel */,
10 /* numUniqueChannelsInRow */, mSbn, listener /* checkSaveListener */,
- null /* onSettingsClick */, null /* onAppSettingsClick */ ,
+ null /* onSettingsClick */, null /* onAppSettingsClick */,
+ true /* provisioned */,
false /* isNonblockable */, true /* isForBlockingHelper */,
true /* isUserSentimentNegative */);
@@ -588,6 +604,7 @@
null /* onAppSettingsClick */,
false /* isNonblockable */,
true /* isForBlockingHelper */,
+ true,
false /* isUserSentimentNegative */);
NotificationGuts guts = mock(NotificationGuts.class);
doCallRealMethod().when(guts).closeControls(anyInt(), anyInt(), anyBoolean(), anyBoolean());
@@ -602,7 +619,7 @@
public void testNonBlockableAppDoesNotBecomeBlocked() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -615,7 +632,7 @@
public void testBlockChangedCallsUpdateNotificationChannel() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -644,6 +661,7 @@
null /* checkSaveListener */,
null /* onSettingsClick */,
null /* onAppSettingsClick */,
+ true /*provisioned */,
false /* isNonblockable */,
true /* isForBlockingHelper */,
true /* isUserSentimentNegative */);
@@ -667,7 +685,7 @@
public void testNonBlockableAppDoesNotBecomeMin() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.minimize).performClick();
waitForUndoButton();
@@ -681,7 +699,7 @@
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mSbn.getNotification().flags = Notification.FLAG_FOREGROUND_SERVICE;
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.findViewById(R.id.minimize).performClick();
waitForUndoButton();
@@ -701,7 +719,7 @@
public void testKeepUpdatesNotificationChannel() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.handleCloseControls(true, false);
@@ -718,7 +736,7 @@
public void testBlockUndoDoesNotBlockNotificationChannel() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -739,7 +757,7 @@
public void testMinUndoDoesNotMinNotificationChannel() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, false);
mNotificationInfo.findViewById(R.id.minimize).performClick();
waitForUndoButton();
@@ -760,7 +778,7 @@
public void testCloseControlsDoesNotUpdateiMinIfSaveIsFalse() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.minimize).performClick();
waitForUndoButton();
@@ -775,7 +793,7 @@
public void testCloseControlsDoesNotUpdateIfSaveIsFalse() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -792,7 +810,7 @@
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn,
(Runnable saveImportance, StatusBarNotification sbn) -> {
- }, null, null, true);
+ }, null, null, true, true);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -810,7 +828,7 @@
TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn,
(Runnable saveImportance, StatusBarNotification sbn) -> {
saveImportance.run();
- }, null, null, false);
+ }, null, null, true, false);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -842,7 +860,7 @@
TEST_PACKAGE_NAME, mNotificationChannel, 1, sbn, null, null,
(View v, Intent intent) -> {
latch.countDown();
- }, false);
+ }, true, false);
final TextView settingsLink = mNotificationInfo.findViewById(R.id.app_settings);
assertEquals(View.VISIBLE, settingsLink.getVisibility());
settingsLink.performClick();
@@ -870,7 +888,7 @@
TEST_PACKAGE_NAME, mNotificationChannel, MULTIPLE_CHANNEL_COUNT, sbn, null, null,
(View v, Intent intent) -> {
latch.countDown();
- }, false);
+ }, true, false);
final TextView settingsLink = mNotificationInfo.findViewById(R.id.app_settings);
assertEquals(View.VISIBLE, settingsLink.getVisibility());
settingsLink.performClick();
@@ -889,7 +907,7 @@
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, MULTIPLE_CHANNEL_COUNT, sbn, null, null,
- null, false);
+ null, true, false);
final TextView settingsLink = mNotificationInfo.findViewById(R.id.app_settings);
assertEquals(GONE, settingsLink.getVisibility());
}
@@ -909,7 +927,7 @@
0, null, 0, 0, n, UserHandle.CURRENT, null, 0);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, sbn, null, null, null, false);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, sbn, null, null, null, true, false);
final TextView settingsLink = mNotificationInfo.findViewById(R.id.app_settings);
assertEquals(GONE, settingsLink.getVisibility());
}
@@ -932,7 +950,7 @@
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, 1, sbn, null, null, null, false, true,
- true);
+ true, true);
final TextView settingsLink = mNotificationInfo.findViewById(R.id.app_settings);
assertEquals(GONE, settingsLink.getVisibility());
}
@@ -948,7 +966,7 @@
mSbn.getNotification().flags = Notification.FLAG_FOREGROUND_SERVICE;
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.minimize).performClick();
waitForUndoButton();
@@ -960,7 +978,7 @@
public void testUndoText_block() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -972,7 +990,7 @@
public void testNoHeaderOnConfirmation() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
@@ -983,7 +1001,7 @@
public void testHeaderOnUndo() throws Exception {
mNotificationChannel.setImportance(IMPORTANCE_LOW);
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
- TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true);
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, true, true);
mNotificationInfo.findViewById(R.id.block).performClick();
waitForUndoButton();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhoneTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhoneTest.java
index 1837909..bdf7cd3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhoneTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhoneTest.java
@@ -16,22 +16,13 @@
package com.android.systemui.statusbar.phone;
-import android.app.ActivityManager;
-import android.app.Instrumentation;
-import android.app.Notification;
-import android.os.UserHandle;
import android.view.View;
-import android.service.notification.StatusBarNotification;
-import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
-import com.android.systemui.R;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
-import com.android.systemui.statusbar.notification.NotificationData;
-import com.android.systemui.statusbar.StatusBarIconView;
+import com.android.systemui.statusbar.AlertingNotificationManager;
+import com.android.systemui.statusbar.AlertingNotificationManagerTest;
import com.android.systemui.statusbar.notification.VisualStabilityManager;
import org.junit.Before;
@@ -42,175 +33,54 @@
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.assertFalse;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@SmallTest
@RunWith(AndroidTestingRunner.class)
@TestableLooper.RunWithLooper
-public class HeadsUpManagerPhoneTest extends SysuiTestCase {
+public class HeadsUpManagerPhoneTest extends AlertingNotificationManagerTest {
@Rule public MockitoRule rule = MockitoJUnit.rule();
- private static final String TEST_PACKAGE_NAME = "test";
- private static final int TEST_UID = 0;
-
private HeadsUpManagerPhone mHeadsUpManager;
- private NotificationData.Entry mEntry;
- private StatusBarNotification mSbn;
-
@Mock private NotificationGroupManager mGroupManager;
@Mock private View mStatusBarWindowView;
- @Mock private StatusBar mBar;
- @Mock private ExpandableNotificationRow mRow;
@Mock private VisualStabilityManager mVSManager;
+ @Mock private StatusBar mBar;
+
+ protected AlertingNotificationManager createAlertingNotificationManager() {
+ return mHeadsUpManager;
+ }
@Before
public void setUp() {
when(mVSManager.isReorderingAllowed()).thenReturn(true);
-
- mHeadsUpManager = new HeadsUpManagerPhone(
- mContext, mStatusBarWindowView, mGroupManager, mBar, mVSManager);
-
- Notification.Builder n = new Notification.Builder(mContext, "")
- .setSmallIcon(R.drawable.ic_person)
- .setContentTitle("Title")
- .setContentText("Text");
- mSbn = new StatusBarNotification(TEST_PACKAGE_NAME, TEST_PACKAGE_NAME, 0, null, TEST_UID,
- 0, n.build(), new UserHandle(ActivityManager.getCurrentUser()), null, 0);
-
- mEntry = new NotificationData.Entry(mSbn);
- mEntry.row = mRow;
- mEntry.expandedIcon = mock(StatusBarIconView.class);
+ mHeadsUpManager = new HeadsUpManagerPhone(mContext, mStatusBarWindowView, mGroupManager,
+ mBar, mVSManager);
+ super.setUp();
+ mHeadsUpManager.mHandler = mTestHandler;
}
@Test
- public void testBasicOperations() {
- // Check the initial state.
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
-
- // Add a notification.
+ public void testSnooze() {
mHeadsUpManager.showNotification(mEntry);
- assertEquals(mEntry, mHeadsUpManager.getEntry(mEntry.key));
- assertEquals(mEntry, mHeadsUpManager.getTopEntry());
- assertEquals(1, mHeadsUpManager.getAllEntries().count());
- assertTrue(mHeadsUpManager.hasHeadsUpNotifications());
+ mHeadsUpManager.snooze();
- // Update the notification.
- mHeadsUpManager.updateNotification(mEntry, false);
-
- assertEquals(mEntry, mHeadsUpManager.getEntry(mEntry.key));
- assertEquals(mEntry, mHeadsUpManager.getTopEntry());
- assertEquals(1, mHeadsUpManager.getAllEntries().count());
- assertTrue(mHeadsUpManager.hasHeadsUpNotifications());
-
- // Try to remove but defer, since the notification is currenlt visible on display.
- mHeadsUpManager.removeNotification(mEntry.key, false /* ignoreEarliestRemovalTime */);
-
- assertEquals(mEntry, mHeadsUpManager.getEntry(mEntry.key));
- assertEquals(mEntry, mHeadsUpManager.getTopEntry());
- assertEquals(1, mHeadsUpManager.getAllEntries().count());
- assertTrue(mHeadsUpManager.hasHeadsUpNotifications());
-
- // Remove forcibly with ignoreEarliestRemovalTime = true.
- mHeadsUpManager.removeNotification(mEntry.key, true /* ignoreEarliestRemovalTime */);
-
- // Check the initial state.
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
+ assertTrue(mHeadsUpManager.isSnoozed(mEntry.notification.getPackageName()));
}
@Test
- public void testsTimeoutRemoval() {
- mHeadsUpManager.removeMinimumDisplayTimeForTesting();
-
- // Check the initial state.
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
-
- Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
-
- // Run the code on the main thready, not to run an async operations.
- instrumentation.runOnMainSync(() -> {
- // Add a notification.
- mHeadsUpManager.showNotification(mEntry);
-
- // Ensure the head up is visible before timeout.
- assertNotNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNotNull(mHeadsUpManager.getTopEntry());
- assertEquals(1, mHeadsUpManager.getAllEntries().count());
- assertTrue(mHeadsUpManager.hasHeadsUpNotifications());
- });
- // Wait for the async operations, which removes the heads up notification.
- waitForIdleSync();
-
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
- }
-
- @Test
- public void releaseImmediately() {
- // Check the initial state.
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
-
- // Add a notification.
+ public void testSwipedOutNotification() {
mHeadsUpManager.showNotification(mEntry);
+ mHeadsUpManager.addSwipedOutNotification(mEntry.key);
- assertEquals(mEntry, mHeadsUpManager.getEntry(mEntry.key));
- assertEquals(mEntry, mHeadsUpManager.getTopEntry());
- assertEquals(1, mHeadsUpManager.getAllEntries().count());
- assertTrue(mHeadsUpManager.hasHeadsUpNotifications());
+ // Remove should succeed because the notification is swiped out
+ mHeadsUpManager.removeNotification(mEntry.key, false /* releaseImmediately */);
- // Remove but defer, since the notification is visible on display.
- mHeadsUpManager.releaseImmediately(mEntry.key);
-
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
- }
-
- @Test
- public void releaseAllImmediately() {
- // Check the initial state.
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
-
- // Add a notification.
- mHeadsUpManager.showNotification(mEntry);
-
- assertEquals(mEntry, mHeadsUpManager.getEntry(mEntry.key));
- assertEquals(mEntry, mHeadsUpManager.getTopEntry());
- assertEquals(1, mHeadsUpManager.getAllEntries().count());
- assertTrue(mHeadsUpManager.hasHeadsUpNotifications());
-
- // Remove but defer, since the notification is visible on display.
- mHeadsUpManager.releaseAllImmediately();
-
- assertNull(mHeadsUpManager.getEntry(mEntry.key));
- assertNull(mHeadsUpManager.getTopEntry());
- assertEquals(0, mHeadsUpManager.getAllEntries().count());
- assertFalse(mHeadsUpManager.hasHeadsUpNotifications());
+ assertFalse(mHeadsUpManager.contains(mEntry.key));
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NearestTouchFrameTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NearestTouchFrameTest.java
index 667a508..2423e14 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NearestTouchFrameTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NearestTouchFrameTest.java
@@ -171,6 +171,23 @@
ev.recycle();
}
+ @Test
+ public void testFurtherSelectedWhenCloserNotFocusable() {
+ View closer = mockViewAt(0, 0, 10, 10);
+ View further = mockViewAt(20, 0, 10, 10);
+ closer.setFocusable(false);
+
+ mNearestTouchFrame.addView(closer);
+ mNearestTouchFrame.addView(further);
+ mNearestTouchFrame.onMeasure(0, 0);
+
+ MotionEvent ev = MotionEvent.obtain(0, 0, 0,
+ 12 /* x */, 5 /* y */, 0);
+ mNearestTouchFrame.onTouchEvent(ev);
+ verify(further).onTouchEvent(eq(ev));
+ ev.recycle();
+ }
+
private View mockViewAt(int x, int y, int width, int height) {
View v = spy(new View(mContext));
doAnswer(invocation -> {
@@ -187,6 +204,7 @@
v.setRight(width);
v.setTop(0);
v.setBottom(height);
+ v.setFocusable(true);
return v;
}
}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 6933328..be4560b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -68,7 +68,7 @@
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
- mDependency.injectMockDependency(StatusBarWindowManager.class);
+ mDependency.injectMockDependency(StatusBarWindowController.class);
mStatusBarKeyguardViewManager = new TestableStatusBarKeyguardViewManager(getContext(),
mViewMediatorCallback, mLockPatternUtils);
mStatusBarKeyguardViewManager.registerStatusBar(mStatusBar, mContainer,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index e39238d..a90346b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -204,7 +204,7 @@
mEntryManager, mScrimController, mBiometricUnlockController,
mock(ActivityLaunchAnimator.class), mKeyguardViewMediator,
mRemoteInputManager, mock(NotificationGroupManager.class),
- mock(FalsingManager.class), mock(StatusBarWindowManager.class),
+ mock(FalsingManager.class), mock(StatusBarWindowController.class),
mock(NotificationIconAreaController.class), mock(DozeScrimController.class),
mock(NotificationShelf.class), mLockscreenUserManager,
mock(CommandQueue.class));
@@ -716,7 +716,7 @@
NotificationRemoteInputManager notificationRemoteInputManager,
NotificationGroupManager notificationGroupManager,
FalsingManager falsingManager,
- StatusBarWindowManager statusBarWindowManager,
+ StatusBarWindowController statusBarWindowController,
NotificationIconAreaController notificationIconAreaController,
DozeScrimController dozeScrimController,
NotificationShelf notificationShelf,
@@ -744,7 +744,7 @@
mRemoteInputManager = notificationRemoteInputManager;
mGroupManager = notificationGroupManager;
mFalsingManager = falsingManager;
- mStatusBarWindowManager = statusBarWindowManager;
+ mStatusBarWindowController = statusBarWindowController;
mNotificationIconAreaController = notificationIconAreaController;
mDozeScrimController = dozeScrimController;
mNotificationShelf = notificationShelf;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarWindowControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarWindowControllerTest.java
new file mode 100644
index 0000000..f8223f6
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarWindowControllerTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.statusbar.phone;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.app.IActivityManager;
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper.RunWithLooper;
+import android.view.View;
+import android.view.WindowManager;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidTestingRunner.class)
+@RunWithLooper
+@SmallTest
+public class StatusBarWindowControllerTest extends SysuiTestCase {
+
+ @Mock
+ private WindowManager mWindowManager;
+ @Mock
+ private DozeParameters mDozeParameters;
+ @Mock
+ private View mStatusBarView;
+ @Mock
+ private IActivityManager mActivityManager;
+
+ private StatusBarWindowController mStatusBarWindowController;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ when(mDozeParameters.getAlwaysOn()).thenReturn(true);
+
+ mStatusBarWindowController = new StatusBarWindowController(mContext, mWindowManager,
+ mActivityManager, mDozeParameters);
+ mStatusBarWindowController.add(mStatusBarView, 100 /* height */);
+ }
+
+ @Test
+ public void testSetDozing_hidesSystemOverlays() {
+ mStatusBarWindowController.setDozing(true);
+ ArgumentCaptor<WindowManager.LayoutParams> captor =
+ ArgumentCaptor.forClass(WindowManager.LayoutParams.class);
+ verify(mWindowManager).updateViewLayout(any(), captor.capture());
+ int flag = captor.getValue().privateFlags
+ & WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+ assertThat(flag).isNotEqualTo(0);
+
+ reset(mWindowManager);
+ mStatusBarWindowController.setDozing(false);
+ verify(mWindowManager).updateViewLayout(any(), captor.capture());
+ flag = captor.getValue().privateFlags
+ & WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+ assertThat(flag).isEqualTo(0);
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java
new file mode 100644
index 0000000..1ee7094
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java
@@ -0,0 +1,126 @@
+package com.android.systemui.statusbar.policy;
+
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.junit.Assert.fail;
+
+import android.media.MediaRouter;
+import android.media.projection.MediaProjectionInfo;
+import android.media.projection.MediaProjectionManager;
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.policy.CastController.Callback;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.junit.Test;
+
+import java.util.ConcurrentModificationException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+public class CastControllerImplTest extends SysuiTestCase {
+
+ @Mock
+ MediaRouter mMediaRouter;
+ @Mock
+ MediaProjectionManager mMediaProjectionManager;
+ @Mock
+ MediaProjectionInfo mProjection;
+
+ private CastControllerImpl mController;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext.addMockSystemService(MediaRouter.class, mMediaRouter);
+ mContext.addMockSystemService(MediaProjectionManager.class, mMediaProjectionManager);
+ when(mMediaProjectionManager.getActiveProjectionInfo()).thenReturn(mProjection);
+
+ mController = new CastControllerImpl(mContext);
+ }
+
+ @Test
+ public void testAddCallback() {
+ Callback mockCallback = mock(Callback.class);
+
+ mController.addCallback(mockCallback);
+ verify(mockCallback, times(1)).onCastDevicesChanged();
+ }
+
+ @Test
+ public void testRemoveCallback() {
+ Callback mockCallback = mock(Callback.class);
+
+ mController.addCallback(mockCallback);
+ verify(mockCallback, times(1)).onCastDevicesChanged();
+
+ mController.removeCallback(mockCallback);
+ verify(mockCallback, times(1)).onCastDevicesChanged();
+ }
+
+ @Test
+ public void testRemoveCallbackFromEmptyList() {
+ Callback mockCallback = mock(Callback.class);
+
+ mController.removeCallback(mockCallback);
+ verify(mockCallback, never()).onCastDevicesChanged();
+ }
+
+ @Test
+ public void testAddCallbackRemoveCallback_concurrently() throws InterruptedException {
+ int callbackCount = 20;
+ int numThreads = 2 * callbackCount;
+ CountDownLatch startThreadsLatch = new CountDownLatch(1);
+ CountDownLatch threadsDone = new CountDownLatch(numThreads);
+ Callback[] callbackList = new Callback[callbackCount];
+ mController.setDiscovering(true);
+ AtomicBoolean error = new AtomicBoolean(false);
+ for (int cbIndex = 0; cbIndex < callbackCount; cbIndex++) {
+ callbackList[cbIndex] = mock(Callback.class);
+ }
+ for (int i = 0; i < numThreads; i++) {
+ final Callback mCallback = callbackList[i / 2];
+ final boolean shouldAdd = (i % 2 == 0);
+ new Thread() {
+ public void run() {
+ try {
+ startThreadsLatch.await(10, TimeUnit.SECONDS);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ try {
+ if (shouldAdd) {
+ mController.addCallback(mCallback);
+ } else {
+ mController.removeCallback(mCallback);
+ }
+ mController.fireOnCastDevicesChanged();
+ } catch (ConcurrentModificationException exc) {
+ error.compareAndSet(false, true);
+ } finally {
+ threadsDone.countDown();
+ }
+ }
+ }.start();
+ }
+ startThreadsLatch.countDown();
+ threadsDone.await(10, TimeUnit.SECONDS);
+ if (error.get()) {
+ fail("Concurrent modification exception");
+ }
+ }
+}
diff --git a/packages/VpnDialogs/res/values-fr/strings.xml b/packages/VpnDialogs/res/values-fr/strings.xml
index 2b3eace..7180119 100644
--- a/packages/VpnDialogs/res/values-fr/strings.xml
+++ b/packages/VpnDialogs/res/values-fr/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">"Demande de connexion"</string>
- <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> souhaite configurer une connexion VPN qui permet de surveiller le trafic réseau. N\'acceptez que si vous faites confiance à la source. <br /> <br /> <img src=vpn_icon /> s\'affiche en haut de votre écran lorsqu\'une connexion VPN est active."</string>
+ <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> souhaite configurer une connexion VPN qui lui permet de surveiller le trafic réseau. N\'acceptez que si vous faites confiance à la source. <br /> <br /> <img src=vpn_icon /> s\'affiche en haut de votre écran lorsqu\'une connexion VPN est active."</string>
<string name="legacy_title" msgid="192936250066580964">"VPN connecté"</string>
<string name="session" msgid="6470628549473641030">"Session :"</string>
<string name="duration" msgid="3584782459928719435">"Durée :"</string>
diff --git a/packages/VpnDialogs/res/values-ru/strings.xml b/packages/VpnDialogs/res/values-ru/strings.xml
index 3b9b4b55..0543937 100644
--- a/packages/VpnDialogs/res/values-ru/strings.xml
+++ b/packages/VpnDialogs/res/values-ru/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/>Когда подключение к сети VPN активно, в верхней части экрана появляется значок <img src=vpn_icon />."</string>
+ <string name="warning" msgid="809658604548412033">"Приложение \"<xliff:g id="APP">%s</xliff:g>\" пытается подключиться к сети VPN, чтобы отслеживать трафик. Этот запрос следует принимать, только если вы доверяете источнику. <br/><br/>Когда подключение к сети VPN активно, в верхней части экрана появляется значок <img src=vpn_icon />."</string>
<string name="legacy_title" msgid="192936250066580964">"VPN-подключение установлено"</string>
<string name="session" msgid="6470628549473641030">"Сеанс:"</string>
<string name="duration" msgid="3584782459928719435">"Продолжительность:"</string>
diff --git a/packages/VpnDialogs/res/values-ta/strings.xml b/packages/VpnDialogs/res/values-ta/strings.xml
index ffaf93ae..3b4cc57 100644
--- a/packages/VpnDialogs/res/values-ta/strings.xml
+++ b/packages/VpnDialogs/res/values-ta/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">"VPN இணைப்பை அமைக்க <xliff:g id="APP">%s</xliff:g> விழைகிறது. அதன்மூலம் இது நெட்வொர்க் டிராஃபிக்கைக் கண்காணிக்கும் அனுமதியைப் பெறும். நம்பகமான மூலத்தை மட்டுமே ஏற்கவும். <br /> <br /> VPN இயக்கத்தில் உள்ளபோது திரையில் மேல் பகுதியில் <img src=vpn_icon /> தோன்றும்."</string>
+ <string name="warning" msgid="809658604548412033">"நெட்வொர்க் டிராஃபிக்கைக் கண்காணிக்க வசதியாக VPN இணைப்பை அமைக்க <xliff:g id="APP">%s</xliff:g> கோருகிறது. நம்பகமான மூலத்தை மட்டுமே ஏற்கவும். <br /> <br /> VPN இயக்கத்தில் உள்ளபோது திரையின் மேல் பகுதியில் <img src=vpn_icon /> தோன்றும்."</string>
<string name="legacy_title" msgid="192936250066580964">"VPN இணைக்கப்பட்டது"</string>
<string name="session" msgid="6470628549473641030">"அமர்வு:"</string>
<string name="duration" msgid="3584782459928719435">"காலஅளவு:"</string>
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/packages/WAPPushManager/AndroidManifest.xml b/packages/WAPPushManager/AndroidManifest.xml
index 89e9d6a..14e6e91 100644
--- a/packages/WAPPushManager/AndroidManifest.xml
+++ b/packages/WAPPushManager/AndroidManifest.xml
@@ -24,7 +24,8 @@
android:protectionLevel="signatureOrSystem" />
<original-package android:name="com.android.smspush" />
- <application>
+ <application
+ android:allowClearUserData="false">
<service android:name=".WapPushManager"
android:permission="com.android.smspush.WAPPUSH_MANAGER_BIND"
android:exported="true">
diff --git a/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
index 754ba72..b08924b 100644
--- a/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationCornerOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Corner display cutout</string>
+ <string name="display_cutout_emulation_overlay">Corner cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml
index 68c2dcb..0a106fa 100644
--- a/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationDoubleOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Double display cutout</string>
+ <string name="display_cutout_emulation_overlay">Double cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
index 4989677..0bf8330 100644
--- a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/strings.xml
@@ -18,7 +18,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Narrow display cutout</string>
+ <string name="display_cutout_emulation_overlay">Narrow cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
index 6dcbbd9..bcc7c97 100644
--- a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Tall display cutout</string>
+ <string name="display_cutout_emulation_overlay">Tall cutout</string>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
index f4b9f7e..0fcbdebb 100644
--- a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/strings.xml
@@ -16,7 +16,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay">Wide display cutout</string>
+ <string name="display_cutout_emulation_overlay">Wide cutout</string>
</resources>
diff --git a/proto/src/gnss.proto b/proto/src/gnss.proto
index 0168392..1509fc0 100644
--- a/proto/src/gnss.proto
+++ b/proto/src/gnss.proto
@@ -45,6 +45,9 @@
// Power metrics
optional PowerMetrics power_metrics = 12;
+
+ // Hardware revision (EVT, DVT, PVT etc.)
+ optional string hardware_revision = 13;
}
// Power metrics
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 02f0439..a20eece 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
@@ -2218,6 +2219,7 @@
// 1: Gesture performed is Nudge
// 2: Gesture performed is Pickup
// 4: Gesture performed is Double Tap
+ // 6: Gesture performed is Reach
ACTION_AMBIENT_GESTURE = 411;
// ---- End N Constants, all N constants go above this line ----
@@ -4083,6 +4085,8 @@
// Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
// Tag FIELD_AUTOFILL_SESSION_ID: id of the autofill session associated with this metric.
// Tag FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
+ // NOTE: starting on OS Q, it also added the following fields:
+ // FIELD_AUTOFILL_UPDATE: Whether the UI displayed "UPDATE" instead of "SAVE"
AUTOFILL_SAVE_UI = 916;
// Tag of a field for the number of saveable ids
@@ -6180,6 +6184,266 @@
// 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;
+
+ // OPEN: Settings > Add face
+ // OS: Q
+ FACE_ENROLL_PREVIEW = 1554;
+
+ // Field used to indicate whether a save request was used to update existing user data.
+ FIELD_AUTOFILL_UPDATE = 1555;
+
+ // OPEN: Settings > Network & Internet > Wi-Fi > Add network
+ // CATEGORY: SETTINGS
+ // OS: Q
+ SETTINGS_WIFI_ADD_NETWORK = 1556;
+
+ // OPEN: Settings > System > Input & Gesture > Reach up gesture
+ // OS: Q
+ SETTINGS_GESTURE_REACH = 1557;
// ---- End Q Constants, all Q constants go above this line ----
diff --git a/proto/src/wifi.proto b/proto/src/wifi.proto
index f7fcf5c..7f8989d 100644
--- a/proto/src/wifi.proto
+++ b/proto/src/wifi.proto
@@ -476,6 +476,9 @@
// Histogram of the EAP method type of all installed Passpoint profiles
repeated PasspointProfileTypeCount installed_passpoint_profile_type = 123;
+
+ // Hardware revision (EVT, DVT, PVT etc.)
+ optional string hardware_revision = 124;
}
// Information that gets logged for every WiFi connection.
@@ -811,6 +814,12 @@
// Framework changed Sta interface MAC address
TYPE_MAC_CHANGE = 17;
+
+ // Wifi is turned on
+ TYPE_WIFI_ENABLED = 18;
+
+ // Wifi is turned off
+ TYPE_WIFI_DISABLED = 19;
}
enum FrameworkDisconnectReason {
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 9c0e110..6be9550 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -701,6 +701,7 @@
public int addAccessibilityInteractionConnection(IWindow windowToken,
IAccessibilityInteractionConnection connection, String packageName,
int userId) throws RemoteException {
+ final int windowId;
synchronized (mLock) {
// We treat calls from a profile as if made by its parent as profiles
// share the accessibility state of the parent. The call below
@@ -713,7 +714,7 @@
packageName = mSecurityPolicy.resolveValidReportedPackageLocked(
packageName, UserHandle.getCallingAppId(), resolvedUserId);
- final int windowId = sNextWindowId++;
+ windowId = sNextWindowId++;
// If the window is from a process that runs across users such as
// the system UI or the system we add it to the global state that
// is shared across users.
@@ -741,8 +742,10 @@
+ " and token: " + windowToken.asBinder());
}
}
- return windowId;
}
+ WindowManagerInternal wm = LocalServices.getService(WindowManagerInternal.class);
+ wm.computeWindowsForAccessibility();
+ return windowId;
}
@Override
@@ -1564,8 +1567,9 @@
}
final long identity = Binder.clearCallingIdentity();
try {
+ final String settingValue = builder.toString();
Settings.Secure.putStringForUser(mContext.getContentResolver(),
- settingName, builder.toString(), userId);
+ settingName, TextUtils.isEmpty(settingValue) ? null : settingValue, userId);
} finally {
Binder.restoreCallingIdentity(identity);
}
diff --git a/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java b/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
index 2cae060..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) {
@@ -572,6 +578,8 @@
}
}
+ // Remove move history before send injected non-move events
+ event = MotionEvent.obtainNoHistory(event);
if (isDraggingGesture(event)) {
// Two pointers moving in the same direction within
// a given distance perform a drag.
@@ -602,6 +610,7 @@
// More than two pointers are delegated to the view hierarchy.
mCurrentState = STATE_DELEGATING;
+ event = MotionEvent.obtainNoHistory(event);
sendDownForAllNotInjectedPointers(event, policyFlags);
}
}
@@ -690,6 +699,8 @@
// The two pointers are moving either in different directions or
// no close enough => delegate the gesture to the view hierarchy.
mCurrentState = STATE_DELEGATING;
+ // Remove move history before send injected non-move events
+ event = MotionEvent.obtainNoHistory(event);
// Send an event to the end of the drag gesture.
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits,
policyFlags);
@@ -699,6 +710,7 @@
} break;
default: {
mCurrentState = STATE_DELEGATING;
+ event = MotionEvent.obtainNoHistory(event);
// Send an event to the end of the drag gesture.
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits,
policyFlags);
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java
index c9c7adc..f69b638 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetService.java
@@ -48,11 +48,6 @@
}
@Override
- public void onUnlockUser(int userHandle) {
- FgThread.getHandler().post(() -> mImpl.onUserUnlocked(userHandle));
- }
-
- @Override
public void onStopUser(int userHandle) {
mImpl.onUserStopped(userHandle);
}
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index db8ad12..b71d7a7 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -19,7 +19,6 @@
import static android.content.Context.KEYGUARD_SERVICE;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
-
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
import android.annotation.UserIdInt;
@@ -2697,7 +2696,12 @@
}
}
- void onUserUnlocked(int userId) {
+ /**
+ * This does not use the usual onUserUnlocked() listener mechanism because it is
+ * invoked at a choreographed point in the middle of the user unlock sequence,
+ * before the boot-completed broadcast is issued and the listeners notified.
+ */
+ void handleUserUnlocked(int userId) {
if (isProfileWithLockedParent(userId)) {
return;
}
@@ -2734,7 +2738,7 @@
}
}
}
- Slog.i(TAG, "Async processing of onUserUnlocked u" + userId + " took "
+ Slog.i(TAG, "Processing of handleUserUnlocked u" + userId + " took "
+ (SystemClock.elapsedRealtime() - time) + " ms");
}
@@ -4801,5 +4805,11 @@
return widgetPackages;
}
}
+
+ @Override
+ public void unlockUser(int userId) {
+ handleUserUnlocked(userId);
+ }
+
}
}
diff --git a/services/art-profile b/services/art-profile
index 24964f3..3c60eee 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
@@ -13303,7 +13303,7 @@
PLcom/android/server/notification/NotificationManagerService$10;->deleteNotificationChannel(Ljava/lang/String;Ljava/lang/String;)V
PLcom/android/server/notification/NotificationManagerService$10;->enforcePolicyAccess(ILjava/lang/String;)V
PLcom/android/server/notification/NotificationManagerService$10;->enforceSystemOrSystemUI(Ljava/lang/String;)V
-PLcom/android/server/notification/NotificationManagerService$10;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;I)V
+PLcom/android/server/notification/NotificationManagerService$10;->enqueueToast(Ljava/lang/String;Landroid/app/ITransientNotification;II)V
PLcom/android/server/notification/NotificationManagerService$10;->finishToken(Ljava/lang/String;Landroid/app/ITransientNotification;)V
PLcom/android/server/notification/NotificationManagerService$10;->getAppActiveNotifications(Ljava/lang/String;I)Landroid/content/pm/ParceledListSlice;
PLcom/android/server/notification/NotificationManagerService$10;->getBackupPayload(I)[B
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
index 0610256..5771748 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;
@@ -438,8 +438,13 @@
Slog.i(TAG, "setLogLevel(): " + level);
mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
- Settings.Global.putInt(mContext.getContentResolver(),
- Settings.Global.AUTOFILL_LOGGING_LEVEL, level);
+ final long token = Binder.clearCallingIdentity();
+ try {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.AUTOFILL_LOGGING_LEVEL, level);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
private void setLogLevelFromSettings() {
@@ -492,8 +497,13 @@
mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
Slog.i(TAG, "setMaxPartitions(): " + max);
- Settings.Global.putInt(mContext.getContentResolver(),
- Settings.Global.AUTOFILL_MAX_PARTITIONS_SIZE, max);
+ final long token = Binder.clearCallingIdentity();
+ try {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.AUTOFILL_MAX_PARTITIONS_SIZE, max);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
private void setMaxPartitionsFromSettings() {
@@ -521,8 +531,13 @@
mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
Slog.i(TAG, "setMaxVisibleDatasets(): " + max);
- Settings.Global.putInt(mContext.getContentResolver(),
- Settings.Global.AUTOFILL_MAX_VISIBLE_DATASETS, max);
+ final long token = Binder.clearCallingIdentity();
+ try {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.AUTOFILL_MAX_VISIBLE_DATASETS, max);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
private void setMaxVisibleDatasetsFromSettings() {
@@ -963,12 +978,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..5a10c1e 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;
@@ -287,6 +290,9 @@
componentNameFromApp == null ? "null"
: componentNameFromApp.flattenToShortString()));
}
+ // Flags used to start the session.
+ int flags = structure.getFlags();
+
if (mCompatMode) {
// Sanitize URL bar, if needed
final String[] urlBarIds = mService.getUrlBarResourceIdsForCompatMode(
@@ -307,12 +313,10 @@
mViewStates.put(urlBarId, viewState);
}
}
+ flags |= FillRequest.FLAG_COMPATIBILITY_MODE_REQUEST;
}
structure.sanitizeForParceling(true);
- // Flags used to start the session.
- final int flags = structure.getFlags();
-
if (mContexts == null) {
mContexts = new ArrayList<>(1);
}
@@ -329,8 +333,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 +532,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 +1436,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,21 +1457,32 @@
* - 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.
final ArrayMap<AutofillId, AutofillValue> currentValues = new ArrayMap<>();
- final ArraySet<AutofillId> allIds = new ArraySet<>();
+ // Savable (optional or required) ids that will be checked against the dataset ids.
+ final ArraySet<AutofillId> savableIds = new ArraySet<>();
final AutofillId[] requiredIds = saveInfo.getRequiredIds();
boolean allRequiredAreNotEmpty = true;
boolean atLeastOneChanged = false;
+ // If an autofilled field is changed, we need to change isUpdate to true so the proper UI is
+ // shown.
+ boolean isUpdate = false;
if (requiredIds != null) {
for (int i = 0; i < requiredIds.length; i++) {
final AutofillId id = requiredIds[i];
@@ -1473,7 +1490,7 @@
Slog.w(TAG, "null autofill id on " + Arrays.toString(requiredIds));
continue;
}
- allIds.add(id);
+ savableIds.add(id);
final ViewState viewState = mViewStates.get(id);
if (viewState == null) {
Slog.w(TAG, "showSaveLocked(): no ViewState for required " + id);
@@ -1523,6 +1540,8 @@
}
changed = false;
}
+ } else {
+ isUpdate = true;
}
if (changed) {
if (sDebug) {
@@ -1536,12 +1555,21 @@
}
final AutofillId[] optionalIds = saveInfo.getOptionalIds();
+ if (sVerbose) {
+ Slog.v(TAG, "allRequiredAreNotEmpty: " + allRequiredAreNotEmpty + " hasOptional: "
+ + (optionalIds != null));
+ }
if (allRequiredAreNotEmpty) {
- if (!atLeastOneChanged && optionalIds != null) {
+ // Must look up all optional ids in 2 scenarios:
+ // - if no required id changed but an optional id did, it should trigger save / update
+ // - if at least one required id changed but it was not part of a filled dataset, we
+ // need to check if an optional id is part of a filled datased (in which case we show
+ // Update instead of Save)
+ if (optionalIds!= null && (!atLeastOneChanged || !isUpdate)) {
// No change on required ids yet, look for changes on optional ids.
for (int i = 0; i < optionalIds.length; i++) {
final AutofillId id = optionalIds[i];
- allIds.add(id);
+ savableIds.add(id);
final ViewState viewState = mViewStates.get(id);
if (viewState == null) {
Slog.w(TAG, "no ViewState for optional " + id);
@@ -1549,17 +1577,27 @@
}
if ((viewState.getState() & ViewState.STATE_CHANGED) != 0) {
final AutofillValue currentValue = viewState.getCurrentValue();
- currentValues.put(id, currentValue);
+ final AutofillValue value = getSanitizedValue(sanitizers, id, currentValue);
+ if (value == null) {
+ if (sDebug) {
+ Slog.d(TAG, "value of opt. field " + id + " failed sanitization");
+ }
+ continue;
+ }
+
+ currentValues.put(id, value);
final AutofillValue filledValue = viewState.getAutofilledValue();
- if (currentValue != null && !currentValue.equals(filledValue)) {
+ if (value != null && !value.equals(filledValue)) {
if (sDebug) {
Slog.d(TAG, "found a change on optional " + id + ": " + filledValue
- + " => " + currentValue);
+ + " => " + value);
+ }
+ if (filledValue != null) {
+ isUpdate = true;
}
atLeastOneChanged = true;
- break;
}
- } else {
+ } else {
// Update current values cache based on initial value
final AutofillValue initialValue = getValueFromContextsLocked(id);
if (sDebug) {
@@ -1610,16 +1648,16 @@
Helper.getFields(dataset);
if (sVerbose) {
Slog.v(TAG, "Checking if saved fields match contents of dataset #" + i
- + ": " + dataset + "; allIds=" + allIds);
+ + ": " + dataset + "; savableIds=" + savableIds);
}
- for (int j = 0; j < allIds.size(); j++) {
- final AutofillId id = allIds.valueAt(j);
+ savable_ids_loop: for (int j = 0; j < savableIds.size(); j++) {
+ final AutofillId id = savableIds.valueAt(j);
final AutofillValue currentValue = currentValues.get(id);
if (currentValue == null) {
if (sDebug) {
Slog.d(TAG, "dataset has value for field that is null: " + id);
}
- continue datasets_loop;
+ continue savable_ids_loop;
}
final AutofillValue datasetValue = datasetValues.get(id);
if (!currentValue.equals(datasetValue)) {
@@ -1645,14 +1683,13 @@
}
// Use handler so logContextCommitted() is logged first
- mHandler.sendMessage(obtainMessage(
- Session::logSaveShown, this));
+ mHandler.sendMessage(obtainMessage(Session::logSaveShown, this));
final IAutoFillManagerClient client = getClient();
mPendingSaveUi = new PendingUi(mActivityToken, id, client);
getUiForShowing().showSaveUi(mService.getServiceLabel(), mService.getServiceIcon(),
mService.getServicePackageName(), saveInfo, this,
- mComponentName, this, mPendingSaveUi, mCompatMode);
+ mComponentName, this, mPendingSaveUi, isUpdate, mCompatMode);
if (client != null) {
try {
client.setSaveUiState(id, true);
@@ -1702,12 +1739,14 @@
return sanitizers;
}
+ // TODO: this method is called a few times in the save process, we should cache its results into
+ // ViewState.
@Nullable
private AutofillValue getSanitizedValue(
@Nullable ArrayMap<AutofillId, InternalSanitizer> sanitizers,
@NonNull AutofillId id,
- @NonNull AutofillValue value) {
- if (sanitizers == null) return value;
+ @Nullable AutofillValue value) {
+ if (sanitizers == null || value == null) return value;
final InternalSanitizer sanitizer = sanitizers.get(id);
if (sanitizer == null) {
@@ -1769,6 +1808,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 +1885,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 +2592,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/autofill/java/com/android/server/autofill/ui/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
index c5e838a..5962406 100644
--- a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
@@ -268,9 +268,10 @@
@Nullable String servicePackageName, @NonNull SaveInfo info,
@NonNull ValueFinder valueFinder, @NonNull ComponentName componentName,
@NonNull AutoFillUiCallback callback, @NonNull PendingUi pendingSaveUi,
- boolean compatMode) {
+ boolean isUpdate, boolean compatMode) {
if (sVerbose) {
- Slog.v(TAG, "showSaveUi() for " + componentName.toShortString() + ": " + info);
+ Slog.v(TAG, "showSaveUi(update=" + isUpdate + ") for " + componentName.toShortString()
+ + ": " + info);
}
int numIds = 0;
numIds += info.getRequiredIds() == null ? 0 : info.getRequiredIds().length;
@@ -280,6 +281,9 @@
.newLogMaker(MetricsEvent.AUTOFILL_SAVE_UI, componentName, servicePackageName,
pendingSaveUi.sessionId, compatMode)
.addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_IDS, numIds);
+ if (isUpdate) {
+ log.addTaggedData(MetricsEvent.FIELD_AUTOFILL_UPDATE, 1);
+ }
mHandler.post(() -> {
if (callback != mCallback) {
@@ -328,7 +332,7 @@
}
mMetricsLogger.write(log);
}
- }, compatMode);
+ }, isUpdate, compatMode);
});
}
diff --git a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
index dc84498..9d3d3cb 100644
--- a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
@@ -35,6 +35,7 @@
import android.os.RemoteException;
import android.service.autofill.BatchUpdates;
import android.service.autofill.CustomDescription;
+import android.service.autofill.InternalOnClickAction;
import android.service.autofill.InternalTransformation;
import android.service.autofill.InternalValidator;
import android.service.autofill.SaveInfo;
@@ -43,6 +44,7 @@
import android.util.ArraySet;
import android.util.Pair;
import android.util.Slog;
+import android.util.SparseArray;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.LayoutInflater;
@@ -81,12 +83,20 @@
void onDestroy();
}
- private class OneTimeListener implements OnSaveListener {
+ /**
+ * Wrapper that guarantees that only one callback action (either {@link #onSave()} or
+ * {@link #onCancel(IntentSender)}) is triggered by ignoring further calls after
+ * it's destroyed.
+ *
+ * <p>It's needed becase {@link #onCancel(IntentSender)} is always called when the Save UI
+ * dialog is dismissed.
+ */
+ private class OneActionThenDestroyListener implements OnSaveListener {
private final OnSaveListener mRealListener;
private boolean mDone;
- OneTimeListener(OnSaveListener realListener) {
+ OneActionThenDestroyListener(OnSaveListener realListener) {
mRealListener = realListener;
}
@@ -96,7 +106,6 @@
if (mDone) {
return;
}
- mDone = true;
mRealListener.onSave();
}
@@ -106,7 +115,6 @@
if (mDone) {
return;
}
- mDone = true;
mRealListener.onCancel(listener);
}
@@ -126,7 +134,7 @@
private final @NonNull Dialog mDialog;
- private final @NonNull OneTimeListener mListener;
+ private final @NonNull OneActionThenDestroyListener mListener;
private final @NonNull OverlayControl mOverlayControl;
@@ -144,9 +152,9 @@
@Nullable String servicePackageName, @NonNull ComponentName componentName,
@NonNull SaveInfo info, @NonNull ValueFinder valueFinder,
@NonNull OverlayControl overlayControl, @NonNull OnSaveListener listener,
- boolean compatMode) {
+ boolean isUpdate, boolean compatMode) {
mPendingUi= pendingUi;
- mListener = new OneTimeListener(listener);
+ mListener = new OneActionThenDestroyListener(listener);
mOverlayControl = overlayControl;
mServicePackageName = servicePackageName;
mComponentName = componentName;
@@ -179,21 +187,29 @@
switch (types.size()) {
case 1:
- mTitle = Html.fromHtml(context.getString(R.string.autofill_save_title_with_type,
+ mTitle = Html.fromHtml(context.getString(
+ isUpdate ? R.string.autofill_update_title_with_type
+ : R.string.autofill_save_title_with_type,
types.valueAt(0), serviceLabel), 0);
break;
case 2:
- mTitle = Html.fromHtml(context.getString(R.string.autofill_save_title_with_2types,
+ mTitle = Html.fromHtml(context.getString(
+ isUpdate ? R.string.autofill_update_title_with_2types
+ : R.string.autofill_save_title_with_2types,
types.valueAt(0), types.valueAt(1), serviceLabel), 0);
break;
case 3:
- mTitle = Html.fromHtml(context.getString(R.string.autofill_save_title_with_3types,
+ mTitle = Html.fromHtml(context.getString(
+ isUpdate ? R.string.autofill_update_title_with_3types
+ : R.string.autofill_save_title_with_3types,
types.valueAt(0), types.valueAt(1), types.valueAt(2), serviceLabel), 0);
break;
default:
// Use generic if more than 3 or invalid type (size 0).
mTitle = Html.fromHtml(
- context.getString(R.string.autofill_save_title, serviceLabel), 0);
+ context.getString(isUpdate ? R.string.autofill_update_title
+ : R.string.autofill_save_title, serviceLabel),
+ 0);
}
titleView.setText(mTitle);
@@ -228,7 +244,10 @@
}
noButton.setOnClickListener((v) -> mListener.onCancel(info.getNegativeActionListener()));
- final View yesButton = view.findViewById(R.id.autofill_save_yes);
+ final TextView yesButton = view.findViewById(R.id.autofill_save_yes);
+ if (isUpdate) {
+ yesButton.setText(R.string.autofill_update_yes);
+ }
yesButton.setOnClickListener((v) -> mListener.onSave());
mDialog = new Dialog(context, THEME_ID);
@@ -321,7 +340,7 @@
template.setApplyTheme(THEME_ID);
final View customSubtitleView = template.apply(context, null, handler);
- // And apply batch updates (if any).
+ // Apply batch updates (if any).
final ArrayList<Pair<InternalValidator, BatchUpdates>> updates =
customDescription.getUpdates();
if (updates != null) {
@@ -360,6 +379,35 @@
}
}
+ // Apply click actions (if any).
+ final SparseArray<InternalOnClickAction> actions = customDescription.getActions();
+ if (actions != null) {
+ final int size = actions.size();
+ if (sDebug) Slog.d(TAG, "custom description has " + size + " actions");
+ if (!(customSubtitleView instanceof ViewGroup)) {
+ Slog.w(TAG, "cannot apply actions because custom description root is not a "
+ + "ViewGroup: " + customSubtitleView);
+ } else {
+ final ViewGroup rootView = (ViewGroup) customSubtitleView;
+ for (int i = 0; i < size; i++) {
+ final int id = actions.keyAt(i);
+ final InternalOnClickAction action = actions.valueAt(i);
+ final View child = rootView.findViewById(id);
+ if (child == null) {
+ Slog.w(TAG, "Ignoring action " + action + " for view " + id
+ + " because it's not on " + rootView);
+ continue;
+ }
+ child.setOnClickListener((v) -> {
+ if (sVerbose) {
+ Slog.v(TAG, "Applying " + action + " after " + v + " was clicked");
+ }
+ action.onClick(rootView);
+ });
+ }
+ }
+ }
+
// Finally, add the custom description to the save UI.
final ViewGroup subtitleContainer =
saveUiView.findViewById(R.id.autofill_save_custom_subtitle);
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/fullbackup/PerformFullTransportBackupTask.java b/services/backup/java/com/android/server/backup/fullbackup/PerformFullTransportBackupTask.java
index a40afc3..f7c1c10 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/PerformFullTransportBackupTask.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/PerformFullTransportBackupTask.java
@@ -136,7 +136,7 @@
CountDownLatch mLatch;
FullBackupJob mJob; // if a scheduled job needs to be finished afterwards
IBackupObserver mBackupObserver;
- IBackupManagerMonitor mMonitor;
+ @Nullable private IBackupManagerMonitor mMonitor;
boolean mUserInitiated;
SinglePackageBackupRunner mBackupRunner;
private final int mBackupRunnerOpToken;
@@ -154,7 +154,7 @@
IFullBackupRestoreObserver observer,
String[] whichPackages, boolean updateSchedule,
FullBackupJob runningJob, CountDownLatch latch, IBackupObserver backupObserver,
- IBackupManagerMonitor monitor, @Nullable OnTaskFinishedListener listener,
+ @Nullable IBackupManagerMonitor monitor, @Nullable OnTaskFinishedListener listener,
boolean userInitiated) {
super(observer);
this.backupManagerService = backupManagerService;
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..f66d8cc 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;
@@ -55,6 +57,7 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.List;
/**
* Asynchronous backup/restore handler thread.
@@ -119,8 +122,8 @@
break;
}
- // snapshot the pending-backup set and work on that
- ArrayList<BackupRequest> queue = new ArrayList<>();
+ // Snapshot the pending-backup set and work on that.
+ List<String> queue = new ArrayList<>();
DataChangedJournal oldJournal = backupManagerService.getJournal();
synchronized (backupManagerService.getQueueLock()) {
// Do we have any work to do? Construct the work queue
@@ -128,7 +131,7 @@
// the backup.
if (backupManagerService.getPendingBackups().size() > 0) {
for (BackupRequest b : backupManagerService.getPendingBackups().values()) {
- queue.add(b);
+ queue.add(b.packageName);
}
if (DEBUG) {
Slog.v(TAG, "clearing pending backups");
@@ -403,10 +406,6 @@
if (MORE_DEBUG) {
Slog.d(TAG, "MSG_REQUEST_BACKUP observer=" + params.observer);
}
- ArrayList<BackupRequest> kvQueue = new ArrayList<>();
- for (String packageName : params.kvPackages) {
- kvQueue.add(new BackupRequest(packageName));
- }
backupManagerService.setBackupRunning(true);
backupManagerService.getWakelock().acquire();
@@ -414,7 +413,7 @@
backupManagerService,
params.transportClient,
params.dirName,
- kvQueue,
+ params.kvPackages,
/* dataChangedJournal */ null,
params.observer,
params.monitor,
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/KeyValueBackupTask.java b/services/backup/java/com/android/server/backup/internal/KeyValueBackupTask.java
deleted file mode 100644
index a4d7bd1..0000000
--- a/services/backup/java/com/android/server/backup/internal/KeyValueBackupTask.java
+++ /dev/null
@@ -1,1357 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.server.backup.internal;
-
-import static com.android.server.backup.BackupManagerService.DEBUG_BACKUP_TRACE;
-import static com.android.server.backup.BackupManagerService.KEY_WIDGET_STATE;
-import static com.android.server.backup.BackupManagerService.OP_PENDING;
-import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP;
-import static com.android.server.backup.BackupManagerService.PACKAGE_MANAGER_SENTINEL;
-
-import android.annotation.Nullable;
-import android.app.ApplicationThreadConstants;
-import android.app.IBackupAgent;
-import android.app.backup.BackupAgent;
-import android.app.backup.BackupDataInput;
-import android.app.backup.BackupDataOutput;
-import android.app.backup.BackupManager;
-import android.app.backup.BackupManagerMonitor;
-import android.app.backup.BackupTransport;
-import android.app.backup.IBackupCallback;
-import android.app.backup.IBackupManager;
-import android.app.backup.IBackupManagerMonitor;
-import android.app.backup.IBackupObserver;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.os.ConditionVariable;
-import android.os.ParcelFileDescriptor;
-import android.os.Process;
-import android.os.RemoteException;
-import android.os.SELinux;
-import android.os.UserHandle;
-import android.os.WorkSource;
-import android.system.ErrnoException;
-import android.system.Os;
-import android.util.EventLog;
-import android.util.Pair;
-import android.util.Slog;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.backup.IBackupTransport;
-import com.android.internal.util.Preconditions;
-import com.android.server.AppWidgetBackupBridge;
-import com.android.server.EventLogTags;
-import com.android.server.backup.BackupAgentTimeoutParameters;
-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.fullbackup.PerformFullTransportBackupTask;
-import com.android.server.backup.remote.RemoteCall;
-import com.android.server.backup.remote.RemoteCallable;
-import com.android.server.backup.remote.RemoteResult;
-import com.android.server.backup.transport.TransportClient;
-import com.android.server.backup.utils.AppBackupUtils;
-import com.android.server.backup.utils.BackupManagerMonitorUtils;
-import com.android.server.backup.utils.BackupObserverUtils;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileDescriptor;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Represents the task of performing a sequence of key-value backups for a given list of packages.
- * Method {@link #run()} executes the backups to the transport specified via the {@code
- * transportClient} parameter in the constructor.
- *
- * <p>A few definitions:
- *
- * <ul>
- * <li>State directory: {@link BackupManagerService#getBaseStateDir()}/<transport>
- * <li>State file: {@link
- * BackupManagerService#getBaseStateDir()}/<transport>/<package><br>
- * Represents the state of the backup data for a specific package in the current dataset.
- * <li>Stage directory: {@link BackupManagerService#getDataDir()}
- * <li>Stage file: {@link BackupManagerService#getDataDir()}/<package>.data<br>
- * Contains staged data that the agents wrote via {@link BackupDataOutput}, to be transmitted
- * to the transport.
- * </ul>
- *
- * If there is no PackageManager (PM) pseudo-package state file in the state directory, the
- * specified transport will be initialized with {@link IBackupTransport#initializeDevice()}.
- *
- * <p>The PM pseudo-package is the first package to be backed-up and sent to the transport in case
- * of incremental choice. If non-incremental, PM will only be backed-up if specified in the queue,
- * and if it's the case it will be re-positioned at the head of the queue.
- *
- * <p>Before starting, this task will register itself in {@link BackupManagerService} current
- * operations.
- *
- * <p>In summary, this task will for each package:
- *
- * <ul>
- * <li>Bind to its {@link IBackupAgent}.
- * <li>Request transport quota and flags.
- * <li>Call {@link IBackupAgent#doBackup(ParcelFileDescriptor, ParcelFileDescriptor,
- * ParcelFileDescriptor, long, int, IBackupManager, int)} via {@link RemoteCall} passing the
- * old state file descriptor (read), the backup data file descriptor (write), the new state
- * file descriptor (write), the quota and the transport flags. This will call {@link
- * BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)} with
- * the old state file to be read, a {@link BackupDataOutput} object to write the backup data
- * and the new state file to write. By writing to {@link BackupDataOutput}, the agent will
- * write data to the stage file. The task will block waiting for either:
- * <ul>
- * <li>Agent response.
- * <li>Agent time-out (specified via {@link
- * BackupManagerService#getAgentTimeoutParameters()}.
- * <li>External cancellation or thread interrupt.
- * </ul>
- * <li>Unbind the agent.
- * <li>Assuming agent response, send the staged data that the agent wrote to disk to the transport
- * via {@link IBackupTransport#performBackup(PackageInfo, ParcelFileDescriptor, int)}.
- * <li>Call {@link IBackupTransport#finishBackup()} if previous call was successful.
- * <li>Save the new state in the state file. During the agent call it was being written to
- * <state file>.new, here we rename it and replace the old one.
- * <li>Delete the stage file.
- * </ul>
- *
- * In the end, this task will:
- *
- * <ul>
- * <li>Mark data-changed for the remaining packages in the queue (skipped packages).
- * <li>Delete the {@link DataChangedJournal} provided. Note that this should not be the current
- * journal.
- * <li>Set {@link BackupManagerService} current token as {@link
- * IBackupTransport#getCurrentRestoreSet()}, if applicable.
- * <li>Add the transport to the list of transports pending initialization ({@link
- * BackupManagerService#getPendingInits()}) and kick-off initialization if the transport ever
- * returned {@link BackupTransport#TRANSPORT_NOT_INITIALIZED}.
- * <li>Unregister the task in current operations.
- * <li>Release the wakelock.
- * <li>Kick-off {@link PerformFullTransportBackupTask} if a list of full-backup packages was
- * provided.
- * </ul>
- *
- * The caller can specify whether this should be an incremental or non-incremental backup. In the
- * case of non-incremental the agents will be passed an empty old state file, which signals that a
- * complete backup should be performed.
- *
- * <p>This task is designed to run on a dedicated thread, with the exception of the {@link
- * #handleCancel(boolean)} method, which can be called from any thread.
- */
-// TODO: Stop poking into BMS state and doing things for it (e.g. synchronizing on public locks)
-// TODO: Consider having the caller responsible for some clean-up (like resetting state)
-// TODO: Distinguish between cancel and time-out where possible for logging/monitoring/observing
-public class KeyValueBackupTask implements BackupRestoreTask, Runnable {
- private static final String TAG = "KeyValueBackupTask";
- private static final boolean DEBUG = BackupManagerService.DEBUG || true;
- private static final boolean MORE_DEBUG = BackupManagerService.MORE_DEBUG || false;
- private static final int THREAD_PRIORITY = Process.THREAD_PRIORITY_BACKGROUND;
- private static final AtomicInteger THREAD_COUNT = new AtomicInteger();
- private static final String BLANK_STATE_FILE_NAME = "blank_state";
- @VisibleForTesting
- public static final String STAGING_FILE_SUFFIX = ".data";
- @VisibleForTesting
- public static final String NEW_STATE_FILE_SUFFIX = ".new";
-
- /**
- * Creates a new {@link KeyValueBackupTask} for key-value backup operation, spins up a new
- * dedicated thread and kicks off the operation in it.
- *
- * @param backupManagerService The {@link BackupManagerService} system service.
- * @param transportClient The {@link TransportClient} that contains the transport used for the
- * operation.
- * @param transportDirName The value of {@link IBackupTransport#transportDirName()} for the
- * transport whose {@link TransportClient} was provided above.
- * @param queue The list of packages that will be backed-up, in the form of {@link
- * BackupRequest}.
- * @param dataChangedJournal The old data-changed journal file that will be deleted when the
- * operation finishes (successfully or not) or {@code null}.
- * @param observer A {@link IBackupObserver}.
- * @param monitor A {@link IBackupManagerMonitor}.
- * @param listener A {@link OnTaskFinishedListener} or {@code null}.
- * @param pendingFullBackups The list of packages that will be passed for a new {@link
- * PerformFullTransportBackupTask} operation, which will be started when this finishes.
- * @param userInitiated Whether this was user-initiated or not.
- * @param nonIncremental If {@code true}, this will be a complete backup for each package,
- * otherwise it will be just an incremental one over the current dataset.
- * @return The {@link KeyValueBackupTask} that was started.
- */
- public static KeyValueBackupTask start(
- BackupManagerService backupManagerService,
- TransportClient transportClient,
- String transportDirName,
- List<BackupRequest> queue,
- @Nullable DataChangedJournal dataChangedJournal,
- IBackupObserver observer,
- IBackupManagerMonitor monitor,
- @Nullable OnTaskFinishedListener listener,
- List<String> pendingFullBackups,
- boolean userInitiated,
- boolean nonIncremental) {
- KeyValueBackupTask task =
- new KeyValueBackupTask(
- backupManagerService,
- transportClient,
- transportDirName,
- queue,
- dataChangedJournal,
- observer,
- monitor,
- listener,
- pendingFullBackups,
- userInitiated,
- nonIncremental);
- Thread thread = new Thread(task, "key-value-backup-" + THREAD_COUNT.incrementAndGet());
- if (DEBUG) {
- Slog.d(TAG, "Spinning thread " + thread.getName());
- }
- thread.start();
- return task;
- }
-
- private final BackupManagerService mBackupManagerService;
- private final TransportClient mTransportClient;
- private final BackupAgentTimeoutParameters mAgentTimeoutParameters;
- private final IBackupObserver mObserver;
- private final OnTaskFinishedListener mListener;
- private final boolean mUserInitiated;
- private final boolean mNonIncremental;
- private final int mCurrentOpToken;
- private final File mStateDir;
- private final List<BackupRequest> mOriginalQueue;
- private final List<BackupRequest> mQueue;
- private final List<String> mPendingFullBackups;
- @Nullable private final DataChangedJournal mJournal;
- private IBackupManagerMonitor mMonitor;
- @Nullable private PerformFullTransportBackupTask mFullBackupTask;
-
- private IBackupAgent mAgentBinder;
- private PackageInfo mCurrentPackage;
- private File mSavedStateFile;
- private File mBackupDataFile;
- private File mNewStateFile;
- private ParcelFileDescriptor mSavedState;
- private ParcelFileDescriptor mBackupData;
- private ParcelFileDescriptor mNewState;
- private int mStatus;
-
- /**
- * This {@link ConditionVariable} is used to signal that the cancel operation has been
- * received by the task and that no more transport calls will be made. Anyone can call {@link
- * ConditionVariable#block()} to wait for these conditions to hold true, but there should only
- * be one place where {@link ConditionVariable#open()} is called. Also there should be no calls
- * to {@link ConditionVariable#close()}, which means there is only one cancel per backup -
- * subsequent calls to block will return immediately.
- */
- private final ConditionVariable mCancelAcknowledged = new ConditionVariable(false);
-
- /**
- * Set it to {@code true} and block on {@code mCancelAcknowledged} to wait for the cancellation.
- * DO NOT set it to {@code false}.
- */
- private volatile boolean mCancelled = false;
-
- /**
- * If non-{@code null} there is a pending agent call being made. This call can be cancelled (and
- * control returned to this task) with {@link RemoteCall#cancel()}.
- */
- @Nullable private volatile RemoteCall mPendingCall;
-
- @VisibleForTesting
- public KeyValueBackupTask(
- BackupManagerService backupManagerService,
- TransportClient transportClient,
- String transportDirName,
- List<BackupRequest> queue,
- @Nullable DataChangedJournal journal,
- IBackupObserver observer,
- IBackupManagerMonitor monitor,
- @Nullable OnTaskFinishedListener listener,
- List<String> pendingFullBackups,
- boolean userInitiated,
- boolean nonIncremental) {
- mBackupManagerService = backupManagerService;
- mTransportClient = transportClient;
- mOriginalQueue = queue;
- // We need to retain the original queue contents in case of transport failure
- mQueue = new ArrayList<>(mOriginalQueue);
- mJournal = journal;
- mObserver = observer;
- mMonitor = monitor;
- mListener = (listener != null) ? listener : OnTaskFinishedListener.NOP;
- mPendingFullBackups = pendingFullBackups;
- mUserInitiated = userInitiated;
- mNonIncremental = nonIncremental;
- mAgentTimeoutParameters =
- Preconditions.checkNotNull(
- backupManagerService.getAgentTimeoutParameters(),
- "Timeout parameters cannot be null");
- mStateDir = new File(backupManagerService.getBaseStateDir(), transportDirName);
- mCurrentOpToken = backupManagerService.generateRandomIntegerToken();
- }
-
- private void registerTask() {
- mBackupManagerService.putOperation(
- mCurrentOpToken, new Operation(OP_PENDING, this, OP_TYPE_BACKUP));
- }
-
- private void unregisterTask() {
- mBackupManagerService.removeOperation(mCurrentOpToken);
- }
-
- @Override
- public void run() {
- Process.setThreadPriority(THREAD_PRIORITY);
-
- BackupState state = beginBackup();
- while (state == BackupState.RUNNING_QUEUE || state == BackupState.BACKUP_PM) {
- if (mCancelled) {
- state = BackupState.CANCELLED;
- }
- switch (state) {
- case BACKUP_PM:
- state = backupPm();
- break;
- case RUNNING_QUEUE:
- Pair<BackupState, RemoteResult> stateAndResult = invokeNextAgent();
- state = stateAndResult.first;
- if (state == null) {
- state = processAgentInvocation(stateAndResult.second);
- }
- break;
- }
- }
- if (state == BackupState.CANCELLED) {
- finalizeCancelledBackup();
- } else {
- finalizeBackup();
- }
- }
-
- private BackupState processAgentInvocation(RemoteResult result) {
- if (result == RemoteResult.FAILED_THREAD_INTERRUPTED) {
- // Not an explicit cancel, we need to flag it
- mCancelled = true;
- handleAgentCancelled();
- return BackupState.CANCELLED;
- }
- if (result == RemoteResult.FAILED_CANCELLED) {
- handleAgentCancelled();
- return BackupState.CANCELLED;
- }
- if (result == RemoteResult.FAILED_TIMED_OUT) {
- handleAgentTimeout();
- return BackupState.RUNNING_QUEUE;
- }
- Preconditions.checkState(result.succeeded());
- return handleAgentResult(result.get());
- }
-
- @Override
- public void execute() {}
-
- @Override
- public void operationComplete(long unusedResult) {}
-
- private BackupState beginBackup() {
- if (DEBUG_BACKUP_TRACE) {
- mBackupManagerService.clearBackupTrace();
- StringBuilder b = new StringBuilder(256);
- b.append("beginBackup: [");
- for (BackupRequest req : mOriginalQueue) {
- b.append(' ');
- b.append(req.packageName);
- }
- b.append(" ]");
- mBackupManagerService.addBackupTrace(b.toString());
- }
- synchronized (mBackupManagerService.getCurrentOpLock()) {
- if (mBackupManagerService.isBackupOperationInProgress()) {
- if (DEBUG) {
- Slog.d(TAG, "Skipping backup since one is already in progress.");
- }
- mBackupManagerService.addBackupTrace("Skipped. Backup already in progress.");
- return BackupState.FINAL;
- }
- }
-
- String[] fullBackups = mPendingFullBackups.toArray(new String[mPendingFullBackups.size()]);
- mFullBackupTask =
- new PerformFullTransportBackupTask(
- mBackupManagerService,
- mTransportClient,
- /* fullBackupRestoreObserver */ null,
- fullBackups,
- /* updateSchedule */ false,
- /* runningJob */ null,
- new CountDownLatch(1),
- mObserver,
- mMonitor,
- mListener,
- mUserInitiated);
- registerTask();
- mBackupManagerService.addBackupTrace("STATE => INITIAL");
-
- mAgentBinder = null;
- mStatus = BackupTransport.TRANSPORT_OK;
-
- // Sanity check: if the queue is empty we have no work to do.
- if (mOriginalQueue.isEmpty() && mPendingFullBackups.isEmpty()) {
- Slog.w(TAG, "Backup begun with an empty queue - nothing to do.");
- mBackupManagerService.addBackupTrace("queue empty at begin");
- return BackupState.FINAL;
- }
-
- // When the transport is forcing non-incremental key/value payloads, we send the
- // metadata only if it explicitly asks for it.
- boolean skipPm = mNonIncremental;
-
- // The app metadata pseudopackage might also be represented in the
- // backup queue if apps have been added/removed since the last time
- // we performed a backup. Drop it from the working queue now that
- // we're committed to evaluating it for backup regardless.
- for (int i = 0; i < mQueue.size(); i++) {
- if (PACKAGE_MANAGER_SENTINEL.equals(mQueue.get(i).packageName)) {
- if (MORE_DEBUG) {
- Slog.i(TAG, "Metadata in queue; eliding");
- }
- mQueue.remove(i);
- skipPm = false;
- break;
- }
- }
-
- if (DEBUG) {
- Slog.v(TAG, "Beginning backup of " + mQueue.size() + " targets");
- }
- File pmState = new File(mStateDir, PACKAGE_MANAGER_SENTINEL);
- try {
- IBackupTransport transport = mTransportClient.connectOrThrow("KVBT.beginBackup()");
- String transportName = transport.name();
- EventLog.writeEvent(EventLogTags.BACKUP_START, transportName);
-
- // If we haven't stored package manager metadata yet, we must init the transport.
- if (pmState.length() <= 0) {
- Slog.i(TAG, "Initializing (wiping) backup state and transport storage");
- mBackupManagerService.addBackupTrace("initializing transport " + transportName);
- mBackupManagerService.resetBackupState(mStateDir); // Just to make sure.
- mStatus = transport.initializeDevice();
-
- mBackupManagerService.addBackupTrace("transport.initializeDevice() == " + mStatus);
- if (mStatus == BackupTransport.TRANSPORT_OK) {
- EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
- } else {
- EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(initialize)");
- Slog.e(TAG, "Transport error in initializeDevice()");
- }
- }
- } catch (Exception e) {
- Slog.e(TAG, "Error in backup thread during init", e);
- mBackupManagerService.addBackupTrace("Exception in backup thread during init: " + e);
- mStatus = BackupTransport.TRANSPORT_ERROR;
- }
- mBackupManagerService.addBackupTrace("exiting prelim: " + mStatus);
-
- if (mStatus != BackupTransport.TRANSPORT_OK) {
- // if things went wrong at this point, we need to
- // restage everything and try again later.
- mBackupManagerService.resetBackupState(mStateDir); // Just to make sure.
- return BackupState.FINAL;
- }
-
- if (skipPm) {
- Slog.d(TAG, "Skipping backup of package metadata.");
- return BackupState.RUNNING_QUEUE;
- }
-
- return BackupState.BACKUP_PM;
- }
-
- private BackupState backupPm() {
- RemoteResult agentResult = null;
- BackupState nextState;
- try {
- // The package manager doesn't have a proper <application> etc, but since it's running
- // here in the system process we can just set up its agent directly and use a synthetic
- // BackupRequest.
- BackupAgent pmAgent = mBackupManagerService.makeMetadataAgent();
- Pair<Integer, RemoteResult> statusAndResult =
- invokeAgentForBackup(
- PACKAGE_MANAGER_SENTINEL,
- IBackupAgent.Stub.asInterface(pmAgent.onBind()));
- mStatus = statusAndResult.first;
- agentResult = statusAndResult.second;
-
- mBackupManagerService.addBackupTrace("PMBA invoke: " + mStatus);
- } catch (Exception e) {
- Slog.e(TAG, "Error in backup thread during pm", e);
- mBackupManagerService.addBackupTrace("Exception in backup thread during pm: " + e);
- mStatus = BackupTransport.TRANSPORT_ERROR;
- }
- mBackupManagerService.addBackupTrace("exiting backupPm: " + mStatus);
-
- if (mStatus == BackupTransport.TRANSPORT_OK) {
- Preconditions.checkNotNull(agentResult);
- nextState = processAgentInvocation(agentResult);
- } else {
- // if things went wrong at this point, we need to
- // restage everything and try again later.
- mBackupManagerService.resetBackupState(mStateDir); // Just to make sure.
- nextState = BackupState.FINAL;
- }
-
- return nextState;
- }
-
- /**
- * Returns either:
- *
- * <ul>
- * <li>(next state, {@code null}): In case we failed to call the agent.
- * <li>({@code null}, agent result): In case we successfully called the agent.
- * </ul>
- */
- private Pair<BackupState, RemoteResult> invokeNextAgent() {
- mStatus = BackupTransport.TRANSPORT_OK;
- mBackupManagerService.addBackupTrace("invoke q=" + mQueue.size());
-
- // Sanity check that we have work to do. If not, skip to the end where
- // we reestablish the wakelock invariants etc.
- if (mQueue.isEmpty()) {
- if (MORE_DEBUG) Slog.i(TAG, "queue now empty");
- return Pair.create(BackupState.FINAL, null);
- }
-
- // pop the entry we're going to process on this step
- BackupRequest request = mQueue.get(0);
- mQueue.remove(0);
-
- Slog.d(TAG, "starting key/value backup of " + request);
- mBackupManagerService.addBackupTrace("launch agent for " + request.packageName);
-
- // Verify that the requested app exists; it might be something that
- // requested a backup but was then uninstalled. The request was
- // journalled and rather than tamper with the journal it's safer
- // to sanity-check here. This also gives us the classname of the
- // package's backup agent.
- RemoteResult agentResult = null;
- try {
- PackageManager pm = mBackupManagerService.getPackageManager();
- mCurrentPackage = pm.getPackageInfo(request.packageName,
- PackageManager.GET_SIGNING_CERTIFICATES);
- if (!AppBackupUtils.appIsEligibleForBackup(mCurrentPackage.applicationInfo, pm)) {
- // The manifest has changed but we had a stale backup request pending.
- // This won't happen again because the app won't be requesting further
- // backups.
- Slog.i(TAG, "Package " + request.packageName
- + " no longer supports backup; skipping");
- mBackupManagerService.addBackupTrace("skipping - not eligible, completion is noop");
- // Shouldn't happen in case of requested backup, as pre-check was done in
- // #requestBackup(), except to app update done concurrently
- BackupObserverUtils.sendBackupOnPackageResult(mObserver,
- mCurrentPackage.packageName,
- BackupManager.ERROR_BACKUP_NOT_ALLOWED);
- return Pair.create(BackupState.RUNNING_QUEUE, null);
- }
-
- if (AppBackupUtils.appGetsFullBackup(mCurrentPackage)) {
- // It's possible that this app *formerly* was enqueued for key/value backup,
- // but has since been updated and now only supports the full-data path.
- // Don't proceed with a key/value backup for it in this case.
- Slog.i(TAG, "Package " + request.packageName
- + " requests full-data rather than key/value; skipping");
- mBackupManagerService.addBackupTrace(
- "skipping - fullBackupOnly, completion is noop");
- // Shouldn't happen in case of requested backup, as pre-check was done in
- // #requestBackup()
- BackupObserverUtils.sendBackupOnPackageResult(mObserver,
- mCurrentPackage.packageName,
- BackupManager.ERROR_BACKUP_NOT_ALLOWED);
- return Pair.create(BackupState.RUNNING_QUEUE, null);
- }
-
- if (AppBackupUtils.appIsStopped(mCurrentPackage.applicationInfo)) {
- // The app has been force-stopped or cleared or just installed,
- // and not yet launched out of that state, so just as it won't
- // receive broadcasts, we won't run it for backup.
- mBackupManagerService.addBackupTrace("skipping - stopped");
- BackupObserverUtils.sendBackupOnPackageResult(mObserver,
- mCurrentPackage.packageName,
- BackupManager.ERROR_BACKUP_NOT_ALLOWED);
- return Pair.create(BackupState.RUNNING_QUEUE, null);
- }
-
- try {
- mBackupManagerService.setWorkSource(
- new WorkSource(mCurrentPackage.applicationInfo.uid));
- IBackupAgent agent =
- mBackupManagerService.bindToAgentSynchronous(
- mCurrentPackage.applicationInfo,
- ApplicationThreadConstants.BACKUP_MODE_INCREMENTAL);
- mBackupManagerService.addBackupTrace("agent bound; a? = " + (agent != null));
- if (agent != null) {
- mAgentBinder = agent;
- Pair<Integer, RemoteResult> statusAndResult =
- invokeAgentForBackup(request.packageName, agent);
- mStatus = statusAndResult.first;
- agentResult = statusAndResult.second;
- } else {
- // Timeout waiting for the agent
- mStatus = BackupTransport.AGENT_ERROR;
- }
- } catch (SecurityException ex) {
- // Try for the next one.
- Slog.d(TAG, "error in bind/backup", ex);
- mStatus = BackupTransport.AGENT_ERROR;
- mBackupManagerService.addBackupTrace("agent SE");
- }
- } catch (PackageManager.NameNotFoundException e) {
- Slog.d(TAG, "Package does not exist; skipping");
- mBackupManagerService.addBackupTrace("no such package");
- mStatus = BackupTransport.AGENT_UNKNOWN;
- } finally {
- mBackupManagerService.setWorkSource(null);
- }
-
- if (mStatus != BackupTransport.TRANSPORT_OK) {
- BackupState nextState = BackupState.RUNNING_QUEUE;
- mAgentBinder = null;
-
- // An agent-level failure means we re-enqueue this one agent for
- // a later retry, but otherwise proceed normally.
- if (mStatus == BackupTransport.AGENT_ERROR) {
- if (MORE_DEBUG) {
- Slog.i(TAG, "Agent failure for " + request.packageName + " - restaging");
- }
- mBackupManagerService.dataChangedImpl(request.packageName);
- mStatus = BackupTransport.TRANSPORT_OK;
- BackupObserverUtils
- .sendBackupOnPackageResult(mObserver, mCurrentPackage.packageName,
- BackupManager.ERROR_AGENT_FAILURE);
- } else if (mStatus == BackupTransport.AGENT_UNKNOWN) {
- // Failed lookup of the app, so we couldn't bring up an agent, but
- // we're otherwise fine. Just drop it and go on to the next as usual.
- mStatus = BackupTransport.TRANSPORT_OK;
- BackupObserverUtils
- .sendBackupOnPackageResult(mObserver, request.packageName,
- BackupManager.ERROR_PACKAGE_NOT_FOUND);
- } else {
- // Transport-level failure means we re-enqueue everything
- revertAndEndBackup();
- nextState = BackupState.FINAL;
- }
-
- return Pair.create(nextState, null);
- }
-
- // Success: caller will figure out the state based on call result
- mBackupManagerService.addBackupTrace("call made; result = " + agentResult);
- return Pair.create(null, agentResult);
- }
-
- private void finalizeBackup() {
- mBackupManagerService.addBackupTrace("finishing");
-
- // Mark packages that we didn't backup (because backup was cancelled, etc.) as needing
- // backup.
- for (BackupRequest req : mQueue) {
- mBackupManagerService.dataChangedImpl(req.packageName);
- }
-
- // Either backup was successful, in which case we of course do not need
- // this pass's journal any more; or it failed, in which case we just
- // re-enqueued all of these packages in the current active journal.
- // Either way, we no longer need this pass's journal.
- if (mJournal != null && !mJournal.delete()) {
- Slog.e(TAG, "Unable to remove backup journal file " + mJournal);
- }
-
- // If everything actually went through and this is the first time we've
- // done a backup, we can now record what the current backup dataset token
- // is.
- String callerLogString = "KVBT.finalizeBackup()";
- if ((mBackupManagerService.getCurrentToken() == 0) && (mStatus
- == BackupTransport.TRANSPORT_OK)) {
- mBackupManagerService.addBackupTrace("success; recording token");
- try {
- IBackupTransport transport = mTransportClient.connectOrThrow(callerLogString);
- mBackupManagerService.setCurrentToken(transport.getCurrentRestoreSet());
- mBackupManagerService.writeRestoreTokens();
- } catch (Exception e) {
- // nothing for it at this point, unfortunately, but this will be
- // recorded the next time we fully succeed.
- Slog.e(TAG, "Transport threw reporting restore set: " + e.getMessage());
- mBackupManagerService.addBackupTrace("transport threw returning token");
- }
- }
-
- // Set up the next backup pass - at this point we can set mBackupRunning
- // to false to allow another pass to fire
- synchronized (mBackupManagerService.getQueueLock()) {
- mBackupManagerService.setBackupRunning(false);
- if (mStatus == BackupTransport.TRANSPORT_NOT_INITIALIZED) {
- // Make sure we back up everything and perform the one-time init
- if (MORE_DEBUG) {
- Slog.d(TAG, "Server requires init; rerunning");
- }
- mBackupManagerService.addBackupTrace("init required; rerunning");
- try {
- String name = mBackupManagerService.getTransportManager()
- .getTransportName(mTransportClient.getTransportComponent());
- mBackupManagerService.getPendingInits().add(name);
- } catch (Exception e) {
- Slog.w(TAG, "Failed to query transport name for init: " + e.getMessage());
- // swallow it and proceed; we don't rely on this
- }
- clearMetadata();
- mBackupManagerService.backupNow();
- }
- }
-
- mBackupManagerService.clearBackupTrace();
-
- unregisterTask();
-
- if (!mCancelled && mStatus == BackupTransport.TRANSPORT_OK &&
- mPendingFullBackups != null && !mPendingFullBackups.isEmpty()) {
- Slog.d(TAG, "Starting full backups for: " + mPendingFullBackups);
- // Acquiring wakelock for PerformFullTransportBackupTask before its start.
- mBackupManagerService.getWakelock().acquire();
- // The full-backup task is now responsible for calling onFinish() on mListener, which
- // was the listener we passed it.
- (new Thread(mFullBackupTask, "full-transport-requested")).start();
- } else if (mCancelled) {
- mListener.onFinished(callerLogString);
- if (mFullBackupTask != null) {
- mFullBackupTask.unregisterTask();
- }
- BackupObserverUtils.sendBackupFinished(mObserver, BackupManager.ERROR_BACKUP_CANCELLED);
- } else {
- mListener.onFinished(callerLogString);
- mFullBackupTask.unregisterTask();
- switch (mStatus) {
- case BackupTransport.TRANSPORT_OK:
- case BackupTransport.TRANSPORT_QUOTA_EXCEEDED:
- case BackupTransport.TRANSPORT_PACKAGE_REJECTED:
- BackupObserverUtils.sendBackupFinished(mObserver, BackupManager.SUCCESS);
- break;
- case BackupTransport.TRANSPORT_NOT_INITIALIZED:
- BackupObserverUtils.sendBackupFinished(mObserver,
- BackupManager.ERROR_TRANSPORT_ABORTED);
- break;
- case BackupTransport.TRANSPORT_ERROR:
- default:
- BackupObserverUtils.sendBackupFinished(mObserver,
- BackupManager.ERROR_TRANSPORT_ABORTED);
- break;
- }
- }
- Slog.i(TAG, "K/V backup pass finished.");
- // Only once we're entirely finished do we release the wakelock for k/v backup.
- mBackupManagerService.getWakelock().release();
- }
-
- // Remove the PM metadata state. This will generate an init on the next pass.
- private void clearMetadata() {
- final File pmState = new File(mStateDir, PACKAGE_MANAGER_SENTINEL);
- if (pmState.exists()) pmState.delete();
- }
-
- /**
- * Returns a {@link Pair}. The first of the pair contains the status. In case the status is
- * {@link BackupTransport#TRANSPORT_OK}, the second of the pair contains the agent result,
- * otherwise {@code null}.
- */
- private Pair<Integer, RemoteResult> invokeAgentForBackup(
- String packageName, IBackupAgent agent) {
- if (DEBUG) {
- Slog.d(TAG, "invokeAgentForBackup on " + packageName);
- }
- mBackupManagerService.addBackupTrace("invoking " + packageName);
-
- File blankStateFile = new File(mStateDir, BLANK_STATE_FILE_NAME);
- mSavedStateFile = new File(mStateDir, packageName);
- mBackupDataFile =
- new File(mBackupManagerService.getDataDir(), packageName + STAGING_FILE_SUFFIX);
- mNewStateFile = new File(mStateDir, packageName + NEW_STATE_FILE_SUFFIX);
- if (MORE_DEBUG) {
- Slog.d(TAG, "data file: " + mBackupDataFile);
- }
-
-
- mSavedState = null;
- mBackupData = null;
- mNewState = null;
-
- boolean callingAgent = false;
- final RemoteResult agentResult;
- try {
- // Look up the package info & signatures. This is first so that if it
- // throws an exception, there's no file setup yet that would need to
- // be unraveled.
- if (packageName.equals(PACKAGE_MANAGER_SENTINEL)) {
- // The metadata 'package' is synthetic; construct one and make
- // sure our global state is pointed at it
- mCurrentPackage = new PackageInfo();
- mCurrentPackage.packageName = packageName;
- }
-
- mSavedState = ParcelFileDescriptor.open(
- (mNonIncremental) ? blankStateFile : mSavedStateFile,
- ParcelFileDescriptor.MODE_READ_ONLY |
- ParcelFileDescriptor.MODE_CREATE); // Make an empty file if necessary
-
- mBackupData = ParcelFileDescriptor.open(mBackupDataFile,
- ParcelFileDescriptor.MODE_READ_WRITE |
- ParcelFileDescriptor.MODE_CREATE |
- ParcelFileDescriptor.MODE_TRUNCATE);
-
- if (!SELinux.restorecon(mBackupDataFile)) {
- Slog.e(TAG, "SELinux restorecon failed on " + mBackupDataFile);
- }
-
- mNewState = ParcelFileDescriptor.open(mNewStateFile,
- ParcelFileDescriptor.MODE_READ_WRITE |
- ParcelFileDescriptor.MODE_CREATE |
- ParcelFileDescriptor.MODE_TRUNCATE);
-
- IBackupTransport transport =
- mTransportClient.connectOrThrow("KVBT.invokeAgentForBackup()");
-
- final long quota = transport.getBackupQuota(packageName, false /* isFullBackup */);
- callingAgent = true;
-
- // Initiate the target's backup pass
- long kvBackupAgentTimeoutMillis =
- mAgentTimeoutParameters.getKvBackupAgentTimeoutMillis();
- mBackupManagerService.addBackupTrace("calling agent doBackup()");
-
- agentResult =
- remoteCall(
- callback ->
- agent.doBackup(
- mSavedState,
- mBackupData,
- mNewState,
- quota,
- callback,
- transport.getTransportFlags()),
- kvBackupAgentTimeoutMillis);
- } catch (Exception e) {
- Slog.e(TAG, "Error invoking for backup on " + packageName + ". " + e);
- mBackupManagerService.addBackupTrace("exception: " + e);
- EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName, e.toString());
- errorCleanup();
- int status =
- callingAgent ? BackupTransport.AGENT_ERROR : BackupTransport.TRANSPORT_ERROR;
- return Pair.create(status, null);
- } finally {
- if (mNonIncremental) {
- blankStateFile.delete();
- }
- }
-
- return Pair.create(BackupTransport.TRANSPORT_OK, agentResult);
- }
-
- private void failAgent(IBackupAgent agent, String message) {
- try {
- agent.fail(message);
- } catch (Exception e) {
- Slog.w(TAG, "Error conveying failure to " + mCurrentPackage.packageName);
- }
- }
-
- // SHA-1 a byte array and return the result in hex
- private String SHA1Checksum(byte[] input) {
- final byte[] checksum;
- try {
- MessageDigest md = MessageDigest.getInstance("SHA-1");
- checksum = md.digest(input);
- } catch (NoSuchAlgorithmException e) {
- Slog.e(TAG, "Unable to use SHA-1!");
- return "00";
- }
-
- StringBuffer sb = new StringBuffer(checksum.length * 2);
- for (int i = 0; i < checksum.length; i++) {
- sb.append(Integer.toHexString(checksum[i]));
- }
- return sb.toString();
- }
-
- private void writeWidgetPayloadIfAppropriate(FileDescriptor fd, String pkgName)
- throws IOException {
- // TODO: http://b/22388012
- byte[] widgetState = AppWidgetBackupBridge.getWidgetState(pkgName,
- UserHandle.USER_SYSTEM);
- // has the widget state changed since last time?
- final File widgetFile = new File(mStateDir, pkgName + "_widget");
- final boolean priorStateExists = widgetFile.exists();
-
- if (MORE_DEBUG) {
- if (priorStateExists || widgetState != null) {
- Slog.i(TAG, "Checking widget update: state=" + (widgetState != null)
- + " prior=" + priorStateExists);
- }
- }
-
- if (!priorStateExists && widgetState == null) {
- // no prior state, no new state => nothing to do
- return;
- }
-
- // if the new state is not null, we might need to compare checksums to
- // determine whether to update the widget blob in the archive. If the
- // widget state *is* null, we know a priori at this point that we simply
- // need to commit a deletion for it.
- String newChecksum = null;
- if (widgetState != null) {
- newChecksum = SHA1Checksum(widgetState);
- if (priorStateExists) {
- final String priorChecksum;
- try (
- FileInputStream fin = new FileInputStream(widgetFile);
- DataInputStream in = new DataInputStream(fin)
- ) {
- priorChecksum = in.readUTF();
- }
- if (Objects.equals(newChecksum, priorChecksum)) {
- // Same checksum => no state change => don't rewrite the widget data
- return;
- }
- }
- } // else widget state *became* empty, so we need to commit a deletion
-
- BackupDataOutput out = new BackupDataOutput(fd);
- if (widgetState != null) {
- try (
- FileOutputStream fout = new FileOutputStream(widgetFile);
- DataOutputStream stateOut = new DataOutputStream(fout)
- ) {
- stateOut.writeUTF(newChecksum);
- }
-
- out.writeEntityHeader(KEY_WIDGET_STATE, widgetState.length);
- out.writeEntityData(widgetState, widgetState.length);
- } else {
- // Widget state for this app has been removed; commit a deletion
- out.writeEntityHeader(KEY_WIDGET_STATE, -1);
- widgetFile.delete();
- }
- }
-
- private BackupState handleAgentResult(long unusedResult) {
- Preconditions.checkState(mBackupData != null);
-
- final String pkgName = mCurrentPackage.packageName;
- final long filepos = mBackupDataFile.length();
- FileDescriptor fd = mBackupData.getFileDescriptor();
- try {
- // If it's a 3rd party app, see whether they wrote any protected keys
- // and complain mightily if they are attempting shenanigans.
- if (mCurrentPackage.applicationInfo != null &&
- (mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM)
- == 0) {
- ParcelFileDescriptor readFd = ParcelFileDescriptor.open(mBackupDataFile,
- ParcelFileDescriptor.MODE_READ_ONLY);
- BackupDataInput in = new BackupDataInput(readFd.getFileDescriptor());
- try {
- while (in.readNextHeader()) {
- final String key = in.getKey();
- if (key != null && key.charAt(0) >= 0xff00) {
- // Not okay: crash them and bail.
- failAgent(mAgentBinder, "Illegal backup key: " + key);
- mBackupManagerService
- .addBackupTrace("illegal key " + key + " from " + pkgName);
- EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, pkgName,
- "bad key");
- mMonitor = BackupManagerMonitorUtils.monitorEvent(mMonitor,
- BackupManagerMonitor.LOG_EVENT_ID_ILLEGAL_KEY,
- mCurrentPackage,
- BackupManagerMonitor
- .LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY,
- BackupManagerMonitorUtils.putMonitoringExtra(null,
- BackupManagerMonitor.EXTRA_LOG_ILLEGAL_KEY,
- key));
- BackupObserverUtils
- .sendBackupOnPackageResult(mObserver, pkgName,
- BackupManager.ERROR_AGENT_FAILURE);
- errorCleanup();
- if (MORE_DEBUG) {
- Slog.i(TAG, "Agent failure for " + pkgName
- + " with illegal key: " + key + "; dropped");
- }
-
- return BackupState.RUNNING_QUEUE;
- }
- in.skipEntityData();
- }
- } finally {
- if (readFd != null) {
- readFd.close();
- }
- }
- }
-
- // Piggyback the widget state payload, if any
- writeWidgetPayloadIfAppropriate(fd, pkgName);
- } catch (IOException e) {
- // Hard disk error; recovery/failure policy TBD. For now roll back,
- // but we may want to consider this a transport-level failure (i.e.
- // we're in such a bad state that we can't contemplate doing backup
- // operations any more during this pass).
- Slog.w(TAG, "Unable read backup data or to save widget state for " + pkgName);
- try {
- Os.ftruncate(fd, filepos);
- } catch (ErrnoException ee) {
- Slog.w(TAG, "Unable to roll back!");
- }
- }
-
- clearAgentState();
- mBackupManagerService.addBackupTrace("operation complete");
-
- ParcelFileDescriptor backupData = null;
- mStatus = BackupTransport.TRANSPORT_OK;
- long size = 0;
- try {
- IBackupTransport transport = mTransportClient.connectOrThrow("KVBT.handleAgentResult()");
- size = mBackupDataFile.length();
- if (size > 0) {
- if (MORE_DEBUG) {
- Slog.v(TAG, "Sending non-empty data to transport for " + pkgName);
- }
- boolean isNonIncremental = mSavedStateFile.length() == 0;
- if (mStatus == BackupTransport.TRANSPORT_OK) {
- backupData = ParcelFileDescriptor.open(mBackupDataFile,
- ParcelFileDescriptor.MODE_READ_ONLY);
- mBackupManagerService.addBackupTrace("sending data to transport");
-
- int userInitiatedFlag =
- mUserInitiated ? BackupTransport.FLAG_USER_INITIATED : 0;
- int incrementalFlag =
- isNonIncremental
- ? BackupTransport.FLAG_NON_INCREMENTAL
- : BackupTransport.FLAG_INCREMENTAL;
- int flags = userInitiatedFlag | incrementalFlag;
-
- mStatus = transport.performBackup(mCurrentPackage, backupData, flags);
- }
-
- if (isNonIncremental
- && mStatus == BackupTransport.TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED) {
- // TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED is only valid if the backup was
- // incremental, as if the backup is non-incremental there is no state to
- // clear. This avoids us ending up in a retry loop if the transport always
- // returns this code.
- Slog.w(TAG, "Transport requested non-incremental but already the case, error");
- mBackupManagerService.addBackupTrace(
- "Transport requested non-incremental but already the case, error");
- mStatus = BackupTransport.TRANSPORT_ERROR;
- }
-
- mBackupManagerService.addBackupTrace("data delivered: " + mStatus);
- if (mStatus == BackupTransport.TRANSPORT_OK) {
- mBackupManagerService.addBackupTrace("finishing op on transport");
- mStatus = transport.finishBackup();
- mBackupManagerService.addBackupTrace("finished: " + mStatus);
- } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
- mBackupManagerService.addBackupTrace("transport rejected package");
- }
- } else {
- if (MORE_DEBUG) {
- Slog.i(TAG, "No backup data written; not calling transport");
- }
- mBackupManagerService.addBackupTrace("no data to send");
- mMonitor = BackupManagerMonitorUtils.monitorEvent(mMonitor,
- BackupManagerMonitor.LOG_EVENT_ID_NO_DATA_TO_SEND,
- mCurrentPackage,
- BackupManagerMonitor.LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY,
- null);
- }
-
- if (mStatus == BackupTransport.TRANSPORT_OK) {
- // After successful transport, delete the now-stale data
- // and juggle the files so that next time we supply the agent
- // with the new state file it just created.
- mBackupDataFile.delete();
- mNewStateFile.renameTo(mSavedStateFile);
- BackupObserverUtils.sendBackupOnPackageResult(
- mObserver, pkgName, BackupManager.SUCCESS);
- EventLog.writeEvent(EventLogTags.BACKUP_PACKAGE, pkgName, size);
- mBackupManagerService.logBackupComplete(pkgName);
- } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
- // The transport has rejected backup of this specific package. Roll it
- // back but proceed with running the rest of the queue.
- mBackupDataFile.delete();
- mNewStateFile.delete();
- BackupObserverUtils.sendBackupOnPackageResult(mObserver, pkgName,
- BackupManager.ERROR_TRANSPORT_PACKAGE_REJECTED);
- EventLogTags.writeBackupAgentFailure(pkgName, "Transport rejected");
- } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
- BackupObserverUtils.sendBackupOnPackageResult(mObserver, pkgName,
- BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED);
- EventLog.writeEvent(EventLogTags.BACKUP_QUOTA_EXCEEDED, pkgName);
-
- } else if (mStatus == BackupTransport.TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED) {
- Slog.i(TAG, "Transport lost data, retrying package");
- mBackupManagerService.addBackupTrace(
- "Transport lost data, retrying package:" + pkgName);
- BackupManagerMonitorUtils.monitorEvent(
- mMonitor,
- BackupManagerMonitor.LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED,
- mCurrentPackage,
- BackupManagerMonitor.LOG_EVENT_CATEGORY_TRANSPORT,
- /*extras=*/ null);
-
- mBackupDataFile.delete();
- mSavedStateFile.delete();
- mNewStateFile.delete();
-
- // Immediately retry the package by adding it back to the front of the queue.
- // We cannot add @pm@ to the queue because we back it up separately at the start
- // of the backup pass in state BACKUP_PM. Instead we retry this state (see
- // below).
- if (!PACKAGE_MANAGER_SENTINEL.equals(pkgName)) {
- mQueue.add(0, new BackupRequest(pkgName));
- }
-
- } else {
- // Actual transport-level failure to communicate the data to the backend
- BackupObserverUtils.sendBackupOnPackageResult(mObserver, pkgName,
- BackupManager.ERROR_TRANSPORT_ABORTED);
- EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, pkgName);
- }
- } catch (Exception e) {
- BackupObserverUtils.sendBackupOnPackageResult(mObserver, pkgName,
- BackupManager.ERROR_TRANSPORT_ABORTED);
- Slog.e(TAG, "Transport error backing up " + pkgName, e);
- EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, pkgName);
- mStatus = BackupTransport.TRANSPORT_ERROR;
- } finally {
- try {
- if (backupData != null) {
- backupData.close();
- }
- } catch (IOException e) {
- Slog.w(TAG, "Error closing backup data fd");
- }
- }
-
- final BackupState nextState;
- if (mStatus == BackupTransport.TRANSPORT_OK
- || mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
- // Success or single-package rejection. Proceed with the next app if any,
- // otherwise we're done.
- nextState = BackupState.RUNNING_QUEUE;
-
- } else if (mStatus == BackupTransport.TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED) {
- // We want to immediately retry the current package.
- if (PACKAGE_MANAGER_SENTINEL.equals(pkgName)) {
- nextState = BackupState.BACKUP_PM;
- } else {
- // This is an ordinary package so we will have added it back into the queue
- // above. Thus, we proceed processing the queue.
- nextState = BackupState.RUNNING_QUEUE;
- }
-
- } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
- if (MORE_DEBUG) {
- Slog.d(TAG, "Package " + mCurrentPackage.packageName +
- " hit quota limit on k/v backup");
- }
- if (mAgentBinder != null) {
- try {
- IBackupTransport transport =
- mTransportClient.connectOrThrow("KVBT.handleAgentResult()");
- long quota = transport.getBackupQuota(mCurrentPackage.packageName, false);
- mAgentBinder.doQuotaExceeded(size, quota);
- } catch (Exception e) {
- Slog.e(TAG, "Unable to notify about quota exceeded: " + e.getMessage());
- }
- }
- nextState = BackupState.RUNNING_QUEUE;
- } else {
- // Any other error here indicates a transport-level failure. That means
- // we need to halt everything and reschedule everything for next time.
- revertAndEndBackup();
- nextState = BackupState.FINAL;
- }
-
- return nextState;
- }
-
- /**
- * Cancels this task. After this method returns there will be no more calls to the transport.
- *
- * <p>If this method is executed while an agent is performing a backup, we will stop waiting for
- * it, disregard its backup data and finalize the task. However, if this method is executed in
- * between agent calls, the backup data of the last called agent will be sent to
- * the transport and we will not consider the next agent (nor the rest of the queue), proceeding
- * to finalize the backup.
- *
- * @param cancelAll MUST be {@code true}. Will be removed.
- */
- @Override
- public void handleCancel(boolean cancelAll) {
- Preconditions.checkArgument(cancelAll, "Can't partially cancel a key-value backup task");
- if (MORE_DEBUG) {
- Slog.v(TAG, "Cancel received");
- }
- mCancelled = true;
- RemoteCall pendingCall = mPendingCall;
- if (pendingCall != null) {
- pendingCall.cancel();
- }
- mCancelAcknowledged.block();
- }
-
- private void handleAgentTimeout() {
- String packageName = getPackageNameForLog();
- Slog.i(TAG, "Agent " + packageName + " timed out");
- EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName);
- mBackupManagerService.addBackupTrace("timeout of " + packageName);
- mMonitor =
- BackupManagerMonitorUtils.monitorEvent(
- mMonitor,
- BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_BACKUP_CANCEL,
- mCurrentPackage,
- BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT,
- BackupManagerMonitorUtils.putMonitoringExtra(
- null, BackupManagerMonitor.EXTRA_LOG_CANCEL_ALL, false));
- errorCleanup();
- }
-
- private void handleAgentCancelled() {
- String packageName = getPackageNameForLog();
- Slog.i(TAG, "Cancel backing up " + packageName);
- EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName);
- mBackupManagerService.addBackupTrace("cancel of " + packageName);
- errorCleanup();
- }
-
- private void finalizeCancelledBackup() {
- mMonitor =
- BackupManagerMonitorUtils.monitorEvent(
- mMonitor,
- BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_BACKUP_CANCEL,
- mCurrentPackage,
- BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT,
- BackupManagerMonitorUtils.putMonitoringExtra(
- null, BackupManagerMonitor.EXTRA_LOG_CANCEL_ALL, true));
- finalizeBackup();
- // finalizeBackup() may call the transport, so we only acknowledge the cancellation here.
- mCancelAcknowledged.open();
- }
-
- private String getPackageNameForLog() {
- return (mCurrentPackage != null) ? mCurrentPackage.packageName : "no_package_yet";
- }
-
- private void revertAndEndBackup() {
- if (MORE_DEBUG) {
- Slog.i(TAG, "Reverting backup queue - restaging everything");
- }
- mBackupManagerService.addBackupTrace("transport error; reverting");
-
- // We want to reset the backup schedule based on whatever the transport suggests
- // by way of retry/backoff time.
- long delay;
- try {
- IBackupTransport transport =
- mTransportClient.connectOrThrow("KVBT.revertAndEndBackup()");
- delay = transport.requestBackupTime();
- } catch (Exception e) {
- Slog.w(TAG, "Unable to contact transport for recommended backoff: " + e.getMessage());
- delay = 0; // use the scheduler's default
- }
- KeyValueBackupJob.schedule(mBackupManagerService.getContext(), delay,
- mBackupManagerService.getConstants());
-
- for (BackupRequest request : mOriginalQueue) {
- mBackupManagerService.dataChangedImpl(request.packageName);
- }
- }
-
- private void errorCleanup() {
- mBackupDataFile.delete();
- mNewStateFile.delete();
- clearAgentState();
- }
-
- // Cleanup common to both success and failure cases
- private void clearAgentState() {
- try {
- if (mSavedState != null) {
- mSavedState.close();
- }
- } catch (IOException e) {
- Slog.w(TAG, "Error closing old state fd");
- }
- try {
- if (mBackupData != null) {
- mBackupData.close();
- }
- } catch (IOException e) {
- Slog.w(TAG, "Error closing backup data fd");
- }
- try {
- if (mNewState != null) {
- mNewState.close();
- }
- } catch (IOException e) {
- Slog.w(TAG, "Error closing new state fd");
- }
- synchronized (mBackupManagerService.getCurrentOpLock()) {
- // Current-operation callback handling requires the validity of these various
- // bits of internal state as an invariant of the operation still being live.
- // This means we make sure to clear all of the state in unison inside the lock.
- mSavedState = mBackupData = mNewState = null;
- }
-
- // If this was a pseudo-package there's no associated Activity Manager state
- if (mCurrentPackage.applicationInfo != null) {
- mBackupManagerService.addBackupTrace("unbinding " + mCurrentPackage.packageName);
- mBackupManagerService.unbindAgent(mCurrentPackage.applicationInfo);
- }
- }
-
- private RemoteResult remoteCall(RemoteCallable<IBackupCallback> remoteCallable, long timeoutMs)
- throws RemoteException {
- mPendingCall = new RemoteCall(mCancelled, remoteCallable, timeoutMs);
- RemoteResult result = mPendingCall.call();
- if (MORE_DEBUG) {
- Slog.v(TAG, "Agent call returned " + result);
- }
- mPendingCall = null;
- return result;
- }
-}
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/keyvalue/KeyValueBackupReporter.java b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupReporter.java
new file mode 100644
index 0000000..8fbca4b
--- /dev/null
+++ b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupReporter.java
@@ -0,0 +1,405 @@
+/*
+ * 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.server.backup.keyvalue;
+
+import android.annotation.Nullable;
+import android.app.backup.BackupManager;
+import android.app.backup.BackupManagerMonitor;
+import android.app.backup.BackupTransport;
+import android.app.backup.IBackupManagerMonitor;
+import android.app.backup.IBackupObserver;
+import android.content.pm.PackageInfo;
+import android.util.EventLog;
+import android.util.Slog;
+
+import com.android.server.EventLogTags;
+import com.android.server.backup.BackupManagerService;
+import com.android.server.backup.DataChangedJournal;
+import com.android.server.backup.remote.RemoteResult;
+import com.android.server.backup.utils.BackupManagerMonitorUtils;
+import com.android.server.backup.utils.BackupObserverUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.util.List;
+
+/**
+ * Reports events that happen during a key-value backup task to:
+ *
+ * <ul>
+ * <li>Logcat (main and event buffers).
+ * <li>Backup observer (see {@link IBackupObserver}).
+ * <li>Backup manager monitor (see {@link IBackupManagerMonitor}).
+ * </ul>
+ */
+// TODO: In KeyValueBackupTaskTest, remove direct assertions on logcat, observer or monitor and
+// verify calls to this object. Add these and more assertions to the test of this class.
+class KeyValueBackupReporter {
+ private static final String TAG = "KeyValueBackupTask";
+ private static final boolean DEBUG = BackupManagerService.DEBUG;
+ private static final boolean MORE_DEBUG = BackupManagerService.MORE_DEBUG || true;
+
+ private final BackupManagerService mBackupManagerService;
+ private final IBackupObserver mObserver;
+ @Nullable private IBackupManagerMonitor mMonitor;
+
+ KeyValueBackupReporter(
+ BackupManagerService backupManagerService,
+ IBackupObserver observer,
+ IBackupManagerMonitor monitor) {
+ mBackupManagerService = backupManagerService;
+ mObserver = observer;
+ mMonitor = monitor;
+ }
+
+ /** Returns the monitor or {@code null} if we lost connection to it. */
+ @Nullable
+ IBackupManagerMonitor getMonitor() {
+ return mMonitor;
+ }
+
+ void onSkipBackup() {
+ if (DEBUG) {
+ Slog.d(TAG, "Skipping backup since one is already in progress");
+ }
+ }
+
+ void onEmptyQueueAtStart() {
+ Slog.w(TAG, "Backup begun with an empty queue, nothing to do");
+ }
+
+ void onQueueReady(List<String> queue) {
+ if (DEBUG) {
+ Slog.v(TAG, "Beginning backup of " + queue.size() + " targets");
+ }
+ }
+
+ void onTransportReady(String transportName) {
+ EventLog.writeEvent(EventLogTags.BACKUP_START, transportName);
+ }
+
+ void onInitializeTransport(String transportName) {
+ Slog.i(TAG, "Initializing transport and resetting backup state");
+ }
+
+ void onTransportInitialized(int status) {
+ if (status == BackupTransport.TRANSPORT_OK) {
+ EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
+ } else {
+ EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(initialize)");
+ Slog.e(TAG, "Transport error in initializeDevice()");
+ }
+ }
+
+ void onInitializeTransportError(Exception e) {
+ Slog.e(TAG, "Error during initialization", e);
+ }
+
+ void onSkipPm() {
+ Slog.d(TAG, "Skipping backup of PM metadata");
+ }
+
+ void onExtractPmAgentDataError(Exception e) {
+ Slog.e(TAG, "Error during PM metadata backup", e);
+ }
+
+ void onEmptyQueue() {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "Queue now empty");
+ }
+ }
+
+ void onStartPackageBackup(String packageName) {
+ Slog.d(TAG, "Starting key-value backup of " + packageName);
+ }
+
+ void onPackageNotEligibleForBackup(String packageName) {
+ Slog.i(TAG, "Package " + packageName + " no longer supports backup, skipping");
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_BACKUP_NOT_ALLOWED);
+ }
+
+ void onPackageEligibleForFullBackup(String packageName) {
+ Slog.i(
+ TAG,
+ "Package " + packageName + " performs full-backup rather than key-value, skipping");
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_BACKUP_NOT_ALLOWED);
+ }
+
+ void onPackageStopped(String packageName) {
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_BACKUP_NOT_ALLOWED);
+ }
+
+ void onBindAgentError(SecurityException e) {
+ Slog.d(TAG, "Error in bind/backup", e);
+ }
+
+ void onAgentUnknown(String packageName) {
+ Slog.d(TAG, "Package does not exist, skipping");
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_PACKAGE_NOT_FOUND);
+ }
+
+ void onAgentError(String packageName) {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "Agent failure for " + packageName + ", re-staging");
+ }
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_AGENT_FAILURE);
+ }
+
+ void onExtractAgentData(String packageName) {
+ if (DEBUG) {
+ Slog.d(TAG, "Invoking agent on " + packageName);
+ }
+ }
+
+ void onAgentFilesReady(File backupDataFile) {
+ if (MORE_DEBUG) {
+ Slog.d(TAG, "Data file: " + backupDataFile);
+ }
+ }
+
+ void onRestoreconFailed(File backupDataFile) {
+ Slog.e(TAG, "SELinux restorecon failed on " + backupDataFile);
+ }
+
+ void onCallAgentDoBackupError(String packageName, boolean callingAgent, Exception e) {
+ if (callingAgent) {
+ Slog.e(TAG, "Error invoking agent on " + packageName + ": " + e);
+ } else {
+ Slog.e(TAG, "Error before invoking agent on " + packageName + ": " + e);
+ }
+ EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName, e.toString());
+ }
+
+ void onFailAgentError(String packageName) {
+ Slog.w(TAG, "Error conveying failure to " + packageName);
+ }
+
+ void onAgentIllegalKey(PackageInfo packageInfo, String key) {
+ String packageName = packageInfo.packageName;
+ EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName, "bad key");
+ mMonitor =
+ BackupManagerMonitorUtils.monitorEvent(
+ mMonitor,
+ BackupManagerMonitor.LOG_EVENT_ID_ILLEGAL_KEY,
+ packageInfo,
+ BackupManagerMonitor.LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY,
+ BackupManagerMonitorUtils.putMonitoringExtra(
+ null, BackupManagerMonitor.EXTRA_LOG_ILLEGAL_KEY, key));
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_AGENT_FAILURE);
+ if (MORE_DEBUG) {
+ Slog.i(
+ TAG,
+ "Agent failure for " + packageName + " with illegal key " + key + ", dropped");
+ }
+ }
+
+ void onReadAgentDataError(String packageName, IOException e) {
+ Slog.w(TAG, "Unable read backup data for " + packageName + ": " + e);
+ }
+
+ void onWriteWidgetDataError(String packageName, IOException e) {
+ Slog.w(TAG, "Unable to save widget data for " + packageName + ": " + e);
+ }
+
+ void onDigestError(NoSuchAlgorithmException e) {
+ Slog.e(TAG, "Unable to use SHA-1!");
+ }
+
+ void onWriteWidgetData(boolean priorStateExists, @Nullable byte[] widgetState) {
+ if (MORE_DEBUG) {
+ Slog.i(
+ TAG,
+ "Checking widget update: state="
+ + (widgetState != null)
+ + " prior="
+ + priorStateExists);
+ }
+ }
+
+ void onTruncateDataError() {
+ Slog.w(TAG, "Unable to roll back");
+ }
+
+ void onSendDataToTransport(String packageName) {
+ if (MORE_DEBUG) {
+ Slog.v(TAG, "Sending non-empty data to transport for " + packageName);
+ }
+ }
+
+ void onNonIncrementalAndNonIncrementalRequired() {
+ Slog.e(TAG, "Transport requested non-incremental but already the case");
+ }
+
+ void onEmptyData(PackageInfo packageInfo) {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "No backup data written, not calling transport");
+ }
+ mMonitor =
+ BackupManagerMonitorUtils.monitorEvent(
+ mMonitor,
+ BackupManagerMonitor.LOG_EVENT_ID_NO_DATA_TO_SEND,
+ packageInfo,
+ BackupManagerMonitor.LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY,
+ null);
+ }
+
+ void onPackageBackupComplete(String packageName, long size) {
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.SUCCESS);
+ EventLog.writeEvent(EventLogTags.BACKUP_PACKAGE, packageName, size);
+ mBackupManagerService.logBackupComplete(packageName);
+ }
+
+ void onPackageBackupRejected(String packageName) {
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_TRANSPORT_PACKAGE_REJECTED);
+ EventLogTags.writeBackupAgentFailure(packageName, "Transport rejected");
+ }
+
+ void onPackageBackupQuotaExceeded(String packageName) {
+ if (MORE_DEBUG) {
+ Slog.d(TAG, "Package " + packageName + " hit quota limit on key-value backup");
+ }
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED);
+ EventLog.writeEvent(EventLogTags.BACKUP_QUOTA_EXCEEDED, packageName);
+ }
+
+ void onAgentDoQuotaExceededError(Exception e) {
+ Slog.e(TAG, "Unable to notify about quota exceeded: " + e);
+ }
+
+ void onPackageBackupNonIncrementalRequired(PackageInfo packageInfo) {
+ Slog.i(TAG, "Transport lost data, retrying package");
+ BackupManagerMonitorUtils.monitorEvent(
+ mMonitor,
+ BackupManagerMonitor.LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED,
+ packageInfo,
+ BackupManagerMonitor.LOG_EVENT_CATEGORY_TRANSPORT,
+ /* extras */ null);
+ }
+
+ void onPackageBackupTransportFailure(String packageName) {
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_TRANSPORT_ABORTED);
+ EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, packageName);
+ }
+
+ void onPackageBackupError(String packageName, Exception e) {
+ Slog.e(TAG, "Transport error backing up " + packageName, e);
+ BackupObserverUtils.sendBackupOnPackageResult(
+ mObserver, packageName, BackupManager.ERROR_TRANSPORT_ABORTED);
+ EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, packageName);
+ }
+
+ void onCloseFileDescriptorError(String logName) {
+ Slog.w(TAG, "Error closing " + logName + " file-descriptor");
+ }
+
+ void onCancel() {
+ if (MORE_DEBUG) {
+ Slog.v(TAG, "Cancel received");
+ }
+ }
+
+ void onAgentTimedOut(@Nullable PackageInfo packageInfo) {
+ String packageName = getPackageName(packageInfo);
+ Slog.i(TAG, "Agent " + packageName + " timed out");
+ EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName);
+ // Time-out used to be implemented as cancel w/ cancelAll = false.
+ // TODO: Change monitoring event to reflect time-out as an event itself.
+ mMonitor =
+ BackupManagerMonitorUtils.monitorEvent(
+ mMonitor,
+ BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_BACKUP_CANCEL,
+ packageInfo,
+ BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT,
+ BackupManagerMonitorUtils.putMonitoringExtra(
+ null, BackupManagerMonitor.EXTRA_LOG_CANCEL_ALL, false));
+ }
+
+ void onAgentCancelled(@Nullable PackageInfo packageInfo) {
+ String packageName = getPackageName(packageInfo);
+ Slog.i(TAG, "Cancel backing up " + packageName);
+ EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName);
+ mMonitor =
+ BackupManagerMonitorUtils.monitorEvent(
+ mMonitor,
+ BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_BACKUP_CANCEL,
+ packageInfo,
+ BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT,
+ BackupManagerMonitorUtils.putMonitoringExtra(
+ null, BackupManagerMonitor.EXTRA_LOG_CANCEL_ALL, true));
+ }
+
+ private String getPackageName(@Nullable PackageInfo packageInfo) {
+ return (packageInfo != null) ? packageInfo.packageName : "no_package_yet";
+ }
+
+ void onRevertBackup() {
+ if (MORE_DEBUG) {
+ Slog.i(TAG, "Reverting backup queue, re-staging everything");
+ }
+ }
+
+ void onTransportRequestBackupTimeError(Exception e) {
+ Slog.w(TAG, "Unable to contact transport for recommended backoff: " + e);
+ }
+
+ void onRemoteCallReturned(RemoteResult result) {
+ if (MORE_DEBUG) {
+ Slog.v(TAG, "Agent call returned " + result);
+ }
+ }
+
+ void onJournalDeleteFailed(DataChangedJournal journal) {
+ Slog.e(TAG, "Unable to remove backup journal file " + journal);
+ }
+
+ void onSetCurrentTokenError(Exception e) {
+ Slog.e(TAG, "Transport threw reporting restore set: " + e);
+ }
+
+ void onTransportNotInitialized() {
+ if (MORE_DEBUG) {
+ Slog.d(TAG, "Transport requires initialization, rerunning");
+ }
+ }
+
+ void onPendingInitializeTransportError(Exception e) {
+ Slog.w(TAG, "Failed to query transport name for pending init: " + e);
+ }
+
+ void onBackupFinished(int status) {
+ BackupObserverUtils.sendBackupFinished(mObserver, status);
+ }
+
+ void onStartFullBackup(List<String> pendingFullBackups) {
+ Slog.d(TAG, "Starting full backups for: " + pendingFullBackups);
+ }
+
+ void onKeyValueBackupFinished() {
+ Slog.i(TAG, "K/V backup pass finished");
+ }
+}
diff --git a/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
new file mode 100644
index 0000000..91af6f1
--- /dev/null
+++ b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
@@ -0,0 +1,1094 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.server.backup.keyvalue;
+
+import static android.os.ParcelFileDescriptor.MODE_CREATE;
+import static android.os.ParcelFileDescriptor.MODE_READ_ONLY;
+import static android.os.ParcelFileDescriptor.MODE_READ_WRITE;
+import static android.os.ParcelFileDescriptor.MODE_TRUNCATE;
+
+import static com.android.server.backup.BackupManagerService.KEY_WIDGET_STATE;
+import static com.android.server.backup.BackupManagerService.OP_PENDING;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP;
+import static com.android.server.backup.BackupManagerService.PACKAGE_MANAGER_SENTINEL;
+
+import android.annotation.Nullable;
+import android.app.ApplicationThreadConstants;
+import android.app.IBackupAgent;
+import android.app.backup.BackupAgent;
+import android.app.backup.BackupDataInput;
+import android.app.backup.BackupDataOutput;
+import android.app.backup.BackupManager;
+import android.app.backup.BackupTransport;
+import android.app.backup.IBackupCallback;
+import android.app.backup.IBackupManager;
+import android.app.backup.IBackupManagerMonitor;
+import android.app.backup.IBackupObserver;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.os.ConditionVariable;
+import android.os.ParcelFileDescriptor;
+import android.os.Process;
+import android.os.RemoteException;
+import android.os.SELinux;
+import android.os.UserHandle;
+import android.os.WorkSource;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.util.Pair;
+import android.util.Slog;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.backup.IBackupTransport;
+import com.android.internal.util.Preconditions;
+import com.android.server.AppWidgetBackupBridge;
+import com.android.server.backup.BackupAgentTimeoutParameters;
+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.TransportManager;
+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;
+import com.android.server.backup.transport.TransportClient;
+import com.android.server.backup.utils.AppBackupUtils;
+
+import java.io.Closeable;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Represents the task of performing a sequence of key-value backups for a given list of packages.
+ * Method {@link #run()} executes the backups to the transport specified via the {@code
+ * transportClient} parameter in the constructor.
+ *
+ * <p>A few definitions:
+ *
+ * <ul>
+ * <li>State directory: {@link BackupManagerService#getBaseStateDir()}/<transport>
+ * <li>State file: {@link
+ * BackupManagerService#getBaseStateDir()}/<transport>/<package><br>
+ * Represents the state of the backup data for a specific package in the current dataset.
+ * <li>Stage directory: {@link BackupManagerService#getDataDir()}
+ * <li>Stage file: {@link BackupManagerService#getDataDir()}/<package>.data<br>
+ * Contains staged data that the agents wrote via {@link BackupDataOutput}, to be transmitted
+ * to the transport.
+ * </ul>
+ *
+ * If there is no PackageManager (PM) pseudo-package state file in the state directory, the
+ * specified transport will be initialized with {@link IBackupTransport#initializeDevice()}.
+ *
+ * <p>The PM pseudo-package is the first package to be backed-up and sent to the transport in case
+ * of incremental choice. If non-incremental, PM will only be backed-up if specified in the queue,
+ * and if it's the case it will be re-positioned at the head of the queue.
+ *
+ * <p>Before starting, this task will register itself in {@link BackupManagerService} current
+ * operations.
+ *
+ * <p>In summary, this task will for each package:
+ *
+ * <ul>
+ * <li>Bind to its {@link IBackupAgent}.
+ * <li>Request transport quota and flags.
+ * <li>Call {@link IBackupAgent#doBackup(ParcelFileDescriptor, ParcelFileDescriptor,
+ * ParcelFileDescriptor, long, int, IBackupManager, int)} via {@link RemoteCall} passing the
+ * old state file descriptor (read), the backup data file descriptor (write), the new state
+ * file descriptor (write), the quota and the transport flags. This will call {@link
+ * BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)} with
+ * the old state file to be read, a {@link BackupDataOutput} object to write the backup data
+ * and the new state file to write. By writing to {@link BackupDataOutput}, the agent will
+ * write data to the stage file. The task will block waiting for either:
+ * <ul>
+ * <li>Agent response.
+ * <li>Agent time-out (specified via {@link
+ * BackupManagerService#getAgentTimeoutParameters()}.
+ * <li>External cancellation or thread interrupt.
+ * </ul>
+ * <li>Unbind the agent.
+ * <li>Assuming agent response, send the staged data that the agent wrote to disk to the transport
+ * via {@link IBackupTransport#performBackup(PackageInfo, ParcelFileDescriptor, int)}.
+ * <li>Call {@link IBackupTransport#finishBackup()} if previous call was successful.
+ * <li>Save the new state in the state file. During the agent call it was being written to
+ * <state file>.new, here we rename it and replace the old one.
+ * <li>Delete the stage file.
+ * </ul>
+ *
+ * In the end, this task will:
+ *
+ * <ul>
+ * <li>Mark data-changed for the remaining packages in the queue (skipped packages).
+ * <li>Delete the {@link DataChangedJournal} provided. Note that this should not be the current
+ * journal.
+ * <li>Set {@link BackupManagerService} current token as {@link
+ * IBackupTransport#getCurrentRestoreSet()}, if applicable.
+ * <li>Add the transport to the list of transports pending initialization ({@link
+ * BackupManagerService#getPendingInits()}) and kick-off initialization if the transport ever
+ * returned {@link BackupTransport#TRANSPORT_NOT_INITIALIZED}.
+ * <li>Unregister the task in current operations.
+ * <li>Release the wakelock.
+ * <li>Kick-off {@link PerformFullTransportBackupTask} if a list of full-backup packages was
+ * provided.
+ * </ul>
+ *
+ * The caller can specify whether this should be an incremental or non-incremental backup. In the
+ * case of non-incremental the agents will be passed an empty old state file, which signals that a
+ * complete backup should be performed.
+ *
+ * <p>This task is designed to run on a dedicated thread, with the exception of the {@link
+ * #handleCancel(boolean)} method, which can be called from any thread.
+ */
+// TODO: Stop poking into BMS state and doing things for it (e.g. synchronizing on public locks)
+// TODO: Consider having the caller responsible for some clean-up (like resetting state)
+// TODO: Distinguish between cancel and time-out where possible for logging/monitoring/observing
+public class KeyValueBackupTask implements BackupRestoreTask, Runnable {
+ private static final String TAG = "KeyValueBackupTask";
+ private static final boolean DEBUG = BackupManagerService.DEBUG;
+ private static final boolean MORE_DEBUG = BackupManagerService.MORE_DEBUG || false;
+ private static final int THREAD_PRIORITY = Process.THREAD_PRIORITY_BACKGROUND;
+ private static final AtomicInteger THREAD_COUNT = new AtomicInteger();
+ private static final String BLANK_STATE_FILE_NAME = "blank_state";
+ private static final String PM_PACKAGE = BackupManagerService.PACKAGE_MANAGER_SENTINEL;
+ @VisibleForTesting
+ public static final String STAGING_FILE_SUFFIX = ".data";
+ @VisibleForTesting
+ public static final String NEW_STATE_FILE_SUFFIX = ".new";
+
+ /**
+ * Creates a new {@link KeyValueBackupTask} for key-value backup operation, spins up a new
+ * dedicated thread and kicks off the operation in it.
+ *
+ * @param backupManagerService The {@link BackupManagerService} system service.
+ * @param transportClient The {@link TransportClient} that contains the transport used for the
+ * operation.
+ * @param transportDirName The value of {@link IBackupTransport#transportDirName()} for the
+ * transport whose {@link TransportClient} was provided above.
+ * @param queue The list of package names that will be backed-up.
+ * @param dataChangedJournal The old data-changed journal file that will be deleted when the
+ * operation finishes (successfully or not) or {@code null}.
+ * @param observer A {@link IBackupObserver}.
+ * @param monitor A {@link IBackupManagerMonitor}.
+ * @param listener A {@link OnTaskFinishedListener} or {@code null}.
+ * @param pendingFullBackups The list of packages that will be passed for a new {@link
+ * PerformFullTransportBackupTask} operation, which will be started when this finishes.
+ * @param userInitiated Whether this was user-initiated or not.
+ * @param nonIncremental If {@code true}, this will be a complete backup for each package,
+ * otherwise it will be just an incremental one over the current dataset.
+ * @return The {@link KeyValueBackupTask} that was started.
+ */
+ public static KeyValueBackupTask start(
+ BackupManagerService backupManagerService,
+ TransportClient transportClient,
+ String transportDirName,
+ List<String> queue,
+ @Nullable DataChangedJournal dataChangedJournal,
+ IBackupObserver observer,
+ @Nullable IBackupManagerMonitor monitor,
+ OnTaskFinishedListener listener,
+ List<String> pendingFullBackups,
+ boolean userInitiated,
+ boolean nonIncremental) {
+ KeyValueBackupTask task =
+ new KeyValueBackupTask(
+ backupManagerService,
+ transportClient,
+ transportDirName,
+ queue,
+ dataChangedJournal,
+ observer,
+ monitor,
+ listener,
+ pendingFullBackups,
+ userInitiated,
+ nonIncremental);
+ Thread thread = new Thread(task, "key-value-backup-" + THREAD_COUNT.incrementAndGet());
+ if (DEBUG) {
+ Slog.d(TAG, "Spinning thread " + thread.getName());
+ }
+ thread.start();
+ return task;
+ }
+
+ private final BackupManagerService mBackupManagerService;
+ private final PackageManager mPackageManager;
+ private final TransportManager mTransportManager;
+ private final TransportClient mTransportClient;
+ private final BackupAgentTimeoutParameters mAgentTimeoutParameters;
+ private final IBackupObserver mObserver;
+ private final KeyValueBackupReporter mReporter;
+ private final OnTaskFinishedListener mTaskFinishedListener;
+ private final boolean mUserInitiated;
+ private final boolean mNonIncremental;
+ private final int mCurrentOpToken;
+ private final File mStateDir;
+ private final List<String> mOriginalQueue;
+ private final List<String> mQueue;
+ private final List<String> mPendingFullBackups;
+ @Nullable private final DataChangedJournal mJournal;
+ @Nullable private PerformFullTransportBackupTask mFullBackupTask;
+
+ private IBackupAgent mAgentBinder;
+ private PackageInfo mCurrentPackage;
+ private File mSavedStateFile;
+ private File mBackupDataFile;
+ private File mNewStateFile;
+ private ParcelFileDescriptor mSavedState;
+ private ParcelFileDescriptor mBackupData;
+ private ParcelFileDescriptor mNewState;
+ private int mStatus;
+
+ /**
+ * This {@link ConditionVariable} is used to signal that the cancel operation has been
+ * received by the task and that no more transport calls will be made. Anyone can call {@link
+ * ConditionVariable#block()} to wait for these conditions to hold true, but there should only
+ * be one place where {@link ConditionVariable#open()} is called. Also there should be no calls
+ * to {@link ConditionVariable#close()}, which means there is only one cancel per backup -
+ * subsequent calls to block will return immediately.
+ */
+ private final ConditionVariable mCancelAcknowledged = new ConditionVariable(false);
+
+ /**
+ * Set it to {@code true} and block on {@code mCancelAcknowledged} to wait for the cancellation.
+ * DO NOT set it to {@code false}.
+ */
+ private volatile boolean mCancelled = false;
+
+ /**
+ * If non-{@code null} there is a pending agent call being made. This call can be cancelled (and
+ * control returned to this task) with {@link RemoteCall#cancel()}.
+ */
+ @Nullable private volatile RemoteCall mPendingCall;
+
+ @VisibleForTesting
+ public KeyValueBackupTask(
+ BackupManagerService backupManagerService,
+ TransportClient transportClient,
+ String transportDirName,
+ List<String> queue,
+ @Nullable DataChangedJournal journal,
+ IBackupObserver observer,
+ @Nullable IBackupManagerMonitor monitor,
+ OnTaskFinishedListener taskFinishedListener,
+ List<String> pendingFullBackups,
+ boolean userInitiated,
+ boolean nonIncremental) {
+ mBackupManagerService = backupManagerService;
+ mTransportManager = backupManagerService.getTransportManager();
+ mPackageManager = backupManagerService.getPackageManager();
+ mTransportClient = transportClient;
+ mOriginalQueue = queue;
+ // We need to retain the original queue contents in case of transport failure
+ mQueue = new ArrayList<>(queue);
+ mJournal = journal;
+ mObserver = observer;
+ mReporter = new KeyValueBackupReporter(backupManagerService, observer, monitor);
+ mTaskFinishedListener = taskFinishedListener;
+ mPendingFullBackups = pendingFullBackups;
+ mUserInitiated = userInitiated;
+ mNonIncremental = nonIncremental;
+ mAgentTimeoutParameters =
+ Preconditions.checkNotNull(
+ backupManagerService.getAgentTimeoutParameters(),
+ "Timeout parameters cannot be null");
+ mStateDir = new File(backupManagerService.getBaseStateDir(), transportDirName);
+ mCurrentOpToken = backupManagerService.generateRandomIntegerToken();
+ }
+
+ private void registerTask() {
+ mBackupManagerService.putOperation(
+ mCurrentOpToken, new Operation(OP_PENDING, this, OP_TYPE_BACKUP));
+ }
+
+ private void unregisterTask() {
+ mBackupManagerService.removeOperation(mCurrentOpToken);
+ }
+
+ @Override
+ public void run() {
+ Process.setThreadPriority(THREAD_PRIORITY);
+
+ BackupState state = startBackup();
+ while (state == BackupState.RUNNING_QUEUE || state == BackupState.BACKUP_PM) {
+ if (mCancelled) {
+ state = BackupState.CANCELLED;
+ }
+ switch (state) {
+ case BACKUP_PM:
+ state = backupPm();
+ break;
+ case RUNNING_QUEUE:
+ Pair<BackupState, RemoteResult> stateAndResult = extractNextAgentData();
+ state = stateAndResult.first;
+ if (state == null) {
+ state = handleAgentResult(stateAndResult.second);
+ }
+ break;
+ }
+ }
+ finishBackup();
+ }
+
+ private BackupState handleAgentResult(RemoteResult result) {
+ if (result == RemoteResult.FAILED_THREAD_INTERRUPTED) {
+ // Not an explicit cancel, we need to flag it.
+ mCancelled = true;
+ handleAgentCancelled();
+ return BackupState.CANCELLED;
+ }
+ if (result == RemoteResult.FAILED_CANCELLED) {
+ handleAgentCancelled();
+ return BackupState.CANCELLED;
+ }
+ if (result == RemoteResult.FAILED_TIMED_OUT) {
+ handleAgentTimeout();
+ return BackupState.RUNNING_QUEUE;
+ }
+ Preconditions.checkState(result.succeeded());
+ return sendDataToTransport(result.get());
+ }
+
+ @Override
+ public void execute() {}
+
+ @Override
+ public void operationComplete(long unusedResult) {}
+
+ private BackupState startBackup() {
+ synchronized (mBackupManagerService.getCurrentOpLock()) {
+ if (mBackupManagerService.isBackupOperationInProgress()) {
+ mReporter.onSkipBackup();
+ return BackupState.FINAL;
+ }
+ }
+
+ String[] fullBackups = mPendingFullBackups.toArray(new String[mPendingFullBackups.size()]);
+ mFullBackupTask =
+ new PerformFullTransportBackupTask(
+ mBackupManagerService,
+ mTransportClient,
+ /* fullBackupRestoreObserver */ null,
+ fullBackups,
+ /* updateSchedule */ false,
+ /* runningJob */ null,
+ new CountDownLatch(1),
+ mObserver,
+ mReporter.getMonitor(),
+ mTaskFinishedListener,
+ mUserInitiated);
+ registerTask();
+
+ mAgentBinder = null;
+ mStatus = BackupTransport.TRANSPORT_OK;
+
+ // Sanity check: if the queue is empty we have no work to do.
+ if (mOriginalQueue.isEmpty() && mPendingFullBackups.isEmpty()) {
+ mReporter.onEmptyQueueAtStart();
+ return BackupState.FINAL;
+ }
+
+ // We only backup PM if it was explicitly in the queue or if it's incremental.
+ boolean backupPm = mQueue.remove(PM_PACKAGE) || !mNonIncremental;
+
+ mReporter.onQueueReady(mQueue);
+ File pmState = new File(mStateDir, PM_PACKAGE);
+ try {
+ IBackupTransport transport = mTransportClient.connectOrThrow("KVBT.startBackup()");
+ String transportName = transport.name();
+ mReporter.onTransportReady(transportName);
+
+ // If we haven't stored PM metadata yet, we must initialize the transport.
+ if (pmState.length() <= 0) {
+ mReporter.onInitializeTransport(transportName);
+ mBackupManagerService.resetBackupState(mStateDir);
+ mStatus = transport.initializeDevice();
+ mReporter.onTransportInitialized(mStatus);
+ }
+ } catch (Exception e) {
+ mReporter.onInitializeTransportError(e);
+ mStatus = BackupTransport.TRANSPORT_ERROR;
+ }
+
+ if (mStatus != BackupTransport.TRANSPORT_OK) {
+ mBackupManagerService.resetBackupState(mStateDir);
+ return BackupState.FINAL;
+ }
+
+ if (!backupPm) {
+ mReporter.onSkipPm();
+ return BackupState.RUNNING_QUEUE;
+ }
+
+ return BackupState.BACKUP_PM;
+ }
+
+ private BackupState backupPm() {
+ RemoteResult agentResult = null;
+ try {
+ mCurrentPackage = new PackageInfo();
+ mCurrentPackage.packageName = PM_PACKAGE;
+
+ // Since PM is running in the system process we can set up its agent directly.
+ BackupAgent pmAgent = mBackupManagerService.makeMetadataAgent();
+ Pair<Integer, RemoteResult> statusAndResult =
+ extractAgentData(
+ PM_PACKAGE,
+ IBackupAgent.Stub.asInterface(pmAgent.onBind()));
+ mStatus = statusAndResult.first;
+ agentResult = statusAndResult.second;
+ } catch (Exception e) {
+ mReporter.onExtractPmAgentDataError(e);
+ mStatus = BackupTransport.TRANSPORT_ERROR;
+ }
+
+ if (mStatus != BackupTransport.TRANSPORT_OK) {
+ mBackupManagerService.resetBackupState(mStateDir);
+ return BackupState.FINAL;
+ }
+
+ Preconditions.checkNotNull(agentResult);
+ return handleAgentResult(agentResult);
+ }
+
+ /**
+ * Returns either:
+ *
+ * <ul>
+ * <li>(next state, {@code null}): In case we failed to call the agent.
+ * <li>({@code null}, agent result): In case we successfully called the agent.
+ * </ul>
+ */
+ private Pair<BackupState, RemoteResult> extractNextAgentData() {
+ mStatus = BackupTransport.TRANSPORT_OK;
+
+ if (mQueue.isEmpty()) {
+ mReporter.onEmptyQueue();
+ return Pair.create(BackupState.FINAL, null);
+ }
+
+ String packageName = mQueue.remove(0);
+ mReporter.onStartPackageBackup(packageName);
+
+ // Verify that the requested app is eligible for key-value backup.
+ RemoteResult agentResult = null;
+ try {
+ mCurrentPackage = mPackageManager.getPackageInfo(
+ packageName, PackageManager.GET_SIGNING_CERTIFICATES);
+ ApplicationInfo applicationInfo = mCurrentPackage.applicationInfo;
+ if (!AppBackupUtils.appIsEligibleForBackup(applicationInfo, mPackageManager)) {
+ // The manifest has changed. This won't happen again because the app won't be
+ // requesting further backups.
+ mReporter.onPackageNotEligibleForBackup(packageName);
+ return Pair.create(BackupState.RUNNING_QUEUE, null);
+ }
+
+ if (AppBackupUtils.appGetsFullBackup(mCurrentPackage)) {
+ // Initially enqueued for key-value backup, but only supports full-backup now.
+ mReporter.onPackageEligibleForFullBackup(packageName);
+ return Pair.create(BackupState.RUNNING_QUEUE, null);
+ }
+
+ if (AppBackupUtils.appIsStopped(applicationInfo)) {
+ // Just as it won't receive broadcasts, we won't run it for backup.
+ mReporter.onPackageStopped(packageName);
+ return Pair.create(BackupState.RUNNING_QUEUE, null);
+ }
+
+ try {
+ mBackupManagerService.setWorkSource(new WorkSource(applicationInfo.uid));
+ IBackupAgent agent =
+ mBackupManagerService.bindToAgentSynchronous(
+ applicationInfo,
+ ApplicationThreadConstants.BACKUP_MODE_INCREMENTAL);
+ if (agent != null) {
+ mAgentBinder = agent;
+ Pair<Integer, RemoteResult> statusAndResult =
+ extractAgentData(packageName, agent);
+ mStatus = statusAndResult.first;
+ agentResult = statusAndResult.second;
+ } else {
+ // Timeout waiting for the agent to bind.
+ mStatus = BackupTransport.AGENT_ERROR;
+ }
+ } catch (SecurityException e) {
+ mReporter.onBindAgentError(e);
+ mStatus = BackupTransport.AGENT_ERROR;
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ mStatus = BackupTransport.AGENT_UNKNOWN;
+ } finally {
+ mBackupManagerService.setWorkSource(null);
+ }
+
+ if (mStatus != BackupTransport.TRANSPORT_OK) {
+ mAgentBinder = null;
+
+ if (mStatus == BackupTransport.AGENT_ERROR) {
+ mReporter.onAgentError(packageName);
+ mBackupManagerService.dataChangedImpl(packageName);
+ mStatus = BackupTransport.TRANSPORT_OK;
+ return Pair.create(BackupState.RUNNING_QUEUE, null);
+ }
+
+ if (mStatus == BackupTransport.AGENT_UNKNOWN) {
+ mReporter.onAgentUnknown(packageName);
+ mStatus = BackupTransport.TRANSPORT_OK;
+ return Pair.create(BackupState.RUNNING_QUEUE, null);
+ }
+
+ // Transport-level failure, re-enqueue everything.
+ revertBackup();
+ return Pair.create(BackupState.FINAL, null);
+ }
+
+ // Success: caller will figure out the state based on call result
+ return Pair.create(null, agentResult);
+ }
+
+ private void finishBackup() {
+ // Mark packages that we couldn't backup as pending backup.
+ for (String packageName : mQueue) {
+ mBackupManagerService.dataChangedImpl(packageName);
+ }
+
+ // If backup succeeded, we just invalidated this journal. If not, we've already re-enqueued
+ // the packages and also don't need the journal.
+ if (mJournal != null && !mJournal.delete()) {
+ mReporter.onJournalDeleteFailed(mJournal);
+ }
+
+ String callerLogString = "KVBT.finishBackup()";
+
+ // If we succeeded and this is the first time we've done a backup, we can record the current
+ // backup dataset token.
+ long currentToken = mBackupManagerService.getCurrentToken();
+ if ((mStatus == BackupTransport.TRANSPORT_OK) && (currentToken == 0)) {
+ try {
+ IBackupTransport transport = mTransportClient.connectOrThrow(callerLogString);
+ mBackupManagerService.setCurrentToken(transport.getCurrentRestoreSet());
+ mBackupManagerService.writeRestoreTokens();
+ } catch (Exception e) {
+ // This will be recorded the next time we succeed.
+ mReporter.onSetCurrentTokenError(e);
+ }
+ }
+
+ synchronized (mBackupManagerService.getQueueLock()) {
+ mBackupManagerService.setBackupRunning(false);
+ if (mStatus == BackupTransport.TRANSPORT_NOT_INITIALIZED) {
+ mReporter.onTransportNotInitialized();
+ try {
+ IBackupTransport transport = mTransportClient.connectOrThrow(callerLogString);
+ mBackupManagerService.getPendingInits().add(transport.name());
+ clearPmMetadata();
+ mBackupManagerService.backupNow();
+ } catch (Exception e) {
+ mReporter.onPendingInitializeTransportError(e);
+ }
+ }
+ }
+
+ unregisterTask();
+ mReporter.onKeyValueBackupFinished();
+
+ if (mCancelled) {
+ // We acknowledge the cancel as soon as we unregister the task, allowing other backups
+ // to be performed.
+ mCancelAcknowledged.open();
+ }
+
+ if (!mCancelled
+ && mStatus == BackupTransport.TRANSPORT_OK
+ && mFullBackupTask != null
+ && !mPendingFullBackups.isEmpty()) {
+ mReporter.onStartFullBackup(mPendingFullBackups);
+ // The key-value backup has finished but not the overall backup. Full-backup task will:
+ // * Call mObserver.backupFinished() (which is called by mReporter below).
+ // * Call mTaskFinishedListener.onFinished().
+ // * Release the wakelock.
+ (new Thread(mFullBackupTask, "full-transport-requested")).start();
+ return;
+ }
+
+ if (mFullBackupTask != null) {
+ mFullBackupTask.unregisterTask();
+ }
+ mTaskFinishedListener.onFinished(callerLogString);
+ mReporter.onBackupFinished(getBackupFinishedStatus(mCancelled, mStatus));
+ mBackupManagerService.getWakelock().release();
+ }
+
+ private int getBackupFinishedStatus(boolean cancelled, int transportStatus) {
+ if (cancelled) {
+ return BackupManager.ERROR_BACKUP_CANCELLED;
+ }
+ switch (transportStatus) {
+ case BackupTransport.TRANSPORT_OK:
+ case BackupTransport.TRANSPORT_QUOTA_EXCEEDED:
+ case BackupTransport.TRANSPORT_PACKAGE_REJECTED:
+ return BackupManager.SUCCESS;
+ case BackupTransport.TRANSPORT_NOT_INITIALIZED:
+ case BackupTransport.TRANSPORT_ERROR:
+ default:
+ return BackupManager.ERROR_TRANSPORT_ABORTED;
+ }
+ }
+
+ /** Removes PM state, triggering initialization in the next key-value task. */
+ private void clearPmMetadata() {
+ File pmState = new File(mStateDir, PM_PACKAGE);
+ if (pmState.exists()) {
+ pmState.delete();
+ }
+ }
+
+ /**
+ * Returns a {@link Pair}. The first of the pair contains the status. In case the status is
+ * {@link BackupTransport#TRANSPORT_OK}, the second of the pair contains the agent result,
+ * otherwise {@code null}.
+ */
+ private Pair<Integer, RemoteResult> extractAgentData(String packageName, IBackupAgent agent) {
+ mReporter.onExtractAgentData(packageName);
+
+ File blankStateFile = new File(mStateDir, BLANK_STATE_FILE_NAME);
+ mSavedStateFile = new File(mStateDir, packageName);
+ File savedStateFileForAgent = (mNonIncremental) ? blankStateFile : mSavedStateFile;
+ mBackupDataFile =
+ new File(mBackupManagerService.getDataDir(), packageName + STAGING_FILE_SUFFIX);
+ mNewStateFile = new File(mStateDir, packageName + NEW_STATE_FILE_SUFFIX);
+ mReporter.onAgentFilesReady(mBackupDataFile);
+
+ mSavedState = null;
+ mBackupData = null;
+ mNewState = null;
+
+ boolean callingAgent = false;
+ final RemoteResult agentResult;
+ try {
+ // MODE_CREATE to make an empty file if necessary
+ mSavedState = ParcelFileDescriptor.open(
+ savedStateFileForAgent, MODE_READ_ONLY | MODE_CREATE);
+ mBackupData = ParcelFileDescriptor.open(
+ mBackupDataFile, MODE_READ_WRITE | MODE_CREATE | MODE_TRUNCATE);
+ mNewState = ParcelFileDescriptor.open(
+ mNewStateFile, MODE_READ_WRITE | MODE_CREATE | MODE_TRUNCATE);
+
+ if (!SELinux.restorecon(mBackupDataFile)) {
+ mReporter.onRestoreconFailed(mBackupDataFile);
+ }
+
+ IBackupTransport transport = mTransportClient.connectOrThrow("KVBT.extractAgentData()");
+ long quota = transport.getBackupQuota(packageName, /* isFullBackup */ false);
+ int transportFlags = transport.getTransportFlags();
+ long kvBackupAgentTimeoutMillis =
+ mAgentTimeoutParameters.getKvBackupAgentTimeoutMillis();
+
+ callingAgent = true;
+ agentResult =
+ remoteCall(
+ callback ->
+ agent.doBackup(
+ mSavedState,
+ mBackupData,
+ mNewState,
+ quota,
+ callback,
+ transportFlags),
+ kvBackupAgentTimeoutMillis);
+ } catch (Exception e) {
+ mReporter.onCallAgentDoBackupError(packageName, callingAgent, e);
+ errorCleanup();
+ // TODO: Remove the check on callingAgent when RemoteCall supports local agent calls.
+ int status =
+ callingAgent ? BackupTransport.AGENT_ERROR : BackupTransport.TRANSPORT_ERROR;
+ return Pair.create(status, null);
+ }
+ blankStateFile.delete();
+
+ return Pair.create(BackupTransport.TRANSPORT_OK, agentResult);
+ }
+
+ private void failAgent(IBackupAgent agent, String message) {
+ try {
+ agent.fail(message);
+ } catch (Exception e) {
+ mReporter.onFailAgentError(mCurrentPackage.packageName);
+ }
+ }
+
+ // SHA-1 a byte array and return the result in hex
+ private String SHA1Checksum(byte[] input) {
+ final byte[] checksum;
+ try {
+ MessageDigest md = MessageDigest.getInstance("SHA-1");
+ checksum = md.digest(input);
+ } catch (NoSuchAlgorithmException e) {
+ mReporter.onDigestError(e);
+ return "00";
+ }
+
+ StringBuilder string = new StringBuilder(checksum.length * 2);
+ for (byte item : checksum) {
+ string.append(Integer.toHexString(item));
+ }
+ return string.toString();
+ }
+
+ private void writeWidgetPayloadIfAppropriate(FileDescriptor fd, String pkgName)
+ throws IOException {
+ // TODO: http://b/22388012
+ byte[] widgetState = AppWidgetBackupBridge.getWidgetState(pkgName, UserHandle.USER_SYSTEM);
+ File widgetFile = new File(mStateDir, pkgName + "_widget");
+ boolean priorStateExists = widgetFile.exists();
+ if (!priorStateExists && widgetState == null) {
+ return;
+ }
+ mReporter.onWriteWidgetData(priorStateExists, widgetState);
+
+ // if the new state is not null, we might need to compare checksums to
+ // determine whether to update the widget blob in the archive. If the
+ // widget state *is* null, we know a priori at this point that we simply
+ // need to commit a deletion for it.
+ String newChecksum = null;
+ if (widgetState != null) {
+ newChecksum = SHA1Checksum(widgetState);
+ if (priorStateExists) {
+ final String priorChecksum;
+ try (
+ FileInputStream fin = new FileInputStream(widgetFile);
+ DataInputStream in = new DataInputStream(fin)
+ ) {
+ priorChecksum = in.readUTF();
+ }
+ if (Objects.equals(newChecksum, priorChecksum)) {
+ // Same checksum => no state change => don't rewrite the widget data
+ return;
+ }
+ }
+ } // else widget state *became* empty, so we need to commit a deletion
+
+ BackupDataOutput out = new BackupDataOutput(fd);
+ if (widgetState != null) {
+ try (
+ FileOutputStream fout = new FileOutputStream(widgetFile);
+ DataOutputStream stateOut = new DataOutputStream(fout)
+ ) {
+ stateOut.writeUTF(newChecksum);
+ }
+
+ out.writeEntityHeader(KEY_WIDGET_STATE, widgetState.length);
+ out.writeEntityData(widgetState, widgetState.length);
+ } else {
+ // Widget state for this app has been removed; commit a deletion
+ out.writeEntityHeader(KEY_WIDGET_STATE, -1);
+ widgetFile.delete();
+ }
+ }
+
+ private BackupState sendDataToTransport(long agentResult) {
+ Preconditions.checkState(mBackupData != null);
+
+ String packageName = mCurrentPackage.packageName;
+ ApplicationInfo applicationInfo = mCurrentPackage.applicationInfo;
+ long filePos = mBackupDataFile.length();
+ FileDescriptor fd = mBackupData.getFileDescriptor();
+ boolean writingWidgetData = false;
+ try {
+ // If it's a 3rd party app, crash them if they wrote any protected keys.
+ if (applicationInfo != null &&
+ (applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
+ ParcelFileDescriptor readFd =
+ ParcelFileDescriptor.open(mBackupDataFile, MODE_READ_ONLY);
+ BackupDataInput in = new BackupDataInput(readFd.getFileDescriptor());
+ try {
+ while (in.readNextHeader()) {
+ String key = in.getKey();
+ if (key != null && key.charAt(0) >= 0xff00) {
+ mReporter.onAgentIllegalKey(mCurrentPackage, key);
+ failAgent(mAgentBinder, "Illegal backup key: " + key);
+ errorCleanup();
+ return BackupState.RUNNING_QUEUE;
+ }
+ in.skipEntityData();
+ }
+ } finally {
+ readFd.close();
+ }
+ }
+
+ writingWidgetData = true;
+ writeWidgetPayloadIfAppropriate(fd, packageName);
+ } catch (IOException e) {
+ if (writingWidgetData) {
+ mReporter.onWriteWidgetDataError(packageName, e);
+ } else {
+ mReporter.onReadAgentDataError(packageName, e);
+ }
+ try {
+ Os.ftruncate(fd, filePos);
+ } catch (ErrnoException ee) {
+ mReporter.onTruncateDataError();
+ }
+ }
+
+ clearAgentState();
+
+ ParcelFileDescriptor backupData = null;
+ mStatus = BackupTransport.TRANSPORT_OK;
+ long size = 0;
+ try {
+ IBackupTransport transport =
+ mTransportClient.connectOrThrow("KVBT.sendDataToTransport()");
+ size = mBackupDataFile.length();
+ if (size > 0) {
+ boolean isNonIncremental = mSavedStateFile.length() == 0;
+
+ if (mStatus == BackupTransport.TRANSPORT_OK) {
+ mReporter.onSendDataToTransport(packageName);
+ backupData = ParcelFileDescriptor.open(mBackupDataFile, MODE_READ_ONLY);
+ int userInitiatedFlag =
+ mUserInitiated ? BackupTransport.FLAG_USER_INITIATED : 0;
+ int incrementalFlag =
+ isNonIncremental
+ ? BackupTransport.FLAG_NON_INCREMENTAL
+ : BackupTransport.FLAG_INCREMENTAL;
+ int flags = userInitiatedFlag | incrementalFlag;
+
+ mStatus = transport.performBackup(mCurrentPackage, backupData, flags);
+ }
+
+ if (isNonIncremental
+ && mStatus == BackupTransport.TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED) {
+ mReporter.onNonIncrementalAndNonIncrementalRequired();
+ mStatus = BackupTransport.TRANSPORT_ERROR;
+ }
+
+ if (mStatus == BackupTransport.TRANSPORT_OK) {
+ mStatus = transport.finishBackup();
+ }
+ } else {
+ mReporter.onEmptyData(mCurrentPackage);
+ }
+
+ if (mStatus == BackupTransport.TRANSPORT_OK) {
+ mBackupDataFile.delete();
+ mNewStateFile.renameTo(mSavedStateFile);
+ mReporter.onPackageBackupComplete(packageName, size);
+ } else if (mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
+ mBackupDataFile.delete();
+ mNewStateFile.delete();
+ mReporter.onPackageBackupRejected(packageName);
+ } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
+ // TODO: Should reset files like above?
+ mReporter.onPackageBackupQuotaExceeded(packageName);
+ } else if (mStatus == BackupTransport.TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED) {
+ mReporter.onPackageBackupNonIncrementalRequired(mCurrentPackage);
+ mBackupDataFile.delete();
+ mSavedStateFile.delete();
+ mNewStateFile.delete();
+
+ // Immediately retry the package by adding it back to the front of the queue.
+ // We cannot add @pm@ to the queue because we back it up separately at the start.
+ // Below we request PM backup if that is the case.
+ if (!PM_PACKAGE.equals(packageName)) {
+ mQueue.add(0, packageName);
+ }
+ } else {
+ mReporter.onPackageBackupTransportFailure(packageName);
+ }
+ } catch (Exception e) {
+ mReporter.onPackageBackupError(packageName, e);
+ mStatus = BackupTransport.TRANSPORT_ERROR;
+ } finally {
+ tryCloseFileDescriptor(backupData, "backup data");
+ }
+
+ final BackupState nextState;
+ if (mStatus == BackupTransport.TRANSPORT_OK
+ || mStatus == BackupTransport.TRANSPORT_PACKAGE_REJECTED) {
+ nextState = BackupState.RUNNING_QUEUE;
+
+ } else if (mStatus == BackupTransport.TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED) {
+ // We want to immediately retry the current package.
+ if (PM_PACKAGE.equals(packageName)) {
+ nextState = BackupState.BACKUP_PM;
+ } else {
+ // This is an ordinary package so we will have added it back into the queue
+ // above. Thus, we proceed processing the queue.
+ nextState = BackupState.RUNNING_QUEUE;
+ }
+
+ } else if (mStatus == BackupTransport.TRANSPORT_QUOTA_EXCEEDED) {
+ if (mAgentBinder != null) {
+ try {
+ IBackupTransport transport =
+ mTransportClient.connectOrThrow("KVBT.sendDataToTransport()");
+ long quota = transport.getBackupQuota(mCurrentPackage.packageName, false);
+ mAgentBinder.doQuotaExceeded(size, quota);
+ } catch (Exception e) {
+ mReporter.onAgentDoQuotaExceededError(e);
+ }
+ }
+ nextState = BackupState.RUNNING_QUEUE;
+ } else {
+ // Any other error here indicates a transport-level failure. That means
+ // we need to halt everything and reschedule everything for next time.
+ revertBackup();
+ nextState = BackupState.FINAL;
+ }
+
+ return nextState;
+ }
+
+ /**
+ * Cancels this task.
+ *
+ * <p>After this method returns this task won't be registered in {@link BackupManagerService}
+ * anymore, which means there will be no backups running unless there is a racy request
+ * coming from another thread in between. As a consequence there will be no more calls to the
+ * transport originated from this task.
+ *
+ * <p>If this method is executed while an agent is performing a backup, we will stop waiting for
+ * it, disregard its backup data and finalize the task. However, if this method is executed in
+ * between agent calls, the backup data of the last called agent will be sent to
+ * the transport and we will not consider the next agent (nor the rest of the queue), proceeding
+ * to finalize the backup.
+ *
+ * <p>Note: This method is inherently racy since there are no guarantees about how much of the
+ * task will be executed after you made the call.
+ *
+ * @param cancelAll MUST be {@code true}. Will be removed.
+ */
+ @Override
+ public void handleCancel(boolean cancelAll) {
+ // This is called in a thread different from the one that executes method run().
+ Preconditions.checkArgument(cancelAll, "Can't partially cancel a key-value backup task");
+ markCancel();
+ waitCancel();
+ }
+
+ /** Marks this task as cancelled and tries to stop any ongoing agent call. */
+ @VisibleForTesting
+ public void markCancel() {
+ mReporter.onCancel();
+ mCancelled = true;
+ RemoteCall pendingCall = mPendingCall;
+ if (pendingCall != null) {
+ pendingCall.cancel();
+ }
+ }
+
+ /** Waits for this task to be cancelled after call to {@link #markCancel()}. */
+ @VisibleForTesting
+ public void waitCancel() {
+ mCancelAcknowledged.block();
+ }
+
+ private void handleAgentTimeout() {
+ mReporter.onAgentTimedOut(mCurrentPackage);
+ errorCleanup();
+ }
+
+ private void handleAgentCancelled() {
+ mReporter.onAgentCancelled(mCurrentPackage);
+ errorCleanup();
+ }
+
+ private void revertBackup() {
+ mReporter.onRevertBackup();
+ long delay;
+ try {
+ IBackupTransport transport =
+ mTransportClient.connectOrThrow("KVBT.revertBackup()");
+ delay = transport.requestBackupTime();
+ } catch (Exception e) {
+ mReporter.onTransportRequestBackupTimeError(e);
+ // Use the scheduler's default.
+ delay = 0;
+ }
+ KeyValueBackupJob.schedule(
+ mBackupManagerService.getContext(), delay, mBackupManagerService.getConstants());
+
+ for (String packageName : mOriginalQueue) {
+ mBackupManagerService.dataChangedImpl(packageName);
+ }
+ }
+
+ private void errorCleanup() {
+ mBackupDataFile.delete();
+ mNewStateFile.delete();
+ clearAgentState();
+ }
+
+ private void clearAgentState() {
+ // Cleanup common to both success and failure cases.
+ tryCloseFileDescriptor(mSavedState, "old state");
+ tryCloseFileDescriptor(mBackupData, "backup data");
+ tryCloseFileDescriptor(mNewState, "new state");
+ synchronized (mBackupManagerService.getCurrentOpLock()) {
+ // TODO: Do we still need this?
+ mSavedState = mBackupData = mNewState = null;
+ }
+
+ // For PM metadata (for which applicationInfo is null) there is no agent-bound state.
+ if (mCurrentPackage.applicationInfo != null) {
+ mBackupManagerService.unbindAgent(mCurrentPackage.applicationInfo);
+ }
+ }
+
+ private void tryCloseFileDescriptor(@Nullable Closeable closeable, String logName) {
+ if (closeable != null) {
+ try {
+ closeable.close();
+ } catch (IOException e) {
+ mReporter.onCloseFileDescriptorError(logName);
+ }
+ }
+ }
+
+ private RemoteResult remoteCall(RemoteCallable<IBackupCallback> remoteCallable, long timeoutMs)
+ throws RemoteException {
+ mPendingCall = new RemoteCall(mCancelled, remoteCallable, timeoutMs);
+ RemoteResult result = mPendingCall.call();
+ mReporter.onRemoteCallReturned(result);
+ mPendingCall = null;
+ return result;
+ }
+
+ private enum BackupState {
+ INITIAL,
+ BACKUP_PM,
+ RUNNING_QUEUE,
+ CANCELLED,
+ FINAL
+ }
+}
diff --git a/services/backup/java/com/android/server/backup/utils/AppBackupUtils.java b/services/backup/java/com/android/server/backup/utils/AppBackupUtils.java
index 28e9b77..9af952d 100644
--- a/services/backup/java/com/android/server/backup/utils/AppBackupUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/AppBackupUtils.java
@@ -136,7 +136,14 @@
/**
* Checks if the app is in a stopped state. This is not part of the general "eligible for
* backup?" check because we *do* still need to restore data to apps in this state (e.g.
- * newly-installing ones)
+ * newly-installing ones).
+ *
+ * <p>Reasons for such state:
+ * <ul>
+ * <li>The app has been force-stopped.
+ * <li>The app has been cleared.
+ * <li>The app has just been installed.
+ * </ul>
*/
public static boolean appIsStopped(ApplicationInfo app) {
return ((app.flags & ApplicationInfo.FLAG_STOPPED) != 0);
diff --git a/services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java b/services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java
index b23781d..6f08376 100644
--- a/services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java
@@ -21,6 +21,7 @@
import static com.android.server.backup.BackupManagerService.DEBUG;
import static com.android.server.backup.BackupManagerService.TAG;
+import android.annotation.Nullable;
import android.app.backup.BackupManagerMonitor;
import android.app.backup.IBackupManagerMonitor;
import android.content.pm.PackageInfo;
@@ -44,8 +45,13 @@
* @param extras - additional event data.
* @return <code>monitor</code> if call succeeded and <code>null</code> otherwise.
*/
- public static IBackupManagerMonitor monitorEvent(IBackupManagerMonitor monitor, int id,
- PackageInfo pkg, int category, Bundle extras) {
+ @Nullable
+ public static IBackupManagerMonitor monitorEvent(
+ @Nullable IBackupManagerMonitor monitor,
+ int id,
+ PackageInfo pkg,
+ int category,
+ Bundle extras) {
if (monitor != null) {
try {
Bundle bundle = new Bundle();
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index 5c14459..50f15ca0 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -624,7 +624,7 @@
// them will get the new sequence number at that point. (See for example how testing
// of JobScheduler's BatteryController works.)
sendBatteryChangedIntentLocked();
- if (mLastBatteryLevel != mHealthInfo.batteryLevel) {
+ if (mLastBatteryLevel != mHealthInfo.batteryLevel || mLastPlugType != mPlugType) {
sendBatteryLevelChangedIntentLocked();
}
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index f81541e..a07939e 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -1171,6 +1171,26 @@
}
private boolean bindService() {
+ int state = BluetoothAdapter.STATE_OFF;
+ try {
+ mBluetoothLock.readLock().lock();
+ if (mBluetooth != null) {
+ state = mBluetooth.getState();
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Unable to call getState", e);
+ return false;
+ } finally {
+ mBluetoothLock.readLock().unlock();
+ }
+
+ if (!mEnable || state != BluetoothAdapter.STATE_ON) {
+ if (DBG) {
+ Slog.d(TAG, "Unable to bindService while Bluetooth is disabled");
+ }
+ return false;
+ }
+
if (mIntent != null && mService == null && doBind(mIntent, this, 0,
UserHandle.CURRENT_OR_SELF)) {
Message msg = mHandler.obtainMessage(MESSAGE_BIND_PROFILE_SERVICE);
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 6b3f8f8..ba5f323 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2194,8 +2194,7 @@
break;
}
case NetworkAgent.EVENT_NETWORK_SCORE_CHANGED: {
- Integer score = (Integer) msg.obj;
- if (score != null) updateNetworkScore(nai, score.intValue());
+ updateNetworkScore(nai, msg.arg1);
break;
}
case NetworkAgent.EVENT_SET_EXPLICITLY_SELECTED: {
@@ -2203,7 +2202,7 @@
loge("ERROR: already-connected network explicitly selected.");
}
nai.networkMisc.explicitlySelected = true;
- nai.networkMisc.acceptUnvalidated = (boolean) msg.obj;
+ nai.networkMisc.acceptUnvalidated = msg.arg1 == 1;
break;
}
case NetworkAgent.EVENT_PACKET_KEEPALIVE: {
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 784dfb4..02a62ff 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -1714,10 +1714,9 @@
}
@Override
- public void addClient(IInputMethodClient client,
- IInputContext inputContext, int uid, int pid) {
- if (!calledFromValidUser()) {
- return;
+ public void addClient(IInputMethodClient client, IInputContext inputContext, int uid, int pid) {
+ if (Binder.getCallingUid() != Process.SYSTEM_UID) {
+ throw new SecurityException("Only system process can call this method.");
}
synchronized (mMethodMap) {
mClients.put(client.asBinder(), new ClientState(client,
@@ -1727,8 +1726,8 @@
@Override
public void removeClient(IInputMethodClient client) {
- if (!calledFromValidUser()) {
- return;
+ if (Binder.getCallingUid() != Process.SYSTEM_UID) {
+ throw new SecurityException("Only system process can call this method.");
}
synchronized (mMethodMap) {
ClientState cs = mClients.remove(client.asBinder());
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index abcd6ef..d829602 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -646,12 +646,7 @@
SystemProperties.set(PROP_QTAGUID_ENABLED, mBandwidthControlEnabled ? "1" : "0");
- try {
- mConnector.execute("strict", "enable");
- mStrictEnabled = true;
- } catch (NativeDaemonConnectorException e) {
- Log.wtf(TAG, "Failed strict enable", e);
- }
+ mStrictEnabled = true;
setDataSaverModeEnabled(mDataSaverMode);
@@ -1232,25 +1227,25 @@
public boolean getIpForwardingEnabled() throws IllegalStateException{
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
- final NativeDaemonEvent event;
try {
- event = mConnector.execute("ipfwd", "status");
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
+ final boolean isEnabled = mNetdService.ipfwdEnabled();
+ return isEnabled;
+ } catch (RemoteException | ServiceSpecificException e) {
+ throw new IllegalStateException(e);
}
-
- // 211 Forwarding enabled
- event.checkCode(IpFwdStatusResult);
- return event.getMessage().endsWith("enabled");
}
@Override
public void setIpForwardingEnabled(boolean enable) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mConnector.execute("ipfwd", enable ? "enable" : "disable", "tethering");
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
+ if (enable) {
+ mNetdService.ipfwdEnableForwarding("tethering");
+ } else {
+ mNetdService.ipfwdDisableForwarding("tethering");
+ }
+ } catch (RemoteException | ServiceSpecificException e) {
+ throw new IllegalStateException(e);
}
}
@@ -1376,11 +1371,14 @@
}
private void modifyInterfaceForward(boolean add, String fromIface, String toIface) {
- final Command cmd = new Command("ipfwd", add ? "add" : "remove", fromIface, toIface);
try {
- mConnector.execute(cmd);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
+ if (add) {
+ mNetdService.ipfwdAddInterfaceForward(fromIface, toIface);
+ } else {
+ mNetdService.ipfwdRemoveInterfaceForward(fromIface, toIface);
+ }
+ } catch (RemoteException | ServiceSpecificException e) {
+ throw new IllegalStateException(e);
}
}
@@ -1809,26 +1807,26 @@
}
private void applyUidCleartextNetworkPolicy(int uid, int policy) {
- final String policyString;
+ final int policyValue;
switch (policy) {
case StrictMode.NETWORK_POLICY_ACCEPT:
- policyString = "accept";
+ policyValue = INetd.PENALTY_POLICY_ACCEPT;
break;
case StrictMode.NETWORK_POLICY_LOG:
- policyString = "log";
+ policyValue = INetd.PENALTY_POLICY_LOG;
break;
case StrictMode.NETWORK_POLICY_REJECT:
- policyString = "reject";
+ policyValue = INetd.PENALTY_POLICY_REJECT;
break;
default:
throw new IllegalArgumentException("Unknown policy " + policy);
}
try {
- mConnector.execute("strict", "set_uid_cleartext_policy", uid, policyString);
+ mNetdService.strictUidCleartextPenalty(uid, policyValue);
mUidCleartextPolicy.put(uid, policy);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
+ } catch (RemoteException | ServiceSpecificException e) {
+ throw new IllegalStateException(e);
}
}
@@ -1846,6 +1844,7 @@
return;
}
+ // TODO: remove this code after removing prepareNativeDaemon()
if (!mStrictEnabled) {
// Module isn't enabled yet; stash the requested policy away to
// apply later once the daemon is connected.
@@ -2313,9 +2312,9 @@
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mConnector.execute("clatd", "start", interfaceName);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
+ mNetdService.clatdStart(interfaceName);
+ } catch (RemoteException | ServiceSpecificException e) {
+ throw new IllegalStateException(e);
}
}
@@ -2324,28 +2323,13 @@
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mConnector.execute("clatd", "stop", interfaceName);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
+ mNetdService.clatdStop(interfaceName);
+ } catch (RemoteException | ServiceSpecificException e) {
+ throw new IllegalStateException(e);
}
}
@Override
- public boolean isClatdStarted(String interfaceName) {
- mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
-
- final NativeDaemonEvent event;
- try {
- event = mConnector.execute("clatd", "status", interfaceName);
- } catch (NativeDaemonConnectorException e) {
- throw e.rethrowAsParcelableException();
- }
-
- event.checkCode(ClatdStatusResult);
- return event.getMessage().endsWith("started");
- }
-
- @Override
public void registerNetworkActivityListener(INetworkActivityListener listener) {
mNetworkActivityListeners.register(listener);
}
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/PinnerService.java b/services/core/java/com/android/server/PinnerService.java
index a05a3e7..0deaee7 100644
--- a/services/core/java/com/android/server/PinnerService.java
+++ b/services/core/java/com/android/server/PinnerService.java
@@ -43,6 +43,7 @@
import android.os.Message;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.MediaStore;
import android.provider.Settings;
import android.system.ErrnoException;
@@ -104,6 +105,7 @@
private final Context mContext;
private final ActivityManagerInternal mAmInternal;
private final IActivityManager mAm;
+ private final UserManager mUserManager;
/** The list of the statically pinned files. */
@GuardedBy("this")
@@ -165,6 +167,8 @@
mAmInternal = LocalServices.getService(ActivityManagerInternal.class);
mAm = ActivityManager.getService();
+ mUserManager = mContext.getSystemService(UserManager.class);
+
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_REPLACED);
filter.addDataScheme("package");
@@ -195,12 +199,16 @@
*/
@Override
public void onSwitchUser(int userHandle) {
- sendPinAppsMessage(userHandle);
+ if (!mUserManager.isManagedProfile(userHandle)) {
+ sendPinAppsMessage(userHandle);
+ }
}
@Override
public void onUnlockUser(int userHandle) {
- sendPinAppsMessage(userHandle);
+ if (!mUserManager.isManagedProfile(userHandle)) {
+ sendPinAppsMessage(userHandle);
+ }
}
/**
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index 6409bb3..306cd83 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -24,12 +24,14 @@
import static android.os.storage.OnObbStateChangeListener.ERROR_PERMISSION_DENIED;
import static android.os.storage.OnObbStateChangeListener.MOUNTED;
import static android.os.storage.OnObbStateChangeListener.UNMOUNTED;
+
import static com.android.internal.util.XmlUtils.readIntAttribute;
import static com.android.internal.util.XmlUtils.readLongAttribute;
import static com.android.internal.util.XmlUtils.readStringAttribute;
import static com.android.internal.util.XmlUtils.writeIntAttribute;
import static com.android.internal.util.XmlUtils.writeLongAttribute;
import static com.android.internal.util.XmlUtils.writeStringAttribute;
+
import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
import static org.xmlpull.v1.XmlPullParser.START_TAG;
@@ -79,6 +81,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;
@@ -111,6 +114,7 @@
import android.util.Xml;
import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IMediaContainerService;
import com.android.internal.os.AppFuseMount;
import com.android.internal.os.BackgroundThread;
@@ -124,11 +128,13 @@
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
import com.android.internal.widget.LockPatternUtils;
-import com.android.server.pm.PackageManagerService;
import com.android.server.storage.AppFuseBridge;
import com.android.server.wm.ActivityTaskManagerInternal;
import com.android.server.wm.ActivityTaskManagerInternal.ScreenObserver;
+import libcore.io.IoUtils;
+import libcore.util.EmptyArray;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -158,14 +164,13 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
-import libcore.io.IoUtils;
-import libcore.util.EmptyArray;
-
/**
* Service responsible for various storage media. Connects to {@code vold} to
* watch for and manage dynamically added storage, such as SD cards and USB mass
@@ -181,8 +186,8 @@
private static final String ZRAM_ENABLED_PROPERTY =
"persist.sys.zram_enabled";
- private static final String ISOLATED_STORAGE_PROPERTY =
- "persist.sys.isolated_storage";
+ private static final boolean ENABLE_ISOLATED_STORAGE = SystemProperties
+ .getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false);
private static final String SHARED_SANDBOX_ID_PREFIX = "shared:";
@@ -447,8 +452,8 @@
private volatile boolean mDaemonConnected = false;
private volatile boolean mSecureKeyguardShowing = true;
- private PackageManagerService mPms;
private PackageManagerInternal mPmInternal;
+ private UserManagerInternal mUmInternal;
private final Callbacks mCallbacks;
private final LockPatternUtils mLockPatternUtils;
@@ -823,8 +828,8 @@
// System user does not have media provider, so skip.
if (user.isSystemOnly()) continue;
- final ProviderInfo provider = mPms.resolveContentProvider(MediaStore.AUTHORITY,
- PackageManager.MATCH_DIRECT_BOOT_AWARE
+ final ProviderInfo provider = mPmInternal.resolveContentProvider(
+ MediaStore.AUTHORITY, PackageManager.MATCH_DIRECT_BOOT_AWARE
| PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
user.id);
if (provider != null) {
@@ -1179,7 +1184,7 @@
@GuardedBy("mLock")
private void onVolumeCreatedLocked(VolumeInfo vol) {
- if (mPms.isOnlyCoreApps()) {
+ if (mPmInternal.isOnlyCoreApps()) {
Slog.d(TAG, "System booted in core-only mode; ignoring volume " + vol.getId());
return;
}
@@ -1427,9 +1432,8 @@
mCallbacks = new Callbacks(FgThread.get().getLooper());
mLockPatternUtils = new LockPatternUtils(mContext);
- // XXX: This will go away soon in favor of IMountServiceObserver
- mPms = (PackageManagerService) ServiceManager.getService("package");
mPmInternal = LocalServices.getService(PackageManagerInternal.class);
+ mUmInternal = LocalServices.getService(UserManagerInternal.class);
HandlerThread hthread = new HandlerThread(TAG);
hthread.start();
@@ -1483,14 +1487,13 @@
connect();
}
- private void collectPackagesInfo() {
- if (!SystemProperties.getBoolean(ISOLATED_STORAGE_PROPERTY, false)) {
- return;
- }
+ @VisibleForTesting
+ void collectPackagesInfo() {
+ if (!ENABLE_ISOLATED_STORAGE) return;
+
resetPackageData();
final SparseArray<String> sharedUserIds = mPmInternal.getAppsWithSharedUserIds();
- final int[] userIds = LocalServices.getService(
- UserManagerInternal.class).getUserIds();
+ final int[] userIds = mUmInternal.getUserIds();
for (int userId : userIds) {
final List<ApplicationInfo> appInfos
= mContext.getPackageManager().getInstalledApplicationsAsUser(
@@ -1524,9 +1527,8 @@
return sharedUserId == null ? packageName : SHARED_SANDBOX_ID_PREFIX + sharedUserId;
}
private void pushPackagesInfo() throws RemoteException {
- if (!SystemProperties.getBoolean(ISOLATED_STORAGE_PROPERTY, false)) {
- return;
- }
+ if (!ENABLE_ISOLATED_STORAGE) return;
+
// Arrays to fill up from {@link #mAppIds}
final String[] allPackageNames;
final int[] appIdsForPackages;
@@ -1564,9 +1566,8 @@
}
private String[] getPackagesArrayForUser(int userId) {
- if (!SystemProperties.getBoolean(ISOLATED_STORAGE_PROPERTY, false)) {
- return new String[0];
- }
+ if (!ENABLE_ISOLATED_STORAGE) return EmptyArray.STRING;
+
synchronized (mPackagesLock) {
return getPackagesForUserPL(userId).toArray(new String[0]);
}
@@ -2266,7 +2267,7 @@
return false;
}
- final int packageUid = mPms.getPackageUid(packageName,
+ final int packageUid = mPmInternal.getPackageUid(packageName,
PackageManager.MATCH_DEBUG_TRIAGED_MISSING, UserHandle.getUserId(callerUid));
if (DEBUG_OBB) {
@@ -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;
@@ -3087,7 +3091,7 @@
bytes += storage.getStorageLowBytes(path);
}
- mPms.freeStorage(volumeUuid, bytes, flags);
+ mPmInternal.freeStorage(volumeUuid, bytes, flags);
} catch (IOException e) {
throw new ParcelableException(e);
} finally {
@@ -3095,6 +3099,72 @@
}
}
+ private static final Pattern PATTERN_TRANSLATE = Pattern.compile(
+ "(?i)^(/storage/[^/]+/(?:[0-9]+/)?)(.*)");
+
+ @Override
+ public String translateAppToSystem(String path, String packageName, int userId) {
+ return translateInternal(path, packageName, userId, true);
+ }
+
+ @Override
+ public String translateSystemToApp(String path, String packageName, int userId) {
+ return translateInternal(path, packageName, userId, false);
+ }
+
+ private String translateInternal(String path, String packageName, int userId,
+ boolean toSystem) {
+ if (!ENABLE_ISOLATED_STORAGE) return path;
+
+ if (path.contains("/../")) {
+ throw new SecurityException("Shady looking path " + path);
+ }
+
+ final int uid = mPmInternal.getPackageUid(packageName,
+ PackageManager.MATCH_UNINSTALLED_PACKAGES, userId);
+ final String sandboxId;
+ synchronized (mPackagesLock) {
+ sandboxId = mSandboxIds.get(UserHandle.getAppId(uid));
+ }
+ if (uid < 0 || sandboxId == null) {
+ throw new IllegalArgumentException("Unknown package " + packageName);
+ }
+
+ final Matcher m = PATTERN_TRANSLATE.matcher(path);
+ if (m.matches()) {
+ final String device = m.group(1);
+ final String devicePath = m.group(2);
+
+ // Does path belong to any packages belonging to this UID? If so,
+ // they get to go straight through to legacy paths.
+ final String[] pkgs = mContext.getPackageManager().getPackagesForUid(uid);
+ for (String pkg : pkgs) {
+ if (devicePath.startsWith("Android/data/" + pkg + "/") ||
+ devicePath.startsWith("Android/media/" + pkg + "/") ||
+ devicePath.startsWith("Android/obb/" + pkg + "/")) {
+ return path;
+ }
+ }
+
+ if (toSystem) {
+ // Everything else goes into sandbox.
+ return device + "Android/sandbox/" + sandboxId.replace(':', '/') + "/" + devicePath;
+ } else {
+ // Does path belong to this sandbox? If so, leave sandbox.
+ final String sandboxPrefix = "Android/sandbox/" + sandboxId.replace(':', '/') + "/";
+ if (devicePath.startsWith(sandboxPrefix)) {
+ return device + devicePath.substring(sandboxPrefix.length());
+ }
+
+ // Path isn't valid inside sandbox!
+ throw new SecurityException(
+ "Path " + path + " isn't valid inside sandbox " + sandboxId);
+ }
+ }
+
+ return path;
+ }
+
private void addObbStateLocked(ObbState obbState) throws RemoteException {
final IBinder binder = obbState.getBinder();
List<ObbState> obbStates = mObbMounts.get(binder);
@@ -3760,9 +3830,7 @@
@Override
public void onExternalStoragePolicyChanged(int uid, String packageName) {
// No runtime storage permissions in isolated storage world, so nothing to do here.
- if (SystemProperties.getBoolean(ISOLATED_STORAGE_PROPERTY, false)) {
- return;
- }
+ if (ENABLE_ISOLATED_STORAGE) return;
final int mountMode = getExternalStorageMountMode(uid, packageName);
remountUidExternalStorage(uid, mountMode);
}
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index ad9fa40..566ce4f 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -36,6 +36,7 @@
import android.telephony.CellLocation;
import android.telephony.DisconnectCause;
import android.telephony.LocationAccessPolicy;
+import android.telephony.PhoneCapability;
import android.telephony.PhoneStateListener;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
@@ -47,7 +48,6 @@
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.telephony.VoLteServiceState;
-import android.text.TextUtils;
import android.util.LocalLog;
import com.android.internal.app.IBatteryStats;
@@ -200,6 +200,8 @@
private boolean mCarrierNetworkChangeState = false;
+ private PhoneCapability mPhoneCapability = null;
+
private final LocalLog mLocalLog = new LocalLog(100);
private PreciseDataConnectionState mPreciseDataConnectionState =
@@ -658,6 +660,13 @@
remove(r.binder);
}
}
+ if ((events & PhoneStateListener.LISTEN_PHONE_CAPABILITY_CHANGE) != 0) {
+ try {
+ r.callback.onPhoneCapabilityChanged(mPhoneCapability);
+ } catch (RemoteException ex) {
+ remove(r.binder);
+ }
+ }
}
}
} else {
@@ -1453,6 +1462,33 @@
}
}
+ public void notifyPhoneCapabilityChanged(PhoneCapability capability) {
+ if (!checkNotifyPermission("notifyPhoneCapabilityChanged()")) {
+ return;
+ }
+
+ if (VDBG) {
+ log("notifyPhoneCapabilityChanged: capability=" + capability);
+ }
+
+ synchronized (mRecords) {
+ mPhoneCapability = capability;
+
+ for (Record r : mRecords) {
+ if (r.matchPhoneStateListenerEvent(
+ PhoneStateListener.LISTEN_PHONE_CAPABILITY_CHANGE)) {
+ try {
+ r.callback.onPhoneCapabilityChanged(capability);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
+
@Override
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
final IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ");
@@ -1488,6 +1524,7 @@
pw.println("mForegroundCallState=" + mForegroundCallState);
pw.println("mBackgroundCallState=" + mBackgroundCallState);
pw.println("mVoLteServiceState=" + mVoLteServiceState);
+ pw.println("mPhoneCapability=" + mPhoneCapability);
pw.decreaseIndent();
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/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index e7a8221..713da30 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -100,6 +100,7 @@
"android.hardware.audio@4.0::IDevicesFactory",
"android.hardware.bluetooth@1.0::IBluetoothHci",
"android.hardware.camera.provider@2.4::ICameraProvider",
+ "android.hardware.graphics.allocator@2.0::IAllocator",
"android.hardware.graphics.composer@2.1::IComposer",
"android.hardware.media.omx@1.0::IOmx",
"android.hardware.media.omx@1.0::IOmxStore",
diff --git a/services/core/java/com/android/server/am/ActiveInstrumentation.java b/services/core/java/com/android/server/am/ActiveInstrumentation.java
index ff65951..8cd9d188 100644
--- a/services/core/java/com/android/server/am/ActiveInstrumentation.java
+++ b/services/core/java/com/android/server/am/ActiveInstrumentation.java
@@ -139,7 +139,9 @@
proto.write(ActiveInstrumentationProto.WATCHER, mWatcher.toString());
proto.write(ActiveInstrumentationProto.UI_AUTOMATION_CONNECTION,
mUiAutomationConnection.toString());
- proto.write(ActiveInstrumentationProto.ARGUMENTS, mArguments.toString());
+ if (mArguments != null) {
+ mArguments.writeToProto(proto, ActiveInstrumentationProto.ARGUMENTS);
+ }
proto.end(token);
}
}
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 48d554c..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 {
@@ -3620,8 +3618,7 @@
mPendingStarts.remove(startSeq);
app.pendingStart = false;
forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid),
- false, false, true, false, false,
- UserHandle.getUserId(app.userId), "start failure");
+ false, false, true, false, false, app.userId, "start failure");
}
}
});
@@ -3637,8 +3634,7 @@
Slog.e(TAG, "Failure starting process " + app.processName, e);
app.pendingStart = false;
forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid),
- false, false, true, false, false,
- UserHandle.getUserId(app.userId), "start failure");
+ false, false, true, false, false, app.userId, "start failure");
}
return app.pid > 0;
}
@@ -6019,10 +6015,9 @@
}
// We deprecated Build.SERIAL and it is not accessible to
- // apps that target the v2 security sandbox and to apps that
- // target APIs higher than O MR1. Since access to the serial
+ // Instant Apps and target APIs higher than O MR1. Since access to the serial
// is now behind a permission we push down the value.
- final String buildSerial = (appInfo.targetSandboxVersion < 2
+ final String buildSerial = (!appInfo.isInstantApp()
&& appInfo.targetSdkVersion < Build.VERSION_CODES.P)
? sTheRealBuildSerial : Build.UNKNOWN;
@@ -7219,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);
@@ -21108,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/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index 081d6f9..9de6875 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -16,6 +16,14 @@
package com.android.server.am;
+import static android.app.ActivityTaskManager.RESIZE_MODE_SYSTEM;
+import static android.app.ActivityTaskManager.RESIZE_MODE_USER;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
+import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static android.view.Display.INVALID_DISPLAY;
+
+import static com.android.server.am.TaskRecord.INVALID_TASK_ID;
+
import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.ActivityTaskManager;
@@ -102,15 +110,6 @@
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
-import static android.app.ActivityTaskManager.RESIZE_MODE_SYSTEM;
-import static android.app.ActivityTaskManager.RESIZE_MODE_USER;
-import static android.app.ActivityTaskManager.INVALID_STACK_ID;
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
-import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
-import static android.view.Display.INVALID_DISPLAY;
-
-import static com.android.server.am.TaskRecord.INVALID_TASK_ID;
-
final class ActivityManagerShellCommand extends ShellCommand {
public static final String NO_CLASS_ERROR_CODE = "Error type 3";
private static final String SHELL_PACKAGE_NAME = "com.android.shell";
@@ -2850,6 +2849,7 @@
pw.println(" --checkin: output checkin format, resetting data.");
pw.println(" --C: output checkin format, not resetting data.");
pw.println(" --proto: output dump in protocol buffer format.");
+ pw.println(" --autofill: dump just the autofill-related state of an activity");
} else {
pw.println("Activity manager (activity) commands:");
pw.println(" help");
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/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 67abedc..628207c 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -705,9 +705,13 @@
final boolean inPictureInPictureMode = inPinnedWindowingMode() && targetStackBounds != null;
if (inPictureInPictureMode != mLastReportedPictureInPictureMode || forceUpdate) {
// Picture-in-picture mode changes also trigger a multi-window mode change as well, so
- // update that here in order
+ // update that here in order. Set the last reported MW state to the same as the PiP
+ // state since we haven't yet actually resized the task (these callbacks need to
+ // preceed the configuration change from the resiez.
+ // TODO(110009072): Once we move these callbacks to the client, remove all logic related
+ // to forcing the update of the picture-in-picture mode as a part of the PiP animation.
mLastReportedPictureInPictureMode = inPictureInPictureMode;
- mLastReportedMultiWindowMode = inMultiWindowMode();
+ mLastReportedMultiWindowMode = inPictureInPictureMode;
final Configuration newConfig = task.computeNewOverrideConfigurationForBounds(
targetStackBounds, null);
schedulePictureInPictureModeChanged(newConfig);
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 54f87ce..fbf2855 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -498,7 +498,7 @@
+ reason);
setResumedActivity(record, reason + " - onActivityStateChanged");
if (record == mStackSupervisor.getTopResumedActivity()) {
- // TODO(b/111541062): Support tracking multiple resumed activities
+ // TODO(b/111361570): Support multiple focused apps in WM
mService.setResumedActivityUncheckLocked(record, reason);
}
mStackSupervisor.mRecentTasks.add(record.getTask());
@@ -3423,7 +3423,15 @@
}
// Move focus to next focusable stack if possible.
- if (adjustFocusToNextFocusableStack(myReason) != null) {
+ final ActivityStack nextFocusableStack = adjustFocusToNextFocusableStack(myReason);
+ if (nextFocusableStack != null) {
+ final ActivityRecord top = nextFocusableStack.topRunningActivityLocked();
+ if (top != null && top == mStackSupervisor.getTopResumedActivity()) {
+ // TODO(b/111361570): Remove this and update focused app per-display in
+ // WindowManager every time an activity becomes resumed in
+ // ActivityTaskManagerService#setResumedActivityUncheckLocked().
+ mService.setResumedActivityUncheckLocked(top, reason);
+ }
return;
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 609ad75..9809bfa 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -3451,7 +3451,7 @@
stack.moveToFront(reason, task);
// Report top activity change to tracking services and WM
if (r == getTopResumedActivity()) {
- // TODO(b/111541062): Support tracking multiple resumed activities
+ // TODO(b/111361570): Support multiple focused apps in WM
mService.setResumedActivityUncheckLocked(r, reason);
}
return true;
@@ -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 54c2ee5..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
@@ -4749,7 +4750,7 @@
updateResumedAppTrace(r);
mLastResumedActivity = r;
- // TODO(b/111541062): Support multiple focused apps in WM
+ // TODO(b/111361570): Support multiple focused apps in WM
mWindowManager.setFocusedApp(r.appToken, true);
applyUpdateLockStateLocked(r);
@@ -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/am/RunningTasks.java b/services/core/java/com/android/server/am/RunningTasks.java
index 8c92496..7008cee 100644
--- a/services/core/java/com/android/server/am/RunningTasks.java
+++ b/services/core/java/com/android/server/am/RunningTasks.java
@@ -54,17 +54,15 @@
// Gather all of the tasks across all of the tasks, and add them to the sorted set
mTmpSortedSet.clear();
- mTmpStackTasks.clear();
final int numDisplays = activityDisplays.size();
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
final ActivityDisplay display = activityDisplays.valueAt(displayNdx);
for (int stackNdx = display.getChildCount() - 1; stackNdx >= 0; --stackNdx) {
final ActivityStack stack = display.getChildAt(stackNdx);
+ mTmpStackTasks.clear();
stack.getRunningTasks(mTmpStackTasks, ignoreActivityType, ignoreWindowingMode,
callingUid, allowed);
- for (int i = mTmpStackTasks.size() - 1; i >= 0; i--) {
- mTmpSortedSet.addAll(mTmpStackTasks);
- }
+ mTmpSortedSet.addAll(mTmpStackTasks);
}
}
diff --git a/services/core/java/com/android/server/am/TEST_MAPPING b/services/core/java/com/android/server/am/TEST_MAPPING
index 9e11eb0..4ca96a1 100644
--- a/services/core/java/com/android/server/am/TEST_MAPPING
+++ b/services/core/java/com/android/server/am/TEST_MAPPING
@@ -46,7 +46,7 @@
"include-annotation": "android.platform.test.annotations.Presubmit"
},
{
- "exclude-annotation": "android.support.test.filters.FlakyTest"
+ "exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
}
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index f854df6..bd412fc 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -24,7 +24,6 @@
import static android.app.ActivityManager.USER_OP_SUCCESS;
import static android.os.Process.SHELL_UID;
import static android.os.Process.SYSTEM_UID;
-
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_MU;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -49,6 +48,7 @@
import android.app.IUserSwitchObserver;
import android.app.KeyguardManager;
import android.app.usage.UsageEvents;
+import android.appwidget.AppWidgetManagerInternal;
import android.content.Context;
import android.content.IIntentReceiver;
import android.content.Intent;
@@ -535,6 +535,9 @@
}
}
+ // Spin up app widgets prior to boot-complete, so they can be ready promptly
+ mInjector.startUserWidgets(userId);
+
Slog.i(TAG, "Sending BOOT_COMPLETE user #" + userId);
// Do not report secondary users, runtime restarts or first boot/upgrade
if (userId == UserHandle.USER_SYSTEM
@@ -2174,6 +2177,13 @@
}
}
+ void startUserWidgets(int userId) {
+ AppWidgetManagerInternal awm = LocalServices.getService(AppWidgetManagerInternal.class);
+ if (awm != null) {
+ awm.unlockUser(userId);
+ }
+ }
+
void updateUserConfiguration() {
mService.mActivityTaskManager.updateUserConfiguration();
}
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/biometrics/common/AuthenticationClient.java b/services/core/java/com/android/server/biometrics/common/AuthenticationClient.java
index 10a1b90..a9cf963 100644
--- a/services/core/java/com/android/server/biometrics/common/AuthenticationClient.java
+++ b/services/core/java/com/android/server/biometrics/common/AuthenticationClient.java
@@ -21,10 +21,11 @@
import android.hardware.biometrics.BiometricConstants;
import android.hardware.biometrics.BiometricPrompt;
import android.hardware.biometrics.IBiometricPromptReceiver;
-import android.hardware.fingerprint.Fingerprint;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Bundle;
+import android.os.Handler;
import android.os.IBinder;
+import android.os.Looper;
import android.os.RemoteException;
import android.util.Slog;
@@ -35,6 +36,7 @@
*/
public abstract class AuthenticationClient extends ClientMonitor {
private long mOpId;
+ private Handler mHandler;
public abstract int handleFailedAttempt();
public abstract void resetFailedAttempts();
@@ -97,6 +99,7 @@
mStatusBarService = statusBarService;
mFingerprintManager = (FingerprintManager) getContext()
.getSystemService(Context.FINGERPRINT_SERVICE);
+ mHandler = new Handler(Looper.getMainLooper());
}
@Override
@@ -217,15 +220,19 @@
BiometricConstants.BIOMETRIC_ERROR_LOCKOUT :
BiometricConstants.BIOMETRIC_ERROR_LOCKOUT_PERMANENT;
- // TODO: if the dialog is showing, this error should be delayed. On a similar
- // note, AuthenticationClient should override onError and delay all other errors
- // as well, if the dialog is showing
- listener.onError(getHalDeviceId(), errorCode, 0 /* vendorCode */);
-
// Send the lockout message to the system dialog
if (mBundle != null) {
mStatusBarService.onBiometricError(
mFingerprintManager.getErrorString(errorCode, 0 /* vendorCode */));
+ mHandler.postDelayed(() -> {
+ try {
+ listener.onError(getHalDeviceId(), errorCode, 0 /* vendorCode */);
+ } catch (RemoteException e) {
+ Slog.w(getLogTag(), "RemoteException while sending error");
+ }
+ }, BiometricPrompt.HIDE_DIALOG_DELAY);
+ } else {
+ listener.onError(getHalDeviceId(), errorCode, 0 /* vendorCode */);
}
} catch (RemoteException e) {
Slog.w(getLogTag(), "Failed to notify lockout:", e);
diff --git a/services/core/java/com/android/server/biometrics/common/BiometricService.java b/services/core/java/com/android/server/biometrics/common/BiometricService.java
index f54baef..5603f2f 100644
--- a/services/core/java/com/android/server/biometrics/common/BiometricService.java
+++ b/services/core/java/com/android/server/biometrics/common/BiometricService.java
@@ -58,7 +58,6 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.statusbar.IStatusBarService;
import com.android.server.SystemService;
-import com.android.server.biometrics.face.FaceService;
import com.android.server.biometrics.fingerprint.FingerprintService;
import java.util.ArrayList;
diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java
index e2ad5f5..c80c0f1 100644
--- a/services/core/java/com/android/server/clipboard/ClipboardService.java
+++ b/services/core/java/com/android/server/clipboard/ClipboardService.java
@@ -47,12 +47,14 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
+import android.provider.Settings;
import android.util.Slog;
import android.util.SparseArray;
import com.android.server.LocalServices;
import com.android.server.SystemService;
import com.android.server.uri.UriGrantsManagerInternal;
+import com.android.server.wm.WindowManagerInternal;
import java.io.IOException;
import java.io.RandomAccessFile;
@@ -149,6 +151,7 @@
private final IActivityManager mAm;
private final IUriGrantsManager mUgm;
private final UriGrantsManagerInternal mUgmInternal;
+ private final WindowManagerInternal mWm;
private final IUserManager mUm;
private final PackageManager mPm;
private final AppOpsManager mAppOps;
@@ -167,6 +170,7 @@
mAm = ActivityManager.getService();
mUgm = UriGrantsManager.getService();
mUgmInternal = LocalServices.getService(UriGrantsManagerInternal.class);
+ mWm = LocalServices.getService(WindowManagerInternal.class);
mPm = getContext().getPackageManager();
mUm = (IUserManager) ServiceManager.getService(Context.USER_SERVICE);
mAppOps = (AppOpsManager) getContext().getSystemService(Context.APP_OPS_SERVICE);
@@ -623,18 +627,19 @@
if (mAppOps.noteOp(op, callingUid, callingPackage) != AppOpsManager.MODE_ALLOWED) {
return false;
}
- try {
- // Installed apps can access the clipboard at any time.
- if (!AppGlobals.getPackageManager().isInstantApp(callingPackage,
- UserHandle.getUserId(callingUid))) {
- return true;
- }
- // Instant apps can only access the clipboard if they are in the foreground.
- return mAm.isAppForeground(callingUid);
- } catch (RemoteException e) {
- Slog.e("clipboard", "Failed to get Instant App status for package " + callingPackage,
- e);
- return false;
+ // The default IME is always allowed to access the clipboard.
+ String defaultIme = Settings.Secure.getStringForUser(getContext().getContentResolver(),
+ Settings.Secure.DEFAULT_INPUT_METHOD, UserHandle.getUserId(callingUid));
+ if (defaultIme != null && defaultIme.equals(callingPackage)) {
+ return true;
}
+
+ // Otherwise only focused applications can access the clipboard.
+ boolean uidFocused = mWm.isUidFocused(callingUid);
+ if (!uidFocused) {
+ Slog.e(TAG, "Denying clipboard access to " + callingPackage
+ + ", application is not in focus.");
+ }
+ return uidFocused;
}
}
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/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index d06e785..f4d20b3 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -1014,12 +1014,7 @@
Bundle finalExtras = new Bundle(extras);
String packageName = syncAdapterInfo.componentName.getPackageName();
// If the app did not run and has no account access, done
- try {
- if (!mPackageManagerInternal.wasPackageEverLaunched(packageName, userId)) {
- continue;
- }
- } catch (IllegalArgumentException e) {
- // Package not found, race with an uninstall
+ if (!wasPackageEverLaunched(packageName, userId)) {
continue;
}
mAccountManagerInternal.requestAccountAccess(account.account,
@@ -3352,7 +3347,7 @@
String packageName = op.owningPackage;
final int userId = UserHandle.getUserId(op.owningUid);
// If the app did not run and has no account access, done
- if (!mPackageManagerInternal.wasPackageEverLaunched(packageName, userId)) {
+ if (!wasPackageEverLaunched(packageName, userId)) {
return;
}
mAccountManagerInternal.requestAccountAccess(op.target.account,
@@ -4059,4 +4054,12 @@
public void resetTodayStats() {
mSyncStorageEngine.resetTodayStats(/*force=*/ true);
}
+
+ private boolean wasPackageEverLaunched(String packageName, int userId) {
+ try {
+ return mPackageManagerInternal.wasPackageEverLaunched(packageName, userId);
+ } catch (IllegalArgumentException e) {
+ return false; // Package has been removed.
+ }
+ }
}
diff --git a/services/core/java/com/android/server/display/DisplayDeviceInfo.java b/services/core/java/com/android/server/display/DisplayDeviceInfo.java
index 349e1c8..512e851 100644
--- a/services/core/java/com/android/server/display/DisplayDeviceInfo.java
+++ b/services/core/java/com/android/server/display/DisplayDeviceInfo.java
@@ -104,6 +104,12 @@
public static final int FLAG_DESTROY_CONTENT_ON_REMOVAL = 1 << 10;
/**
+ * Flag: The display cutout of this display is masked.
+ * @hide
+ */
+ public static final int FLAG_MASK_DISPLAY_CUTOUT = 1 << 11;
+
+ /**
* Touch attachment: Display does not receive touch.
*/
public static final int TOUCH_NONE = 0;
@@ -453,6 +459,9 @@
if ((flags & FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD) != 0) {
msg.append(", FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD");
}
+ if ((flags & FLAG_MASK_DISPLAY_CUTOUT) != 0) {
+ msg.append(", FLAG_MASK_DISPLAY_CUTOUT");
+ }
return msg.toString();
}
}
diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
index 21ae048..16d82df 100644
--- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
@@ -402,6 +402,10 @@
&& SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))) {
mInfo.flags |= DisplayDeviceInfo.FLAG_ROUND;
}
+ if (res.getBoolean(
+ com.android.internal.R.bool.config_maskMainBuiltInDisplayCutout)) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_MASK_DISPLAY_CUTOUT;
+ }
mInfo.displayCutout = DisplayCutout.fromResourcesRectApproximation(res,
mInfo.width, mInfo.height);
mInfo.type = Display.TYPE_BUILT_IN;
diff --git a/services/core/java/com/android/server/display/LogicalDisplay.java b/services/core/java/com/android/server/display/LogicalDisplay.java
index 23ee56b..373de63 100644
--- a/services/core/java/com/android/server/display/LogicalDisplay.java
+++ b/services/core/java/com/android/server/display/LogicalDisplay.java
@@ -23,6 +23,8 @@
import android.view.Surface;
import android.view.SurfaceControl;
+import com.android.server.wm.utils.InsetUtils;
+
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;
@@ -251,14 +253,18 @@
if ((deviceInfo.flags & DisplayDeviceInfo.FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD) != 0) {
mBaseDisplayInfo.flags |= Display.FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD;
}
+ Rect maskingInsets = getMaskingInsets(deviceInfo);
+ int maskedWidth = deviceInfo.width - maskingInsets.left - maskingInsets.right;
+ int maskedHeight = deviceInfo.height - maskingInsets.top - maskingInsets.bottom;
+
mBaseDisplayInfo.type = deviceInfo.type;
mBaseDisplayInfo.address = deviceInfo.address;
mBaseDisplayInfo.name = deviceInfo.name;
mBaseDisplayInfo.uniqueId = deviceInfo.uniqueId;
- mBaseDisplayInfo.appWidth = deviceInfo.width;
- mBaseDisplayInfo.appHeight = deviceInfo.height;
- mBaseDisplayInfo.logicalWidth = deviceInfo.width;
- mBaseDisplayInfo.logicalHeight = deviceInfo.height;
+ mBaseDisplayInfo.appWidth = maskedWidth;
+ mBaseDisplayInfo.appHeight = maskedHeight;
+ mBaseDisplayInfo.logicalWidth = maskedWidth;
+ mBaseDisplayInfo.logicalHeight = maskedHeight;
mBaseDisplayInfo.rotation = Surface.ROTATION_0;
mBaseDisplayInfo.modeId = deviceInfo.modeId;
mBaseDisplayInfo.defaultModeId = deviceInfo.defaultModeId;
@@ -275,13 +281,15 @@
mBaseDisplayInfo.appVsyncOffsetNanos = deviceInfo.appVsyncOffsetNanos;
mBaseDisplayInfo.presentationDeadlineNanos = deviceInfo.presentationDeadlineNanos;
mBaseDisplayInfo.state = deviceInfo.state;
- mBaseDisplayInfo.smallestNominalAppWidth = deviceInfo.width;
- mBaseDisplayInfo.smallestNominalAppHeight = deviceInfo.height;
- mBaseDisplayInfo.largestNominalAppWidth = deviceInfo.width;
- mBaseDisplayInfo.largestNominalAppHeight = deviceInfo.height;
+ mBaseDisplayInfo.smallestNominalAppWidth = maskedWidth;
+ mBaseDisplayInfo.smallestNominalAppHeight = maskedHeight;
+ mBaseDisplayInfo.largestNominalAppWidth = maskedWidth;
+ mBaseDisplayInfo.largestNominalAppHeight = maskedHeight;
mBaseDisplayInfo.ownerUid = deviceInfo.ownerUid;
mBaseDisplayInfo.ownerPackageName = deviceInfo.ownerPackageName;
- mBaseDisplayInfo.displayCutout = deviceInfo.displayCutout;
+ boolean maskCutout =
+ (deviceInfo.flags & DisplayDeviceInfo.FLAG_MASK_DISPLAY_CUTOUT) != 0;
+ mBaseDisplayInfo.displayCutout = maskCutout ? null : deviceInfo.displayCutout;
mPrimaryDisplayDeviceInfo = deviceInfo;
mInfo = null;
@@ -289,6 +297,18 @@
}
/**
+ * Returns insets in ROTATION_0 for areas that are masked.
+ */
+ private static Rect getMaskingInsets(DisplayDeviceInfo deviceInfo) {
+ boolean maskCutout = (deviceInfo.flags & DisplayDeviceInfo.FLAG_MASK_DISPLAY_CUTOUT) != 0;
+ if (maskCutout && deviceInfo.displayCutout != null) {
+ return deviceInfo.displayCutout.getSafeInsets();
+ } else {
+ return new Rect();
+ }
+ }
+
+ /**
* Applies the layer stack and transformation to the given display device
* so that it shows the contents of this logical display.
*
@@ -349,6 +369,12 @@
int physWidth = rotated ? displayDeviceInfo.height : displayDeviceInfo.width;
int physHeight = rotated ? displayDeviceInfo.width : displayDeviceInfo.height;
+ Rect maskingInsets = getMaskingInsets(displayDeviceInfo);
+ InsetUtils.rotateInsets(maskingInsets, orientation);
+ // Don't consider the masked area as available when calculating the scaling below.
+ physWidth -= maskingInsets.left + maskingInsets.right;
+ physHeight -= maskingInsets.top + maskingInsets.bottom;
+
// Determine whether the width or height is more constrained to be scaled.
// physWidth / displayInfo.logicalWidth => letter box
// or physHeight / displayInfo.logicalHeight => pillar box
@@ -375,6 +401,9 @@
mTempDisplayRect.set(displayRectLeft, displayRectTop,
displayRectLeft + displayRectWidth, displayRectTop + displayRectHeight);
+ // Now add back the offset for the masked area.
+ mTempDisplayRect.offset(maskingInsets.left, maskingInsets.top);
+
mTempDisplayRect.left += mDisplayOffsetX;
mTempDisplayRect.right += mDisplayOffsetX;
mTempDisplayRect.top += mDisplayOffsetY;
diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java
index 5292d3e5f..ba05b49 100644
--- a/services/core/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/core/java/com/android/server/dreams/DreamManagerService.java
@@ -50,7 +50,6 @@
import android.service.dreams.DreamManagerInternal;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
-import android.text.TextUtils;
import android.util.Slog;
import android.view.Display;
@@ -124,7 +123,7 @@
}
}, new IntentFilter(Intent.ACTION_USER_SWITCHED), null, mHandler);
mContext.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP), false,
+ Settings.Secure.getUriFor(Settings.Secure.DOZE_DOUBLE_TAP_GESTURE), false,
mDozeEnabledObserver, UserHandle.USER_ALL);
writePulseGestureEnabled();
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index a2eb1c1..c16d3cd 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -402,6 +402,8 @@
if (mCecController != null) {
if (mHdmiControlEnabled) {
initializeCec(INITIATED_BY_BOOT_UP);
+ } else {
+ mCecController.setOption(OptionKey.ENABLE_CEC, false);
}
} else {
Slog.i(TAG, "Device does not support HDMI-CEC.");
@@ -2384,6 +2386,7 @@
@ServiceThreadOnly
private void enableHdmiControlService() {
+ mCecController.setOption(OptionKey.ENABLE_CEC, true);
mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, true);
mMhlController.setOption(OPTION_MHL_ENABLE, ENABLED);
@@ -2400,6 +2403,7 @@
@Override
public void run() {
mCecController.setOption(OptionKey.ENABLE_CEC, false);
+ mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, false);
mMhlController.setOption(OPTION_MHL_ENABLE, DISABLED);
clearLocalDevices();
}
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/CriticalNotificationExtractor.java b/services/core/java/com/android/server/notification/CriticalNotificationExtractor.java
new file mode 100644
index 0000000..a899a08
--- /dev/null
+++ b/services/core/java/com/android/server/notification/CriticalNotificationExtractor.java
@@ -0,0 +1,93 @@
+/*
+ * 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.server.notification;
+
+import android.app.Notification;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.util.Slog;
+
+/**
+ * Sets the criticality of a notification record. This is used to allow a bypass to all other
+ * ranking signals. It is required in the automotive use case to facilitate placing emergency and
+ * warning notifications above all others. It does not process notifications unless the system
+ * has the automotive feature flag set.
+ * <p>
+ * Note: it is up to the notification ranking system to determine the effect of criticality values
+ * on a notification record
+ *
+ */
+public class CriticalNotificationExtractor implements NotificationSignalExtractor {
+
+ private static final String TAG = "CriticalNotificationExt";
+ private static final boolean DBG = false;
+ private boolean mSupportsCriticalNotifications = false;
+ /**
+ * Intended to bypass all other ranking, notification should be placed above all others.
+ * In the automotive case, the notification would be used to tell a driver to pull over
+ * immediately
+ */
+ static final int CRITICAL = 0;
+ /**
+ * Indicates a notification should be place above all notifications except those marked as
+ * critical. In the automotive case this is a check engine light.
+ */
+ static final int CRITICAL_LOW = 1;
+ /** Normal notification. */
+ static final int NORMAL = 2;
+
+ @Override
+ public void initialize(Context context, NotificationUsageStats usageStats) {
+ if (DBG) Slog.d(TAG, "Initializing " + getClass().getSimpleName() + ".");
+ mSupportsCriticalNotifications = supportsCriticalNotifications(context);
+ }
+
+ private boolean supportsCriticalNotifications(Context context) {
+ return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE, 0);
+ }
+
+ @Override
+ public RankingReconsideration process(NotificationRecord record) {
+ if (!mSupportsCriticalNotifications) {
+ if (DBG) Slog.d(TAG, "skipping since system does not support critical notification");
+ return null;
+ }
+ if (record == null || record.getNotification() == null) {
+ if (DBG) Slog.d(TAG, "skipping empty notification");
+ return null;
+ }
+ // Note: The use of both CATEGORY_CAR_EMERGENCY and CATEGORY_CAR_WARNING is restricted to
+ // System apps
+ if (record.isCategory(Notification.CATEGORY_CAR_EMERGENCY)) {
+ record.setCriticality(CRITICAL);
+ } else if (record.isCategory(Notification.CATEGORY_CAR_WARNING)) {
+ record.setCriticality(CRITICAL_LOW);
+ } else {
+ record.setCriticality(NORMAL);
+ }
+ return null;
+ }
+
+ @Override
+ public void setConfig(RankingConfig config) {
+ }
+
+ @Override
+ public void setZenHelper(ZenModeHelper helper) {
+ }
+
+}
diff --git a/services/core/java/com/android/server/notification/ImportanceExtractor.java b/services/core/java/com/android/server/notification/ImportanceExtractor.java
index dfdd55b..ca41b74 100644
--- a/services/core/java/com/android/server/notification/ImportanceExtractor.java
+++ b/services/core/java/com/android/server/notification/ImportanceExtractor.java
@@ -41,7 +41,7 @@
if (DBG) Slog.d(TAG, "missing config");
return null;
}
- record.setUserImportance(record.getChannel().getImportance());
+ record.calculateImportance();
return null;
}
diff --git a/services/core/java/com/android/server/notification/NotificationDelegate.java b/services/core/java/com/android/server/notification/NotificationDelegate.java
index 8be8450..decdac6 100644
--- a/services/core/java/com/android/server/notification/NotificationDelegate.java
+++ b/services/core/java/com/android/server/notification/NotificationDelegate.java
@@ -30,6 +30,7 @@
void onNotificationClear(int callingUid, int callingPid,
String pkg, String tag, int id, int userId, String key,
@NotificationStats.DismissalSurface int dismissalSurface,
+ @NotificationStats.DismissalSentiment int dismissalSentiment,
NotificationVisibility nv);
void onNotificationError(int callingUid, int callingPid,
String pkg, String tag, int id,
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index de53427..ce71dd2 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -72,7 +72,6 @@
import static android.service.notification.NotificationListenerService.REASON_USER_STOPPED;
import static android.service.notification.NotificationListenerService.TRIM_FULL;
import static android.service.notification.NotificationListenerService.TRIM_LIGHT;
-import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
import static com.android.server.utils.PriorityDump.PRIORITY_ARG;
@@ -628,15 +627,17 @@
final String pkg;
final ITransientNotification callback;
int duration;
+ int displayId;
Binder token;
ToastRecord(int pid, String pkg, ITransientNotification callback, int duration,
- Binder token) {
+ Binder token, int displayId) {
this.pid = pid;
this.pkg = pkg;
this.callback = callback;
this.duration = duration;
this.token = token;
+ this.displayId = displayId;
}
void update(int duration) {
@@ -699,7 +700,8 @@
}
@Override
- public void onNotificationClick(int callingUid, int callingPid, String key, NotificationVisibility nv) {
+ public void onNotificationClick(int callingUid, int callingPid, String key,
+ NotificationVisibility nv) {
exitIdle();
synchronized (mNotificationLock) {
NotificationRecord r = mNotificationsByKey.get(key);
@@ -756,11 +758,13 @@
public void onNotificationClear(int callingUid, int callingPid,
String pkg, String tag, int id, int userId, String key,
@NotificationStats.DismissalSurface int dismissalSurface,
+ @NotificationStats.DismissalSentiment int dismissalSentiment,
NotificationVisibility nv) {
synchronized (mNotificationLock) {
NotificationRecord r = mNotificationsByKey.get(key);
if (r != null) {
r.recordDismissalSurface(dismissalSurface);
+ r.recordDismissalSentiment(dismissalSentiment);
}
}
cancelNotification(callingUid, callingPid, pkg, tag, id, 0,
@@ -796,8 +800,8 @@
}
@Override
- public void onNotificationError(int callingUid, int callingPid, String pkg, String tag, int id,
- int uid, int initialPid, String message, int userId) {
+ public void onNotificationError(int callingUid, int callingPid, String pkg, String tag,
+ int id, int uid, int initialPid, String message, int userId) {
cancelNotification(callingUid, callingPid, pkg, tag, id, 0, 0, false, userId,
REASON_ERROR, null);
}
@@ -1039,10 +1043,12 @@
uidList = intent.getIntArrayExtra(Intent.EXTRA_CHANGED_UID_LIST);
} else if (action.equals(Intent.ACTION_PACKAGES_SUSPENDED)) {
pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
+ uidList = intent.getIntArrayExtra(Intent.EXTRA_CHANGED_UID_LIST);
cancelNotifications = false;
hideNotifications = true;
} else if (action.equals(Intent.ACTION_PACKAGES_UNSUSPENDED)) {
pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
+ uidList = intent.getIntArrayExtra(Intent.EXTRA_CHANGED_UID_LIST);
cancelNotifications = false;
unhideNotifications = true;
} else if (queryRestart) {
@@ -1986,11 +1992,12 @@
// ============================================================================
@Override
- public void enqueueToast(String pkg, ITransientNotification callback, int duration)
+ public void enqueueToast(String pkg, ITransientNotification callback, int duration,
+ int displayId)
{
if (DBG) {
Slog.i(TAG, "enqueueToast pkg=" + pkg + " callback=" + callback
- + " duration=" + duration);
+ + " duration=" + duration + " displayId=" + displayId);
}
if (pkg == null || callback == null) {
@@ -2042,8 +2049,9 @@
}
Binder token = new Binder();
- mWindowManagerInternal.addWindowToken(token, TYPE_TOAST, DEFAULT_DISPLAY);
- record = new ToastRecord(callingPid, pkg, callback, duration, token);
+ mWindowManagerInternal.addWindowToken(token, TYPE_TOAST, displayId);
+ record = new ToastRecord(callingPid, pkg, callback, duration, token,
+ displayId);
mToastQueue.add(record);
index = mToastQueue.size() - 1;
keepProcessAliveIfNeededLocked(callingPid);
@@ -2094,7 +2102,7 @@
int index = indexOfToastLocked(pkg, callback);
if (index >= 0) {
ToastRecord record = mToastQueue.get(index);
- finishTokenLocked(record.token);
+ finishTokenLocked(record.token, record.displayId);
} else {
Slog.w(TAG, "Toast already killed. pkg=" + pkg
+ " callback=" + callback);
@@ -2144,6 +2152,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,
@@ -2686,24 +2698,30 @@
try {
synchronized (mNotificationLock) {
final ManagedServiceInfo info = mListeners.checkServiceTokenLocked(token);
- if (keys != null) {
- final int N = keys.length;
- for (int i = 0; i < N; i++) {
- NotificationRecord r = mNotificationsByKey.get(keys[i]);
- if (r == null) continue;
- final int userId = r.sbn.getUserId();
- if (userId != info.userid && userId != UserHandle.USER_ALL &&
- !mUserProfiles.isCurrentProfile(userId)) {
- throw new SecurityException("Disallowed call from listener: "
- + info.service);
- }
- if (!r.isSeen()) {
- if (DBG) Slog.d(TAG, "Marking notification as seen " + keys[i]);
- reportSeen(r);
- r.setSeen();
- maybeRecordInterruptionLocked(r);
- }
+ if (keys == null) {
+ return;
+ }
+ ArrayList<NotificationRecord> seen = new ArrayList<>();
+ final int n = keys.length;
+ for (int i = 0; i < n; i++) {
+ NotificationRecord r = mNotificationsByKey.get(keys[i]);
+ if (r == null) continue;
+ final int userId = r.sbn.getUserId();
+ if (userId != info.userid && userId != UserHandle.USER_ALL
+ && !mUserProfiles.isCurrentProfile(userId)) {
+ throw new SecurityException("Disallowed call from listener: "
+ + info.service);
}
+ seen.add(r);
+ if (!r.isSeen()) {
+ if (DBG) Slog.d(TAG, "Marking notification as seen " + keys[i]);
+ reportSeen(r);
+ r.setSeen();
+ maybeRecordInterruptionLocked(r);
+ }
+ }
+ if (!seen.isEmpty()) {
+ mAssistants.onNotificationsSeenLocked(seen);
}
}
} finally {
@@ -3480,20 +3498,25 @@
public void applyAdjustmentsFromAssistant(INotificationListener token,
List<Adjustment> adjustments) {
+ boolean needsSort = false;
final long identity = Binder.clearCallingIdentity();
try {
- boolean appliedAdjustment = false;
synchronized (mNotificationLock) {
mAssistants.checkServiceTokenLocked(token);
for (Adjustment adjustment : adjustments) {
NotificationRecord r = mNotificationsByKey.get(adjustment.getKey());
if (r != null && mAssistants.isSameUser(token, r.getUserId())) {
applyAdjustment(r, adjustment);
- appliedAdjustment = true;
+ r.applyAdjustments();
+ if (r.getImportance() == IMPORTANCE_NONE) {
+ cancelNotificationsFromListener(token, new String[]{r.getKey()});
+ } else {
+ needsSort = true;
+ }
}
}
}
- if (appliedAdjustment) {
+ if (needsSort) {
mRankingHandler.requestSort();
}
} finally {
@@ -4114,14 +4137,16 @@
// an opinion otherwise (and the channel hasn't yet shown a fg service).
if (TextUtils.isEmpty(channelId)
|| NotificationChannel.DEFAULT_CHANNEL_ID.equals(channelId)) {
- r.setImportance(IMPORTANCE_LOW, "Bumped for foreground service");
+ r.setSystemImportance(IMPORTANCE_LOW);
} else {
channel.setImportance(IMPORTANCE_LOW);
+ r.setSystemImportance(IMPORTANCE_LOW);
if (!fgServiceShown) {
channel.unlockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
channel.setFgServiceShown(true);
}
- mPreferencesHelper.updateNotificationChannel(pkg, notificationUid, channel, false);
+ mPreferencesHelper.updateNotificationChannel(
+ pkg, notificationUid, channel, false);
r.updateNotificationChannel(channel);
}
} else if (!fgServiceShown && !TextUtils.isEmpty(channelId)
@@ -4295,11 +4320,7 @@
usageStats.registerSuspendedByAdmin(r);
return isPackageSuspended;
}
- final boolean isBlocked =
- mPreferencesHelper.isGroupBlocked(pkg, callingUid, r.getChannel().getGroup())
- || mPreferencesHelper.getImportance(pkg, callingUid)
- == NotificationManager.IMPORTANCE_NONE
- || r.getChannel().getImportance() == NotificationManager.IMPORTANCE_NONE;
+ final boolean isBlocked = isBlocked(r);
if (isBlocked) {
Slog.e(TAG, "Suppressing notification from package by user request.");
usageStats.registerBlocked(r);
@@ -4307,6 +4328,15 @@
return isBlocked;
}
+ private boolean isBlocked(NotificationRecord r) {
+ final String pkg = r.sbn.getPackageName();
+ final int callingUid = r.sbn.getUid();
+ return mPreferencesHelper.isGroupBlocked(pkg, callingUid, r.getChannel().getGroup())
+ || mPreferencesHelper.getImportance(pkg, callingUid)
+ == NotificationManager.IMPORTANCE_NONE
+ || r.getImportance() == NotificationManager.IMPORTANCE_NONE;
+ }
+
protected class SnoozeNotificationRunnable implements Runnable {
private final String mKey;
private final long mDuration;
@@ -4383,6 +4413,88 @@
}
}
+ protected class CancelNotificationRunnable implements Runnable {
+ private final int mCallingUid;
+ private final int mCallingPid;
+ private final String mPkg;
+ private final String mTag;
+ private final int mId;
+ private final int mMustHaveFlags;
+ private final int mMustNotHaveFlags;
+ private final boolean mSendDelete;
+ private final int mUserId;
+ private final int mReason;
+ private final int mRank;
+ private final int mCount;
+ private final ManagedServiceInfo mListener;
+
+ CancelNotificationRunnable(final int callingUid, final int callingPid,
+ final String pkg, final String tag, final int id,
+ final int mustHaveFlags, final int mustNotHaveFlags, final boolean sendDelete,
+ final int userId, final int reason, int rank, int count,
+ final ManagedServiceInfo listener) {
+ this.mCallingUid = callingUid;
+ this.mCallingPid = callingPid;
+ this.mPkg = pkg;
+ this.mTag = tag;
+ this.mId = id;
+ this.mMustHaveFlags = mustHaveFlags;
+ this.mMustNotHaveFlags = mustNotHaveFlags;
+ this.mSendDelete = sendDelete;
+ this.mUserId = userId;
+ this.mReason = reason;
+ this.mRank = rank;
+ this.mCount = count;
+ this.mListener = listener;
+ }
+
+ @Override
+ public void run() {
+ String listenerName = mListener == null ? null : mListener.component.toShortString();
+ if (DBG) {
+ EventLogTags.writeNotificationCancel(mCallingUid, mCallingPid, mPkg, mId, mTag,
+ mUserId, mMustHaveFlags, mMustNotHaveFlags, mReason, listenerName);
+ }
+
+ synchronized (mNotificationLock) {
+ // Look for the notification, searching both the posted and enqueued lists.
+ NotificationRecord r = findNotificationLocked(mPkg, mTag, mId, mUserId);
+ if (r != null) {
+ // The notification was found, check if it should be removed.
+
+ // Ideally we'd do this in the caller of this method. However, that would
+ // require the caller to also find the notification.
+ if (mReason == REASON_CLICK) {
+ mUsageStats.registerClickedByUser(r);
+ }
+
+ if ((r.getNotification().flags & mMustHaveFlags) != mMustHaveFlags) {
+ return;
+ }
+ if ((r.getNotification().flags & mMustNotHaveFlags) != 0) {
+ return;
+ }
+
+ // Cancel the notification.
+ boolean wasPosted = removeFromNotificationListsLocked(r);
+ cancelNotificationLocked(
+ r, mSendDelete, mReason, mRank, mCount, wasPosted, listenerName);
+ cancelGroupChildrenLocked(r, mCallingUid, mCallingPid, listenerName,
+ mSendDelete, null);
+ updateLightsLocked();
+ } else {
+ // No notification was found, assume that it is snoozed and cancel it.
+ if (mReason != REASON_SNOOZED) {
+ final boolean wasSnoozed = mSnoozeHelper.cancel(mUserId, mPkg, mTag, mId);
+ if (wasSnoozed) {
+ savePolicyFile();
+ }
+ }
+ }
+ }
+ }
+ }
+
protected class EnqueueNotificationRunnable implements Runnable {
private final NotificationRecord r;
private final int userId;
@@ -4482,6 +4594,11 @@
return;
}
+ if (isBlocked(r)) {
+ Slog.i(TAG, "notification blocked by assistant request");
+ return;
+ }
+
r.setHidden(isPackageSuspendedLocked(r));
NotificationRecord old = mNotificationsByKey.get(key);
final StatusBarNotification n = r.sbn;
@@ -5033,11 +5150,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{
@@ -5128,13 +5245,13 @@
ToastRecord lastToast = mToastQueue.remove(index);
mWindowManagerInternal.removeWindowToken(lastToast.token, false /* removeWindows */,
- DEFAULT_DISPLAY);
+ lastToast.displayId);
// We passed 'false' for 'removeWindows' so that the client has time to stop
// rendering (as hide above is a one-way message), otherwise we could crash
// a client which was actively using a surface made from the token. However
// we need to schedule a timeout to make sure the token is eventually killed
// one way or another.
- scheduleKillTokenTimeout(lastToast.token);
+ scheduleKillTokenTimeout(lastToast);
keepProcessAliveIfNeededLocked(record.pid);
if (mToastQueue.size() > 0) {
@@ -5145,14 +5262,13 @@
}
}
- void finishTokenLocked(IBinder t) {
+ void finishTokenLocked(IBinder t, int displayId) {
mHandler.removeCallbacksAndMessages(t);
// We pass 'true' for 'removeWindows' to let the WindowManager destroy any
// remaining surfaces as either the client has called finishToken indicating
// it has successfully removed the views, or the client has timed out
// at which point anything goes.
- mWindowManagerInternal.removeWindowToken(t, true /* removeWindows */,
- DEFAULT_DISPLAY);
+ mWindowManagerInternal.removeWindowToken(t, true /* removeWindows */, displayId);
}
@GuardedBy("mToastQueue")
@@ -5176,18 +5292,18 @@
}
@GuardedBy("mToastQueue")
- private void scheduleKillTokenTimeout(IBinder token)
+ private void scheduleKillTokenTimeout(ToastRecord r)
{
- mHandler.removeCallbacksAndMessages(token);
- Message m = Message.obtain(mHandler, MESSAGE_FINISH_TOKEN_TIMEOUT, token);
+ mHandler.removeCallbacksAndMessages(r);
+ Message m = Message.obtain(mHandler, MESSAGE_FINISH_TOKEN_TIMEOUT, r);
mHandler.sendMessageDelayed(m, FINISH_TOKEN_TIMEOUT);
}
- private void handleKillTokenTimeout(IBinder token)
+ private void handleKillTokenTimeout(ToastRecord record)
{
- if (DBG) Slog.d(TAG, "Kill Token Timeout token=" + token);
+ if (DBG) Slog.d(TAG, "Kill Token Timeout token=" + record.token);
synchronized (mToastQueue) {
- finishTokenLocked(token);
+ finishTokenLocked(record.token, record.displayId);
}
}
@@ -5381,7 +5497,7 @@
handleDurationReached((ToastRecord)msg.obj);
break;
case MESSAGE_FINISH_TOKEN_TIMEOUT:
- handleKillTokenTimeout((IBinder)msg.obj);
+ handleKillTokenTimeout((ToastRecord)msg.obj);
break;
case MESSAGE_SAVE_POLICY_FILE:
handleSavePolicyFile();
@@ -5405,6 +5521,11 @@
}
}
+ protected void scheduleCancelNotification(CancelNotificationRunnable cancelRunnable) {
+ if (!hasCallbacks(cancelRunnable)) {
+ sendMessage(Message.obtain(this, cancelRunnable));
+ }
+ }
}
private final class RankingHandlerWorker extends Handler implements RankingHandler
@@ -5730,56 +5851,15 @@
void cancelNotification(final int callingUid, final int callingPid,
final String pkg, final String tag, final int id,
final int mustHaveFlags, final int mustNotHaveFlags, final boolean sendDelete,
- final int userId, final int reason, int rank, int count, final ManagedServiceInfo listener) {
-
+ final int userId, final int reason, int rank, int count,
+ final ManagedServiceInfo listener) {
// In enqueueNotificationInternal notifications are added by scheduling the
// work on the worker handler. Hence, we also schedule the cancel on this
// handler to avoid a scenario where an add notification call followed by a
// remove notification call ends up in not removing the notification.
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- String listenerName = listener == null ? null : listener.component.toShortString();
- if (DBG) EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, id, tag,
- userId, mustHaveFlags, mustNotHaveFlags, reason, listenerName);
-
- synchronized (mNotificationLock) {
- // Look for the notification, searching both the posted and enqueued lists.
- NotificationRecord r = findNotificationLocked(pkg, tag, id, userId);
- if (r != null) {
- // The notification was found, check if it should be removed.
-
- // Ideally we'd do this in the caller of this method. However, that would
- // require the caller to also find the notification.
- if (reason == REASON_CLICK) {
- mUsageStats.registerClickedByUser(r);
- }
-
- if ((r.getNotification().flags & mustHaveFlags) != mustHaveFlags) {
- return;
- }
- if ((r.getNotification().flags & mustNotHaveFlags) != 0) {
- return;
- }
-
- // Cancel the notification.
- boolean wasPosted = removeFromNotificationListsLocked(r);
- cancelNotificationLocked(r, sendDelete, reason, rank, count, wasPosted, listenerName);
- cancelGroupChildrenLocked(r, callingUid, callingPid, listenerName,
- sendDelete, null);
- updateLightsLocked();
- } else {
- // No notification was found, assume that it is snoozed and cancel it.
- if (reason != REASON_SNOOZED) {
- final boolean wasSnoozed = mSnoozeHelper.cancel(userId, pkg, tag, id);
- if (wasSnoozed) {
- savePolicyFile();
- }
- }
- }
- }
- }
- });
+ mHandler.scheduleCancelNotification(new CancelNotificationRunnable(callingUid, callingPid,
+ pkg, tag, id, mustHaveFlags, mustNotHaveFlags, sendDelete, userId, reason, rank,
+ count, listener));
}
/**
@@ -5889,6 +5969,7 @@
}
notificationList.remove(i);
mNotificationsByKey.remove(r.getKey());
+ r.recordDismissalSentiment(NotificationStats.DISMISS_SENTIMENT_NEUTRAL);
canceledNotifications.add(r);
cancelNotificationLocked(r, sendDelete, reason, wasPosted, listenerName);
}
@@ -6486,6 +6567,35 @@
rebindServices(true);
}
+ protected void onNotificationsSeenLocked(ArrayList<NotificationRecord> records) {
+ // There should be only one, but it's a list, so while we enforce
+ // singularity elsewhere, we keep it general here, to avoid surprises.
+ for (final ManagedServiceInfo info : NotificationAssistants.this.getServices()) {
+ ArrayList<String> keys = new ArrayList<>(records.size());
+ for (NotificationRecord r : records) {
+ boolean sbnVisible = isVisibleToListener(r.sbn, info)
+ && info.isSameUser(r.getUserId());
+ if (sbnVisible) {
+ keys.add(r.getKey());
+ }
+ }
+
+ if (!keys.isEmpty()) {
+ mHandler.post(() -> notifySeen(info, keys));
+ }
+ }
+ }
+
+ private void notifySeen(final ManagedServiceInfo info,
+ final ArrayList<String> keys) {
+ final INotificationListener assistant = (INotificationListener) info.service;
+ try {
+ assistant.onNotificationsSeen(keys);
+ } catch (RemoteException ex) {
+ Log.e(TAG, "unable to notify assistant (seen): " + assistant, ex);
+ }
+ }
+
public void onNotificationEnqueued(final NotificationRecord r) {
final StatusBarNotification sbn = r.sbn;
TrimCache trimCache = new TrimCache(sbn);
@@ -6503,18 +6613,18 @@
mHandler.post(new Runnable() {
@Override
public void run() {
- notifyEnqueued(info, sbnToPost);
+ notifyEnqueued(info, sbnToPost, r.getChannel());
}
});
}
}
private void notifyEnqueued(final ManagedServiceInfo info,
- final StatusBarNotification sbn) {
+ final StatusBarNotification sbn, final NotificationChannel channel) {
final INotificationListener assistant = (INotificationListener) info.service;
StatusBarNotificationHolder sbnHolder = new StatusBarNotificationHolder(sbn);
try {
- assistant.onNotificationEnqueued(sbnHolder);
+ assistant.onNotificationEnqueuedWithChannel(sbnHolder, channel);
} catch (RemoteException ex) {
Log.e(TAG, "unable to notify assistant (enqueued): " + assistant, ex);
}
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 469828b..fbb42ea 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -49,7 +49,6 @@
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
-import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.Settings;
import android.service.notification.Adjustment;
@@ -142,8 +141,11 @@
private int mAuthoritativeRank;
private String mGlobalSortKey;
private int mPackageVisibility;
- private int mUserImportance = IMPORTANCE_UNSPECIFIED;
+ private int mSystemImportance = IMPORTANCE_UNSPECIFIED;
+ private int mAssistantImportance = IMPORTANCE_UNSPECIFIED;
private int mImportance = IMPORTANCE_UNSPECIFIED;
+ // Field used in global sort key to bypass normal notifications
+ private int mCriticality = CriticalNotificationExtractor.NORMAL;
private CharSequence mImportanceExplanation = null;
private int mSuppressedVisualEffects = 0;
@@ -198,7 +200,7 @@
mSound = calculateSound();
mVibration = calculateVibration();
mAttributes = calculateAttributes();
- mImportance = calculateImportance();
+ mImportance = calculateInitialImportance();
mLight = calculateLights();
mAdjustments = new ArrayList<>();
mStats = new NotificationStats();
@@ -321,7 +323,7 @@
return attributes;
}
- private int calculateImportance() {
+ private int calculateInitialImportance() {
final Notification n = sbn.getNotification();
int importance = getChannel().getImportance();
int requestedImportance = IMPORTANCE_DEFAULT;
@@ -525,8 +527,10 @@
pw.println(prefix + "mRecentlyIntrusive=" + mRecentlyIntrusive);
pw.println(prefix + "mPackagePriority=" + mPackagePriority);
pw.println(prefix + "mPackageVisibility=" + mPackageVisibility);
- pw.println(prefix + "mUserImportance="
- + NotificationListenerService.Ranking.importanceToString(mUserImportance));
+ pw.println(prefix + "mSystemImportance="
+ + NotificationListenerService.Ranking.importanceToString(mSystemImportance));
+ pw.println(prefix + "mAsstImportance="
+ + NotificationListenerService.Ranking.importanceToString(mAssistantImportance));
pw.println(prefix + "mImportance="
+ NotificationListenerService.Ranking.importanceToString(mImportance));
pw.println(prefix + "mImportanceExplanation=" + mImportanceExplanation);
@@ -641,6 +645,12 @@
if (signals.containsKey(Adjustment.KEY_SMART_REPLIES)) {
setSmartReplies(signals.getCharSequenceArrayList(Adjustment.KEY_SMART_REPLIES));
}
+ if (signals.containsKey(Adjustment.KEY_IMPORTANCE)) {
+ int importance = signals.getInt(Adjustment.KEY_IMPORTANCE);
+ importance = Math.max(IMPORTANCE_UNSPECIFIED, importance);
+ importance = Math.min(IMPORTANCE_HIGH, importance);
+ setAssistantImportance(importance);
+ }
}
}
}
@@ -654,7 +664,7 @@
mContactAffinity = contactAffinity;
if (mImportance < IMPORTANCE_DEFAULT &&
mContactAffinity > ValidateNotificationPeople.VALID_CONTACT) {
- setImportance(IMPORTANCE_DEFAULT, getPeopleExplanation());
+ setSystemImportance(IMPORTANCE_DEFAULT);
}
}
@@ -693,11 +703,6 @@
return mPackageVisibility;
}
- public void setUserImportance(int importance) {
- mUserImportance = importance;
- applyUserImportance();
- }
-
private String getUserExplanation() {
if (mUserExplanation == null) {
mUserExplanation = mContext.getResources().getString(
@@ -706,31 +711,42 @@
return mUserExplanation;
}
- private String getPeopleExplanation() {
- if (mPeopleExplanation == null) {
- mPeopleExplanation = mContext.getResources().getString(
- com.android.internal.R.string.importance_from_person);
- }
- return mPeopleExplanation;
+ /**
+ * Sets the importance value the system thinks the record should have.
+ * e.g. bumping up foreground service notifications or people to people notifications.
+ */
+ public void setSystemImportance(int importance) {
+ mSystemImportance = importance;
+ calculateImportance();
}
- private void applyUserImportance() {
- if (mUserImportance != IMPORTANCE_UNSPECIFIED) {
- mImportance = mUserImportance;
- mImportanceExplanation = getUserExplanation();
- }
+ /**
+ * Sets the importance value the
+ * {@link android.service.notification.NotificationAssistantService} thinks the record should
+ * have.
+ */
+ public void setAssistantImportance(int importance) {
+ mAssistantImportance = importance;
+ calculateImportance();
}
- public int getUserImportance() {
- return mUserImportance;
- }
-
- public void setImportance(int importance, CharSequence explanation) {
- if (importance != IMPORTANCE_UNSPECIFIED) {
- mImportance = importance;
- mImportanceExplanation = explanation;
+ /**
+ * Recalculates the importance of the record after fields affecting importance have changed
+ */
+ protected void calculateImportance() {
+ mImportance = calculateInitialImportance();
+ mImportanceExplanation = "app";
+ if (getChannel().isImportanceLocked()) {
+ mImportanceExplanation = "user";
}
- applyUserImportance();
+ if (!getChannel().isImportanceLocked() && mAssistantImportance != IMPORTANCE_UNSPECIFIED) {
+ mImportance = mAssistantImportance;
+ mImportanceExplanation = "asst";
+ }
+ if (mSystemImportance != IMPORTANCE_UNSPECIFIED) {
+ mImportance = mSystemImportance;
+ mImportanceExplanation = "system";
+ }
}
public int getImportance() {
@@ -746,6 +762,19 @@
return mIntercept;
}
+ /**
+ * Set to affect global sort key.
+ *
+ * @param criticality used in a string based sort thus 0 is the most critical
+ */
+ public void setCriticality(int criticality) {
+ mCriticality = criticality;
+ }
+
+ public int getCriticality() {
+ return mCriticality;
+ }
+
public boolean isIntercepted() {
return mIntercept;
}
@@ -920,7 +949,7 @@
}
/**
- * @see RankingHelper#getIsAppImportanceLocked(String, int)
+ * @see PreferencesHelper#getIsAppImportanceLocked(String, int)
*/
public boolean getIsAppImportanceLocked() {
return mIsAppImportanceLocked;
@@ -1036,6 +1065,10 @@
mStats.setDismissalSurface(surface);
}
+ public void recordDismissalSentiment(@NotificationStats.DismissalSentiment int sentiment) {
+ mStats.setDismissalSentiment(sentiment);
+ }
+
public void recordSnoozed() {
mStats.setSnoozed();
}
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index f5e58ea..b1e9144 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -106,6 +106,8 @@
synchronized (mProxyByGroupTmp) {
// record individual ranking result and nominate proxies for each group
+ // Note: iteration is done backwards such that the index can be used as a sort key
+ // in a string compare below
for (int i = N - 1; i >= 0; i--) {
final NotificationRecord record = notificationList.get(i);
record.setAuthoritativeRank(i);
@@ -138,7 +140,8 @@
boolean isGroupSummary = record.getNotification().isGroupSummary();
record.setGlobalSortKey(
- String.format("intrsv=%c:grnk=0x%04x:gsmry=%c:%s:rnk=0x%04x",
+ String.format("crtcl=0x%04x:intrsv=%c:grnk=0x%04x:gsmry=%c:%s:rnk=0x%04x",
+ record.getCriticality(),
record.isRecentlyIntrusive()
&& record.getImportance() > NotificationManager.IMPORTANCE_MIN
? '0' : '1',
diff --git a/services/core/java/com/android/server/notification/ZenModeConditions.java b/services/core/java/com/android/server/notification/ZenModeConditions.java
index 8013f7a..b080a73 100644
--- a/services/core/java/com/android/server/notification/ZenModeConditions.java
+++ b/services/core/java/com/android/server/notification/ZenModeConditions.java
@@ -19,7 +19,6 @@
import android.content.ComponentName;
import android.net.Uri;
import android.service.notification.Condition;
-import android.service.notification.IConditionListener;
import android.service.notification.IConditionProvider;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ZenRule;
@@ -27,6 +26,8 @@
import android.util.ArraySet;
import android.util.Log;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.io.PrintWriter;
import java.util.Objects;
@@ -36,7 +37,9 @@
private final ZenModeHelper mHelper;
private final ConditionProviders mConditionProviders;
- private final ArrayMap<Uri, ComponentName> mSubscriptions = new ArrayMap<>();
+
+ @VisibleForTesting
+ protected final ArrayMap<Uri, ComponentName> mSubscriptions = new ArrayMap<>();
private boolean mFirstEvaluation = true;
@@ -152,7 +155,8 @@
if (current != null) {
current.add(id);
}
- if (processSubscriptions && trigger != null && trigger.equals(rule.component)) {
+ if (processSubscriptions && ((trigger != null && trigger.equals(rule.component))
+ || isSystemCondition)) {
if (DEBUG) Log.d(TAG, "Subscribing to " + rule.component);
if (mConditionProviders.subscribeIfNecessary(rule.component, rule.conditionId)) {
synchronized (mSubscriptions) {
diff --git a/services/core/java/com/android/server/notification/ZenModeFiltering.java b/services/core/java/com/android/server/notification/ZenModeFiltering.java
index 71cee05..28cee7a 100644
--- a/services/core/java/com/android/server/notification/ZenModeFiltering.java
+++ b/services/core/java/com/android/server/notification/ZenModeFiltering.java
@@ -117,7 +117,8 @@
}
public boolean shouldIntercept(int zen, ZenModeConfig config, NotificationRecord record) {
- if (zen == ZEN_MODE_OFF) {
+ // Zen mode is ignored for critical notifications.
+ if (zen == ZEN_MODE_OFF || isCritical(record)) {
return false;
}
// Make an exception to policy for the notification saying that policy has changed
@@ -207,6 +208,19 @@
}
}
+ /**
+ * Check if the notification is too critical to be suppressed.
+ *
+ * @param record the record to test for criticality
+ * @return {@code true} if notification is considered critical
+ *
+ * @see CriticalNotificationExtractor for criteria
+ */
+ private boolean isCritical(NotificationRecord record) {
+ // 0 is the most critical
+ return record.getCriticality() < CriticalNotificationExtractor.NORMAL;
+ }
+
private static boolean shouldInterceptAudience(int source, NotificationRecord record) {
if (!audienceMatches(source, record.getContactAffinity())) {
ZenLog.traceIntercepted(record, "!audienceMatches");
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 7149720..6ac72d3 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -102,7 +102,7 @@
private final ZenModeFiltering mFiltering;
protected final RingerModeDelegate mRingerModeDelegate = new
RingerModeDelegate();
- private final ZenModeConditions mConditions;
+ @VisibleForTesting protected final ZenModeConditions mConditions;
private final SparseArray<ZenModeConfig> mConfigs = new SparseArray<>();
private final Metrics mMetrics = new Metrics();
private final ConditionProviders.Config mServiceConfig;
@@ -1199,7 +1199,9 @@
&& zen != Global.ZEN_MODE_OFF
&& !isWatch
&& Settings.Global.getInt(mContext.getContentResolver(),
- Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0;
+ Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0
+ && Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Secure.ZEN_SETTINGS_UPDATED, 0) != 1;
if (isWatch) {
Settings.Global.putInt(mContext.getContentResolver(),
diff --git a/services/core/java/com/android/server/pm/OtaDexoptService.java b/services/core/java/com/android/server/pm/OtaDexoptService.java
index 320affb..cf47d4e 100644
--- a/services/core/java/com/android/server/pm/OtaDexoptService.java
+++ b/services/core/java/com/android/server/pm/OtaDexoptService.java
@@ -365,10 +365,12 @@
continue;
}
- // If the path is in /system, /vendor or /product, ignore. It will have been
- // ota-dexopted into /data/ota and moved into the dalvik-cache already.
- if (pkg.codePath.startsWith("/system") || pkg.codePath.startsWith("/vendor")
- || pkg.codePath.startsWith("/product")) {
+ // If the path is in /system, /vendor, /product or /product_services, ignore. It will
+ // have been ota-dexopted into /data/ota and moved into the dalvik-cache already.
+ if (pkg.codePath.startsWith("/system")
+ || pkg.codePath.startsWith("/vendor")
+ || pkg.codePath.startsWith("/product")
+ || pkg.codePath.startsWith("/product_services")) {
continue;
}
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 55b1940..95c70d5 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -417,7 +417,7 @@
// TODO(calin): maybe add a separate call.
mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0,
/*oatDir*/ null, dexoptFlags,
- compilerFilter, info.volumeUuid, classLoaderContext, info.seInfoUser,
+ compilerFilter, info.volumeUuid, classLoaderContext, info.seInfo,
options.isDowngrade(), info.targetSdkVersion, /*profileName*/ null,
/*dexMetadataPath*/ null, getReasonName(reason));
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 3d6b3fb..fba4be2 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -90,6 +90,7 @@
import static android.os.storage.StorageManager.FLAG_STORAGE_DE;
import static android.system.OsConstants.O_CREAT;
import static android.system.OsConstants.O_RDWR;
+
import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE;
import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_PARENT;
import static com.android.internal.content.NativeLibraryHelper.LIB64_DIR_NAME;
@@ -253,6 +254,7 @@
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.ExceptionUtils;
+import android.util.IntArray;
import android.util.Log;
import android.util.LogPrinter;
import android.util.LongSparseArray;
@@ -321,6 +323,11 @@
import com.android.server.storage.DeviceStorageMonitorInternal;
import com.android.server.wm.ActivityTaskManagerInternal;
+import dalvik.system.CloseGuard;
+import dalvik.system.VMRuntime;
+
+import libcore.io.IoUtils;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -365,10 +372,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Predicate;
-import dalvik.system.CloseGuard;
-import dalvik.system.VMRuntime;
-import libcore.io.IoUtils;
-
/**
* Keep track of all those APKs everywhere.
* <p>
@@ -447,26 +450,27 @@
private static final int SHELL_UID = Process.SHELL_UID;
private static final int SE_UID = Process.SE_UID;
- static final int SCAN_NO_DEX = 1<<0;
- static final int SCAN_UPDATE_SIGNATURE = 1<<1;
- static final int SCAN_NEW_INSTALL = 1<<2;
- static final int SCAN_UPDATE_TIME = 1<<3;
- static final int SCAN_BOOTING = 1<<4;
- static final int SCAN_REQUIRE_KNOWN = 1<<7;
- static final int SCAN_MOVE = 1<<8;
- static final int SCAN_INITIAL = 1<<9;
- static final int SCAN_CHECK_ONLY = 1<<10;
- static final int SCAN_DONT_KILL_APP = 1<<11;
- static final int SCAN_IGNORE_FROZEN = 1<<12;
- static final int SCAN_FIRST_BOOT_OR_UPGRADE = 1<<13;
- static final int SCAN_AS_INSTANT_APP = 1<<14;
- static final int SCAN_AS_FULL_APP = 1<<15;
- static final int SCAN_AS_VIRTUAL_PRELOAD = 1<<16;
- static final int SCAN_AS_SYSTEM = 1<<17;
- static final int SCAN_AS_PRIVILEGED = 1<<18;
- static final int SCAN_AS_OEM = 1<<19;
- static final int SCAN_AS_VENDOR = 1<<20;
- static final int SCAN_AS_PRODUCT = 1<<21;
+ static final int SCAN_NO_DEX = 1 << 0;
+ static final int SCAN_UPDATE_SIGNATURE = 1 << 1;
+ static final int SCAN_NEW_INSTALL = 1 << 2;
+ static final int SCAN_UPDATE_TIME = 1 << 3;
+ static final int SCAN_BOOTING = 1 << 4;
+ static final int SCAN_REQUIRE_KNOWN = 1 << 7;
+ static final int SCAN_MOVE = 1 << 8;
+ static final int SCAN_INITIAL = 1 << 9;
+ static final int SCAN_CHECK_ONLY = 1 << 10;
+ static final int SCAN_DONT_KILL_APP = 1 << 11;
+ static final int SCAN_IGNORE_FROZEN = 1 << 12;
+ static final int SCAN_FIRST_BOOT_OR_UPGRADE = 1 << 13;
+ static final int SCAN_AS_INSTANT_APP = 1 << 14;
+ static final int SCAN_AS_FULL_APP = 1 << 15;
+ static final int SCAN_AS_VIRTUAL_PRELOAD = 1 << 16;
+ static final int SCAN_AS_SYSTEM = 1 << 17;
+ static final int SCAN_AS_PRIVILEGED = 1 << 18;
+ static final int SCAN_AS_OEM = 1 << 19;
+ static final int SCAN_AS_VENDOR = 1 << 20;
+ static final int SCAN_AS_PRODUCT = 1 << 21;
+ static final int SCAN_AS_PRODUCT_SERVICES = 1 << 22;
@IntDef(flag = true, prefix = { "SCAN_" }, value = {
SCAN_NO_DEX,
@@ -572,6 +576,8 @@
private static final String PRODUCT_OVERLAY_DIR = "/product/overlay";
+ private static final String PRODUCT_SERVICES_OVERLAY_DIR = "/product_services/overlay";
+
/** Canonical intent used to identify what counts as a "web browser" app */
private static final Intent sBrowserIntent;
static {
@@ -2587,9 +2593,10 @@
scanFlags = scanFlags | SCAN_FIRST_BOOT_OR_UPGRADE;
}
- // Collect vendor/product overlay packages. (Do this before scanning any apps.)
- // For security and version matching reason, only consider
- // overlay packages if they reside in the right directory.
+ // Collect vendor/product/product_services overlay packages. (Do this before scanning
+ // any apps.)
+ // For security and version matching reason, only consider overlay packages if they
+ // reside in the right directory.
scanDirTracedLI(new File(VENDOR_OVERLAY_DIR),
mDefParseFlags
| PackageParser.PARSE_IS_SYSTEM_DIR,
@@ -2604,6 +2611,13 @@
| SCAN_AS_SYSTEM
| SCAN_AS_PRODUCT,
0);
+ scanDirTracedLI(new File(PRODUCT_SERVICES_OVERLAY_DIR),
+ mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT_SERVICES,
+ 0);
mParallelPackageParserCallback.findStaticOverlayPackages();
@@ -2715,7 +2729,7 @@
| SCAN_AS_OEM,
0);
- // Collected privileged product packages.
+ // Collected privileged /product packages.
File privilegedProductAppDir = new File(Environment.getProductDirectory(), "priv-app");
try {
privilegedProductAppDir = privilegedProductAppDir.getCanonicalFile();
@@ -2731,7 +2745,7 @@
| SCAN_AS_PRIVILEGED,
0);
- // Collect ordinary product packages.
+ // Collect ordinary /product packages.
File productAppDir = new File(Environment.getProductDirectory(), "app");
try {
productAppDir = productAppDir.getCanonicalFile();
@@ -2746,6 +2760,39 @@
| SCAN_AS_PRODUCT,
0);
+ // Collected privileged /product_services packages.
+ File privilegedProductServicesAppDir =
+ new File(Environment.getProductServicesDirectory(), "priv-app");
+ try {
+ privilegedProductServicesAppDir =
+ privilegedProductServicesAppDir.getCanonicalFile();
+ } catch (IOException e) {
+ // failed to look up canonical path, continue with original one
+ }
+ scanDirTracedLI(privilegedProductServicesAppDir,
+ mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT_SERVICES
+ | SCAN_AS_PRIVILEGED,
+ 0);
+
+ // Collect ordinary /product_services packages.
+ File productServicesAppDir = new File(Environment.getProductServicesDirectory(), "app");
+ try {
+ productServicesAppDir = productServicesAppDir.getCanonicalFile();
+ } catch (IOException e) {
+ // failed to look up canonical path, continue with original one
+ }
+ scanDirTracedLI(productServicesAppDir,
+ mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT_SERVICES,
+ 0);
+
// Prune any system packages that no longer exist.
final List<String> possiblyDeletedUpdatedSystemApps = new ArrayList<>();
// Stub packages must either be replaced with full versions in the /data
@@ -2950,6 +2997,23 @@
scanFlags
| SCAN_AS_SYSTEM
| SCAN_AS_PRODUCT;
+ } else if (FileUtils.contains(privilegedProductServicesAppDir, scanFile)) {
+ reparseFlags =
+ mDefParseFlags |
+ PackageParser.PARSE_IS_SYSTEM_DIR;
+ rescanFlags =
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT_SERVICES
+ | SCAN_AS_PRIVILEGED;
+ } else if (FileUtils.contains(productServicesAppDir, scanFile)) {
+ reparseFlags =
+ mDefParseFlags |
+ PackageParser.PARSE_IS_SYSTEM_DIR;
+ rescanFlags =
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT_SERVICES;
} else {
Slog.e(TAG, "Ignoring unexpected fallback path " + scanFile);
continue;
@@ -6369,17 +6433,17 @@
&& intent.hasCategory(CATEGORY_DEFAULT);
}
- private boolean isDeviceProvisioned() {
- return android.provider.Settings.Global.getInt(mContext.getContentResolver(),
- android.provider.Settings.Global.DEVICE_PROVISIONED, 0) == 1;
- }
-
// TODO: handle preferred activities missing while user has amnesia
ResolveInfo findPreferredActivity(Intent intent, String resolvedType, int flags,
List<ResolveInfo> query, int priority, boolean always,
boolean removeMatches, boolean debug, int userId) {
if (!sUserManager.exists(userId)) return null;
final int callingUid = Binder.getCallingUid();
+ // Do NOT hold the packages lock; this calls up into the settings provider which
+ // could cause a deadlock.
+ final boolean isDeviceProvisioned =
+ android.provider.Settings.Global.getInt(mContext.getContentResolver(),
+ android.provider.Settings.Global.DEVICE_PROVISIONED, 0) == 1;
flags = updateFlagsForResolve(
flags, userId, intent, callingUid, false /*includeInstantApps*/);
intent = updateIntentForResolve(intent);
@@ -6459,7 +6523,7 @@
}
}
final boolean excludeSetupWizardHomeActivity = isHomeIntent(intent)
- && !isDeviceProvisioned();
+ && !isDeviceProvisioned;
if (ai == null) {
// Do not remove launcher's preferred activity during SetupWizard
// due to it may not install yet
@@ -8912,10 +8976,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.
@@ -9021,6 +9085,20 @@
}
}
+ /**
+ * Enforces that only the system UID or shell's UID can call a method exposed
+ * via Binder.
+ *
+ * @param message used as message if SecurityException is thrown
+ * @throws SecurityException if the caller is not system or shell
+ */
+ private static void enforceSystemOrShell(String message) {
+ final int uid = Binder.getCallingUid();
+ if (uid != Process.SYSTEM_UID && uid != Process.SHELL_UID) {
+ throw new SecurityException(message);
+ }
+ }
+
@Override
public void performFstrimIfNeeded() {
enforceSystemOrRoot("Only the system can request fstrim");
@@ -9502,7 +9580,13 @@
if (getInstantAppPackageName(Binder.getCallingUid()) != null) {
return false;
}
- return BackgroundDexOptService.runIdleOptimizationsNow(this, mContext, packageNames);
+ enforceSystemOrShell("runBackgroundDexoptJob");
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return BackgroundDexOptService.runIdleOptimizationsNow(this, mContext, packageNames);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
}
List<PackageParser.Package> findSharedNonSystemLibraries(PackageParser.Package p) {
@@ -10144,6 +10228,7 @@
* <li>{@link #SCAN_AS_OEM}</li>
* <li>{@link #SCAN_AS_VENDOR}</li>
* <li>{@link #SCAN_AS_PRODUCT}</li>
+ * <li>{@link #SCAN_AS_PRODUCT_SERVICES}</li>
* <li>{@link #SCAN_AS_INSTANT_APP}</li>
* <li>{@link #SCAN_AS_VIRTUAL_PRELOAD}</li>
* </ul>
@@ -10170,6 +10255,10 @@
& ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0) {
scanFlags |= SCAN_AS_PRODUCT;
}
+ if ((disabledPkgSetting.pkgPrivateFlags
+ & ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES) != 0) {
+ scanFlags |= SCAN_AS_PRODUCT_SERVICES;
+ }
}
if (pkgSetting != null) {
final int userId = ((user == null) ? 0 : user.getIdentifier());
@@ -11012,6 +11101,10 @@
pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRODUCT;
}
+ if ((scanFlags & SCAN_AS_PRODUCT_SERVICES) != 0) {
+ pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES;
+ }
+
// Check if the package is signed with the same key as the platform package.
if (PLATFORM_PACKAGE_NAME.equals(pkg.packageName) ||
(platformPkg != null && compareSignatures(
@@ -12105,6 +12198,8 @@
codeRoot = Environment.getOdmDirectory();
} else if (FileUtils.contains(Environment.getProductDirectory(), codePath)) {
codeRoot = Environment.getProductDirectory();
+ } else if (FileUtils.contains(Environment.getProductServicesDirectory(), codePath)) {
+ codeRoot = Environment.getProductServicesDirectory();
} else {
// Unrecognized code path; take its top real segment as the apk root:
// e.g. /something/app/blah.apk => /something
@@ -14147,11 +14242,12 @@
info.sendPackageRemovedBroadcasts(true /*killApp*/);
}
- private void sendPackagesSuspendedForUser(String[] pkgList, int userId, boolean suspended,
- PersistableBundle launcherExtras) {
+ private void sendPackagesSuspendedForUser(String[] pkgList, int[] uidList, int userId,
+ boolean suspended, PersistableBundle launcherExtras) {
if (pkgList.length > 0) {
Bundle extras = new Bundle(1);
extras.putStringArray(Intent.EXTRA_CHANGED_PACKAGE_LIST, pkgList);
+ extras.putIntArray(Intent.EXTRA_CHANGED_UID_LIST, uidList);
if (launcherExtras != null) {
extras.putBundle(Intent.EXTRA_LAUNCHER_EXTRAS,
new Bundle(launcherExtras.deepCopy()));
@@ -14333,6 +14429,7 @@
}
final List<String> changedPackagesList = new ArrayList<>(packageNames.length);
+ final IntArray changedUids = new IntArray(packageNames.length);
final List<String> unactionedPackages = new ArrayList<>(packageNames.length);
final long callingId = Binder.clearCallingIdentity();
try {
@@ -14360,6 +14457,7 @@
pkgSetting.setSuspended(suspended, callingPackage, dialogMessage, appExtras,
launcherExtras, userId);
changedPackagesList.add(packageName);
+ changedUids.add(UserHandle.getUid(userId, pkgSetting.appId));
}
}
} finally {
@@ -14368,7 +14466,8 @@
if (!changedPackagesList.isEmpty()) {
final String[] changedPackages = changedPackagesList.toArray(
new String[changedPackagesList.size()]);
- sendPackagesSuspendedForUser(changedPackages, userId, suspended, launcherExtras);
+ sendPackagesSuspendedForUser(
+ changedPackages, changedUids.toArray(), userId, suspended, launcherExtras);
sendMyPackageSuspendedOrUnsuspended(changedPackages, suspended, appExtras, userId);
synchronized (mPackages) {
scheduleWritePackageRestrictionsLocked(userId);
@@ -14483,12 +14582,14 @@
private void unsuspendForSuspendingPackages(Predicate<String> packagePredicate, int userId) {
final List<String> affectedPackages = new ArrayList<>();
+ final IntArray affectedUids = new IntArray();
synchronized (mPackages) {
for (PackageSetting ps : mSettings.mPackages.values()) {
final PackageUserState pus = ps.readUserState(userId);
if (pus.suspended && packagePredicate.test(pus.suspendingPackage)) {
ps.setSuspended(false, null, null, null, null, userId);
affectedPackages.add(ps.name);
+ affectedUids.add(UserHandle.getUid(userId, ps.getAppId()));
}
}
}
@@ -14496,7 +14597,8 @@
final String[] packageArray = affectedPackages.toArray(
new String[affectedPackages.size()]);
sendMyPackageSuspendedOrUnsuspended(packageArray, false, null, userId);
- sendPackagesSuspendedForUser(packageArray, userId, false, null);
+ sendPackagesSuspendedForUser(
+ packageArray, affectedUids.toArray(), userId, false, null);
// Write package restrictions immediately to avoid an inconsistent state.
mSettings.writePackageRestrictionsLPr(userId);
}
@@ -16645,13 +16747,16 @@
final boolean oem = isOemApp(oldPackage);
final boolean vendor = isVendorApp(oldPackage);
final boolean product = isProductApp(oldPackage);
+ final boolean productServices = isProductServicesApp(oldPackage);
+
final @ParseFlags int systemParseFlags = parseFlags;
final @ScanFlags int systemScanFlags = scanFlags
| SCAN_AS_SYSTEM
| (privileged ? SCAN_AS_PRIVILEGED : 0)
| (oem ? SCAN_AS_OEM : 0)
| (vendor ? SCAN_AS_VENDOR : 0)
- | (product ? SCAN_AS_PRODUCT : 0);
+ | (product ? SCAN_AS_PRODUCT : 0)
+ | (productServices ? SCAN_AS_PRODUCT_SERVICES : 0);
replaceSystemPackageLIF(oldPackage, pkg, systemParseFlags, systemScanFlags,
user, allUsers, installerPackageName, res, installReason);
@@ -17293,13 +17398,6 @@
"Instant app package must target at least O");
return;
}
- if (pkg.applicationInfo.targetSandboxVersion != 2) {
- Slog.w(TAG, "Instant app package " + pkg.packageName
- + " does not target targetSandboxVersion 2");
- res.setError(INSTALL_FAILED_INSTANT_APP_INVALID,
- "Instant app package must use targetSandboxVersion 2");
- return;
- }
if (pkg.mSharedUserId != null) {
Slog.w(TAG, "Instant app package " + pkg.packageName
+ " may not declare sharedUserId.");
@@ -17967,6 +18065,11 @@
return (pkg.applicationInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
}
+ private static boolean isProductServicesApp(PackageParser.Package pkg) {
+ return (pkg.applicationInfo.privateFlags
+ & ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES) != 0;
+ }
+
private static boolean hasDomainURLs(PackageParser.Package pkg) {
return (pkg.applicationInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_HAS_DOMAIN_URLS) != 0;
}
@@ -18706,10 +18809,13 @@
final File privilegedVendorAppDir = new File(Environment.getVendorDirectory(), "priv-app");
final File privilegedOdmAppDir = new File(Environment.getOdmDirectory(), "priv-app");
final File privilegedProductAppDir = new File(Environment.getProductDirectory(), "priv-app");
+ final File privilegedProductServicesAppDir =
+ new File(Environment.getProductServicesDirectory(), "priv-app");
return path.startsWith(privilegedAppDir.getCanonicalPath())
|| path.startsWith(privilegedVendorAppDir.getCanonicalPath())
|| path.startsWith(privilegedOdmAppDir.getCanonicalPath())
- || path.startsWith(privilegedProductAppDir.getCanonicalPath());
+ || path.startsWith(privilegedProductAppDir.getCanonicalPath())
+ || path.startsWith(privilegedProductServicesAppDir.getCanonicalPath());
} catch (IOException e) {
Slog.e(TAG, "Unable to access code path " + path);
}
@@ -18744,6 +18850,15 @@
return false;
}
+ static boolean locationIsProductServices(String path) {
+ try {
+ return path.startsWith(Environment.getProductServicesDirectory().getCanonicalPath());
+ } catch (IOException e) {
+ Slog.e(TAG, "Unable to access code path " + path);
+ }
+ return false;
+ }
+
/*
* Tries to delete system package.
*/
@@ -18871,6 +18986,9 @@
if (locationIsProduct(codePathString)) {
scanFlags |= SCAN_AS_PRODUCT;
}
+ if (locationIsProductServices(codePathString)) {
+ scanFlags |= SCAN_AS_PRODUCT_SERVICES;
+ }
final File codePath = new File(codePathString);
final PackageParser.Package pkg =
@@ -21227,7 +21345,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,
@@ -22070,9 +22189,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(
@@ -22086,7 +22202,9 @@
}
for (String packageName : apkList) {
setSystemAppHiddenUntilInstalled(packageName, true);
- setSystemAppInstallState(packageName, false, ActivityManager.getCurrentUser());
+ for (UserInfo user : sUserManager.getUsers(false)) {
+ setSystemAppInstallState(packageName, false, user.id);
+ }
}
}
@@ -24456,6 +24574,17 @@
return getAppsWithSharedUserIdsLocked();
}
}
+
+ @Override
+ public boolean isOnlyCoreApps() {
+ return PackageManagerService.this.isOnlyCoreApps();
+ }
+
+ @Override
+ public void freeStorage(String volumeUuid, long bytes, int storageFlags)
+ throws IOException {
+ PackageManagerService.this.freeStorage(volumeUuid, bytes, storageFlags);
+ }
}
private SparseArray<String> getAppsWithSharedUserIdsLocked() {
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index 3834a88..f2c0395 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -25,7 +25,6 @@
import android.accounts.IAccountManager;
import android.app.ActivityManager;
import android.app.ActivityManagerInternal;
-import android.app.Application;
import android.content.ComponentName;
import android.content.Context;
import android.content.IIntentReceiver;
@@ -67,7 +66,6 @@
import android.os.IUserManager;
import android.os.ParcelFileDescriptor;
import android.os.ParcelFileDescriptor.AutoCloseInputStream;
-import android.os.ParcelFileDescriptor.AutoCloseOutputStream;
import android.os.PersistableBundle;
import android.os.Process;
import android.os.RemoteException;
@@ -84,11 +82,17 @@
import android.text.format.DateUtils;
import android.util.ArraySet;
import android.util.PrintWriterPrinter;
+
import com.android.internal.content.PackageHelper;
import com.android.internal.util.ArrayUtils;
import com.android.server.LocalServices;
import com.android.server.SystemConfig;
+
import dalvik.system.DexFile;
+
+import libcore.io.IoUtils;
+import libcore.io.Streams;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -96,10 +100,6 @@
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.nio.file.attribute.FileAttribute;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -110,10 +110,7 @@
import java.util.WeakHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;
-import libcore.io.IoUtils;
-import libcore.io.Streams;
class PackageManagerShellCommand extends ShellCommand {
/** Path for streaming APK content */
@@ -1777,6 +1774,15 @@
}
}
+ private boolean isProductServicesApp(String pkg) {
+ try {
+ final PackageInfo info = mInterface.getPackageInfo(pkg, 0, UserHandle.USER_SYSTEM);
+ return info != null && info.applicationInfo.isProductServices();
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
private int runGetPrivappPermissions() {
final String pkg = getNextArg();
if (pkg == null) {
@@ -1789,6 +1795,9 @@
privAppPermissions = SystemConfig.getInstance().getVendorPrivAppPermissions(pkg);
} else if (isProductApp(pkg)) {
privAppPermissions = SystemConfig.getInstance().getProductPrivAppPermissions(pkg);
+ } else if (isProductServicesApp(pkg)) {
+ privAppPermissions = SystemConfig.getInstance()
+ .getProductServicesPrivAppPermissions(pkg);
} else {
privAppPermissions = SystemConfig.getInstance().getPrivAppPermissions(pkg);
}
@@ -1810,6 +1819,9 @@
privAppPermissions = SystemConfig.getInstance().getVendorPrivAppDenyPermissions(pkg);
} else if (isProductApp(pkg)) {
privAppPermissions = SystemConfig.getInstance().getProductPrivAppDenyPermissions(pkg);
+ } else if (isProductServicesApp(pkg)) {
+ privAppPermissions = SystemConfig.getInstance()
+ .getProductServicesPrivAppDenyPermissions(pkg);
} else {
privAppPermissions = SystemConfig.getInstance().getPrivAppDenyPermissions(pkg);
}
diff --git a/services/core/java/com/android/server/pm/PackageSetting.java b/services/core/java/com/android/server/pm/PackageSetting.java
index ea05b74..727fb15 100644
--- a/services/core/java/com/android/server/pm/PackageSetting.java
+++ b/services/core/java/com/android/server/pm/PackageSetting.java
@@ -148,6 +148,10 @@
return (pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
}
+ public boolean isProductServices() {
+ return (pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES) != 0;
+ }
+
public boolean isForwardLocked() {
return (pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0;
}
diff --git a/services/core/java/com/android/server/pm/SettingBase.java b/services/core/java/com/android/server/pm/SettingBase.java
index 7c92045..239dc99 100644
--- a/services/core/java/com/android/server/pm/SettingBase.java
+++ b/services/core/java/com/android/server/pm/SettingBase.java
@@ -63,6 +63,7 @@
| ApplicationInfo.PRIVATE_FLAG_OEM
| ApplicationInfo.PRIVATE_FLAG_VENDOR
| ApplicationInfo.PRIVATE_FLAG_PRODUCT
+ | ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES
| ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK
| ApplicationInfo.PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER);
}
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index e9cd707..ed56a32 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -850,7 +850,8 @@
pkgSetting.pkgPrivateFlags &= ~(ApplicationInfo.PRIVATE_FLAG_PRIVILEGED
| ApplicationInfo.PRIVATE_FLAG_OEM
| ApplicationInfo.PRIVATE_FLAG_VENDOR
- | ApplicationInfo.PRIVATE_FLAG_PRODUCT);
+ | ApplicationInfo.PRIVATE_FLAG_PRODUCT
+ | ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES);
pkgSetting.pkgFlags |= pkgFlags & ApplicationInfo.FLAG_SYSTEM;
pkgSetting.pkgPrivateFlags |=
pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
@@ -860,6 +861,8 @@
pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR;
pkgSetting.pkgPrivateFlags |=
pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT;
+ pkgSetting.pkgPrivateFlags |=
+ pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES;
pkgSetting.primaryCpuAbiString = primaryCpuAbi;
pkgSetting.secondaryCpuAbiString = secondaryCpuAbi;
if (childPkgNames != null) {
@@ -4445,6 +4448,7 @@
ApplicationInfo.PRIVATE_FLAG_STATIC_SHARED_LIBRARY, "STATIC_SHARED_LIBRARY",
ApplicationInfo.PRIVATE_FLAG_VENDOR, "VENDOR",
ApplicationInfo.PRIVATE_FLAG_PRODUCT, "PRODUCT",
+ ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES, "PRODUCT_SERVICES",
ApplicationInfo.PRIVATE_FLAG_VIRTUAL_PRELOAD, "VIRTUAL_PRELOAD",
};
diff --git a/services/core/java/com/android/server/pm/SharedUserSetting.java b/services/core/java/com/android/server/pm/SharedUserSetting.java
index ca08415..c94d209 100644
--- a/services/core/java/com/android/server/pm/SharedUserSetting.java
+++ b/services/core/java/com/android/server/pm/SharedUserSetting.java
@@ -64,7 +64,7 @@
public void writeToProto(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
- proto.write(PackageServiceDumpProto.SharedUserProto.USER_ID, userId);
+ proto.write(PackageServiceDumpProto.SharedUserProto.UID, userId);
proto.write(PackageServiceDumpProto.SharedUserProto.NAME, name);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
index 9ca02ba..3f28ee6 100644
--- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
+++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
@@ -574,13 +574,13 @@
Settings.Secure.DOZE_ALWAYS_ON, 0, userId);
android.provider.Settings.Secure.putIntForUser(
context.getContentResolver(),
- Settings.Secure.DOZE_PULSE_ON_PICK_UP, 0, userId);
+ Settings.Secure.DOZE_PICK_UP_GESTURE, 0, userId);
android.provider.Settings.Secure.putIntForUser(
context.getContentResolver(),
Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, 0, userId);
android.provider.Settings.Secure.putIntForUser(
context.getContentResolver(),
- Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, 0, userId);
+ Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, 0, userId);
}
break;
case UserManager.DISALLOW_CONFIG_LOCATION:
@@ -684,9 +684,9 @@
case android.provider.Settings.Secure.DOZE_ENABLED:
case android.provider.Settings.Secure.DOZE_ALWAYS_ON:
- case android.provider.Settings.Secure.DOZE_PULSE_ON_PICK_UP:
+ case android.provider.Settings.Secure.DOZE_PICK_UP_GESTURE:
case android.provider.Settings.Secure.DOZE_PULSE_ON_LONG_PRESS:
- case android.provider.Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP:
+ case android.provider.Settings.Secure.DOZE_DOUBLE_TAP_GESTURE:
if ("0".equals(value)) {
return false;
}
diff --git a/services/core/java/com/android/server/pm/permission/BasePermission.java b/services/core/java/com/android/server/pm/permission/BasePermission.java
index 1d002ef..8202580 100644
--- a/services/core/java/com/android/server/pm/permission/BasePermission.java
+++ b/services/core/java/com/android/server/pm/permission/BasePermission.java
@@ -39,6 +39,7 @@
import com.android.server.pm.DumpState;
import com.android.server.pm.PackageManagerService;
+import com.android.server.pm.PackageSetting;
import com.android.server.pm.PackageSettingBase;
import org.xmlpull.v1.XmlPullParser;
@@ -374,8 +375,10 @@
}
public void enforceDeclaredUsedAndRuntimeOrDevelopment(PackageParser.Package pkg) {
+ final PackageSetting pkgSetting = (PackageSetting) pkg.mExtras;
+ final PermissionsState permsState = pkgSetting.getPermissionsState();
int index = pkg.requestedPermissions.indexOf(name);
- if (index == -1) {
+ if (!permsState.hasRequestedPermission(name) && index == -1) {
throw new SecurityException("Package " + pkg.packageName
+ " has not requested permission " + name);
}
diff --git a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
index 50e6f8d..a78cb33 100644
--- a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
@@ -25,7 +25,6 @@
import android.app.DownloadManager;
import android.app.admin.DevicePolicyManager;
import android.companion.CompanionDeviceManager;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
@@ -45,6 +44,7 @@
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.storage.StorageManager;
import android.print.PrintManager;
@@ -53,7 +53,6 @@
import android.provider.MediaStore;
import android.provider.Telephony.Sms.Intents;
import android.security.Credentials;
-import android.service.textclassifier.TextClassifierService;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.ArrayMap;
@@ -169,12 +168,33 @@
SENSORS_PERMISSIONS.add(Manifest.permission.BODY_SENSORS);
}
+ @Deprecated
private static final Set<String> STORAGE_PERMISSIONS = new ArraySet<>();
static {
STORAGE_PERMISSIONS.add(Manifest.permission.READ_EXTERNAL_STORAGE);
STORAGE_PERMISSIONS.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
+ private static final Set<String> MEDIA_AURAL_PERMISSIONS = new ArraySet<>();
+ static {
+ // STOPSHIP(b/112545973): remove once feature enabled by default
+ if (SystemProperties.getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false)) {
+ MEDIA_AURAL_PERMISSIONS.add(Manifest.permission.READ_MEDIA_AUDIO);
+ MEDIA_AURAL_PERMISSIONS.add(Manifest.permission.WRITE_MEDIA_AUDIO);
+ }
+ }
+
+ private static final Set<String> MEDIA_VISUAL_PERMISSIONS = new ArraySet<>();
+ static {
+ // STOPSHIP(b/112545973): remove once feature enabled by default
+ if (SystemProperties.getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false)) {
+ MEDIA_VISUAL_PERMISSIONS.add(Manifest.permission.READ_MEDIA_IMAGES);
+ MEDIA_VISUAL_PERMISSIONS.add(Manifest.permission.WRITE_MEDIA_IMAGES);
+ MEDIA_VISUAL_PERMISSIONS.add(Manifest.permission.READ_MEDIA_VIDEO);
+ MEDIA_VISUAL_PERMISSIONS.add(Manifest.permission.WRITE_MEDIA_VIDEO);
+ }
+ }
+
private static final int MSG_READ_DEFAULT_PERMISSION_EXCEPTIONS = 1;
private static final String ACTION_TRACK = "com.android.fitness.TRACK";
@@ -404,6 +424,8 @@
MediaStore.AUTHORITY, userId);
if (mediaStorePackage != null) {
grantRuntimePermissions(mediaStorePackage, STORAGE_PERMISSIONS, true, userId);
+ grantRuntimePermissions(mediaStorePackage, MEDIA_AURAL_PERMISSIONS, true, userId);
+ grantRuntimePermissions(mediaStorePackage, MEDIA_VISUAL_PERMISSIONS, true, userId);
grantRuntimePermissions(mediaStorePackage, PHONE_PERMISSIONS, true, userId);
}
@@ -615,6 +637,7 @@
if (galleryPackage != null
&& doesPackageSupportRuntimePermissions(galleryPackage)) {
grantRuntimePermissions(galleryPackage, STORAGE_PERMISSIONS, userId);
+ grantRuntimePermissions(galleryPackage, MEDIA_VISUAL_PERMISSIONS, userId);
}
// Email
@@ -724,6 +747,7 @@
if (musicPackage != null
&& doesPackageSupportRuntimePermissions(musicPackage)) {
grantRuntimePermissions(musicPackage, STORAGE_PERMISSIONS, userId);
+ grantRuntimePermissions(musicPackage, MEDIA_AURAL_PERMISSIONS, userId);
}
// Home
@@ -1373,6 +1397,11 @@
if (dir.isDirectory() && dir.canRead()) {
Collections.addAll(ret, dir.listFiles());
}
+ dir = new File(Environment.getProductServicesDirectory(),
+ "etc/default-permissions");
+ if (dir.isDirectory() && dir.canRead()) {
+ Collections.addAll(ret, dir.listFiles());
+ }
// For IoT devices, we check the oem partition for default permissions for each app.
if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_EMBEDDED, 0)) {
dir = new File(Environment.getOemDirectory(), "etc/default-permissions");
diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
index 9dc0b29..c4f90a12 100644
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
@@ -1097,6 +1097,10 @@
} else if (pkg.isProduct()) {
wlPermissions =
SystemConfig.getInstance().getProductPrivAppPermissions(pkg.packageName);
+ } else if (pkg.isProductServices()) {
+ wlPermissions =
+ SystemConfig.getInstance().getProductServicesPrivAppPermissions(
+ pkg.packageName);
} else {
wlPermissions = SystemConfig.getInstance().getPrivAppPermissions(pkg.packageName);
}
@@ -1129,6 +1133,9 @@
} else if (pkg.isProduct()) {
deniedPermissions = SystemConfig.getInstance()
.getProductPrivAppDenyPermissions(pkg.packageName);
+ } else if (pkg.isProductServices()) {
+ deniedPermissions = SystemConfig.getInstance()
+ .getProductServicesPrivAppDenyPermissions(pkg.packageName);
} else {
deniedPermissions = SystemConfig.getInstance()
.getPrivAppDenyPermissions(pkg.packageName);
diff --git a/services/core/java/com/android/server/pm/permission/PermissionsState.java b/services/core/java/com/android/server/pm/permission/PermissionsState.java
index 11df380..5e66bfc3 100644
--- a/services/core/java/com/android/server/pm/permission/PermissionsState.java
+++ b/services/core/java/com/android/server/pm/permission/PermissionsState.java
@@ -20,9 +20,9 @@
import android.os.UserHandle;
import android.util.ArrayMap;
import android.util.ArraySet;
-
import android.util.SparseArray;
import android.util.SparseBooleanArray;
+
import com.android.internal.util.ArrayUtils;
import java.util.ArrayList;
@@ -291,6 +291,13 @@
}
/**
+ * Returns whether the state has any known request for the given permission name,
+ * whether or not it has been granted.
+ */
+ public boolean hasRequestedPermission(String name) {
+ return mPermissions != null && (mPermissions.get(name) != null);
+ }
+ /**
* Gets all permissions for a given device user id regardless if they
* are install time or runtime permissions.
*
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index a8b92a6..d15271c 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -76,7 +76,7 @@
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT;
@@ -128,7 +128,6 @@
import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVERED;
import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVER_ABSENT;
import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_UNCOVERED;
-import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.LID_ABSENT;
import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.LID_CLOSED;
import static com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs.LID_OPEN;
import static com.android.server.wm.WindowManagerPolicyProto.FOCUSED_APP_TOKEN;
@@ -223,7 +222,6 @@
import android.speech.RecognizerIntent;
import android.telecom.TelecomManager;
import android.util.ArraySet;
-import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
import android.util.LongSparseArray;
@@ -269,7 +267,6 @@
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.policy.IShortcutService;
-import com.android.internal.policy.KeyguardDismissCallback;
import com.android.internal.policy.PhoneWindow;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.util.ArrayUtils;
@@ -917,6 +914,7 @@
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
android.Manifest.permission.USER_ACTIVITY);
+ break;
case MSG_RINGER_TOGGLE_CHORD:
handleRingerChordGesture();
break;
@@ -990,7 +988,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 +1426,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 +1463,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 +1619,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 +1747,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 +3930,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
@@ -4322,8 +4328,9 @@
if (!isKeyguardShowing) {
navTranslucent &= areTranslucentBarsAllowed();
}
- boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null
- && (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0;
+ boolean statusBarForcesShowingNavigation = !isKeyguardShowing && mStatusBar != null
+ && (mStatusBar.getAttrs().privateFlags
+ & PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION) != 0;
// When the navigation bar isn't visible, we put up a fake input window to catch all
// touch events. This way we can detect when the user presses anywhere to bring back the
@@ -4349,7 +4356,7 @@
navVisible |= !canHideNavigationBar();
boolean updateSysUiVisibility = layoutNavigationBar(displayFrames, uiMode, navVisible,
- navTranslucent, navAllowedHidden, statusBarExpandedNotKeyguard);
+ navTranslucent, navAllowedHidden, statusBarForcesShowingNavigation);
if (DEBUG_LAYOUT) Slog.i(TAG, "mDock rect:" + displayFrames.mDock);
updateSysUiVisibility |= layoutStatusBar(displayFrames, sysui, isKeyguardShowing);
if (updateSysUiVisibility) {
@@ -4502,7 +4509,7 @@
private boolean layoutNavigationBar(DisplayFrames displayFrames, int uiMode, boolean navVisible,
boolean navTranslucent, boolean navAllowedHidden,
- boolean statusBarExpandedNotKeyguard) {
+ boolean statusBarForcesShowingNavigation) {
if (mNavigationBar == null) {
return false;
}
@@ -4536,7 +4543,7 @@
= displayFrames.mRestrictedOverscan.bottom = top;
} else {
// We currently want to hide the navigation UI - unless we expanded the status bar.
- mNavigationBarController.setBarShowingLw(statusBarExpandedNotKeyguard);
+ mNavigationBarController.setBarShowingLw(statusBarForcesShowingNavigation);
}
if (navVisible && !navTranslucent && !navAllowedHidden
&& !mNavigationBar.isAnimatingLw()
@@ -4559,7 +4566,7 @@
= displayFrames.mRestrictedOverscan.right = left;
} else {
// We currently want to hide the navigation UI - unless we expanded the status bar.
- mNavigationBarController.setBarShowingLw(statusBarExpandedNotKeyguard);
+ mNavigationBarController.setBarShowingLw(statusBarForcesShowingNavigation);
}
if (navVisible && !navTranslucent && !navAllowedHidden
&& !mNavigationBar.isAnimatingLw()
@@ -4582,7 +4589,7 @@
displayFrames.mRestrictedOverscan.left = right;
} else {
// We currently want to hide the navigation UI - unless we expanded the status bar.
- mNavigationBarController.setBarShowingLw(statusBarExpandedNotKeyguard);
+ mNavigationBarController.setBarShowingLw(statusBarForcesShowingNavigation);
}
if (navVisible && !navTranslucent && !navAllowedHidden
&& !mNavigationBar.isAnimatingLw()
@@ -5392,19 +5399,21 @@
mStatusBarController.setShowTransparent(true /* transparent */);
}
- boolean statusBarExpanded =
- (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0;
+ boolean statusBarForcesShowingNavigation
+ = (mStatusBar.getAttrs().privateFlags
+ & PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION) != 0;
boolean topAppHidesStatusBar = topAppHidesStatusBar();
if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent
- || statusBarExpanded) {
+ || statusBarForcesShowingNavigation) {
if (DEBUG_LAYOUT) Slog.v(TAG, "Showing status bar: forced");
if (mStatusBarController.setBarShowingLw(true)) {
changes |= FINISH_LAYOUT_REDO_LAYOUT;
}
// Maintain fullscreen layout until incoming animation is complete.
topIsFullscreen = mTopIsFullscreen && mStatusBar.isAnimatingLw();
- // Transient status bar on the lockscreen is not allowed
- if ((mForceStatusBarFromKeyguard || statusBarExpanded)
+ // Transient status bar is not allowed if status bar is on lockscreen or status bar
+ // is expecting the navigation keys from the user.
+ if ((mForceStatusBarFromKeyguard || statusBarForcesShowingNavigation)
&& mStatusBarController.isTransientShowing()) {
mStatusBarController.updateVisibilityLw(false /*transientAllowed*/,
mLastSystemUiFlags, mLastSystemUiFlags);
@@ -6029,7 +6038,8 @@
}
if (useHapticFeedback) {
- performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false,
+ "Virtual Key - Press");
}
if (isWakeKey) {
@@ -6862,7 +6872,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 +7335,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 +7360,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..b55adeb 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
@@ -1710,8 +1711,8 @@
}
/**
- * Requests that the WindowManager sends WindowManagerPolicy#ACTION_USER_ACTIVITY_NOTIFICATION
- * on the next user activity.
+ * Requests that the WindowManager sends
+ * WindowManagerPolicyConstants#ACTION_USER_ACTIVITY_NOTIFICATION on the next user activity.
*/
public void requestUserActivityNotification();
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 13800b6..91d4717 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -288,6 +288,9 @@
private long mLastWakeTime;
private long mLastSleepTime;
+ // Last reason the device went to sleep.
+ private int mLastSleepReason;
+
// Timestamp of the last call to user activity.
private long mLastUserActivityTime;
private long mLastUserActivityTimeNoChangeLights;
@@ -1433,6 +1436,7 @@
}
mLastSleepTime = eventTime;
+ mLastSleepReason = reason;
mSandmanSummoned = true;
setWakefulnessLocked(WAKEFULNESS_DOZING, reason);
@@ -3266,6 +3270,7 @@
pw.println(" mDeviceIdleTempWhitelist=" + Arrays.toString(mDeviceIdleTempWhitelist));
pw.println(" mLastWakeTime=" + TimeUtils.formatUptime(mLastWakeTime));
pw.println(" mLastSleepTime=" + TimeUtils.formatUptime(mLastSleepTime));
+ pw.println(" mLastSleepReason=" + PowerManager.sleepReasonToString(mLastSleepReason));
pw.println(" mLastUserActivityTime=" + TimeUtils.formatUptime(mLastUserActivityTime));
pw.println(" mLastUserActivityTimeNoChangeLights="
+ TimeUtils.formatUptime(mLastUserActivityTimeNoChangeLights));
@@ -4404,6 +4409,19 @@
}
}
+ @Override // Binder call
+ public int getLastSleepReason() {
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.DEVICE_POWER, null);
+
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ return getLastSleepReasonInternal();
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
+ }
+
/**
* Reboots the device.
*
@@ -4619,6 +4637,12 @@
}
}
+ private int getLastSleepReasonInternal() {
+ synchronized (mLock) {
+ return mLastSleepReason;
+ }
+ }
+
private final class LocalService extends PowerManagerInternal {
@Override
public void setScreenBrightnessOverrideFromWindowManager(int screenBrightness) {
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index 519881e..b8c9be7 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -80,6 +80,7 @@
private int mDisabled2 = 0;
private final Object mLock = new Object();
+ private final DeathRecipient mDeathRecipient = new DeathRecipient();
// encompasses lights-out mode and other flags defined on View
private int mSystemUiVisibility = 0;
private int mFullscreenStackSysUiVisibility;
@@ -93,6 +94,23 @@
private IBinder mImeToken = null;
private int mCurrentUserId;
+ private class DeathRecipient implements IBinder.DeathRecipient {
+ public void binderDied() {
+ mBar.asBinder().unlinkToDeath(this,0);
+ mBar = null;
+ notifyBarAttachChanged();
+ }
+
+ public void linkToDeath() {
+ try {
+ mBar.asBinder().linkToDeath(mDeathRecipient,0);
+ } catch (RemoteException e) {
+ Slog.e(TAG,"Unable to register Death Recipient for status bar", e);
+ }
+ }
+
+ }
+
private class DisableRecord implements IBinder.DeathRecipient {
int userId;
String pkg;
@@ -859,16 +877,7 @@
Slog.i(TAG, "registerStatusBar bar=" + bar);
mBar = bar;
- try {
- mBar.asBinder().linkToDeath(new DeathRecipient() {
- @Override
- public void binderDied() {
- mBar = null;
- notifyBarAttachChanged();
- }
- }, 0);
- } catch (RemoteException e) {
- }
+ mDeathRecipient.linkToDeath();
notifyBarAttachChanged();
synchronized (mIcons) {
for (String slot : mIcons.keySet()) {
@@ -1044,14 +1053,16 @@
@Override
public void onNotificationClear(String pkg, String tag, int id, int userId, String key,
- @NotificationStats.DismissalSurface int dismissalSurface, NotificationVisibility nv) {
+ @NotificationStats.DismissalSurface int dismissalSurface,
+ @NotificationStats.DismissalSentiment int dismissalSentiment,
+ NotificationVisibility nv) {
enforceStatusBarService();
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
long identity = Binder.clearCallingIdentity();
try {
mNotificationDelegate.onNotificationClear(callingUid, callingPid, pkg, tag, id, userId,
- key, dismissalSurface, nv);
+ key, dismissalSurface, dismissalSentiment, nv);
} finally {
Binder.restoreCallingIdentity(identity);
}
diff --git a/services/core/java/com/android/server/uri/UriGrantsManagerService.java b/services/core/java/com/android/server/uri/UriGrantsManagerService.java
index 1b5ffda..9a7e75e 100644
--- a/services/core/java/com/android/server/uri/UriGrantsManagerService.java
+++ b/services/core/java/com/android/server/uri/UriGrantsManagerService.java
@@ -30,6 +30,7 @@
import static android.os.Process.ROOT_UID;
import static android.os.Process.SYSTEM_UID;
import static android.os.Process.myUid;
+
import static com.android.internal.util.XmlUtils.readBooleanAttribute;
import static com.android.internal.util.XmlUtils.readIntAttribute;
import static com.android.internal.util.XmlUtils.readLongAttribute;
@@ -37,6 +38,7 @@
import static com.android.internal.util.XmlUtils.writeIntAttribute;
import static com.android.internal.util.XmlUtils.writeLongAttribute;
import static com.android.server.uri.UriGrantsManagerService.H.PERSIST_URI_GRANTS_MSG;
+
import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
import static org.xmlpull.v1.XmlPullParser.START_TAG;
@@ -73,15 +75,19 @@
import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
+
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.Preconditions;
import com.android.server.IoThread;
import com.android.server.LocalServices;
import com.android.server.SystemService;
import com.android.server.SystemServiceManager;
+
import com.google.android.collect.Lists;
import com.google.android.collect.Maps;
+import libcore.io.IoUtils;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -98,8 +104,6 @@
import java.util.Iterator;
import java.util.List;
-import libcore.io.IoUtils;
-
/** Manages uri grants. */
public class UriGrantsManagerService extends IUriGrantsManager.Stub {
private static final boolean DEBUG = false;
@@ -150,7 +154,6 @@
void onActivityManagerInternalAdded() {
mAmInternal = LocalServices.getService(ActivityManagerInternal.class);
- mPmInternal = LocalServices.getService(PackageManagerInternal.class);
}
public static final class Lifecycle extends SystemService {
@@ -296,7 +299,7 @@
if (toPackage != null) {
mAmInternal.enforceCallingPermission(FORCE_PERSISTABLE_URI_PERMISSIONS,
"takePersistableUriPermission");
- uid = mPmInternal.getPackageUid(toPackage, 0, userId);
+ uid = getPmInternal().getPackageUid(toPackage, 0, userId);
} else {
enforceNotIsolatedCaller("takePersistableUriPermission");
uid = Binder.getCallingUid();
@@ -361,7 +364,7 @@
if (toPackage != null) {
mAmInternal.enforceCallingPermission(FORCE_PERSISTABLE_URI_PERMISSIONS,
"releasePersistableUriPermission");
- uid = mPmInternal.getPackageUid(toPackage, 0, userId);
+ uid = getPmInternal().getPackageUid(toPackage, 0, userId);
} else {
enforceNotIsolatedCaller("releasePersistableUriPermission");
uid = Binder.getCallingUid();
@@ -1062,10 +1065,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 +1084,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 +1119,7 @@
}
}
if (allowed) {
- return -1;
+ return allowedResult;
}
}
@@ -1259,6 +1269,14 @@
}
}
+ private PackageManagerInternal getPmInternal() {
+ // Don't need to synchonize; worst-case scenario LocalServices will be called twice.
+ if (mPmInternal == null) {
+ mPmInternal = LocalServices.getService(PackageManagerInternal.class);
+ }
+ return mPmInternal;
+ }
+
final class H extends Handler {
static final int PERSIST_URI_GRANTS_MSG = 1;
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/webkit/WebViewUpdater.java b/services/core/java/com/android/server/webkit/WebViewUpdater.java
index 3e72d981..f270715 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdater.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdater.java
@@ -504,20 +504,20 @@
private static boolean providerHasValidSignature(WebViewProviderInfo provider,
PackageInfo packageInfo, SystemInterface systemInterface) {
- if (systemInterface.systemIsDebuggable()) {
- return true;
- }
- // If no signature is declared, instead check whether the package is included in the
- // system.
- if (provider.signatures == null || provider.signatures.length == 0) {
- return packageInfo.applicationInfo.isSystemApp();
- }
+ // Skip checking signatures on debuggable builds, for development purposes.
+ if (systemInterface.systemIsDebuggable()) return true;
+
+ // Allow system apps to be valid providers regardless of signature.
+ if (packageInfo.applicationInfo.isSystemApp()) return true;
+
+ // We don't support packages with multiple signatures.
if (packageInfo.signatures.length != 1) return false;
- // Return whether the package signature matches any of the valid signatures
+ // If any of the declared signatures match the package signature, it's valid.
for (Signature signature : provider.signatures) {
if (signature.equals(packageInfo.signatures[0])) return true;
}
+
return false;
}
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index f0898c0..e449111 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -119,13 +119,13 @@
}
}
- public void performComputeChangedWindowsNotLocked() {
+ public void performComputeChangedWindowsNotLocked(boolean forceSend) {
WindowsForAccessibilityObserver observer = null;
synchronized (mService) {
observer = mWindowsForAccessibilityObserver;
}
if (observer != null) {
- observer.performComputeChangedWindowsNotLocked();
+ observer.performComputeChangedWindowsNotLocked(forceSend);
}
}
@@ -193,7 +193,7 @@
observer = mWindowsForAccessibilityObserver;
}
if (observer != null) {
- observer.performComputeChangedWindowsNotLocked();
+ observer.performComputeChangedWindowsNotLocked(false);
}
}
@@ -1011,12 +1011,12 @@
mHandler = new MyHandler(mService.mH.getLooper());
mRecurringAccessibilityEventsIntervalMillis = ViewConfiguration
.getSendRecurringAccessibilityEventsInterval();
- computeChangedWindows();
+ computeChangedWindows(true);
}
- public void performComputeChangedWindowsNotLocked() {
+ public void performComputeChangedWindowsNotLocked(boolean forceSend) {
mHandler.removeMessages(MyHandler.MESSAGE_COMPUTE_CHANGED_WINDOWS);
- computeChangedWindows();
+ computeChangedWindows(forceSend);
}
public void scheduleComputeChangedWindowsLocked() {
@@ -1026,7 +1026,12 @@
}
}
- public void computeChangedWindows() {
+ /**
+ * Check if windows have changed, and send them to the accessibilty subsystem if they have.
+ *
+ * @param forceSend Send the windows the accessibility even if they haven't changed.
+ */
+ public void computeChangedWindows(boolean forceSend) {
if (DEBUG) {
Slog.i(LOG_TAG, "computeChangedWindows()");
}
@@ -1171,36 +1176,38 @@
visibleWindows.clear();
addedWindows.clear();
- // We computed the windows and if they changed notify the client.
- if (mOldWindows.size() != windows.size()) {
- // Different size means something changed.
- windowsChanged = true;
- } else if (!mOldWindows.isEmpty() || !windows.isEmpty()) {
- // Since we always traverse windows from high to low layer
- // the old and new windows at the same index should be the
- // same, otherwise something changed.
- for (int i = 0; i < windowCount; i++) {
- WindowInfo oldWindow = mOldWindows.get(i);
- WindowInfo newWindow = windows.get(i);
- // We do not care for layer changes given the window
- // order does not change. This brings no new information
- // to the clients.
- if (windowChangedNoLayer(oldWindow, newWindow)) {
- windowsChanged = true;
- break;
+ if (!forceSend) {
+ // We computed the windows and if they changed notify the client.
+ if (mOldWindows.size() != windows.size()) {
+ // Different size means something changed.
+ windowsChanged = true;
+ } else if (!mOldWindows.isEmpty() || !windows.isEmpty()) {
+ // Since we always traverse windows from high to low layer
+ // the old and new windows at the same index should be the
+ // same, otherwise something changed.
+ for (int i = 0; i < windowCount; i++) {
+ WindowInfo oldWindow = mOldWindows.get(i);
+ WindowInfo newWindow = windows.get(i);
+ // We do not care for layer changes given the window
+ // order does not change. This brings no new information
+ // to the clients.
+ if (windowChangedNoLayer(oldWindow, newWindow)) {
+ windowsChanged = true;
+ break;
+ }
}
}
}
- if (windowsChanged) {
+ if (forceSend || windowsChanged) {
cacheWindows(windows);
}
}
// Now we do not hold the lock, so send the windows over.
- if (windowsChanged) {
+ if (forceSend || windowsChanged) {
if (DEBUG) {
- Log.i(LOG_TAG, "Windows changed:" + windows);
+ Log.i(LOG_TAG, "Windows changed or force sending:" + windows);
}
mCallback.onWindowsForAccessibilityChanged(windows);
} else {
@@ -1345,7 +1352,7 @@
public void handleMessage(Message message) {
switch (message.what) {
case MESSAGE_COMPUTE_CHANGED_WINDOWS: {
- computeChangedWindows();
+ computeChangedWindows(false);
} break;
}
}
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 4ab06a2..49638a9 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -20,7 +20,6 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
-import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND;
@@ -59,12 +58,25 @@
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
+import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
+
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
-import static com.android.server.wm.utils.CoordinateTransforms.transformPhysicalToLogicalCoordinates;
-import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
+import static com.android.server.wm.DisplayContentProto.ABOVE_APP_WINDOWS;
+import static com.android.server.wm.DisplayContentProto.BELOW_APP_WINDOWS;
+import static com.android.server.wm.DisplayContentProto.DISPLAY_FRAMES;
+import static com.android.server.wm.DisplayContentProto.DISPLAY_INFO;
+import static com.android.server.wm.DisplayContentProto.DOCKED_STACK_DIVIDER_CONTROLLER;
+import static com.android.server.wm.DisplayContentProto.DPI;
+import static com.android.server.wm.DisplayContentProto.ID;
+import static com.android.server.wm.DisplayContentProto.IME_WINDOWS;
+import static com.android.server.wm.DisplayContentProto.PINNED_STACK_CONTROLLER;
+import static com.android.server.wm.DisplayContentProto.ROTATION;
+import static com.android.server.wm.DisplayContentProto.SCREEN_ROTATION_ANIMATION;
+import static com.android.server.wm.DisplayContentProto.STACKS;
+import static com.android.server.wm.DisplayContentProto.WINDOW_CONTAINER;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_BOOT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DISPLAY;
@@ -101,19 +113,7 @@
import static com.android.server.wm.WindowStateAnimator.DRAW_PENDING;
import static com.android.server.wm.WindowStateAnimator.READY_TO_SHOW;
import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_MAY_CHANGE;
-import static com.android.server.wm.DisplayProto.ABOVE_APP_WINDOWS;
-import static com.android.server.wm.DisplayProto.BELOW_APP_WINDOWS;
-import static com.android.server.wm.DisplayProto.DISPLAY_FRAMES;
-import static com.android.server.wm.DisplayProto.DISPLAY_INFO;
-import static com.android.server.wm.DisplayProto.DOCKED_STACK_DIVIDER_CONTROLLER;
-import static com.android.server.wm.DisplayProto.DPI;
-import static com.android.server.wm.DisplayProto.ID;
-import static com.android.server.wm.DisplayProto.IME_WINDOWS;
-import static com.android.server.wm.DisplayProto.PINNED_STACK_CONTROLLER;
-import static com.android.server.wm.DisplayProto.ROTATION;
-import static com.android.server.wm.DisplayProto.SCREEN_ROTATION_ANIMATION;
-import static com.android.server.wm.DisplayProto.STACKS;
-import static com.android.server.wm.DisplayProto.WINDOW_CONTAINER;
+import static com.android.server.wm.utils.CoordinateTransforms.transformPhysicalToLogicalCoordinates;
import android.annotation.CallSuper;
import android.annotation.NonNull;
@@ -122,7 +122,6 @@
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Matrix;
-import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
@@ -141,6 +140,7 @@
import android.view.Display;
import android.view.DisplayCutout;
import android.view.DisplayInfo;
+import android.view.Gravity;
import android.view.InputDevice;
import android.view.MagnificationSpec;
import android.view.Surface;
@@ -1617,6 +1617,54 @@
}
}
+ /**
+ * Apps that use the compact menu panel (as controlled by the panelMenuIsCompact
+ * theme attribute) on devices that feature a physical options menu key attempt to position
+ * their menu panel window along the edge of the screen nearest the physical menu key.
+ * This lowers the travel distance between invoking the menu panel and selecting
+ * a menu option.
+ *
+ * This method helps control where that menu is placed. Its current implementation makes
+ * assumptions about the menu key and its relationship to the screen based on whether
+ * the device's natural orientation is portrait (width < height) or landscape.
+ *
+ * The menu key is assumed to be located along the bottom edge of natural-portrait
+ * devices and along the right edge of natural-landscape devices. If these assumptions
+ * do not hold for the target device, this method should be changed to reflect that.
+ *
+ * @return A {@link Gravity} value for placing the options menu window.
+ */
+ int getPreferredOptionsPanelGravity() {
+ final int rotation = getRotation();
+ if (mInitialDisplayWidth < mInitialDisplayHeight) {
+ // On devices with a natural orientation of portrait.
+ switch (rotation) {
+ default:
+ case Surface.ROTATION_0:
+ return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
+ case Surface.ROTATION_90:
+ return Gravity.RIGHT | Gravity.BOTTOM;
+ case Surface.ROTATION_180:
+ return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
+ case Surface.ROTATION_270:
+ return Gravity.START | Gravity.BOTTOM;
+ }
+ }
+
+ // On devices with a natural orientation of landscape.
+ switch (rotation) {
+ default:
+ case Surface.ROTATION_0:
+ return Gravity.RIGHT | Gravity.BOTTOM;
+ case Surface.ROTATION_90:
+ return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
+ case Surface.ROTATION_180:
+ return Gravity.START | Gravity.BOTTOM;
+ case Surface.ROTATION_270:
+ return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
+ }
+ }
+
DockedStackDividerController getDockedDividerController() {
return mDividerControllerLocked;
}
@@ -2130,6 +2178,8 @@
}
}
mService.mAnimator.removeDisplayLocked(mDisplayId);
+ mWindowingLayer.release();
+ mOverlayLayer.release();
} finally {
mRemovingDisplay = false;
}
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/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index a6bda37..d8cbb26 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -16,9 +16,46 @@
package com.android.server.wm;
+import static android.view.Display.DEFAULT_DISPLAY;
+import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE;
+import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
+import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG;
+
+import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM;
+import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT;
+import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
+import static com.android.server.wm.RootWindowContainerProto.DISPLAYS;
+import static com.android.server.wm.RootWindowContainerProto.WINDOWS;
+import static com.android.server.wm.RootWindowContainerProto.WINDOW_CONTAINER;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DISPLAY;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_KEEP_SCREEN_ON;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_LAYOUT_REPEATS;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ORIENTATION;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WALLPAPER_LIGHT;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_TRACE;
+import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACTIONS;
+import static com.android.server.wm.WindowManagerDebugConfig.SHOW_SURFACE_ALLOC;
+import static com.android.server.wm.WindowManagerDebugConfig.SHOW_TRANSACTIONS;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_KEEP_SCREEN_ON;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
+import static com.android.server.wm.WindowManagerService.H.REPORT_LOSING_FOCUS;
+import static com.android.server.wm.WindowManagerService.H.SEND_NEW_CONFIGURATION;
+import static com.android.server.wm.WindowManagerService.H.WINDOW_FREEZE_TIMEOUT;
+import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_PLACING_SURFACES;
+import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES;
+import static com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_NONE;
+import static com.android.server.wm.WindowManagerService.logSurface;
+import static com.android.server.wm.WindowSurfacePlacer.SET_FORCE_HIDING_CHANGED;
+import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE;
+import static com.android.server.wm.WindowSurfacePlacer.SET_UPDATE_ROTATION;
+import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING;
+import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_MAY_CHANGE;
+
import android.annotation.CallSuper;
import android.content.res.Configuration;
-import android.graphics.Rect;
import android.hardware.power.V1_0.PowerHint;
import android.os.Binder;
import android.os.Debug;
@@ -26,7 +63,6 @@
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
-import android.os.ParcelFileDescriptor;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.UserHandle;
@@ -43,51 +79,11 @@
import com.android.internal.util.ArrayUtils;
import com.android.server.EventLogTags;
-import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
-import static android.view.Display.DEFAULT_DISPLAY;
-import static android.view.Display.INVALID_DISPLAY;
-import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE;
-import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
-import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG;
-
-import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM;
-import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT;
-import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DISPLAY;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_KEEP_SCREEN_ON;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_LAYOUT_REPEATS;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ORIENTATION;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WALLPAPER_LIGHT;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_TRACE;
-import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACTIONS;
-import static com.android.server.wm.WindowManagerDebugConfig.SHOW_SURFACE_ALLOC;
-import static com.android.server.wm.WindowManagerDebugConfig.SHOW_TRANSACTIONS;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_KEEP_SCREEN_ON;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
-import static com.android.server.wm.WindowManagerService.H.REPORT_LOSING_FOCUS;
-import static com.android.server.wm.WindowManagerService.H.SEND_NEW_CONFIGURATION;
-import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_PLACING_SURFACES;
-import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES;
-import static com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_NONE;
-import static com.android.server.wm.WindowManagerService.H.WINDOW_FREEZE_TIMEOUT;
-import static com.android.server.wm.WindowManagerService.logSurface;
-import static com.android.server.wm.WindowSurfacePlacer.SET_FORCE_HIDING_CHANGED;
-import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE;
-import static com.android.server.wm.WindowSurfacePlacer.SET_UPDATE_ROTATION;
-import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING;
-import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_MAY_CHANGE;
-import static com.android.server.wm.RootWindowContainerProto.DISPLAYS;
-import static com.android.server.wm.RootWindowContainerProto.WINDOWS;
-import static com.android.server.wm.RootWindowContainerProto.WINDOW_CONTAINER;
-
/** Root {@link WindowContainer} for the device. */
class RootWindowContainer extends WindowContainer<DisplayContent> {
private static final String TAG = TAG_WITH_CLASS_NAME ? "RootWindowContainer" : TAG_WM;
@@ -301,6 +297,18 @@
return null;
}
+ /** Returns the window token for the input binder if it exist in the system. */
+ WindowToken getWindowToken(IBinder binder) {
+ for (int i = mChildren.size() - 1; i >= 0; --i) {
+ final DisplayContent dc = mChildren.get(i);
+ final WindowToken wtoken = dc.getWindowToken(binder);
+ if (wtoken != null) {
+ return wtoken;
+ }
+ }
+ return null;
+ }
+
/** Returns the display object the input window token is currently mapped on. */
DisplayContent getWindowTokenDisplay(WindowToken token) {
if (token == null) {
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/WindowManagerInternal.java b/services/core/java/com/android/server/wm/WindowManagerInternal.java
index 0c65518..44783f8 100644
--- a/services/core/java/com/android/server/wm/WindowManagerInternal.java
+++ b/services/core/java/com/android/server/wm/WindowManagerInternal.java
@@ -410,7 +410,7 @@
public abstract boolean isDockedDividerResizing();
/**
- * Requests the window manager to recompute the windows for accessibility.
+ * Requests the window manager to resend the windows for accessibility.
*/
public abstract void computeWindowsForAccessibility();
@@ -436,4 +436,9 @@
* the window token is not found.
*/
public abstract int getWindowOwnerUserId(IBinder windowToken);
+
+ /**
+ * Returns {@code true} if a Window owned by {@code uid} has focus.
+ */
+ public abstract boolean isUidFocused(int uid);
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index ab735af..158d09a 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -226,7 +226,6 @@
import android.view.WindowManagerPolicyConstants.PointerEventListener;
import com.android.internal.R;
-import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
import com.android.internal.os.IResultReceiver;
import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.policy.IShortcutService;
@@ -269,7 +268,6 @@
import java.util.Arrays;
import java.util.Date;
import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
/** {@hide} */
public class WindowManagerService extends IWindowManager.Stub
@@ -1153,7 +1151,7 @@
throw new IllegalStateException("Display has not been initialialized");
}
- final DisplayContent displayContent = getDisplayContentOrCreate(displayId);
+ final DisplayContent displayContent = getDisplayContentOrCreate(displayId, attrs.token);
if (displayContent == null) {
Slog.w(TAG_WM, "Attempted to add window to a display that does not exist: "
@@ -1367,7 +1365,7 @@
// UID, otherwise we allow unlimited duration. When a UID looses focus we
// schedule hiding all of its toast windows.
if (type == TYPE_TOAST) {
- if (!getDefaultDisplayContentLocked().canAddToastWindowForUid(callingUid)) {
+ if (!displayContent.canAddToastWindowForUid(callingUid)) {
Slog.w(TAG_WM, "Adding more than one toast window for UID at a time.");
return WindowManagerGlobal.ADD_DUPLICATE_ADD;
}
@@ -1542,9 +1540,20 @@
* that corresponds to a display just added to DisplayManager has not yet been created. This
* usually means that the call of this method was initiated from outside of Activity or Window
* Manager. In most cases the regular getter should be used.
+ * @param displayId The preferred display Id.
+ * @param token The window token associated with the window we are trying to get display for.
+ * if not null then the display of the window token will be returned. Set to null
+ * is there isn't an a token associated with the request.
* @see RootWindowContainer#getDisplayContent(int)
*/
- private DisplayContent getDisplayContentOrCreate(int displayId) {
+ private DisplayContent getDisplayContentOrCreate(int displayId, IBinder token) {
+ if (token != null) {
+ final WindowToken wToken = mRoot.getWindowToken(token);
+ if (wToken != null) {
+ return wToken.getDisplayContent();
+ }
+ }
+
DisplayContent displayContent = mRoot.getDisplayContent(displayId);
// Create an instance if possible instead of waiting for the ActivityManagerService to drive
@@ -1901,6 +1910,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;
}
@@ -2093,12 +2103,9 @@
}
if (focusMayChange) {
- //System.out.println("Focus may change: " + win.mAttrs.getTitle());
- if (updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES,
- false /*updateInputWindows*/)) {
+ if (updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /*updateInputWindows*/)) {
imMayMove = false;
}
- //System.out.println("Relayout " + win + ": focus=" + mCurrentFocus);
}
// updateFocusedWindowLocked() already assigned layers so we only need to
@@ -2342,6 +2349,12 @@
synchronized(mWindowMap) {
final DisplayContent dc = mRoot.getDisplayContent(displayId);
+ if (dc == null) {
+ Slog.w(TAG_WM, "addWindowToken: Attempted to add token: " + binder
+ + " for non-exiting displayId=" + displayId);
+ return;
+ }
+
WindowToken token = dc.getWindowToken(binder);
if (token != null) {
Slog.w(TAG_WM, "addWindowToken: Attempted to add binder token: " + binder
@@ -3953,56 +3966,14 @@
}
}
- /**
- * Apps that use the compact menu panel (as controlled by the panelMenuIsCompact
- * theme attribute) on devices that feature a physical options menu key attempt to position
- * their menu panel window along the edge of the screen nearest the physical menu key.
- * This lowers the travel distance between invoking the menu panel and selecting
- * a menu option.
- *
- * This method helps control where that menu is placed. Its current implementation makes
- * assumptions about the menu key and its relationship to the screen based on whether
- * the device's natural orientation is portrait (width < height) or landscape.
- *
- * The menu key is assumed to be located along the bottom edge of natural-portrait
- * devices and along the right edge of natural-landscape devices. If these assumptions
- * do not hold for the target device, this method should be changed to reflect that.
- *
- * @return A {@link Gravity} value for placing the options menu window
- */
@Override
- public int getPreferredOptionsPanelGravity() {
+ public int getPreferredOptionsPanelGravity(int displayId) {
synchronized (mWindowMap) {
- // TODO(multidisplay): Assume that such devices physical keys are on the main screen.
- final DisplayContent displayContent = getDefaultDisplayContentLocked();
- final int rotation = displayContent.getRotation();
- if (displayContent.mInitialDisplayWidth < displayContent.mInitialDisplayHeight) {
- // On devices with a natural orientation of portrait
- switch (rotation) {
- default:
- case Surface.ROTATION_0:
- return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
- case Surface.ROTATION_90:
- return Gravity.RIGHT | Gravity.BOTTOM;
- case Surface.ROTATION_180:
- return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
- case Surface.ROTATION_270:
- return Gravity.START | Gravity.BOTTOM;
- }
+ final DisplayContent displayContent = mRoot.getDisplayContent(displayId);
+ if (displayContent == null) {
+ return Gravity.CENTER | Gravity.BOTTOM;
}
-
- // On devices with a natural orientation of landscape
- switch (rotation) {
- default:
- case Surface.ROTATION_0:
- return Gravity.RIGHT | Gravity.BOTTOM;
- case Surface.ROTATION_90:
- return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
- case Surface.ROTATION_180:
- return Gravity.START | Gravity.BOTTOM;
- case Surface.ROTATION_270:
- return Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
- }
+ return displayContent.getPreferredOptionsPanelGravity();
}
}
@@ -6208,6 +6179,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
@@ -6930,10 +6912,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(
@@ -7098,7 +7078,7 @@
final long token = Binder.clearCallingIdentity();
try {
synchronized (mWindowMap) {
- final DisplayContent dc = getDisplayContentOrCreate(displayId);
+ final DisplayContent dc = getDisplayContentOrCreate(displayId, null);
if (dc == null) {
throw new IllegalArgumentException(
"Trying to register a non existent display.");
@@ -7422,7 +7402,7 @@
accessibilityController = mAccessibilityController;
}
if (accessibilityController != null) {
- accessibilityController.performComputeChangedWindowsNotLocked();
+ accessibilityController.performComputeChangedWindowsNotLocked(true);
}
}
@@ -7456,6 +7436,13 @@
return UserHandle.USER_NULL;
}
}
+
+ @Override
+ public boolean isUidFocused(int uid) {
+ synchronized (mWindowMap) {
+ return mCurrentFocus != null ? uid == mCurrentFocus.getOwningUid() : false;
+ }
+ }
}
void registerAppFreezeListener(AppFreezeListener listener) {
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/java/com/android/server/wm/utils/InsetUtils.java b/services/core/java/com/android/server/wm/utils/InsetUtils.java
index c5b103f..f5cc0d5 100644
--- a/services/core/java/com/android/server/wm/utils/InsetUtils.java
+++ b/services/core/java/com/android/server/wm/utils/InsetUtils.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.Rect;
+import android.view.Surface;
/**
@@ -30,6 +31,32 @@
}
/**
+ * Transforms insets given in one rotation into insets in a different rotation.
+ *
+ * @param inOutInsets the insets to transform, is set to the transformed insets
+ * @param rotationDelta the delta between the new and old rotation.
+ * Must be one of Surface.ROTATION_0/90/180/270.
+ */
+ public static void rotateInsets(Rect inOutInsets, int rotationDelta) {
+ final Rect r = inOutInsets;
+ switch (rotationDelta) {
+ case Surface.ROTATION_0:
+ return;
+ case Surface.ROTATION_90:
+ r.set(r.top, r.right, r.bottom, r.left);
+ break;
+ case Surface.ROTATION_180:
+ r.set(r.right, r.bottom, r.left, r.top);
+ break;
+ case Surface.ROTATION_270:
+ r.set(r.bottom, r.left, r.top, r.right);
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown rotation: " + rotationDelta);
+ }
+ }
+
+ /**
* Adds {@code insetsToAdd} to {@code inOutInsets}.
*/
public static void addInsets(Rect inOutInsets, Rect insetsToAdd) {
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/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 81ac6a4..664a837 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -4579,10 +4579,12 @@
enforceFullCrossUsersPermission(userHandle);
synchronized (getLockObject()) {
if (!isCallerWithSystemUid()) {
- // This API can only be called by an active device admin,
- // so try to retrieve it to check that the caller is one.
- getActiveAdminForCallerLocked(
- null, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent);
+ // This API can be called by an active device admin or by keyguard code.
+ if (mContext.checkCallingPermission(permission.ACCESS_KEYGUARD_SECURE_STORAGE)
+ != PackageManager.PERMISSION_GRANTED) {
+ getActiveAdminForCallerLocked(
+ null, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent);
+ }
}
DevicePolicyData policy = getUserDataUnchecked(getCredentialOwner(userHandle, parent));
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index b6f3d3b..c82c242 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -28,6 +28,7 @@
import android.content.res.Configuration;
import android.content.res.Resources.Theme;
import android.database.sqlite.SQLiteCompatibilityWalFlags;
+import android.database.sqlite.SQLiteGlobal;
import android.os.BaseBundle;
import android.os.Binder;
import android.os.Build;
@@ -355,6 +356,10 @@
Binder.setWarnOnBlocking(true);
// The system server should always load safe labels
PackageItemInfo.setForceSafeLabels(true);
+
+ // Default to FULL within the system server.
+ SQLiteGlobal.sDefaultSyncMode = SQLiteGlobal.SYNC_MODE_FULL;
+
// Deactivate SQLiteCompatibilityWalFlags until settings provider is initialized
SQLiteCompatibilityWalFlags.init(null);
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/README b/services/robotests/README
new file mode 100644
index 0000000..3c68292
--- /dev/null
+++ b/services/robotests/README
@@ -0,0 +1,23 @@
+This folder is for Robolectric tests inside the platform.
+
+To add a test class annotate it as follows:
+
+@RunWith(FrameworkRobolectricTestRunner.class)
+@Config(manifest = Config.NONE, sdk = 26)
+@SystemLoaderClasses({ClassUnderTest.class, DependencyClasses.class})
+@SystemLoaderPackages({"com.android.server.yourmodule"})
+
+Robolectric loads some classes that it decides from versioned jars of the framework. Since we are
+part of the framework some of our classes get loaded from these jars. This is NOT what we want, we
+want to test against what we wrote in the tree. Because of this we use a custom test runner,
+FrameworkRobolectricTestRunner, that bypasses these jars and loads certain classes from the system
+class loader.
+
+To specify which classes to load use either @SystemLoaderClasses or @SystemLoaderPackages. In
+practice:
+* You MUST put the class under test here.
+* If you encounter any exceptions that might be caused by a different version of the class being
+loaded, such as NoSuchMethodException, put the class involved in the exception in this annotation
+and try again.
+
+Check Android.mk file for more info.
diff --git a/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java b/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
index ea9967b..91a8857 100644
--- a/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
+++ b/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
@@ -45,7 +45,6 @@
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.testing.BackupManagerServiceTestUtils;
import com.android.server.backup.testing.TransportData;
import com.android.server.backup.testing.TransportTestUtils.TransportMock;
@@ -769,7 +768,7 @@
mShadowBackupLooper.runToEndOfTasks();
assertThat(result).isEqualTo(BackupManager.SUCCESS);
ShadowKeyValueBackupTask shadowTask = ShadowKeyValueBackupTask.getLastCreated();
- assertThat(shadowTask.getQueue()).containsExactly(new BackupRequest(PACKAGE_1));
+ assertThat(shadowTask.getQueue()).containsExactly(PACKAGE_1);
assertThat(shadowTask.getPendingFullBackups()).isEmpty();
// TODO: Assert more about KeyValueBackupTask
tearDownForRequestBackup();
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 85%
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..9d6b8d5 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;
@@ -32,7 +32,9 @@
import static com.android.server.backup.testing.PackageData.fullBackupPackage;
import static com.android.server.backup.testing.PackageData.keyValuePackage;
import static com.android.server.backup.testing.TestUtils.assertEventLogged;
+import static com.android.server.backup.testing.TestUtils.messagesInLooper;
import static com.android.server.backup.testing.TestUtils.uncheck;
+import static com.android.server.backup.testing.TestUtils.waitUntil;
import static com.android.server.backup.testing.TransportData.backupTransport;
import static com.android.server.backup.testing.Utils.oneTimeIterable;
@@ -48,17 +50,19 @@
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import static org.robolectric.shadow.api.Shadow.extract;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
import static java.util.Collections.emptyList;
-import static java.util.stream.Collectors.toCollection;
import static java.util.stream.Collectors.toList;
import android.annotation.Nullable;
@@ -69,6 +73,7 @@
import android.app.backup.BackupDataOutput;
import android.app.backup.BackupManager;
import android.app.backup.BackupTransport;
+import android.app.backup.IBackupCallback;
import android.app.backup.IBackupManager;
import android.app.backup.IBackupManagerMonitor;
import android.app.backup.IBackupObserver;
@@ -78,6 +83,7 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
+import android.os.ConditionVariable;
import android.os.DeadObjectException;
import android.os.Handler;
import android.os.Looper;
@@ -90,11 +96,16 @@
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.TestUtils.ThrowingRunnable;
import com.android.server.backup.testing.TransportData;
import com.android.server.backup.testing.TransportTestUtils;
import com.android.server.backup.testing.TransportTestUtils.TransportMock;
@@ -114,6 +125,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentMatcher;
+import org.mockito.InOrder;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
@@ -136,6 +148,7 @@
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
+import java.util.concurrent.TimeoutException;
import java.util.stream.Stream;
// TODO: When returning to RUNNING_QUEUE vs FINAL, RUNNING_QUEUE sets status = OK. Why? Verify?
@@ -158,6 +171,8 @@
public class KeyValueBackupTaskTest {
private static final PackageData PACKAGE_1 = keyValuePackage(1);
private static final PackageData PACKAGE_2 = keyValuePackage(2);
+ private static final String BACKUP_AGENT_SHARED_PREFS_SYNCHRONIZER_CLASS =
+ "android.app.backup.BackupAgent$SharedPrefsSynchronizer";
@Mock private TransportManager mTransportManager;
@Mock private DataChangedJournal mOldJournal;
@@ -175,6 +190,7 @@
private File mDataDir;
private Application mApplication;
private ShadowApplication mShadowApplication;
+ private Looper mMainLooper;
private FrameworkShadowLooper mShadowMainLooper;
private Context mContext;
@@ -188,7 +204,8 @@
mShadowApplication = shadowOf(mApplication);
mContext = mApplication;
- mShadowMainLooper = extract(Looper.getMainLooper());
+ mMainLooper = Looper.getMainLooper();
+ mShadowMainLooper = extract(mMainLooper);
File cacheDir = mApplication.getCacheDir();
// Corresponds to /data/backup
@@ -1375,6 +1392,7 @@
verify(agentMock.agent).onQuotaExceeded(anyLong(), eq(1234L));
assertEventLogged(EventLogTags.BACKUP_QUOTA_EXCEEDED, PACKAGE_1.packageName);
assertBackupNotPendingFor(PACKAGE_1);
+ // TODO: Assert about state/staging files (possible bug)
}
@Test
@@ -1577,6 +1595,235 @@
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);
+ }
+
+ @Test
+ public void
+ testRunTask_whenMarkCancelDuringFirstAgentOnBackup_doesNotCallTransportAfterWaitCancel()
+ throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ AgentMock agentMock = setUpAgent(PACKAGE_1);
+ setUpAgentsWithData(PACKAGE_2);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient,
+ mTransport.transportDirName,
+ PACKAGE_1,
+ PACKAGE_2);
+ agentOnBackupDo(
+ agentMock,
+ (oldState, dataOutput, newState) -> {
+ writeData(dataOutput, "key", "data".getBytes());
+ writeState(newState, "newState".getBytes());
+ runInWorkerThread(task::markCancel);
+ });
+
+ ConditionVariable taskFinished = runTaskAsync(task);
+
+ verifyAndUnblockAgentCalls(2);
+ task.waitCancel();
+ reset(transportMock.transport);
+ taskFinished.block();
+ verifyZeroInteractions(transportMock.transport);
+ }
+
+ @Test
+ public void testRunTask_whenMarkCancelDuringAgentOnBackup_doesNotCallTransportForPackage()
+ throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ AgentMock agentMock = setUpAgent(PACKAGE_1);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName, PACKAGE_1);
+ agentOnBackupDo(
+ agentMock,
+ (oldState, dataOutput, newState) -> {
+ writeData(dataOutput, "key", "data".getBytes());
+ writeState(newState, "newState".getBytes());
+ runInWorkerThread(task::markCancel);
+ });
+
+ ConditionVariable taskFinished = runTaskAsync(task);
+
+ verifyAndUnblockAgentCalls(2);
+ taskFinished.block();
+ // For PM
+ verify(transportMock.transport, times(1)).finishBackup();
+ verify(transportMock.transport, never())
+ .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt());
+ }
+
+ @Test
+ public void testRunTask_whenMarkCancelDuringTransportPerformBackup_callsTransportForPackage()
+ throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ setUpAgentWithData(PACKAGE_1);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName, PACKAGE_1);
+ when(transportMock.transport.performBackup(
+ argThat(packageInfo(PACKAGE_1)), any(), anyInt()))
+ .thenAnswer(
+ invocation -> {
+ runInWorkerThread(task::markCancel);
+ return BackupTransport.TRANSPORT_OK;
+ });
+
+ ConditionVariable taskFinished = runTaskAsync(task);
+
+ verifyAndUnblockAgentCalls(2);
+ taskFinished.block();
+ InOrder inOrder = inOrder(transportMock.transport);
+ inOrder.verify(transportMock.transport)
+ .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt());
+ inOrder.verify(transportMock.transport).finishBackup();
+ }
+
+ @Test
+ public void
+ testRunTask_whenMarkCancelDuringSecondAgentOnBackup_callsTransportForFirstPackageButNotForSecond()
+ throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ setUpAgentWithData(PACKAGE_1);
+ AgentMock agentMock = setUpAgent(PACKAGE_2);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient,
+ mTransport.transportDirName,
+ PACKAGE_1,
+ PACKAGE_2);
+ agentOnBackupDo(
+ agentMock,
+ (oldState, dataOutput, newState) -> {
+ writeData(dataOutput, "key", "data".getBytes());
+ writeState(newState, "newState".getBytes());
+ runInWorkerThread(task::markCancel);
+ });
+
+ ConditionVariable taskFinished = runTaskAsync(task);
+
+ verifyAndUnblockAgentCalls(3);
+ taskFinished.block();
+ InOrder inOrder = inOrder(transportMock.transport);
+ inOrder.verify(transportMock.transport)
+ .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt());
+ inOrder.verify(transportMock.transport).finishBackup();
+ verify(transportMock.transport, never())
+ .performBackup(argThat(packageInfo(PACKAGE_2)), any(), anyInt());
+ }
+
+ @Test
+ public void
+ testRunTask_whenMarkCancelDuringTransportPerformBackupForFirstPackage_callsTransportForFirstPackageButNotForSecond()
+ throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ setUpAgentsWithData(PACKAGE_1, PACKAGE_2);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient,
+ mTransport.transportDirName,
+ PACKAGE_1,
+ PACKAGE_2);
+ when(transportMock.transport.performBackup(
+ argThat(packageInfo(PACKAGE_1)), any(), anyInt()))
+ .thenAnswer(
+ invocation -> {
+ runInWorkerThread(task::markCancel);
+ return BackupTransport.TRANSPORT_OK;
+ });
+
+ ConditionVariable taskFinished = runTaskAsync(task);
+
+ verifyAndUnblockAgentCalls(2);
+ taskFinished.block();
+ InOrder inOrder = inOrder(transportMock.transport);
+ inOrder.verify(transportMock.transport)
+ .performBackup(argThat(packageInfo(PACKAGE_1)), any(), anyInt());
+ inOrder.verify(transportMock.transport).finishBackup();
+ verify(transportMock.transport, never())
+ .performBackup(argThat(packageInfo(PACKAGE_2)), any(), anyInt());
+ }
+
+ @Test
+ public void testRunTask_afterMarkCancel_doesNotCallAgentOrTransport() throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ AgentMock agentMock = setUpAgentWithData(PACKAGE_1);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName, PACKAGE_1);
+ task.markCancel();
+
+ runTask(task);
+
+ verify(agentMock.agent, never()).onBackup(any(), any(), any());
+ verify(transportMock.transport, never()).performBackup(any(), any(), anyInt());
+ verify(transportMock.transport, never()).finishBackup();
+ }
+
+ @Test
+ public void testWaitCancel_afterCancelledTaskFinished_returns() throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ setUpAgentWithData(PACKAGE_1);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName, PACKAGE_1);
+ task.markCancel();
+ runTask(task);
+
+ task.waitCancel();
+ }
+
+ @Test
+ public void testWaitCancel_whenMarkCancelDuringAgentOnBackup_unregistersTask() throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ setUpAgentWithData(PACKAGE_1);
+ AgentMock agentMock = setUpAgent(PACKAGE_1);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName, PACKAGE_1);
+ agentOnBackupDo(
+ agentMock,
+ (oldState, dataOutput, newState) -> {
+ writeData(dataOutput, "key", "data".getBytes());
+ writeState(newState, "newState".getBytes());
+ runInWorkerThread(task::markCancel);
+ });
+ ConditionVariable taskFinished = runTaskAsync(task);
+ verifyAndUnblockAgentCalls(1);
+ boolean backupInProgressDuringBackup = mBackupManagerService.isBackupOperationInProgress();
+ assertThat(backupInProgressDuringBackup).isTrue();
+ verifyAndUnblockAgentCalls(1);
+
+ task.waitCancel();
+
+ boolean backupInProgressAfterWaitCancel =
+ mBackupManagerService.isBackupOperationInProgress();
+ assertThat(backupInProgressDuringBackup).isTrue();
+ assertThat(backupInProgressAfterWaitCancel).isFalse();
+ taskFinished.block();
+ }
+
+ @Test
+ public void testMarkCancel_afterTaskFinished_returns() throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ setUpAgentWithData(PACKAGE_1);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName, PACKAGE_1);
+ runTask(task);
+
+ task.markCancel();
+ }
+
private void runTask(KeyValueBackupTask task) {
// Pretend we are not on the main-thread to prevent RemoteCall from complaining
mShadowMainLooper.setCurrentThread(false);
@@ -1585,6 +1832,60 @@
assertTaskPostConditions();
}
+ private ConditionVariable runTaskAsync(KeyValueBackupTask task) {
+ return runInWorkerThreadAsync(task::run);
+ }
+
+ private static ConditionVariable runInWorkerThreadAsync(ThrowingRunnable runnable) {
+ ConditionVariable finished = new ConditionVariable(false);
+ new Thread(
+ () -> {
+ uncheck(runnable);
+ finished.open();
+ },
+ "test-worker-thread")
+ .start();
+ return finished;
+ }
+
+ private static void runInWorkerThread(ThrowingRunnable runnable) {
+ runInWorkerThreadAsync(runnable).block();
+ }
+
+ /**
+ * If you have kicked-off the task with {@link #runTaskAsync(KeyValueBackupTask)}, call this to
+ * unblock the task thread that will be waiting for the agent's {@link
+ * IBackupAgent#doBackup(ParcelFileDescriptor, ParcelFileDescriptor, ParcelFileDescriptor, long,
+ * IBackupCallback, int)}.
+ *
+ * @param times The number of {@link IBackupAgent#doBackup(ParcelFileDescriptor,
+ * ParcelFileDescriptor, ParcelFileDescriptor, long, IBackupCallback, int)} calls. Remember
+ * to count PM calls.
+ */
+ private void verifyAndUnblockAgentCalls(int times)
+ throws InterruptedException, TimeoutException {
+ // HACK: IBackupAgent.doBackup() posts a runnable to the front of the main-thread queue and
+ // immediately waits for its execution. In Robolectric, if we are in the main-thread this
+ // runnable is executed inline (this is called unpaused looper), that's why when we run the
+ // task in the main-thread (runTask() as opposed to runTaskAsync()) we don't need to call
+ // this method. However, if we are not in the main-thread nobody executes the runnable for
+ // us, thus IBackupAgent code will be stuck waiting for someone to execute the runnable.
+ // This method waits for that *specific* runnable, identifying it via class name, and then
+ // idles the main looper (for 0 seconds because it's posted at the front of the queue),
+ // which executes the method.
+ for (int i = 0; i < times; i++) {
+ waitUntil(() -> messagesInLooper(mMainLooper, this::isSharedPrefsSynchronizer) > 0);
+ mShadowMainLooper.idle();
+ }
+ }
+
+ private boolean isSharedPrefsSynchronizer(@Nullable Message message) {
+ String className = BACKUP_AGENT_SHARED_PREFS_SYNCHRONIZER_CLASS;
+ return message != null
+ && message.getCallback() != null
+ && className.equals(message.getCallback().getClass().getName());
+ }
+
private TransportMock setUpTransport(TransportData transport) throws Exception {
TransportMock transportMock =
TransportTestUtils.setUpTransport(mTransportManager, transport);
@@ -1705,11 +2006,8 @@
String transportDirName,
boolean nonIncremental,
PackageData... packages) {
- ArrayList<BackupRequest> keyValueBackupRequests =
- Stream.of(packages)
- .map(packageData -> packageData.packageName)
- .map(BackupRequest::new)
- .collect(toCollection(ArrayList::new));
+ List<String> queue =
+ Stream.of(packages).map(packageData -> packageData.packageName).collect(toList());
mBackupManagerService.getPendingBackups().clear();
// mOldJournal is a mock, but it would be the value returned by BMS.getJournal() now
mBackupManagerService.setJournal(null);
@@ -1719,7 +2017,7 @@
mBackupManagerService,
transportClient,
transportDirName,
- keyValueBackupRequests,
+ queue,
mOldJournal,
mObserver,
mMonitor,
@@ -1795,10 +2093,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/backup/testing/BackupManagerServiceTestUtils.java b/services/robotests/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java
index 084f27f..603a471 100644
--- a/services/robotests/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java
+++ b/services/robotests/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java
@@ -99,7 +99,6 @@
Handler backupHandler,
PowerManager.WakeLock wakeLock,
BackupAgentTimeoutParameters agentTimeoutParameters) {
- SparseArray<Operation> operations = new SparseArray<>();
when(backupManagerService.getContext()).thenReturn(application);
when(backupManagerService.getTransportManager()).thenReturn(transportManager);
@@ -107,7 +106,6 @@
when(backupManagerService.getBackupHandler()).thenReturn(backupHandler);
when(backupManagerService.getCurrentOpLock()).thenReturn(new Object());
when(backupManagerService.getQueueLock()).thenReturn(new Object());
- when(backupManagerService.getCurrentOperations()).thenReturn(operations);
when(backupManagerService.getActivityManager()).thenReturn(mock(IActivityManager.class));
when(backupManagerService.getWakelock()).thenReturn(wakeLock);
when(backupManagerService.getAgentTimeoutParameters()).thenReturn(agentTimeoutParameters);
@@ -119,22 +117,6 @@
AccessorMock backupRunning = mockAccessor(false);
doAnswer(backupEnabled.getter).when(backupManagerService).isBackupRunning();
doAnswer(backupRunning.setter).when(backupManagerService).setBackupRunning(anyBoolean());
-
- doAnswer(
- invocation -> {
- operations.put(invocation.getArgument(0), invocation.getArgument(1));
- return null;
- })
- .when(backupManagerService)
- .putOperation(anyInt(), any());
- doAnswer(
- invocation -> {
- int token = invocation.getArgument(0);
- operations.remove(token);
- return null;
- })
- .when(backupManagerService)
- .removeOperation(anyInt());
}
public static void setUpBinderCallerAndApplicationAsSystem(Application application) {
diff --git a/services/robotests/src/com/android/server/backup/testing/TestUtils.java b/services/robotests/src/com/android/server/backup/testing/TestUtils.java
index 134cfd8..df4d457 100644
--- a/services/robotests/src/com/android/server/backup/testing/TestUtils.java
+++ b/services/robotests/src/com/android/server/backup/testing/TestUtils.java
@@ -21,6 +21,8 @@
import static org.robolectric.Shadows.shadowOf;
import android.os.Looper;
+import android.os.Message;
+import android.os.MessageQueue;
import com.android.server.testing.shadows.ShadowEventLog;
@@ -30,9 +32,49 @@
import java.util.Arrays;
import java.util.concurrent.Callable;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
import java.util.function.Predicate;
+import java.util.function.Supplier;
public class TestUtils {
+ private static final long TIMEOUT_MS = 3000;
+ private static final long STEP_MS = 50;
+
+ /**
+ * Counts the number of messages in the looper {@code looper} that satisfy {@code
+ * messageFilter}.
+ */
+ public static int messagesInLooper(Looper looper, Predicate<Message> messageFilter) {
+ MessageQueue queue = looper.getQueue();
+ int i = 0;
+ for (Message m = shadowOf(queue).getHead(); m != null; m = shadowOf(m).getNext()) {
+ if (messageFilter.test(m)) {
+ i += 1;
+ }
+ }
+ return i;
+ }
+
+ public static void waitUntil(Supplier<Boolean> condition)
+ throws InterruptedException, TimeoutException {
+ waitUntil(condition, STEP_MS, TIMEOUT_MS);
+ }
+
+ public static void waitUntil(Supplier<Boolean> condition, long stepMs, long timeoutMs)
+ throws InterruptedException, TimeoutException {
+ long deadline = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(timeoutMs);
+ while (true) {
+ if (condition.get()) {
+ return;
+ }
+ if (System.nanoTime() > deadline) {
+ throw new TimeoutException("Test timed-out waiting for condition");
+ }
+ Thread.sleep(stepMs);
+ }
+ }
+
/** Version of {@link ShadowLooper#runToEndOfTasks()} that also advances the system clock. */
public static void runToEndOfTasks(Looper looper) {
ShadowLooper shadowLooper = shadowOf(looper);
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..aeda2dc 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,13 @@
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.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)
@@ -52,7 +50,7 @@
}
private OnTaskFinishedListener mListener;
- private List<BackupRequest> mQueue;
+ private List<String> mQueue;
private List<String> mPendingFullBackups;
@Implementation
@@ -60,7 +58,7 @@
BackupManagerService backupManagerService,
TransportClient transportClient,
String dirName,
- List<BackupRequest> queue,
+ List<String> queue,
@Nullable DataChangedJournal journal,
IBackupObserver observer,
IBackupManagerMonitor monitor,
@@ -79,7 +77,7 @@
mListener.onFinished("ShadowKeyValueBackupTask.execute()");
}
- public List<BackupRequest> getQueue() {
+ public List<String> getQueue() {
return mQueue;
}
diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk
index 8f4e8e4..43f319e 100644
--- a/services/tests/servicestests/Android.mk
+++ b/services/tests/servicestests/Android.mk
@@ -22,7 +22,7 @@
services.net \
services.usage \
guava \
- android-support-test \
+ androidx-test \
mockito-target-minus-junit4 \
platform-test-annotations \
ShortcutManagerTestUtils \
diff --git a/services/tests/servicestests/AndroidManifest.xml b/services/tests/servicestests/AndroidManifest.xml
index a8efe81..348e201 100644
--- a/services/tests/servicestests/AndroidManifest.xml
+++ b/services/tests/servicestests/AndroidManifest.xml
@@ -65,6 +65,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.SUSPEND_APPS"/>
<uses-permission android:name="android.permission.CONTROL_KEYGUARD"/>
+ <uses-permission android:name="android.permission.MANAGE_BIND_INSTANT_SERVICE"/>
<!-- Uses API introduced in O (26) -->
<uses-sdk android:minSdkVersion="1"
@@ -220,7 +221,7 @@
</application>
<instrumentation
- android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.frameworks.servicestests"
android:label="Frameworks Services Tests" />
</manifest>
diff --git a/services/tests/servicestests/AndroidTest.xml b/services/tests/servicestests/AndroidTest.xml
index 5ac68d4..4d653b9 100644
--- a/services/tests/servicestests/AndroidTest.xml
+++ b/services/tests/servicestests/AndroidTest.xml
@@ -28,7 +28,7 @@
<option name="test-tag" value="FrameworksServicesTests" />
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.frameworks.servicestests" />
- <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
+ <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
<option name="hidden-api-checks" value="false"/>
</test>
</configuration>
diff --git a/services/tests/servicestests/src/com/android/server/AlarmManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/AlarmManagerServiceTest.java
index 918807d..1f63d61 100644
--- a/services/tests/servicestests/src/com/android/server/AlarmManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/AlarmManagerServiceTest.java
@@ -20,10 +20,11 @@
import static org.junit.Assert.assertEquals;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.SparseArray;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.ObjectUtils;
import com.android.server.AlarmManagerService.Alarm;
diff --git a/services/tests/servicestests/src/com/android/server/AppOpsUpgradeTest.java b/services/tests/servicestests/src/com/android/server/AppOpsUpgradeTest.java
index 4d77fab..aac96a1 100644
--- a/services/tests/servicestests/src/com/android/server/AppOpsUpgradeTest.java
+++ b/services/tests/servicestests/src/com/android/server/AppOpsUpgradeTest.java
@@ -25,13 +25,14 @@
import android.content.res.AssetManager;
import android.os.Handler;
import android.os.HandlerThread;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import android.util.SparseArray;
import android.util.Xml;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java b/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java
index 933b3d6..910aad7f 100644
--- a/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java
+++ b/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java
@@ -60,12 +60,13 @@
import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.Settings.Global;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.test.mock.MockContentResolver;
import android.util.ArraySet;
import android.util.Pair;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsService;
import com.android.server.AppStateTracker.Listener;
diff --git a/services/tests/servicestests/src/com/android/server/BatteryServiceTest.java b/services/tests/servicestests/src/com/android/server/BatteryServiceTest.java
index 106f9e8..cb12ba7 100644
--- a/services/tests/servicestests/src/com/android/server/BatteryServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/BatteryServiceTest.java
@@ -17,28 +17,25 @@
package com.android.server;
import static junit.framework.Assert.*;
+
import static org.mockito.Mockito.*;
import android.hardware.health.V2_0.IHealth;
import android.hidl.manager.V1_0.IServiceManager;
import android.hidl.manager.V1_0.IServiceNotification;
-import android.os.RemoteException;
-import android.support.test.filters.SmallTest;
import android.test.AndroidTestCase;
-import android.util.Slog;
+
+import androidx.test.filters.SmallTest;
+
+import org.mockito.ArgumentMatcher;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
import java.util.Arrays;
import java.util.Collection;
import java.util.NoSuchElementException;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentMatcher;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.Spy;
-import org.mockito.invocation.InvocationOnMock;
-
-
public class BatteryServiceTest extends AndroidTestCase {
@Mock IServiceManager mMockedManager;
diff --git a/services/tests/servicestests/src/com/android/server/BootReceiverFixFsckFsStatTest.java b/services/tests/servicestests/src/com/android/server/BootReceiverFixFsckFsStatTest.java
index 69c1499..9ba3308 100644
--- a/services/tests/servicestests/src/com/android/server/BootReceiverFixFsckFsStatTest.java
+++ b/services/tests/servicestests/src/com/android/server/BootReceiverFixFsckFsStatTest.java
@@ -18,10 +18,8 @@
import static junit.framework.Assert.*;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import junit.framework.Assert;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/GestureLauncherServiceTest.java b/services/tests/servicestests/src/com/android/server/GestureLauncherServiceTest.java
index 33e4165..2ec6830 100644
--- a/services/tests/servicestests/src/com/android/server/GestureLauncherServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/GestureLauncherServiceTest.java
@@ -33,12 +33,13 @@
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.test.mock.MockContentResolver;
-import android.view.KeyEvent;
import android.util.MutableBoolean;
+import android.view.KeyEvent;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -46,17 +47,16 @@
import com.android.server.LocalServices;
import com.android.server.statusbar.StatusBarManagerInternal;
-import java.util.List;
-
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.util.List;
+
/**
* Unit tests for {@link GestureLauncherService}.
* runtest frameworks-services -c com.android.server.GestureLauncherServiceTest
diff --git a/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java b/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
index c9180a9..4bac200 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
@@ -29,10 +29,11 @@
import static org.junit.Assert.assertTrue;
import android.net.NetworkPolicyManager;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArrayMap;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -52,7 +53,7 @@
* Install: adb install -r \
* ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
* Run: adb shell am instrument -e class com.android.server.NetworkManagementInternalTest -w \
- * com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
index 17babe9..eb28e1a 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
@@ -114,8 +114,6 @@
import android.os.SimpleClock;
import android.os.SystemClock;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionPlan;
@@ -128,6 +126,9 @@
import android.util.Range;
import android.util.RecurrenceRule;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.util.test.BroadcastInterceptingContext;
import com.android.internal.util.test.BroadcastInterceptingContext.FutureIntent;
@@ -135,9 +136,6 @@
import com.android.server.net.NetworkPolicyManagerService;
import com.android.server.net.NetworkStatsManagerInternal;
-import libcore.io.IoUtils;
-import libcore.io.Streams;
-
import com.google.common.util.concurrent.AbstractFuture;
import org.junit.After;
@@ -154,6 +152,9 @@
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
+import libcore.io.IoUtils;
+import libcore.io.Streams;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
@@ -190,7 +191,7 @@
m -j32 FrameworksServicesTests && adb install -r -g \
${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && \
adb shell am instrument -e class "com.android.server.NetworkPolicyManagerServiceTest" -w \
- "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
+ "com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner"
* </code></pre>
*/
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java
index 4176d2a..e9e96c9 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkScoreServiceTest.java
@@ -24,14 +24,12 @@
import static junit.framework.Assert.fail;
import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -47,7 +45,6 @@
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.res.Resources;
-import android.database.ContentObserver;
import android.net.INetworkRecommendationProvider;
import android.net.INetworkScoreCache;
import android.net.NetworkKey;
@@ -69,9 +66,10 @@
import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.devicepolicy.MockUtils;
diff --git a/services/tests/servicestests/src/com/android/server/NetworkScorerAppManagerTest.java b/services/tests/servicestests/src/com/android/server/NetworkScorerAppManagerTest.java
index 6874624..52428e8 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkScorerAppManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkScorerAppManagerTest.java
@@ -34,7 +34,6 @@
import android.app.AppOpsManager;
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.PackageManager;
@@ -45,14 +44,14 @@
import android.net.NetworkScorerAppData;
import android.os.Bundle;
import android.provider.Settings;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.R;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.ArgumentMatcher;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
diff --git a/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java
new file mode 100644
index 0000000..43438b9
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java
@@ -0,0 +1,209 @@
+/*
+ * 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.server;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManagerInternal;
+import android.os.UserHandle;
+import android.os.UserManagerInternal;
+import android.os.storage.StorageManagerInternal;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.SparseArray;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class StorageManagerServiceTest {
+
+ private StorageManagerService mService;
+
+ @Mock private Context mContext;
+ @Mock private PackageManager mPm;
+ @Mock private PackageManagerInternal mPmi;
+ @Mock private UserManagerInternal mUmi;
+
+ private static final String PKG_GREY = "com.grey";
+ private static final String PKG_RED = "com.red";
+ private static final String PKG_BLUE = "com.blue";
+
+ private static final int UID_GREY = 10000;
+ private static final int UID_COLORS = 10001;
+
+ private static final String NAME_COLORS = "colors";
+
+ private static ApplicationInfo buildApplicationInfo(String packageName, int uid) {
+ final ApplicationInfo ai = new ApplicationInfo();
+ ai.packageName = packageName;
+ ai.uid = uid;
+ return ai;
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+
+ LocalServices.removeServiceForTest(StorageManagerInternal.class);
+
+ LocalServices.removeServiceForTest(PackageManagerInternal.class);
+ LocalServices.addService(PackageManagerInternal.class, mPmi);
+ LocalServices.removeServiceForTest(UserManagerInternal.class);
+ LocalServices.addService(UserManagerInternal.class, mUmi);
+
+ when(mContext.getPackageManager()).thenReturn(mPm);
+
+ when(mUmi.getUserIds()).thenReturn(new int[] { 0 });
+
+ {
+ final SparseArray<String> res = new SparseArray<>();
+ res.put(UID_COLORS, NAME_COLORS);
+ when(mPmi.getAppsWithSharedUserIds()).thenReturn(res);
+ }
+
+ {
+ final List<ApplicationInfo> res = new ArrayList<>();
+ res.add(buildApplicationInfo(PKG_GREY, UID_GREY));
+ res.add(buildApplicationInfo(PKG_RED, UID_COLORS));
+ res.add(buildApplicationInfo(PKG_BLUE, UID_COLORS));
+ when(mPm.getInstalledApplicationsAsUser(anyInt(), anyInt())).thenReturn(res);
+ }
+
+ when(mPmi.getPackageUid(eq(PKG_GREY), anyInt(), anyInt())).thenReturn(UID_GREY);
+ when(mPmi.getPackageUid(eq(PKG_RED), anyInt(), anyInt())).thenReturn(UID_COLORS);
+ when(mPmi.getPackageUid(eq(PKG_BLUE), anyInt(), anyInt())).thenReturn(UID_COLORS);
+
+ when(mPm.getPackagesForUid(eq(UID_GREY))).thenReturn(new String[] { PKG_GREY });
+ when(mPm.getPackagesForUid(eq(UID_COLORS))).thenReturn(new String[] { PKG_RED, PKG_BLUE });
+
+ mService = new StorageManagerService(mContext);
+ mService.collectPackagesInfo();
+ }
+
+ @Test
+ public void testNone() throws Exception {
+ assertTranslation(
+ "/dev/null",
+ "/dev/null", PKG_GREY);
+ assertTranslation(
+ "/dev/null",
+ "/dev/null", PKG_RED);
+ }
+
+ @Test
+ public void testPrimary() throws Exception {
+ assertTranslation(
+ "/storage/emulated/0/Android/sandbox/com.grey/foo.jpg",
+ "/storage/emulated/0/foo.jpg", PKG_GREY);
+ assertTranslation(
+ "/storage/emulated/0/Android/sandbox/shared/colors/foo.jpg",
+ "/storage/emulated/0/foo.jpg", PKG_RED);
+ }
+
+ @Test
+ public void testSecondary() throws Exception {
+ assertTranslation(
+ "/storage/0000-0000/Android/sandbox/com.grey/foo/bar.jpg",
+ "/storage/0000-0000/foo/bar.jpg", PKG_GREY);
+ assertTranslation(
+ "/storage/0000-0000/Android/sandbox/shared/colors/foo/bar.jpg",
+ "/storage/0000-0000/foo/bar.jpg", PKG_RED);
+ }
+
+ @Test
+ public void testLegacy() throws Exception {
+ // Accessing their own paths goes straight through
+ assertTranslation(
+ "/storage/emulated/0/Android/data/com.grey/foo.jpg",
+ "/storage/emulated/0/Android/data/com.grey/foo.jpg", PKG_GREY);
+
+ // Accessing other package paths goes into sandbox
+ assertTranslation(
+ "/storage/emulated/0/Android/sandbox/shared/colors/"
+ + "Android/data/com.grey/foo.jpg",
+ "/storage/emulated/0/Android/data/com.grey/foo.jpg", PKG_RED);
+ }
+
+ @Test
+ public void testLegacyShared() throws Exception {
+ // Accessing their own paths goes straight through
+ assertTranslation(
+ "/storage/emulated/0/Android/data/com.red/foo.jpg",
+ "/storage/emulated/0/Android/data/com.red/foo.jpg", PKG_RED);
+ assertTranslation(
+ "/storage/emulated/0/Android/data/com.red/foo.jpg",
+ "/storage/emulated/0/Android/data/com.red/foo.jpg", PKG_BLUE);
+
+ // Accessing other package paths goes into sandbox
+ assertTranslation(
+ "/storage/emulated/0/Android/sandbox/com.grey/"
+ + "Android/data/com.red/foo.jpg",
+ "/storage/emulated/0/Android/data/com.red/foo.jpg", PKG_GREY);
+ }
+
+ @Test
+ public void testSecurity() throws Exception {
+ // Shady paths should throw
+ try {
+ mService.translateAppToSystem(
+ "/storage/emulated/0/../foo.jpg",
+ PKG_GREY, UserHandle.USER_SYSTEM);
+ fail();
+ } catch (SecurityException expected) {
+ }
+
+ // Sandboxes can't see system paths
+ try {
+ mService.translateSystemToApp(
+ "/storage/emulated/0/foo.jpg",
+ PKG_GREY, UserHandle.USER_SYSTEM);
+ fail();
+ } catch (SecurityException expected) {
+ }
+
+ // Sandboxes can't see paths in other sandboxes
+ try {
+ mService.translateSystemToApp(
+ "/storage/emulated/0/Android/sandbox/shared/colors/foo.jpg",
+ PKG_GREY, UserHandle.USER_SYSTEM);
+ fail();
+ } catch (SecurityException expected) {
+ }
+ }
+
+ private void assertTranslation(String system, String sandbox, String packageName)
+ throws Exception {
+ assertEquals(system,
+ mService.translateAppToSystem(sandbox, packageName, UserHandle.USER_SYSTEM));
+ assertEquals(sandbox,
+ mService.translateSystemToApp(system, packageName, UserHandle.USER_SYSTEM));
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java b/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java
index 6e76b67..4d229ef 100644
--- a/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java
+++ b/services/tests/servicestests/src/com/android/server/WatchdogDiagnosticsTest.java
@@ -18,14 +18,14 @@
import static org.junit.Assert.assertEquals;
-import android.support.test.runner.AndroidJUnit4;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
/**
* Unit tests for {@link WatchdogDiagnostics}
*/
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerTest.java
index 5d09e31..4c0f38a 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerTest.java
@@ -18,6 +18,7 @@
import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertSame;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -30,13 +31,14 @@
import android.app.Instrumentation;
import android.os.Looper;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.IAccessibilityManager;
import android.view.accessibility.IAccessibilityManagerClient;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.IntPair;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/KeyEventDispatcherTest.java b/services/tests/servicestests/src/com/android/server/accessibility/KeyEventDispatcherTest.java
index 1819398..236b458 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/KeyEventDispatcherTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/KeyEventDispatcherTest.java
@@ -19,6 +19,7 @@
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertFalse;
import static junit.framework.TestCase.assertTrue;
+
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyObject;
@@ -30,11 +31,6 @@
import static org.mockito.Mockito.when;
import static org.mockito.hamcrest.MockitoHamcrest.argThat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
import android.content.Context;
import android.os.Handler;
import android.os.IPowerManager;
@@ -42,9 +38,10 @@
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
-import android.support.test.runner.AndroidJUnit4;
import android.view.KeyEvent;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.accessibility.KeyEventDispatcher.KeyEventFilter;
import com.android.server.policy.WindowManagerPolicy;
@@ -56,6 +53,11 @@
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
/**
* Tests for KeyEventDispatcher
*/
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/KeyboardInterceptorTest.java b/services/tests/servicestests/src/com/android/server/accessibility/KeyboardInterceptorTest.java
index ceb3f9d..851e221 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/KeyboardInterceptorTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/KeyboardInterceptorTest.java
@@ -23,14 +23,19 @@
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.isNull;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.hamcrest.MockitoHamcrest.argThat;
-import org.hamcrest.BaseMatcher;
+import android.os.Looper;
+import android.view.KeyEvent;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.policy.WindowManagerPolicy;
+import com.android.server.policy.WindowManagerPolicy.WindowState;
+
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Before;
@@ -42,13 +47,6 @@
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import android.os.Looper;
-import android.support.test.runner.AndroidJUnit4;
-import android.view.KeyEvent;
-
-import com.android.server.policy.WindowManagerPolicy;
-import com.android.server.policy.WindowManagerPolicy.WindowState;
-
/**
* Tests for KeyboardInterceptor
*/
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java
index 5253cb4..f9d264b 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/MagnificationControllerTest.java
@@ -17,9 +17,9 @@
package com.android.server.accessibility;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
import static org.mockito.ArgumentMatchers.anyFloat;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.eq;
@@ -43,9 +43,10 @@
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
-import android.support.test.runner.AndroidJUnit4;
import android.view.MagnificationSpec;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.R;
import com.android.server.wm.WindowManagerInternal;
import com.android.server.wm.WindowManagerInternal.MagnificationCallbacks;
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/MagnificationGestureHandlerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/MagnificationGestureHandlerTest.java
index 23fe0ff..79e4d70 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/MagnificationGestureHandlerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/MagnificationGestureHandlerTest.java
@@ -35,12 +35,13 @@
import android.annotation.NonNull;
import android.content.Context;
import android.os.Message;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.DebugUtils;
import android.view.InputDevice;
import android.view.MotionEvent;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.testutils.OffsettableClock;
import com.android.server.testutils.TestHandler;
@@ -50,7 +51,6 @@
import java.util.function.IntConsumer;
-
/**
* Tests the state transitions of {@link MagnificationGestureHandler}
*
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/MotionEventInjectorTest.java b/services/tests/servicestests/src/com/android/server/accessibility/MotionEventInjectorTest.java
index 6cacb1f..5f0fa87 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/MotionEventInjectorTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/MotionEventInjectorTest.java
@@ -19,6 +19,7 @@
import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_UP;
import static android.view.WindowManagerPolicyConstants.FLAG_PASS_TO_USER;
+
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.CoreMatchers.everyItem;
@@ -45,18 +46,14 @@
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
-import android.util.Pair;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
import android.view.accessibility.AccessibilityEvent;
+
+import androidx.test.runner.AndroidJUnit4;
+
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@@ -66,6 +63,10 @@
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Tests for MotionEventInjector
*/
diff --git a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
index 149ef15..7a96f4c 100644
--- a/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java
@@ -17,6 +17,7 @@
package com.android.server.accounts;
import static android.database.sqlite.SQLiteDatabase.deleteDatabase;
+
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyInt;
@@ -25,7 +26,6 @@
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.nullable;
-import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -35,11 +35,10 @@
import android.accounts.CantAddAccountActivity;
import android.accounts.IAccountManagerResponse;
import android.app.AppOpsManager;
+import android.app.INotificationManager;
import android.app.admin.DevicePolicyManager;
import android.app.admin.DevicePolicyManagerInternal;
-import android.app.INotificationManager;
import android.content.BroadcastReceiver;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -48,6 +47,7 @@
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManagerInternal;
import android.content.pm.ResolveInfo;
import android.content.pm.Signature;
import android.content.pm.UserInfo;
@@ -67,7 +67,6 @@
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
-import com.android.frameworks.servicestests.R;
import com.android.server.LocalServices;
import org.mockito.ArgumentCaptor;
@@ -90,7 +89,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
-
/**
* Tests for {@link AccountManagerService}.
* <p>Run with:<pre>
@@ -98,7 +96,7 @@
* adb install -r ${OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
* adb shell am instrument -w -e package com.android.server.accounts \
* com.android.frameworks.servicestests\
- * /android.support.test.runner.AndroidJUnitRunner
+ * /androidx.test.runner.AndroidJUnitRunner
* </pre>
*/
public class AccountManagerServiceTest extends AndroidTestCase {
@@ -114,6 +112,7 @@
@Mock private IAccountManagerResponse mMockAccountManagerResponse;
@Mock private IBinder mMockBinder;
@Mock private INotificationManager mMockNotificationManager;
+ @Mock private PackageManagerInternal mMockPackageManagerInternal;
@Captor private ArgumentCaptor<Intent> mIntentCaptor;
@Captor private ArgumentCaptor<Bundle> mBundleCaptor;
@@ -158,6 +157,9 @@
when(mMockContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn(
mMockDevicePolicyManager);
when(mMockAccountManagerResponse.asBinder()).thenReturn(mMockBinder);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(true);
+ LocalServices.addService(PackageManagerInternal.class, mMockPackageManagerInternal);
Context realTestContext = getContext();
MyMockContext mockContext = new MyMockContext(realTestContext, mMockContext);
@@ -177,6 +179,7 @@
cdl.countDown();
});
cdl.await(1, TimeUnit.SECONDS);
+ LocalServices.removeServiceForTest(PackageManagerInternal.class);
super.tearDown();
}
@@ -610,6 +613,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -626,7 +631,7 @@
waitForLatch(latch);
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -792,6 +797,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -808,7 +815,7 @@
waitForLatch(latch);
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -1092,6 +1099,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -1106,7 +1115,7 @@
waitForLatch(latch);
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -1352,6 +1361,8 @@
unlockSystemUser();
when(mMockPackageManager.checkSignatures(anyInt(), anyInt()))
.thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
try {
mAms.removeAccountAsUser(
mMockAccountManagerResponse, // response
@@ -1688,6 +1699,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -1701,7 +1714,7 @@
waitForLatch(latch);
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -1959,6 +1972,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -1974,7 +1989,7 @@
waitForLatch(latch);
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -2097,6 +2112,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -2110,7 +2127,7 @@
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -2230,6 +2247,8 @@
any(Intent.class), anyInt(), anyInt())).thenReturn(resolveInfo);
when(mMockPackageManager.checkSignatures(
anyInt(), anyInt())).thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
@@ -2245,7 +2264,7 @@
verify(mMockAccountManagerResponse, never()).onResult(any(Bundle.class));
verify(mMockAccountManagerResponse).onError(
- eq(AccountManager.ERROR_CODE_REMOTE_EXCEPTION), anyString());
+ eq(AccountManager.ERROR_CODE_INVALID_RESPONSE), anyString());
}
@SmallTest
@@ -2332,6 +2351,8 @@
unlockSystemUser();
when(mMockPackageManager.checkSignatures(anyInt(), anyInt()))
.thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
try {
mAms.editProperties(
mMockAccountManagerResponse, // response
@@ -2621,6 +2642,8 @@
PackageManager.PERMISSION_DENIED);
when(mMockPackageManager.checkSignatures(anyInt(), anyInt()))
.thenReturn(PackageManager.SIGNATURE_NO_MATCH);
+ when(mMockPackageManagerInternal.hasSignatureCapability(anyInt(), anyInt(), anyInt()))
+ .thenReturn(false);
final CountDownLatch latch = new CountDownLatch(1);
Response response = new Response(latch, mMockAccountManagerResponse);
diff --git a/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java b/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java
index 5d0c23f..72c22fd 100644
--- a/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java
+++ b/services/tests/servicestests/src/com/android/server/accounts/AccountsDbTest.java
@@ -17,14 +17,21 @@
package com.android.server.accounts;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import android.accounts.Account;
import android.content.Context;
import android.database.Cursor;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+import android.os.Build;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Pair;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -35,11 +42,6 @@
import java.util.List;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
/**
* Tests for {@link AccountsDb}.
* <p>Run with:<pre>
@@ -47,7 +49,7 @@
* adb install \
* -r out/target/product/marlin/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
* adb shell am instrument -e class com.android.server.accounts.AccountsDbTest \
- * -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
* </pre>
*/
@RunWith(AndroidJUnit4.class)
@@ -85,6 +87,12 @@
@Test
public void testCeNotAvailableInitially() {
+ // If the CE database is not attached to the DE database then any calls that modify the CE
+ // database will result in a Log.wtf call that will crash this process on eng builds. To
+ // allow the test to run through to completion skip this test on eng builds.
+ if (Build.IS_ENG) {
+ return;
+ }
Account account = new Account("name", "example.com");
long id = mAccountsDb.insertCeAccount(account, "");
assertEquals("Insert into CE should fail until CE database is attached", -1, id);
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
index 583a9dd..9de64f2 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityLaunchParamsModifierTests.java
@@ -16,28 +16,29 @@
package com.android.server.am;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+
+import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_DONE;
+import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_SKIP;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import android.app.ActivityOptions;
import android.content.pm.ActivityInfo;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.am.LaunchParamsController.LaunchParams;
-import org.junit.runner.RunWith;
+
import org.junit.Before;
import org.junit.Test;
-
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
-import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
-import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_DONE;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.doAnswer;
-
-import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_SKIP;
+import org.junit.runner.RunWith;
/**
* Tests for exercising resizing bounds due to activity options.
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java
index bce87dc..9a7488e 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java
@@ -21,8 +21,9 @@
import android.app.ActivityManagerInternal;
import android.os.SystemClock;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
@@ -43,7 +44,7 @@
* Install: adb install -r \
* ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
* Run: adb shell am instrument -e class com.android.server.am.ActivityManagerInternalTest -w \
- * com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@RunWith(AndroidJUnit4.class)
public class ActivityManagerInternalTest {
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
index aeae11a..47ce879 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
@@ -28,6 +28,7 @@
import static android.app.ActivityManager.PROCESS_STATE_SERVICE;
import static android.app.ActivityManager.PROCESS_STATE_TOP;
import static android.util.DebugUtils.valueToString;
+
import static com.android.server.am.ActivityManagerInternalTest.CustomThread;
import static com.android.server.am.ActivityManagerService.DISPATCH_UIDS_CHANGED_UI_MSG;
import static com.android.server.am.ActivityManagerService.Injector;
@@ -62,9 +63,10 @@
import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
-import android.support.test.filters.MediumTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.AppOpsService;
@@ -97,7 +99,7 @@
* Install: adb install -r \
* ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
* Run: adb shell am instrument -e class com.android.server.am.ActivityManagerServiceTest -w \
- * com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java
index 28b37c5..d15bff4 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityOptionsTest.java
@@ -20,19 +20,19 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_ROTATE;
+
import static org.junit.Assert.assertEquals;
import android.app.ActivityOptions;
import android.os.Bundle;
-import android.os.Debug;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
-
/**
* atest FrameworksServicesTests:ActivityOptionsTest
*/
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java
index 6cfa317..2338744 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityRecordTests.java
@@ -22,11 +22,7 @@
import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
import static android.view.Display.DEFAULT_DISPLAY;
-import static com.android.server.am.ActivityStack.ActivityState.DESTROYED;
-import static com.android.server.am.ActivityStack.ActivityState.DESTROYING;
-import static com.android.server.am.ActivityStack.ActivityState.FINISHING;
import static com.android.server.am.ActivityStack.ActivityState.INITIALIZING;
-import static com.android.server.am.ActivityStack.ActivityState.PAUSED;
import static com.android.server.am.ActivityStack.ActivityState.PAUSING;
import static com.android.server.am.ActivityStack.ActivityState.STOPPED;
import static com.android.server.am.ActivityStack.REMOVE_TASK_MODE_MOVING;
@@ -43,7 +39,6 @@
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -54,14 +49,14 @@
import android.app.servertransaction.PauseActivityItem;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.MutableBoolean;
-import org.junit.runner.RunWith;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.invocation.InvocationOnMock;
/**
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
index 3c4fe18..20df2ae 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
@@ -27,8 +27,7 @@
import static android.content.pm.ActivityInfo.FLAG_SHOW_WHEN_LOCKED;
import static com.android.server.am.ActivityStack.REMOVE_TASK_MODE_DESTROYING;
-import static com.android.server.am.ActivityStackSupervisor
- .MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE;
+import static com.android.server.am.ActivityStackSupervisor.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -47,10 +46,11 @@
import android.app.WaitResult;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.SparseIntArray;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
index 5669819..59b0890 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
@@ -34,23 +34,20 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
import android.content.pm.ActivityInfo;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import org.junit.runner.RunWith;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for the {@link ActivityStack} class.
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java
index f5ae46cd..e1ebbcf 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStartControllerTests.java
@@ -19,25 +19,26 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
-import android.app.IApplicationThread;
-import android.content.Intent;
-import android.os.UserHandle;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.server.am.ActivityStackSupervisor.PendingActivityLaunch;
-import com.android.server.am.ActivityStarter.Factory;
-
-import org.junit.runner.RunWith;
-import org.junit.Test;
-
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.app.IApplicationThread;
+import android.content.Intent;
+import android.os.UserHandle;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.am.ActivityStackSupervisor.PendingActivityLaunch;
+import com.android.server.am.ActivityStarter.Factory;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
import java.util.Random;
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
index 41c7f1d..86541b9 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
@@ -39,12 +39,13 @@
import android.os.UserHandle;
import android.os.UserManager;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
import android.testing.DexmakerShareClassLoaderRule;
+import androidx.test.filters.SmallTest;
+
+import com.android.internal.app.HarmfulAppWarningActivity;
import com.android.internal.app.SuspendedAppActivity;
import com.android.internal.app.UnlaunchableAppActivity;
-import com.android.internal.app.HarmfulAppWarningActivity;
import com.android.server.LocalServices;
import com.android.server.pm.PackageManagerService;
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..d032eb5 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
@@ -32,10 +32,26 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
+import static android.content.Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;
+
+import static com.android.server.am.ActivityManagerService.ANIMATE;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.anyObject;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
import android.app.ActivityOptions;
import android.app.IApplicationThread;
-import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo.WindowLayout;
@@ -47,13 +63,9 @@
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
import android.service.voice.IVoiceInteractionSession;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.Gravity;
-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,20 +76,25 @@
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;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.am.LaunchParamsController.LaunchParamsModifier;
import com.android.server.am.TaskRecord.TaskRecordFactory;
-import java.util.ArrayList;
-import java.util.List;
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for the {@link ActivityStarter} class.
@@ -92,6 +109,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 +123,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 +504,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/am/ActivityTestsBase.java b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
index a9e0aa8..9c0b525 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
@@ -26,14 +26,14 @@
import static com.android.server.am.ActivityStack.REMOVE_TASK_MODE_DESTROYING;
import static com.android.server.am.ActivityStackSupervisor.ON_TOP;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
@@ -62,27 +62,30 @@
import android.os.Looper;
import android.os.UserHandle;
import android.service.voice.IVoiceInteractionSession;
-import android.support.test.InstrumentationRegistry;
import android.testing.DexmakerShareClassLoaderRule;
import android.util.SparseIntArray;
+import androidx.test.InstrumentationRegistry;
import com.android.internal.app.IVoiceInteractor;
-
import com.android.server.AttributeCache;
import com.android.server.wm.AppWindowContainerController;
+import com.android.server.wm.DisplayWindowController;
import com.android.server.wm.PinnedStackWindowController;
import com.android.server.wm.StackWindowController;
import com.android.server.wm.TaskWindowContainerController;
import com.android.server.wm.WindowManagerService;
import com.android.server.wm.WindowTestUtils;
+import com.android.server.uri.UriGrantsManagerInternal;
+
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
import java.util.List;
-
/**
* A base class to handle common operations in activity related unit tests.
*/
diff --git a/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java b/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java
index 243c1b3..87d367f 100644
--- a/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/AppErrorDialogTest.java
@@ -18,10 +18,11 @@
import android.content.Context;
import android.os.Handler;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.annotation.UiThreadTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.AppOpsService;
diff --git a/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java b/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
index f74d116..a030210 100644
--- a/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/AssistDataRequesterTest.java
@@ -42,12 +42,13 @@
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import android.view.IWindowManager;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.am.AssistDataRequester.AssistDataRequesterCallbacks;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java b/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java
index 3257389..62c5734 100644
--- a/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/BroadcastRecordTest.java
@@ -25,8 +25,9 @@
import android.os.Process;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java b/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java
index ef6d5e8..b4ad183 100644
--- a/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ClientLifecycleManagerTests.java
@@ -9,8 +9,9 @@
import android.app.servertransaction.ClientTransaction;
import android.os.Binder;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java b/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java
index da30c11..fe8256e 100644
--- a/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/CoreSettingsObserverTest.java
@@ -26,18 +26,18 @@
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.test.mock.MockContentResolver;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.test.FakeSettingsProvider;
import com.android.server.AppOpsService;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -58,7 +58,7 @@
* Install: adb install -r \
* ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
* Run: adb shell am instrument -e class com.android.server.am.CoreSettingsObserverTest -w \
- * com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java b/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
index d9b3e1c..765aaad 100644
--- a/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/GlobalSettingsToPropertiesMapperTest.java
@@ -18,11 +18,12 @@
import android.content.ContentResolver;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.test.mock.MockContentResolver;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.Preconditions;
import com.android.internal.util.test.FakeSettingsProvider;
diff --git a/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java b/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java
index fbe552d..d4bab2e 100644
--- a/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/LaunchParamsControllerTests.java
@@ -16,20 +16,14 @@
package com.android.server.am;
-import android.app.ActivityOptions;
-import android.content.pm.ActivityInfo.WindowLayout;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.server.am.LaunchParamsController.LaunchParams;
-import org.junit.runner.RunWith;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.android.server.am.LaunchParamsController.LaunchParamsModifier;
-
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
+
+import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_CONTINUE;
+import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_DONE;
+import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_SKIP;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.doNothing;
@@ -40,12 +34,19 @@
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_DONE;
-import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_CONTINUE;
-import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_SKIP;
+import android.app.ActivityOptions;
+import android.content.pm.ActivityInfo.WindowLayout;
+import android.platform.test.annotations.Presubmit;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.am.LaunchParamsController.LaunchParams;
+import com.android.server.am.LaunchParamsController.LaunchParamsModifier;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for exercising {@link LaunchParamsController}.
diff --git a/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java b/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java
index f46d712..863a0d8 100644
--- a/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/LockTaskControllerTest.java
@@ -52,12 +52,13 @@
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
import android.telecom.TelecomManager;
import android.testing.DexmakerShareClassLoaderRule;
import android.util.Pair;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.widget.LockPatternUtils;
import com.android.server.LocalServices;
diff --git a/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java b/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java
index 5518ca5..06c7437 100644
--- a/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/MemoryStatUtilTest.java
@@ -16,15 +16,15 @@
package com.android.server.am;
+import static com.android.server.am.MemoryStatUtil.MemoryStat;
import static com.android.server.am.MemoryStatUtil.parseMemoryStatFromMemcg;
import static com.android.server.am.MemoryStatUtil.parseMemoryStatFromProcfs;
-import static com.android.server.am.MemoryStatUtil.MemoryStat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java b/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
index e73661b..1c4e0f6 100644
--- a/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/PendingRemoteAnimationRegistryTest.java
@@ -20,16 +20,14 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import android.annotation.Nullable;
import android.app.ActivityOptions;
-import android.os.Handler;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.ArrayMap;
import android.view.RemoteAnimationAdapter;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.testutils.OffsettableClock;
import com.android.server.testutils.TestHandler;
diff --git a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
index ee484d6..ba82487 100644
--- a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
@@ -36,11 +36,8 @@
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
-import static java.lang.Integer.MAX_VALUE;
-
import android.app.ActivityManager.RecentTaskInfo;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.ActivityTaskManager;
@@ -57,19 +54,22 @@
import android.os.RemoteException;
import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.MutableLong;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.am.RecentTasks.Callbacks;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import static java.lang.Integer.MAX_VALUE;
+
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java b/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java
index b642d26..f15b5f7 100644
--- a/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RecentsAnimationTest.java
@@ -19,9 +19,10 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+
import static com.android.server.wm.RecentsAnimationController.REORDER_KEEP_IN_PLACE;
+
import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
@@ -33,11 +34,12 @@
import android.content.Context;
import android.content.Intent;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.IRecentsAnimationRunner;
-import com.android.server.AttributeCache;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java b/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
index 944f20f..283c027 100644
--- a/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
@@ -30,11 +30,12 @@
import android.content.ComponentName;
import android.content.Context;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.SparseArray;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -42,7 +43,7 @@
import java.util.ArrayList;
/**
- * runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
+ * atest FrameworksServicesTests:RunningTasksTest
*/
@MediumTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java b/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java
index 168bc17..8e4e7e6 100644
--- a/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/SafeActivityOptionsTest.java
@@ -20,9 +20,10 @@
import android.app.ActivityOptions;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java b/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
index f71a6e7..f5b8f78 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskLaunchParamsModifierTests.java
@@ -16,31 +16,25 @@
package com.android.server.am;
-import android.content.pm.ActivityInfo.WindowLayout;
-import android.graphics.Rect;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import android.view.Gravity;
-
-import org.junit.runner.RunWith;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.mockito.invocation.InvocationOnMock;
-
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static com.android.server.am.LaunchParamsController.LaunchParamsModifier.RESULT_CONTINUE;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.doAnswer;
import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.when;
+import android.content.pm.ActivityInfo.WindowLayout;
+import android.graphics.Rect;
+import android.platform.test.annotations.Presubmit;
+import android.view.Gravity;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for exercising resizing task bounds.
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java b/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java
index b8680bf..fa8a09c 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskRecordTests.java
@@ -29,20 +29,17 @@
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
-import android.content.res.XmlResourceParser;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
import android.service.voice.IVoiceInteractionSession;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Xml;
-import com.android.frameworks.servicestests.R;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.app.IVoiceInteractor;
import com.android.server.am.TaskRecord.TaskRecordFactory;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -57,9 +54,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.Reader;
-import java.nio.file.Files;
import java.util.ArrayList;
-import java.util.Comparator;
/**
* Tests for exercising {@link TaskRecord}.
diff --git a/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java b/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java
index 5cd410e..3f7c714 100644
--- a/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/TaskStackChangedListenerTest.java
@@ -16,7 +16,8 @@
package com.android.server.am;
-import static android.support.test.InstrumentationRegistry.getInstrumentation;
+import static androidx.test.InstrumentationRegistry.getInstrumentation;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -33,23 +34,25 @@
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
-import android.content.res.Resources.Theme;
import android.os.RemoteException;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.text.TextUtils;
-import android.util.Pair;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.annotations.GuardedBy;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
+
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
@MediumTest
@RunWith(AndroidJUnit4.class)
public class TaskStackChangedListenerTest {
@@ -140,10 +143,10 @@
assertEquals(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, params[1]);
}
- @Test
/**
* Tests for onTaskCreated, onTaskMovedToFront, onTaskRemoved and onTaskRemovalStarted.
*/
+ @Test
public void testTaskChangeCallBacks() throws Exception {
final Object[] params = new Object[2];
final CountDownLatch taskCreatedLaunchLatch = new CountDownLatch(1);
@@ -215,16 +218,17 @@
/**
* Starts the provided activity and returns the started instance.
*/
- private Activity startTestActivity(Class<?> activityClass) {
+ private TestActivity startTestActivity(Class<?> activityClass) throws InterruptedException {
final Context context = InstrumentationRegistry.getContext();
final ActivityMonitor monitor =
new ActivityMonitor(activityClass.getName(), null, false);
InstrumentationRegistry.getInstrumentation().addMonitor(monitor);
context.startActivity(new Intent(context, activityClass));
- final Activity activity = monitor.waitForActivityWithTimeout(1000);
+ final TestActivity activity = (TestActivity)monitor.waitForActivityWithTimeout(1000);
if (activity == null) {
throw new RuntimeException("Timed out waiting for Activity");
}
+ activity.waitForResumeStateChange(true);
return activity;
}
@@ -242,7 +246,43 @@
}catch (InterruptedException e) {}
}
- public static class ActivityA extends Activity {
+ public static class TestActivity extends Activity {
+ boolean mIsResumed = false;
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ synchronized (this) {
+ mIsResumed = true;
+ notifyAll();
+ }
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ synchronized (this) {
+ mIsResumed = false;
+ notifyAll();
+ }
+ }
+
+ /**
+ * If isResumed is {@code true}, sleep the thread until the activity is resumed.
+ * if {@code false}, sleep the thread until the activity is paused.
+ */
+ public void waitForResumeStateChange(boolean isResumed) throws InterruptedException {
+ synchronized (this) {
+ if (mIsResumed == isResumed) {
+ return;
+ }
+ wait(5000);
+ }
+ assertTrue("The activity resume state change timed out", mIsResumed == isResumed);
+ }
+ }
+
+ public static class ActivityA extends TestActivity {
private boolean mActivityBLaunched = false;
@@ -258,7 +298,7 @@
}
}
- public static class ActivityB extends Activity {
+ public static class ActivityB extends TestActivity {
@Override
protected void onPostResume() {
@@ -271,7 +311,7 @@
}
}
- public static class ActivityRequestedOrientationChange extends Activity {
+ public static class ActivityRequestedOrientationChange extends TestActivity {
@Override
protected void onPostResume() {
super.onPostResume();
@@ -280,7 +320,7 @@
}
}
- public static class ActivityTaskDescriptionChange extends Activity {
+ public static class ActivityTaskDescriptionChange extends TestActivity {
@Override
protected void onPostResume() {
super.onPostResume();
@@ -289,7 +329,7 @@
}
}
- public static class ActivityTaskChangeCallbacks extends Activity {
+ public static class ActivityTaskChangeCallbacks extends TestActivity {
boolean onDetachedFromWindowCalled = false;
CountDownLatch onDetachedFromWindowCountDownLatch;
diff --git a/services/tests/servicestests/src/com/android/server/appops/AppOpsActiveWatcherTest.java b/services/tests/servicestests/src/com/android/server/appops/AppOpsActiveWatcherTest.java
index 7f397d6..7e0dfcf 100644
--- a/services/tests/servicestests/src/com/android/server/appops/AppOpsActiveWatcherTest.java
+++ b/services/tests/servicestests/src/com/android/server/appops/AppOpsActiveWatcherTest.java
@@ -31,9 +31,10 @@
import android.app.AppOpsManager.OnOpActiveChangedListener;
import android.content.Context;
import android.os.Process;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/appops/AppOpsServiceTest.java b/services/tests/servicestests/src/com/android/server/appops/AppOpsServiceTest.java
index 45e2865..4ae9bea 100644
--- a/services/tests/servicestests/src/com/android/server/appops/AppOpsServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/appops/AppOpsServiceTest.java
@@ -31,9 +31,10 @@
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Process;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/appwidget/AppWidgetServiceImplTest.java b/services/tests/servicestests/src/com/android/server/appwidget/AppWidgetServiceImplTest.java
index 1bb93cc..f3c76b6 100644
--- a/services/tests/servicestests/src/com/android/server/appwidget/AppWidgetServiceImplTest.java
+++ b/services/tests/servicestests/src/com/android/server/appwidget/AppWidgetServiceImplTest.java
@@ -53,7 +53,6 @@
import java.util.Random;
import java.util.concurrent.CountDownLatch;
-
/**
* Tests for {@link AppWidgetManager} and {@link AppWidgetServiceImpl}.
*
@@ -61,7 +60,7 @@
adb install \
-r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.appwidget.AppWidgetServiceImplTest \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
public class AppWidgetServiceImplTest extends InstrumentationTestCase {
diff --git a/services/tests/servicestests/src/com/android/server/backup/BackupPasswordManagerTest.java b/services/tests/servicestests/src/com/android/server/backup/BackupPasswordManagerTest.java
index bc16297..2dc0ee1 100644
--- a/services/tests/servicestests/src/com/android/server/backup/BackupPasswordManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/BackupPasswordManagerTest.java
@@ -17,7 +17,6 @@
package com.android.server.backup;
import static com.android.server.testutils.TestUtils.assertExpectException;
-
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.anyString;
@@ -25,8 +24,9 @@
import android.content.Context;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.backup.utils.PasswordUtils;
diff --git a/services/tests/servicestests/src/com/android/server/backup/DataChangedJournalTest.java b/services/tests/servicestests/src/com/android/server/backup/DataChangedJournalTest.java
index 3cdeba6..f588c4f 100644
--- a/services/tests/servicestests/src/com/android/server/backup/DataChangedJournalTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/DataChangedJournalTest.java
@@ -19,8 +19,9 @@
import static com.google.common.truth.Truth.assertThat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Rule;
diff --git a/services/tests/servicestests/src/com/android/server/backup/ProcessedPackagesJournalTest.java b/services/tests/servicestests/src/com/android/server/backup/ProcessedPackagesJournalTest.java
index b4a1f18..cf4f975 100644
--- a/services/tests/servicestests/src/com/android/server/backup/ProcessedPackagesJournalTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/ProcessedPackagesJournalTest.java
@@ -19,8 +19,9 @@
import static com.google.common.truth.Truth.assertThat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.google.android.collect.Sets;
diff --git a/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java b/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
index bbd999b..79eba68 100644
--- a/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
@@ -43,8 +43,9 @@
import android.os.RemoteException;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/backup/restore/PerformAdbRestoreTaskTest.java b/services/tests/servicestests/src/com/android/server/backup/restore/PerformAdbRestoreTaskTest.java
index 05f4c13..00c6391 100644
--- a/services/tests/servicestests/src/com/android/server/backup/restore/PerformAdbRestoreTaskTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/restore/PerformAdbRestoreTaskTest.java
@@ -20,9 +20,10 @@
import android.content.Context;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.servicestests.R;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java
index 6801bd2..9fcdf2d 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java
@@ -20,7 +20,6 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
@@ -31,8 +30,9 @@
import android.content.pm.SigningInfo;
import android.os.Process;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.backup.BackupManagerService;
import com.android.server.backup.testutils.PackageManagerStub;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/BackupManagerMonitorUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/BackupManagerMonitorUtilsTest.java
index c40b411..d3fd89c 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/BackupManagerMonitorUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/BackupManagerMonitorUtilsTest.java
@@ -18,9 +18,9 @@
import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_CATEGORY;
import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_ID;
+import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_LONG_VERSION;
import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME;
import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_VERSION;
-import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_LONG_VERSION;
import static com.google.common.truth.Truth.assertThat;
@@ -33,8 +33,9 @@
import android.os.Bundle;
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/BackupObserverUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/BackupObserverUtilsTest.java
index ebe6133..cdffd35 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/BackupObserverUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/BackupObserverUtilsTest.java
@@ -23,8 +23,9 @@
import android.app.backup.IBackupObserver;
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/DataStreamFileCodecTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/DataStreamFileCodecTest.java
index bfb95c1..efd4603 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/DataStreamFileCodecTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/DataStreamFileCodecTest.java
@@ -19,8 +19,10 @@
import static com.google.common.truth.Truth.assertThat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupRestoreObserverUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupRestoreObserverUtilsTest.java
index 2f56598..9b861a4 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupRestoreObserverUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupRestoreObserverUtilsTest.java
@@ -24,8 +24,9 @@
import android.app.backup.IFullBackupRestoreObserver;
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupUtilsTest.java
index 4e3de64..ae0452a 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/FullBackupUtilsTest.java
@@ -25,8 +25,9 @@
import android.os.ParcelFileDescriptor;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
@@ -40,7 +41,6 @@
import java.io.EOFException;
import java.io.File;
import java.io.FileOutputStream;
-import java.io.IOException;
import java.io.OutputStream;
import java.util.Random;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/SparseArrayUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/SparseArrayUtilsTest.java
index db55120..679e098 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/SparseArrayUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/SparseArrayUtilsTest.java
@@ -19,10 +19,11 @@
import static com.google.common.truth.Truth.assertThat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.SparseArray;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.google.android.collect.Sets;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
index 2830a74..12f2991 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
@@ -29,8 +29,6 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
@@ -47,13 +45,14 @@
import android.os.Bundle;
import android.os.Process;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.servicestests.R;
-import com.android.server.backup.FileMetadata;
import com.android.server.backup.BackupManagerService;
+import com.android.server.backup.FileMetadata;
import com.android.server.backup.restore.PerformAdbRestoreTask;
import com.android.server.backup.restore.RestorePolicy;
import com.android.server.backup.testutils.PackageManagerStub;
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyConstantsTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyConstantsTest.java
index 175fdd8..be05245 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyConstantsTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyConstantsTest.java
@@ -28,7 +28,7 @@
-w com.android.frameworks.servicestests
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
public class DevicePolicyConstantsTest extends AndroidTestCase {
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
index a23636c..e37a6c1 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
@@ -117,7 +117,7 @@
adb install \
-r ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
(mmma frameworks/base/services/tests/servicestests/ for non-ninja build)
*
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java
index 939a272..34edd9f 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java
@@ -33,11 +33,12 @@
import android.content.pm.ServiceInfo;
import android.content.res.Resources;
import android.os.RemoteException;
-import android.support.test.InstrumentationRegistry;
import android.test.AndroidTestCase;
import android.test.mock.MockPackageManager;
import android.view.inputmethod.InputMethodInfo;
+import androidx.test.InstrumentationRegistry;
+
import com.android.internal.R;
import com.android.internal.view.IInputMethodManager;
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/OwnersTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/OwnersTest.java
index cb6a747..5899bb0 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/OwnersTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/OwnersTest.java
@@ -16,12 +16,12 @@
package com.android.server.devicepolicy;
-import com.android.server.devicepolicy.DevicePolicyManagerServiceTestable.OwnersTestable;
-
import android.content.ComponentName;
import android.os.UserHandle;
import android.test.suitebuilder.annotation.SmallTest;
+import com.android.server.devicepolicy.DevicePolicyManagerServiceTestable.OwnersTestable;
+
/**
* Tests for the DeviceOwner object that saves & loads device and policy owner information.
* run this test with:
@@ -29,7 +29,7 @@
adb install \
-r out/target/product/hammerhead/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.devicepolicy.OwnersTest \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
(mmma frameworks/base/services/tests/servicestests/ for non-ninja build)
*/
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
index e4e9701..e51859b 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
@@ -20,6 +20,7 @@
import static android.app.admin.SystemUpdatePolicy.ValidationFailedException.ERROR_DUPLICATE_OR_OVERLAP;
import static android.app.admin.SystemUpdatePolicy.ValidationFailedException.ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE;
import static android.app.admin.SystemUpdatePolicy.ValidationFailedException.ERROR_NEW_FREEZE_PERIOD_TOO_LONG;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -27,10 +28,10 @@
import android.app.admin.FreezePeriod;
import android.app.admin.SystemUpdatePolicy;
import android.os.Parcel;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.Pair;
import android.util.Xml;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.FastXmlSerializer;
import org.junit.Test;
@@ -50,7 +51,6 @@
import java.util.List;
import java.util.concurrent.TimeUnit;
-
/**
* Unit tests for {@link android.app.admin.SystemUpdatePolicy}.
* Throughout this test, we use "MM-DD" format to denote dates without year.
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java
index e3e61ac..2005dd9 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java
@@ -30,7 +30,7 @@
import static org.junit.Assert.assertTrue;
import android.os.Environment;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.runner.AndroidJUnit4;
import android.util.Log;
import com.android.server.devicepolicy.TransferOwnershipMetadataManager.Injector;
diff --git a/services/tests/servicestests/src/com/android/server/display/AmbientBrightnessStatsTrackerTest.java b/services/tests/servicestests/src/com/android/server/display/AmbientBrightnessStatsTrackerTest.java
index 8502e69..e8e6ded 100644
--- a/services/tests/servicestests/src/com/android/server/display/AmbientBrightnessStatsTrackerTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/AmbientBrightnessStatsTrackerTest.java
@@ -25,9 +25,10 @@
import android.hardware.display.AmbientBrightnessDayStats;
import android.os.SystemClock;
import android.os.UserManager;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/display/BrightnessMappingStrategyTest.java b/services/tests/servicestests/src/com/android/server/display/BrightnessMappingStrategyTest.java
index 284d443..e6ca03b 100644
--- a/services/tests/servicestests/src/com/android/server/display/BrightnessMappingStrategyTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/BrightnessMappingStrategyTest.java
@@ -30,11 +30,11 @@
import android.content.res.TypedArray;
import android.hardware.display.BrightnessConfiguration;
import android.os.PowerManager;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.MathUtils;
import android.util.Spline;
-import android.util.Slog;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -531,8 +531,8 @@
@Test
public void testGammaCorrectionChangeAtEdges() {
// The algorithm behaves differently at the edges, because gamma correction there tends to
- // be extreme. If we add a user data point at (x0, y0+0.3), the adjustment should be
- // 0.3*2 = 0.6, resulting in a gamma of 3**-0.6 = ~0.52.
+ // be extreme. If we add a user data point at (x0, y0+0.3), the adjustment should be 0.3,
+ // resulting in a gamma of 3**-0.6 = ~0.52.
final int x0 = 100;
final int x2 = 2500;
final int x4 = 4900;
@@ -547,17 +547,15 @@
assertEquals(y2, strategy.getBrightness(x2), 0.01f /* tolerance */);
assertEquals(y4, strategy.getBrightness(x4), 0.01f /* tolerance */);
// Rollin':
- float increase = 0.3f;
- float adjustment = increase * 2;
+ float adjustment = 0.3f;
float gamma = (float) MathUtils.pow(MAXIMUM_GAMMA, -adjustment);
- strategy.addUserDataPoint(x0, y0 + increase);
- assertEquals(y0 + increase, strategy.getBrightness(x0), 0.01f /* tolerance */);
+ strategy.addUserDataPoint(x0, y0 + adjustment);
+ assertEquals(y0 + adjustment, strategy.getBrightness(x0), 0.01f /* tolerance */);
assertEquals(MathUtils.pow(y2, gamma), strategy.getBrightness(x2), 0.01f /* tolerance */);
assertEquals(MathUtils.pow(y4, gamma), strategy.getBrightness(x4), 0.01f /* tolerance */);
assertEquals(adjustment, strategy.getAutoBrightnessAdjustment(), 0.01f /* tolerance */);
- // Similarly, if we set a user data point at (x4, 1.0), the adjustment should be (1-y4)*2.
- increase = 1.0f - y4;
- adjustment = increase * 2;
+ // Similarly, if we set a user data point at (x4, 1.0), the adjustment should be 1 - y4.
+ adjustment = 1.0f - y4;
gamma = (float) MathUtils.pow(MAXIMUM_GAMMA, -adjustment);
strategy.addUserDataPoint(x4, 1.0f);
assertEquals(MathUtils.pow(y0, gamma), strategy.getBrightness(x0), 0.01f /* tolerance */);
diff --git a/services/tests/servicestests/src/com/android/server/display/BrightnessTrackerTest.java b/services/tests/servicestests/src/com/android/server/display/BrightnessTrackerTest.java
index 75dc96f..ece9f42 100644
--- a/services/tests/servicestests/src/com/android/server/display/BrightnessTrackerTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/BrightnessTrackerTest.java
@@ -46,11 +46,12 @@
import android.os.SystemClock;
import android.os.UserManager;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.AtomicFile;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/display/ColorDisplayServiceTest.java b/services/tests/servicestests/src/com/android/server/display/ColorDisplayServiceTest.java
index 6bd8011..53711a6 100644
--- a/services/tests/servicestests/src/com/android/server/display/ColorDisplayServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/ColorDisplayServiceTest.java
@@ -16,6 +16,10 @@
package com.android.server.display;
+import static com.google.common.truth.Truth.assertWithMessage;
+
+import static org.mockito.Mockito.doReturn;
+
import android.annotation.NonNull;
import android.app.ActivityManager;
import android.app.AlarmManager;
@@ -26,10 +30,11 @@
import android.provider.Settings;
import android.provider.Settings.Secure;
import android.provider.Settings.System;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.test.mock.MockContentResolver;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.app.ColorDisplayController;
import com.android.internal.util.test.FakeSettingsProvider;
import com.android.server.LocalServices;
@@ -37,24 +42,22 @@
import com.android.server.twilight.TwilightListener;
import com.android.server.twilight.TwilightManager;
import com.android.server.twilight.TwilightState;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.ZoneId;
import java.util.Calendar;
import java.util.HashMap;
-import java.time.LocalTime;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import static com.google.common.truth.Truth.assertWithMessage;
-import static org.mockito.Mockito.doReturn;
-
@RunWith(AndroidJUnit4.class)
public class ColorDisplayServiceTest {
diff --git a/services/tests/servicestests/src/com/android/server/display/PersistentDataStoreTest.java b/services/tests/servicestests/src/com/android/server/display/PersistentDataStoreTest.java
index 675000e..196454b 100644
--- a/services/tests/servicestests/src/com/android/server/display/PersistentDataStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/PersistentDataStoreTest.java
@@ -22,23 +22,21 @@
import static org.junit.Assert.assertTrue;
import android.hardware.display.BrightnessConfiguration;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.AtomicFile;
import android.util.Pair;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.io.FileInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
-import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/ArcTerminationActionFromAvrTest.java b/services/tests/servicestests/src/com/android/server/hdmi/ArcTerminationActionFromAvrTest.java
index 14695c5..9d617a9 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/ArcTerminationActionFromAvrTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/ArcTerminationActionFromAvrTest.java
@@ -22,7 +22,9 @@
import android.hardware.tv.cec.V1_0.SendMessageResult;
import android.os.Looper;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/DetectTvSystemAudioModeSupportActionTest.java b/services/tests/servicestests/src/com/android/server/hdmi/DetectTvSystemAudioModeSupportActionTest.java
index e114e03..8114510 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/DetectTvSystemAudioModeSupportActionTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/DetectTvSystemAudioModeSupportActionTest.java
@@ -22,8 +22,11 @@
import android.hardware.tv.cec.V1_0.SendMessageResult;
import android.os.Looper;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import com.android.server.hdmi.HdmiCecLocalDeviceAudioSystem.TvSystemAudioModeSupportedCallback;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java
index 6cf5f00..cc005ed 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java
@@ -18,6 +18,7 @@
import static android.hardware.hdmi.HdmiDeviceInfo.DEVICE_AUDIO_SYSTEM;
import static android.hardware.hdmi.HdmiDeviceInfo.DEVICE_PLAYBACK;
import static android.hardware.hdmi.HdmiDeviceInfo.DEVICE_TV;
+
import static com.android.server.hdmi.Constants.ADDR_AUDIO_SYSTEM;
import static com.android.server.hdmi.Constants.ADDR_PLAYBACK_1;
import static com.android.server.hdmi.Constants.ADDR_PLAYBACK_2;
@@ -25,14 +26,18 @@
import static com.android.server.hdmi.Constants.ADDR_SPECIFIC_USE;
import static com.android.server.hdmi.Constants.ADDR_TV;
import static com.android.server.hdmi.Constants.ADDR_UNREGISTERED;
+
import static junit.framework.Assert.assertEquals;
import android.content.Context;
import android.hardware.tv.cec.V1_0.SendMessageResult;
import android.os.Looper;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import com.android.server.hdmi.HdmiCecController.AllocateAddressCallback;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystemTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystemTest.java
index 0dc5130..6dbbbfe 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystemTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystemTest.java
@@ -22,21 +22,27 @@
import static com.android.server.hdmi.HdmiControlService.STANDBY_SCREEN_OFF;
import static com.google.common.truth.Truth.assertThat;
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
import android.media.AudioManager;
import android.os.Looper;
import android.os.SystemProperties;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import com.android.server.hdmi.HdmiCecLocalDevice.ActiveSource;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import java.util.ArrayList;
+
@SmallTest
@RunWith(JUnit4.class)
/** Tests for {@link HdmiCecLocalDeviceAudioSystem} class. */
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTest.java
index 3cd8481..daf35dd 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTest.java
@@ -16,25 +16,30 @@
package com.android.server.hdmi;
import static android.hardware.hdmi.HdmiDeviceInfo.DEVICE_TV;
+
import static com.android.server.hdmi.Constants.ADDR_AUDIO_SYSTEM;
import static com.android.server.hdmi.Constants.ADDR_BROADCAST;
import static com.android.server.hdmi.Constants.ADDR_TV;
import static com.android.server.hdmi.Constants.ADDR_UNREGISTERED;
import static com.android.server.hdmi.Constants.MESSAGE_DEVICE_VENDOR_ID;
import static com.android.server.hdmi.Constants.MESSAGE_REPORT_PHYSICAL_ADDRESS;
+
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import android.hardware.hdmi.HdmiControlManager;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
-import java.util.Arrays;
+
+import androidx.test.filters.SmallTest;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import java.util.Arrays;
+
@SmallTest
@RunWith(JUnit4.class)
/** Tests for {@link HdmiCecLocalDevice} class. */
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageBuilderTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageBuilderTest.java
index 1ca48d4..c7809d3 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageBuilderTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageBuilderTest.java
@@ -21,7 +21,9 @@
import static com.google.common.truth.Truth.assertThat;
import android.hardware.hdmi.HdmiDeviceInfo;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java
index 7de637b..71af71e 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java
@@ -17,20 +17,27 @@
import static android.hardware.hdmi.HdmiDeviceInfo.DEVICE_AUDIO_SYSTEM;
import static android.hardware.hdmi.HdmiDeviceInfo.DEVICE_PLAYBACK;
+
import static com.android.server.hdmi.HdmiControlService.INITIATED_BY_ENABLE_CEC;
+
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import android.os.Looper;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
-import java.util.ArrayList;
+
+import androidx.test.filters.SmallTest;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Tests for {@link HdmiControlService} class. */
+import java.util.ArrayList;
+
+/**
+ * Tests for {@link HdmiControlService} class.
+ */
@SmallTest
@RunWith(JUnit4.class)
public class HdmiControlServiceTest {
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/SystemAudioInitiationActionFromAvrTest.java b/services/tests/servicestests/src/com/android/server/hdmi/SystemAudioInitiationActionFromAvrTest.java
index e6ff143..6ff1c0f 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/SystemAudioInitiationActionFromAvrTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/SystemAudioInitiationActionFromAvrTest.java
@@ -16,6 +16,7 @@
package com.android.server.hdmi;
import static com.google.common.truth.Truth.assertThat;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -25,7 +26,9 @@
import android.media.AudioManager;
import android.os.Looper;
import android.os.test.TestLooper;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/job/BackgroundRestrictionsTest.java b/services/tests/servicestests/src/com/android/server/job/BackgroundRestrictionsTest.java
index 14b118e..be8e569 100644
--- a/services/tests/servicestests/src/com/android/server/job/BackgroundRestrictionsTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/BackgroundRestrictionsTest.java
@@ -38,11 +38,12 @@
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.servicestests.apps.jobtestapp.TestJobActivity;
import org.junit.After;
diff --git a/services/tests/servicestests/src/com/android/server/job/JobSetTest.java b/services/tests/servicestests/src/com/android/server/job/JobSetTest.java
index 83bd9fc..e62e07d 100644
--- a/services/tests/servicestests/src/com/android/server/job/JobSetTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/JobSetTest.java
@@ -29,13 +29,14 @@
import android.content.pm.PackageManagerInternal;
import android.os.Build;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArraySet;
import android.util.Log;
import android.util.SparseArray;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.LocalServices;
import com.android.server.job.controllers.JobStatus;
diff --git a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
index 4ee2ff4..543f51cba 100644
--- a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
@@ -22,12 +22,13 @@
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.os.SystemClock;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.test.RenamingDelegatingContext;
import android.util.Log;
import android.util.Pair;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.HexDump;
import com.android.server.IoThread;
import com.android.server.LocalServices;
diff --git a/services/tests/servicestests/src/com/android/server/job/controllers/JobStatusTest.java b/services/tests/servicestests/src/com/android/server/job/controllers/JobStatusTest.java
index d78af22..1752479 100644
--- a/services/tests/servicestests/src/com/android/server/job/controllers/JobStatusTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/controllers/JobStatusTest.java
@@ -21,7 +21,8 @@
import android.app.job.JobInfo;
import android.content.ComponentName;
import android.os.SystemClock;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.job.JobSchedulerService;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java
index 2214d74..a28a5a1 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java
@@ -29,32 +29,28 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static java.io.FileDescriptor.*;
-
import android.app.ActivityManager;
import android.content.Context;
import android.os.Binder;
-import android.os.Debug;
import android.os.Handler;
import android.os.Looper;
import android.os.ResultReceiver;
import android.os.ShellCallback;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.widget.LockPatternUtils;
-import junit.framework.Assert;
-
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import java.io.FileDescriptor;
+import static java.io.FileDescriptor.*;
/**
* Test class for {@link LockSettingsShellCommand}.
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java b/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java
index 34831cd..7fb1278 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java
@@ -15,7 +15,7 @@
import java.util.ArrayList;
import java.util.Arrays;
-public class MockWeaverService implements IWeaver {
+public class MockWeaverService extends IWeaver.Stub {
private static final int MAX_SLOTS = 8;
private static final int KEY_LENGTH = 256 / 8;
@@ -55,54 +55,4 @@
cb.onValues(WeaverStatus.FAILED, response);
}
}
-
- @Override
- public IHwBinder asBinder() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public ArrayList<String> interfaceChain() throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String interfaceDescriptor() throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setHALInstrumentation() throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean linkToDeath(DeathRecipient recipient, long cookie) throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void ping() throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public DebugInfo getDebugInfo() throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void notifySyspropsChanged() throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean unlinkToDeath(DeathRecipient recipient) throws RemoteException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public ArrayList<byte[]> getHashChain() throws RemoteException {
- throw new UnsupportedOperationException();
- }
}
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java
index 90947f4..8a9e5d1 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java
@@ -20,9 +20,9 @@
import static android.security.keystore.recovery.KeyChainProtectionParams.UI_FORMAT_PASSWORD;
import static android.security.keystore.recovery.KeyChainProtectionParams.UI_FORMAT_PATTERN;
import static android.security.keystore.recovery.KeyChainProtectionParams.UI_FORMAT_PIN;
+
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PASSWORD;
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PATTERN;
-
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertArrayEquals;
@@ -31,7 +31,6 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
@@ -50,9 +49,10 @@
import android.security.keystore.recovery.RecoveryController;
import android.security.keystore.recovery.TrustedRootCertificates;
import android.security.keystore.recovery.WrappedApplicationKey;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDb;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverySnapshotStorage;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncUtilsTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncUtilsTest.java
index fae48c6..f832d3c 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncUtilsTest.java
@@ -22,8 +22,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.google.common.collect.ImmutableMap;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java
index 0f0e3f3..13436e7 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java
@@ -32,9 +32,10 @@
import android.content.Context;
import android.security.keystore.KeyProperties;
import android.security.keystore.KeyProtection;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDb;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGeneratorTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGeneratorTest.java
index fd8b319..48afb8b 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGeneratorTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGeneratorTest.java
@@ -25,9 +25,10 @@
import android.security.keystore.AndroidKeyStoreSecretKey;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDb;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java
index 8e86a87..b15863d 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManagerTest.java
@@ -23,6 +23,7 @@
import static android.security.keystore.recovery.RecoveryController.ERROR_INVALID_CERTIFICATE;
import static com.google.common.truth.Truth.assertThat;
+
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -35,16 +36,14 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.Manifest;
import android.app.KeyguardManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
-import android.Manifest;
import android.os.Binder;
import android.os.ServiceSpecificException;
import android.os.UserHandle;
-import android.security.KeyStore;
-import android.security.keystore.AndroidKeyStoreProvider;
import android.security.keystore.AndroidKeyStoreSecretKey;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
@@ -53,9 +52,10 @@
import android.security.keystore.recovery.RecoveryCertPath;
import android.security.keystore.recovery.TrustedRootCertificates;
import android.security.keystore.recovery.WrappedApplicationKey;
-import android.support.test.filters.SmallTest;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.locksettings.recoverablekeystore.storage.ApplicationKeyStorage;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDb;
@@ -75,19 +75,16 @@
import java.io.File;
import java.nio.charset.StandardCharsets;
-import java.security.UnrecoverableKeyException;
import java.security.cert.CertPath;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
-import java.util.concurrent.Executors;
import java.util.Map;
import java.util.Random;
+import java.util.concurrent.Executors;
-import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
-import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverySnapshotListenersStorageTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverySnapshotListenersStorageTest.java
index acc200f..33038aa 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverySnapshotListenersStorageTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverySnapshotListenersStorageTest.java
@@ -8,9 +8,10 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/SecureBoxTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/SecureBoxTest.java
index 35ec23b..15b0708 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/SecureBoxTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/SecureBoxTest.java
@@ -17,11 +17,16 @@
package com.android.server.locksettings.recoverablekeystore;
import static com.google.common.truth.Truth.assertThat;
+
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.expectThrows;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
@@ -31,9 +36,8 @@
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.ECPrivateKeySpec;
+
import javax.crypto.AEADBadTagException;
-import org.junit.Test;
-import org.junit.runner.RunWith;
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/TestOnlyInsecureCertificateHelperTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/TestOnlyInsecureCertificateHelperTest.java
index 67436cc..944d6e0 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/TestOnlyInsecureCertificateHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/TestOnlyInsecureCertificateHelperTest.java
@@ -3,8 +3,9 @@
import static com.google.common.truth.Truth.assertThat;
import android.security.keystore.recovery.TrustedRootCertificates;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.widget.LockPatternUtils;
@@ -13,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
+
import javax.crypto.SecretKey;
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/WrappedKeyTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/WrappedKeyTest.java
index 56122a7..b5ee60e 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/WrappedKeyTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/WrappedKeyTest.java
@@ -24,8 +24,9 @@
import android.security.keystore.AndroidKeyStoreSecretKey;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertUtilsTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertUtilsTest.java
index 9279698..1cbebff 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertUtilsTest.java
@@ -18,13 +18,17 @@
import static com.google.common.truth.Truth.assertThat;
-import static java.nio.charset.StandardCharsets.UTF_8;
-
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.expectThrows;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.w3c.dom.Element;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
import java.io.InputStream;
import java.security.KeyPairGenerator;
@@ -39,10 +43,6 @@
import java.util.Collections;
import java.util.List;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.w3c.dom.Element;
-
@SmallTest
@RunWith(AndroidJUnit4.class)
public final class CertUtilsTest {
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertXmlTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertXmlTest.java
index 52269d9..bbcc411 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertXmlTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/CertXmlTest.java
@@ -21,17 +21,17 @@
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.expectThrows;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import java.security.cert.CertPath;
-import java.security.cert.X509Certificate;
-import java.util.List;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.security.cert.CertPath;
+import java.security.cert.X509Certificate;
+import java.util.List;
+
@SmallTest
@RunWith(AndroidJUnit4.class)
public final class CertXmlTest {
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/SigXmlTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/SigXmlTest.java
index 4d87006..45adb4b 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/SigXmlTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/SigXmlTest.java
@@ -21,8 +21,8 @@
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.expectThrows;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/TestData.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/TestData.java
index 5eb4166..c5792ad 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/TestData.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/TestData.java
@@ -17,7 +17,8 @@
package com.android.server.locksettings.recoverablekeystore.certificate;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
+
+import androidx.test.InstrumentationRegistry;
import com.google.common.io.ByteStreams;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/serialization/KeyChainSnapshotSerializerTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/serialization/KeyChainSnapshotSerializerTest.java
index a23ac0f..880255d 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/serialization/KeyChainSnapshotSerializerTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/serialization/KeyChainSnapshotSerializerTest.java
@@ -22,9 +22,9 @@
import android.security.keystore.recovery.KeyChainSnapshot;
import android.security.keystore.recovery.KeyDerivationParams;
import android.security.keystore.recovery.WrappedApplicationKey;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.locksettings.recoverablekeystore.TestData;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbHelperTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbHelperTest.java
index 9b09dd1a..7130b42 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbHelperTest.java
@@ -18,24 +18,25 @@
import static com.google.common.truth.Truth.assertThat;
-import static java.nio.charset.StandardCharsets.UTF_8;
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.sqlite.SQLiteDatabase;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.KeysEntry;
+import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.RecoveryServiceMetadataEntry;
+import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.RootOfTrustEntry;
+import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.UserMetadataEntry;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.sqlite.SQLiteDatabase;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.KeysEntry;
-import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.RecoveryServiceMetadataEntry;
-import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.RootOfTrustEntry;
-import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDbContract.UserMetadataEntry;
+import static java.nio.charset.StandardCharsets.UTF_8;
@SmallTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbTest.java
index 940745e..6a26f8c 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbTest.java
@@ -17,25 +17,27 @@
package com.android.server.locksettings.recoverablekeystore.storage;
import static com.google.common.truth.Truth.assertThat;
+
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.content.Context;
+import android.security.keystore.recovery.RecoveryController;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.locksettings.recoverablekeystore.TestData;
+import com.android.server.locksettings.recoverablekeystore.WrappedKey;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import android.content.Context;
-import android.security.keystore.recovery.RecoveryController;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.server.locksettings.recoverablekeystore.TestData;
-import com.android.server.locksettings.recoverablekeystore.WrappedKey;
-
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.security.KeyPairGenerator;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySessionStorageTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySessionStorageTest.java
index bb0474e..c2d1440 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySessionStorageTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySessionStorageTest.java
@@ -22,8 +22,8 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySnapshotStorageTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySnapshotStorageTest.java
index ad14c3a..e8614af 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySnapshotStorageTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverySnapshotStorageTest.java
@@ -12,9 +12,10 @@
import android.security.keystore.recovery.KeyChainSnapshot;
import android.security.keystore.recovery.KeyDerivationParams;
import android.security.keystore.recovery.WrappedApplicationKey;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.locksettings.recoverablekeystore.TestData;
diff --git a/services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java b/services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java
index 28b54ef..fe7a376 100644
--- a/services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java
@@ -20,10 +20,6 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import com.android.frameworks.servicestests.R;
-import com.android.servicestests.aidl.ICmdReceiverService;
-import com.android.servicestests.aidl.INetworkStateObserver;
-
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -34,13 +30,17 @@
import android.os.IBinder;
import android.os.SystemClock;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.text.TextUtils;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.servicestests.aidl.ICmdReceiverService;
+import com.android.servicestests.aidl.INetworkStateObserver;
+
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -64,7 +64,7 @@
* Install: adb install -r \
* ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk
* Run: adb shell am instrument -e class com.android.server.net.ConnOnActivityStartTest -w \
- * com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java b/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
index 9f4b754..7767a28 100644
--- a/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/IpConfigStoreTest.java
@@ -27,9 +27,10 @@
import android.net.NetworkUtils;
import android.net.ProxyInfo;
import android.net.StaticIpConfiguration;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArrayMap;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/HarmfulDigestsTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/HarmfulDigestsTests.java
index a34f95e..be56855 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/HarmfulDigestsTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/HarmfulDigestsTests.java
@@ -19,8 +19,8 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.HexDump;
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/NetworkWatchlistServiceTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/NetworkWatchlistServiceTests.java
index ccd3cdd..b5a354c 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/NetworkWatchlistServiceTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/NetworkWatchlistServiceTests.java
@@ -17,7 +17,6 @@
package com.android.server.net.watchlist;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -30,9 +29,10 @@
import android.os.Message;
import android.os.Process;
import android.os.RemoteException;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.ServiceThread;
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/PrivacyUtilsTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/PrivacyUtilsTests.java
index 6f2237f..9d2c409 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/PrivacyUtilsTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/PrivacyUtilsTests.java
@@ -21,8 +21,9 @@
import static org.junit.Assert.assertTrue;
import android.privacy.DifferentialPrivacyEncoder;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/ReportEncoderTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/ReportEncoderTests.java
index cb4f6c5..bf125f8 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/ReportEncoderTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/ReportEncoderTests.java
@@ -19,9 +19,13 @@
import static org.junit.Assert.assertEquals;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.service.nano.NetworkWatchlistAppResultProto;
+import com.android.service.nano.NetworkWatchlistReportProto;
import org.junit.After;
import org.junit.Before;
@@ -35,9 +39,6 @@
import java.io.InputStreamReader;
import java.util.HashMap;
-import com.android.service.nano.NetworkWatchlistReportProto;
-import com.android.service.nano.NetworkWatchlistAppResultProto;
-
/**
* runtest frameworks-services -c com.android.server.net.watchlist.ReportEncoderTests
*/
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistConfigTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistConfigTests.java
index 678f018..fa61c59 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistConfigTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistConfigTests.java
@@ -18,13 +18,14 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.HexDump;
@@ -40,8 +41,6 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
-import java.util.Arrays;
-
/**
* runtest frameworks-services -c com.android.server.net.watchlist.WatchlistConfigTests
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistLoggingHandlerTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistLoggingHandlerTests.java
index 8399dac..8bbad8d 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistLoggingHandlerTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistLoggingHandlerTests.java
@@ -17,11 +17,12 @@
package com.android.server.net.watchlist;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.doAnswer;
-
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
import android.content.Context;
import android.content.ContextWrapper;
@@ -32,21 +33,18 @@
import android.os.FileUtils;
import android.os.Looper;
import android.os.UserManager;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.InstrumentationRegistry;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistSettingsTests.java b/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistSettingsTests.java
index 07158af..03b1c41 100644
--- a/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistSettingsTests.java
+++ b/services/tests/servicestests/src/com/android/server/net/watchlist/WatchlistSettingsTests.java
@@ -20,9 +20,10 @@
import static org.junit.Assert.assertNotEquals;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.HexDump;
diff --git a/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java b/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
index b2eb572..6591d6f 100644
--- a/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
@@ -22,10 +22,11 @@
import android.content.pm.PackageStats;
import android.os.SystemClock;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.ArrayUtils;
import org.junit.After;
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java
index cdac516..e379cd0 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageManagerServiceTest.java
@@ -18,7 +18,8 @@
import android.content.IIntentReceiver;
import android.os.Bundle;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Assert;
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java b/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java
index 97ff94f..ee41c0b 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageManagerSettingsTests.java
@@ -42,14 +42,15 @@
import android.os.PersistableBundle;
import android.os.UserHandle;
import android.os.UserManagerInternal;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
import android.util.LongSparseArray;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.os.AtomicFile;
import com.android.server.LocalServices;
import com.android.server.pm.permission.PermissionManagerInternal;
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java b/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
index 2f6e2c2..318ed3a 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
@@ -15,6 +15,8 @@
*/
package com.android.server.pm;
+import static org.junit.Assert.*;
+
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ConfigurationInfo;
@@ -28,9 +30,18 @@
import android.os.Bundle;
import android.os.Parcel;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import android.util.ArrayMap;
+import android.util.ArraySet;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import libcore.io.IoUtils;
import java.io.File;
import java.lang.reflect.Array;
@@ -42,16 +53,6 @@
import java.util.List;
import java.util.Set;
-import static org.junit.Assert.*;
-
-import android.util.ArrayMap;
-import android.util.ArraySet;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import libcore.io.IoUtils;
-
@RunWith(AndroidJUnit4.class)
@MediumTest
public class PackageParserTest {
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageUserStateTest.java b/services/tests/servicestests/src/com/android/server/pm/PackageUserStateTest.java
index 2a4ea8c..4a33ca3 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageUserStateTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageUserStateTest.java
@@ -24,10 +24,11 @@
import android.content.pm.PackageUserState;
import android.os.PersistableBundle;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArraySet;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/pm/ParallelPackageParserTest.java b/services/tests/servicestests/src/com/android/server/pm/ParallelPackageParserTest.java
index d665094..41489dc 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ParallelPackageParserTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ParallelPackageParserTest.java
@@ -17,9 +17,10 @@
package com.android.server.pm;
import android.content.pm.PackageParser;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.runner.AndroidJUnit4;
+
import junit.framework.Assert;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
index 6c6c9932..fa73447 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
@@ -117,7 +117,7 @@
adb install \
-r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
public class ShortcutManagerTest1 extends BaseShortcutManagerTest {
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest10.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest10.java
index ca1e6af..ae01b40 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest10.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest10.java
@@ -37,7 +37,7 @@
adb install \
-r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
public class ShortcutManagerTest10 extends BaseShortcutManagerTest {
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
index fcdadac..76d52fd 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest2.java
@@ -50,8 +50,6 @@
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import java.io.Writer;
import java.util.Locale;
@@ -62,7 +60,7 @@
adb install \
-r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
public class ShortcutManagerTest2 extends BaseShortcutManagerTest {
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest8.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest8.java
index e9a329c..8a489d2 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest8.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest8.java
@@ -56,7 +56,7 @@
adb install \
-r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
* TODO for CTS
* - Foreground check.
diff --git a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest9.java b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest9.java
index 012024f1..edb9df5 100644
--- a/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest9.java
+++ b/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest9.java
@@ -44,7 +44,7 @@
adb install \
-r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
*/
@SmallTest
public class ShortcutManagerTest9 extends BaseShortcutManagerTest {
diff --git a/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java b/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java
index c186e48..f115b9c 100644
--- a/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/SuspendPackagesTest.java
@@ -41,9 +41,6 @@
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
@@ -52,6 +49,10 @@
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.servicestests.apps.suspendtestapp.SuspendTestActivity;
import com.android.servicestests.apps.suspendtestapp.SuspendTestReceiver;
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java
index bb35beb..c489cf0 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserDataPreparerTest.java
@@ -16,15 +16,22 @@
package com.android.server.pm;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Matchers.isNull;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import android.content.Context;
import android.content.pm.UserInfo;
import android.os.FileUtils;
import android.os.storage.StorageManager;
import android.os.storage.VolumeInfo;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
@@ -39,19 +46,13 @@
import java.util.Arrays;
import java.util.Collections;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Matchers.isNull;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
/**
* <p>Run with:<pre>
* m FrameworksServicesTests &&
* adb install \
* -r out/target/product/hammerhead/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
* adb shell am instrument -e class com.android.server.pm.UserDataPreparerTest \
- * -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
* </pre>
*/
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserLifecycleStressTest.java b/services/tests/servicestests/src/com/android/server/pm/UserLifecycleStressTest.java
index 304e0e9..d6f7e37 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserLifecycleStressTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserLifecycleStressTest.java
@@ -24,11 +24,12 @@
import android.content.pm.UserInfo;
import android.os.RemoteException;
import android.os.UserManager;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceCreateProfileTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceCreateProfileTest.java
index c314de4..8dd8967 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceCreateProfileTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceCreateProfileTest.java
@@ -24,20 +24,21 @@
import android.os.Looper;
import android.os.UserHandle;
import android.os.UserManagerInternal;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.IconDrawableFactory;
-import com.android.server.LocalServices;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
-import java.util.List;
+import com.android.server.LocalServices;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.List;
+
/**
* <p>Run with:<pre>
* runtest -c com.android.server.pm.UserManagerServiceCreateProfileTest frameworks-services
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceIdRecyclingTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceIdRecyclingTest.java
index 35967fb..a9ce618 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceIdRecyclingTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceIdRecyclingTest.java
@@ -16,12 +16,17 @@
package com.android.server.pm;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import android.content.pm.UserInfo;
import android.os.Looper;
import android.os.UserManagerInternal;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.filters.MediumTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.LocalServices;
@@ -31,17 +36,13 @@
import java.util.LinkedHashSet;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
/**
* <p>Run with:<pre>
* m FrameworksServicesTests &&
* adb install \
* -r out/target/product/hammerhead/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
* adb shell am instrument -e class com.android.server.pm.UserManagerServiceIdRecyclingTest \
- * -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ * -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
* </pre>
*/
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
index 092119e..806c71a 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
@@ -16,16 +16,21 @@
package com.android.server.pm;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import android.content.pm.UserInfo;
import android.os.Looper;
import android.os.Parcel;
-import android.os.UserManagerInternal;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.filters.MediumTest;
+import android.os.UserManagerInternal;
import android.text.TextUtils;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.LocalServices;
import com.android.server.pm.UserManagerService.UserData;
@@ -38,10 +43,6 @@
import java.io.DataOutputStream;
import java.util.List;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
/**
* <p>Run with:<pre>
* runtest -c com.android.server.pm.UserManagerServiceUserInfoTest frameworks-services
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java b/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
index 882bf32..2cc5323 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
@@ -35,7 +35,7 @@
adb install \
-r out/target/product/hammerhead/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.pm.UserRestrictionsUtilsTest \
- -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
+ -w com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
* </pre>
*/
@SmallTest
diff --git a/services/tests/servicestests/src/com/android/server/pm/backup/BackupUtilsTest.java b/services/tests/servicestests/src/com/android/server/pm/backup/BackupUtilsTest.java
index caa1d02..13612a1 100644
--- a/services/tests/servicestests/src/com/android/server/pm/backup/BackupUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/backup/BackupUtilsTest.java
@@ -17,24 +17,22 @@
import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageParser;
-import android.content.pm.PackageParser.Package;
import android.content.pm.Signature;
import android.content.pm.SigningInfo;
-import android.test.MoreAsserts;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import android.test.MoreAsserts;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.backup.BackupUtils;
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexLoggerTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexLoggerTests.java
index bf8d405..87c3cd2 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexLoggerTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexLoggerTests.java
@@ -16,13 +16,19 @@
package com.android.server.pm.dex;
+import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
-import android.content.pm.PackageInfo;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.os.storage.StorageManager;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.pm.Installer;
import com.android.server.pm.Installer.InstallerException;
@@ -40,14 +46,6 @@
import java.util.Arrays;
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-
-import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
-import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DexLoggerTests {
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
index 147347d..416a616 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexManagerTests.java
@@ -16,16 +16,40 @@
package com.android.server.pm.dex;
+import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
+import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.os.Build;
import android.os.UserHandle;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.pm.Installer;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.mockito.quality.Strictness;
+
import dalvik.system.DelegateLastClassLoader;
import dalvik.system.PathClassLoader;
import dalvik.system.VMRuntime;
@@ -38,31 +62,6 @@
import java.util.List;
import java.util.Map;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnit;
-import org.mockito.junit.MockitoRule;
-import org.mockito.quality.Strictness;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
-import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DexManagerTests {
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
index 93064bc..62589eb 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java
@@ -19,19 +19,19 @@
import static com.android.server.pm.PackageManagerServiceCompilerMapping.getCompilerFilterForReason;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.pm.PackageManagerService;
import com.android.server.pm.PackageManagerServiceCompilerMapping;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DexoptOptionsTests {
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java b/services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java
index 150f7f0..77f517b 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java
@@ -16,9 +16,8 @@
package com.android.server.pm.dex;
-import com.android.server.pm.PackageDexOptimizer;
-
import static com.android.server.pm.PackageDexOptimizer.SKIP_SHARED_LIBRARY_CHECK;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@@ -26,17 +25,18 @@
import static org.junit.Assert.fail;
import android.content.pm.ApplicationInfo;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.SparseArray;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import dalvik.system.DelegateLastClassLoader;
import dalvik.system.DexClassLoader;
import dalvik.system.PathClassLoader;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
diff --git a/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java b/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
index 69a148d..3e93dcf 100644
--- a/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
+++ b/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
@@ -16,16 +16,27 @@
package com.android.server.pm.dex;
-import android.os.Build;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import dalvik.system.VMRuntime;
+import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
+import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
-import java.util.Collections;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.os.Build;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import dalvik.system.VMRuntime;
+
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
@@ -35,16 +46,6 @@
import java.util.Map;
import java.util.Set;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import static com.android.server.pm.dex.PackageDexUsage.PackageUseInfo;
-import static com.android.server.pm.dex.PackageDexUsage.DexUseInfo;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class PackageDexUsageTests {
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
index 7e18ce7..cce6ba7 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerInsetsTest.java
@@ -22,16 +22,15 @@
import static android.view.Surface.ROTATION_90;
import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.Display;
import android.view.DisplayInfo;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
index cb9fab3..fee761d 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerLayoutTest.java
@@ -39,11 +39,12 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.DisplayCutout;
import android.view.WindowManager;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
index 30665b5..d92d7e0 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
@@ -19,6 +19,10 @@
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+import static android.view.WindowManager.DOCKED_BOTTOM;
+import static android.view.WindowManager.DOCKED_LEFT;
+import static android.view.WindowManager.DOCKED_RIGHT;
+import static android.view.WindowManager.DOCKED_TOP;
import static android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
import static android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND;
import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
@@ -28,13 +32,9 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
-import static android.view.WindowManager.DOCKED_BOTTOM;
-import static android.view.WindowManager.DOCKED_LEFT;
-import static android.view.WindowManager.DOCKED_RIGHT;
-import static android.view.WindowManager.DOCKED_TOP;
-import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_LEFT;
import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_BOTTOM;
+import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_LEFT;
import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_RIGHT;
import static org.junit.Assert.assertEquals;
@@ -44,10 +44,11 @@
import android.graphics.PixelFormat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.WindowManager;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
index ef87f9d..acd065e 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTestBase.java
@@ -34,13 +34,11 @@
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Matrix;
-import android.graphics.Path;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.IBinder;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
import android.testing.TestableResources;
import android.util.Pair;
import android.view.Display;
@@ -53,6 +51,8 @@
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.IAccessibilityManager;
+import androidx.test.InstrumentationRegistry;
+
import com.android.server.policy.keyguard.KeyguardServiceDelegate;
import com.android.server.wm.DisplayFrames;
import com.android.server.wm.WindowTestUtils.TestDisplayContent;
diff --git a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
index 0764a56..fd04970 100644
--- a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
@@ -25,10 +25,11 @@
import android.content.ContentResolver;
import android.content.res.Resources;
import android.provider.Settings.Global;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.test.mock.MockContext;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.google.common.base.Objects;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
index 9bd4cc3..ba61fd2 100644
--- a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
@@ -25,8 +25,9 @@
import static org.mockito.Mockito.verify;
import android.metrics.LogMaker;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
diff --git a/services/tests/servicestests/src/com/android/server/power/batterysaver/CpuFrequenciesTest.java b/services/tests/servicestests/src/com/android/server/power/batterysaver/CpuFrequenciesTest.java
index f72ec34..8371e9c 100644
--- a/services/tests/servicestests/src/com/android/server/power/batterysaver/CpuFrequenciesTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/CpuFrequenciesTest.java
@@ -17,10 +17,11 @@
import static org.junit.Assert.assertEquals;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArrayMap;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/power/batterysaver/FileUpdaterTest.java b/services/tests/servicestests/src/com/android/server/power/batterysaver/FileUpdaterTest.java
index 7324fe6..89c7dd4 100644
--- a/services/tests/servicestests/src/com/android/server/power/batterysaver/FileUpdaterTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/FileUpdaterTest.java
@@ -27,14 +27,14 @@
import static org.mockito.Mockito.verify;
import android.content.Context;
-import android.hardware.camera2.impl.GetCommand;
import android.os.Handler;
import android.os.Looper;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArrayMap;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -48,7 +48,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-
/**
atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/FileUpdaterTest.java
*/
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java b/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java
index 62f1433..9e00077 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeZoneDetectorStrategyTest.java
@@ -28,9 +28,10 @@
import android.icu.util.Calendar;
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
-import android.support.test.runner.AndroidJUnit4;
import android.util.TimestampedValue;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
index ed74cd7..45fef76 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
@@ -31,15 +31,16 @@
import android.app.timedetector.TimeSignal;
import android.content.Context;
import android.content.pm.PackageManager;
-import android.support.test.runner.AndroidJUnit4;
import android.util.TimestampedValue;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.timedetector.TimeDetectorStrategy.Callback;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import com.android.server.timedetector.TimeDetectorStrategy.Callback;
-
import java.io.PrintWriter;
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java
index 301ded4..239d413 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java
+++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyTest.java
@@ -18,9 +18,10 @@
import static org.junit.Assert.assertEquals;
-import android.support.test.runner.AndroidJUnit4;
import android.util.TimestampedValue;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/timezone/CheckTokenTest.java b/services/tests/servicestests/src/com/android/server/timezone/CheckTokenTest.java
index 9603a06..f7d282b 100644
--- a/services/tests/servicestests/src/com/android/server/timezone/CheckTokenTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezone/CheckTokenTest.java
@@ -16,16 +16,16 @@
package com.android.server.timezone;
-import org.junit.Test;
-
-import android.support.test.filters.SmallTest;
-
-import java.io.IOException;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+
+import java.io.IOException;
+
@SmallTest
public class CheckTokenTest {
diff --git a/services/tests/servicestests/src/com/android/server/timezone/PackageStatusStorageTest.java b/services/tests/servicestests/src/com/android/server/timezone/PackageStatusStorageTest.java
index 74013b7..090db11 100644
--- a/services/tests/servicestests/src/com/android/server/timezone/PackageStatusStorageTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezone/PackageStatusStorageTest.java
@@ -16,26 +16,28 @@
package com.android.server.timezone;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
import static junit.framework.Assert.assertTrue;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
+import android.content.Context;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
@SmallTest
public class PackageStatusStorageTest {
private static final PackageVersions VALID_PACKAGE_VERSIONS = new PackageVersions(1, 2);
diff --git a/services/tests/servicestests/src/com/android/server/timezone/PackageStatusTest.java b/services/tests/servicestests/src/com/android/server/timezone/PackageStatusTest.java
index c0ae81e..9b45f05 100644
--- a/services/tests/servicestests/src/com/android/server/timezone/PackageStatusTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezone/PackageStatusTest.java
@@ -16,13 +16,13 @@
package com.android.server.timezone;
-import org.junit.Test;
-
-import android.support.test.filters.SmallTest;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+
@SmallTest
public class PackageStatusTest {
diff --git a/services/tests/servicestests/src/com/android/server/timezone/PackageTrackerTest.java b/services/tests/servicestests/src/com/android/server/timezone/PackageTrackerTest.java
index d9f4adf..1356ea2 100644
--- a/services/tests/servicestests/src/com/android/server/timezone/PackageTrackerTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezone/PackageTrackerTest.java
@@ -16,27 +16,6 @@
package com.android.server.timezone;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import android.app.timezone.RulesUpdaterContract;
-import android.content.Context;
-import android.content.Intent;
-import android.provider.TimeZoneRulesDataContract;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.time.Clock;
-import java.time.Instant;
-import java.time.ZoneId;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -48,6 +27,28 @@
import static org.mockito.Mockito.when;
import static org.mockito.hamcrest.MockitoHamcrest.argThat;
+import android.app.timezone.RulesUpdaterContract;
+import android.content.Context;
+import android.content.Intent;
+import android.provider.TimeZoneRulesDataContract;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.time.Clock;
+import java.time.Instant;
+import java.time.ZoneId;
+
/**
* White box interaction / unit testing of the {@link PackageTracker}.
*/
diff --git a/services/tests/servicestests/src/com/android/server/timezone/PackageVersionsTest.java b/services/tests/servicestests/src/com/android/server/timezone/PackageVersionsTest.java
index a470f8f..9ffc4e9 100644
--- a/services/tests/servicestests/src/com/android/server/timezone/PackageVersionsTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezone/PackageVersionsTest.java
@@ -16,13 +16,13 @@
package com.android.server.timezone;
-import org.junit.Test;
-
-import android.support.test.filters.SmallTest;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+
@SmallTest
public class PackageVersionsTest {
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
index 19d31cf..0936fff 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorServiceTest.java
@@ -17,8 +17,9 @@
package com.android.server.timezonedetector;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
index 8461166..869f8fa0 100644
--- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
@@ -37,11 +37,9 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
-
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -58,12 +56,13 @@
import android.os.Looper;
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArraySet;
import android.view.Display;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.SystemService;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/usage/AppTimeLimitControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppTimeLimitControllerTests.java
index 84475bb..047addd 100644
--- a/services/tests/servicestests/src/com/android/server/usage/AppTimeLimitControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/usage/AppTimeLimitControllerTests.java
@@ -19,13 +19,13 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import android.app.PendingIntent;
import android.os.HandlerThread;
import android.os.Looper;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/utils/PriorityDumpTest.java b/services/tests/servicestests/src/com/android/server/utils/PriorityDumpTest.java
index da45d81..4eb2474 100644
--- a/services/tests/servicestests/src/com/android/server/utils/PriorityDumpTest.java
+++ b/services/tests/servicestests/src/com/android/server/utils/PriorityDumpTest.java
@@ -18,14 +18,16 @@
import static com.android.server.utils.PriorityDump.dump;
-import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertSame;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.same;
import static org.mockito.Mockito.verify;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.filters.SmallTest;
+
import com.android.server.utils.PriorityDump.PriorityDumper;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/wallpaper/WallpaperServiceTests.java b/services/tests/servicestests/src/com/android/server/wallpaper/WallpaperServiceTests.java
index 9c010a0..2dd8817 100644
--- a/services/tests/servicestests/src/com/android/server/wallpaper/WallpaperServiceTests.java
+++ b/services/tests/servicestests/src/com/android/server/wallpaper/WallpaperServiceTests.java
@@ -24,9 +24,10 @@
import android.os.Message;
import android.os.SystemClock;
import android.service.wallpaper.WallpaperService;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.annotation.UiThreadTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
index dca09af..bf89cd0 100644
--- a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
@@ -19,15 +19,12 @@
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.Signature;
import android.os.Build;
import android.os.Bundle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.MediumTest;
import android.util.Base64;
import android.webkit.UserPackage;
@@ -35,17 +32,18 @@
import android.webkit.WebViewProviderInfo;
import android.webkit.WebViewProviderResponse;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
-
import org.mockito.ArgumentMatcher;
-import org.mockito.Mockito;
import org.mockito.Matchers;
+import org.mockito.Mockito;
import java.lang.Integer;
import java.util.concurrent.CountDownLatch;
-
/**
* Tests for WebViewUpdateService
runtest --path frameworks/base/services/tests/servicestests/ \
diff --git a/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java b/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
index 164c80b..b5fe8b1 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AnimatingAppWindowTokenRegistryTest.java
@@ -18,27 +18,22 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
-import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
-import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.mockito.ArgumentMatchers.any;
+
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java b/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java
index be7d781..3053c41 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppTransitionTests.java
@@ -20,13 +20,15 @@
import static android.view.WindowManager.TRANSIT_CRASHING_ACTIVITY_CLOSE;
import static android.view.WindowManager.TRANSIT_KEYGUARD_GOING_AWAY;
import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
+
import static org.junit.Assert.assertEquals;
import android.content.Context;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Rule;
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
index e0645b1..fcd8a39e4 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
@@ -16,26 +16,28 @@
package com.android.server.wm;
-import android.support.test.filters.FlakyTest;
-import org.junit.Test;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
import static android.content.res.Configuration.EMPTY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.WindowTestUtils.TestTaskWindowContainerController;
+import org.junit.Test;
+
/**
* Test class for {@link AppWindowContainerController}.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
index c3907ff..e3ab5cf 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenAnimationTests.java
@@ -26,8 +26,9 @@
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import android.view.SurfaceControl;
import com.android.server.wm.WindowTestUtils.TestAppWindowToken;
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
index e8d8022..6d31dfb 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java
@@ -16,16 +16,6 @@
package com.android.server.wm;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.view.Surface;
-import android.view.WindowManager;
-
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
@@ -38,6 +28,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.TRANSIT_UNSET;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -46,6 +37,17 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
+import android.platform.test.annotations.Presubmit;
+import android.view.Surface;
+import android.view.WindowManager;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
/**
* Tests for the {@link AppWindowToken} class.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
index 08b522c..12be0b3 100644
--- a/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
@@ -21,34 +21,31 @@
import static com.android.server.wm.BoundsAnimationController.SCHEDULE_PIP_MODE_CHANGED_ON_START;
import static com.android.server.wm.BoundsAnimationController.SchedulePipModeChangedState;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Rect;
import android.os.Handler;
import android.os.Looper;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.annotation.UiThreadTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.wm.BoundsAnimationController.BoundsAnimator;
import com.android.server.wm.WindowManagerInternal.AppTransitionListener;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import com.android.server.wm.BoundsAnimationController.BoundsAnimator;
-
/**
* Test class for {@link BoundsAnimationController} to ensure that it sends the right callbacks
* depending on the various interactions.
diff --git a/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java
index 192e156..2b8214d 100644
--- a/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/ConfigurationContainerTests.java
@@ -28,13 +28,16 @@
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
import static android.content.res.Configuration.EMPTY;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import android.content.res.Configuration;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java b/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
index 6769e40..21555e3 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
@@ -29,10 +29,11 @@
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.runner.AndroidJUnit4;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
index ef0e27b..0d40c5e 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
@@ -30,6 +30,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
+
import static com.android.server.wm.WindowContainer.POSITION_TOP;
import static org.hamcrest.Matchers.is;
@@ -42,25 +43,27 @@
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import android.annotation.SuppressLint;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.DisplayMetrics;
import android.util.SparseIntArray;
import android.view.DisplayCutout;
+import android.view.Gravity;
import android.view.MotionEvent;
import android.view.Surface;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.utils.WmDisplayCutout;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -573,6 +576,31 @@
.setDisplayInfoOverrideFromWindowManager(dc.getDisplayId(), null);
}
+ @Test
+ public void testGetPreferredOptionsPanelGravityFromDifferentDisplays() {
+ final DisplayContent portraitDisplay = createNewDisplay();
+ portraitDisplay.mInitialDisplayHeight = 2000;
+ portraitDisplay.mInitialDisplayWidth = 1000;
+
+ portraitDisplay.setRotation(Surface.ROTATION_0);
+ assertFalse(isOptionsPanelAtRight(portraitDisplay.getDisplayId()));
+ portraitDisplay.setRotation(Surface.ROTATION_90);
+ assertTrue(isOptionsPanelAtRight(portraitDisplay.getDisplayId()));
+
+ final DisplayContent landscapeDisplay = createNewDisplay();
+ landscapeDisplay.mInitialDisplayHeight = 1000;
+ landscapeDisplay.mInitialDisplayWidth = 2000;
+
+ landscapeDisplay.setRotation(Surface.ROTATION_0);
+ assertTrue(isOptionsPanelAtRight(landscapeDisplay.getDisplayId()));
+ landscapeDisplay.setRotation(Surface.ROTATION_90);
+ assertFalse(isOptionsPanelAtRight(landscapeDisplay.getDisplayId()));
+ }
+
+ private boolean isOptionsPanelAtRight(int displayId) {
+ return (sWm.getPreferredOptionsPanelGravity(displayId) & Gravity.RIGHT) == Gravity.RIGHT;
+ }
+
private static void verifySizes(DisplayContent displayContent, int expectedBaseWidth,
int expectedBaseHeight, int expectedBaseDensity) {
assertEquals(displayContent.mBaseDisplayWidth, expectedBaseWidth);
diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java
index 0ea56ed..07eafa5 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DisplaySettingsTests.java
@@ -22,12 +22,13 @@
import android.app.WindowConfiguration;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.Display;
import android.view.DisplayInfo;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java
index a09656c..7125246 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DragDropControllerTests.java
@@ -19,9 +19,11 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
@@ -33,25 +35,29 @@
import android.os.UserHandle;
import android.os.UserManagerInternal;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.InputChannel;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
import android.view.View;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.annotations.GuardedBy;
import com.android.server.LocalServices;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
/**
* Tests for the {@link DragDropController} class.
*
- * atest com.android.server.wm.DragDropControllerTests
+ * atest FrameworksServicesTests:com.android.server.wm.DragDropControllerTests
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
@@ -113,7 +119,7 @@
mTarget = new TestDragDropController(sWm, sWm.mH.getLooper());
mDisplayContent = spy(mDisplayContent);
mWindow = createDropTargetWindow("Drag test window", 0);
- when(mDisplayContent.getTouchableWinAtPointLocked(0, 0)).thenReturn(mWindow);
+ doReturn(mWindow).when(mDisplayContent).getTouchableWinAtPointLocked(0, 0);
when(sWm.mInputManager.transferTouchFocus(any(), any())).thenReturn(true);
synchronized (sWm.mWindowMap) {
@@ -154,8 +160,7 @@
public void testPerformDrag_NullDataToOtherUser() throws Exception {
final WindowState otherUsersWindow =
createDropTargetWindow("Other user's window", 1 * UserHandle.PER_USER_RANGE);
- when(mDisplayContent.getTouchableWinAtPointLocked(10, 10))
- .thenReturn(otherUsersWindow);
+ doReturn(otherUsersWindow).when(mDisplayContent).getTouchableWinAtPointLocked(10, 10);
dragFlow(0, null, 10, 10);
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java
index 96745fa..7222a99 100644
--- a/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/PinnedStackControllerTest.java
@@ -2,18 +2,6 @@
import static android.view.Display.DEFAULT_DISPLAY;
-import android.os.RemoteException;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.view.IPinnedStackListener;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -23,6 +11,19 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.os.RemoteException;
+import android.platform.test.annotations.Presubmit;
+import android.view.IPinnedStackListener;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
@SmallTest
@Presubmit
@RunWith(AndroidJUnit4.class)
diff --git a/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java
index a2af9b8..e7c45d5 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/RecentsAnimationControllerTest.java
@@ -19,8 +19,10 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.Display.DEFAULT_DISPLAY;
+
import static com.android.server.wm.RecentsAnimationController.REORDER_KEEP_IN_PLACE;
import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_TO_ORIGINAL_POSITION;
+
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.atLeast;
@@ -31,11 +33,14 @@
import android.os.Binder;
import android.os.IInterface;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.IRecentsAnimationRunner;
import android.view.SurfaceControl;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
index 95361f0..7d19baa 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
@@ -31,9 +31,6 @@
import android.os.Binder;
import android.os.IInterface;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.IRemoteAnimationFinishedCallback;
import android.view.IRemoteAnimationRunner;
import android.view.RemoteAnimationAdapter;
@@ -41,6 +38,9 @@
import android.view.SurfaceControl;
import android.view.SurfaceControl.Transaction;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.testutils.OffsettableClock;
import com.android.server.testutils.TestHandler;
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
diff --git a/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java
index 204e26c..c1db6a6 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java
@@ -1,16 +1,16 @@
package com.android.server.wm;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static org.junit.Assert.assertTrue;
import android.content.res.Configuration;
import android.graphics.Rect;
-
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import static org.junit.Assert.assertTrue;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for the {@link RootWindowContainer} class.
diff --git a/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java b/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java
index bfc99c8..60025f0 100644
--- a/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/ScreenDecorWindowTests.java
@@ -32,6 +32,7 @@
import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+
import static org.junit.Assert.assertEquals;
import android.app.Activity;
@@ -46,9 +47,6 @@
import android.media.ImageReader;
import android.os.Handler;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Pair;
import android.view.Display;
import android.view.DisplayInfo;
@@ -57,6 +55,10 @@
import android.view.WindowManager;
import android.widget.TextView;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java
index ab0a2bd..9f2645c 100644
--- a/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/StackWindowControllerTests.java
@@ -16,20 +16,20 @@
package com.android.server.wm;
-import android.graphics.Rect;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.graphics.Rect;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
/**
* Test class for {@link StackWindowController}.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
index 79e9bb4..4551c36 100644
--- a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimationRunnerTest.java
@@ -16,7 +16,6 @@
package com.android.server.wm;
-import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -34,9 +33,6 @@
import android.graphics.Point;
import android.os.PowerManagerInternal;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.Choreographer;
import android.view.Choreographer.FrameCallback;
import android.view.SurfaceControl;
@@ -44,6 +40,10 @@
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.LocalAnimationAdapter.AnimationSpec;
import org.junit.Before;
@@ -54,6 +54,8 @@
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
+import static java.util.concurrent.TimeUnit.SECONDS;
+
import java.util.concurrent.CountDownLatch;
/**
diff --git a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java
index 16b8458..7b5e8de 100644
--- a/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/SurfaceAnimatorTest.java
@@ -28,14 +28,15 @@
import static org.mockito.Mockito.verifyZeroInteractions;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.SurfaceControl;
import android.view.SurfaceControl.Builder;
import android.view.SurfaceControl.Transaction;
import android.view.SurfaceSession;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.SurfaceAnimator.Animatable;
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
@@ -46,8 +47,6 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import java.util.ArrayList;
-
/**
* Test class for {@link SurfaceAnimatorTest}.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
index dc6bbbf..17b7fc1 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskPositionerTests.java
@@ -16,31 +16,32 @@
package com.android.server.wm;
-import android.app.IActivityManager;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.app.IActivityTaskManager;
-import android.graphics.Rect;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.DisplayMetrics;
-import android.util.Log;
-import android.view.Display;
-import org.mockito.Mockito;
-
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+
import static com.android.server.wm.TaskPositioner.MIN_ASPECT;
import static com.android.server.wm.WindowManagerService.dipToPixel;
import static com.android.server.wm.WindowState.MINIMUM_VISIBLE_HEIGHT_IN_DP;
import static com.android.server.wm.WindowState.MINIMUM_VISIBLE_WIDTH_IN_DP;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.app.IActivityTaskManager;
+import android.graphics.Rect;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.Display;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+
/**
* Tests for the {@link TaskPositioner} class.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java
index 6070516..ced0847 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskPositioningControllerTests.java
@@ -17,6 +17,7 @@
package com.android.server.wm;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@@ -27,9 +28,11 @@
import static org.mockito.Mockito.when;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.InputChannel;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
index 649de4a..c9d8004 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotCacheTest.java
@@ -17,12 +17,14 @@
package com.android.server.wm;
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
+
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java
index 5650050..efce063 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotControllerTest.java
@@ -19,17 +19,19 @@
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.view.WindowManager.TRANSIT_UNSET;
+
import static com.android.server.wm.TaskSnapshotController.*;
+
import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArraySet;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.google.android.collect.Sets;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
index 325d42a..600b2e5 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java
@@ -18,23 +18,24 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import android.app.ActivityManager.TaskSnapshot;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArraySet;
-
import android.view.View;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.TaskSnapshotPersister.RemoveObsoleteFilesQueueItem;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
index 8b86043..6f4f173 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterTestBase.java
@@ -28,7 +28,8 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.os.UserManager;
-import android.support.test.InstrumentationRegistry;
+
+import androidx.test.InstrumentationRegistry;
import org.junit.After;
import org.junit.Before;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
index 21402ce..91074b9 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
@@ -19,6 +19,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
+
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
@@ -35,10 +36,11 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.Surface;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.server.wm.TaskSnapshotSurface.Window;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java
index ca1994f..9fa5ba4 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskStackContainersTests.java
@@ -18,20 +18,20 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.Before;
-import org.junit.After;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
/**
* Tests for the {@link DisplayContent.TaskStackContainers} container in {@link DisplayContent}.
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java
index eaf71f0..53a1185 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskStackTests.java
@@ -16,21 +16,19 @@
package com.android.server.wm;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for the {@link TaskStack} class.
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
index 1dd9365..edd7664 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
@@ -16,17 +16,19 @@
package com.android.server.wm;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
/**
* Test class for {@link TaskWindowContainerController}.
*
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/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java b/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
index a5c47de..3ac97027 100644
--- a/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java
@@ -19,8 +19,9 @@
import static junit.framework.Assert.assertTrue;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java
index 71ead20..882e789 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WallpaperControllerTests.java
@@ -11,8 +11,9 @@
import android.graphics.Bitmap;
import android.os.IBinder;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java
index 9dc0025..827d938 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java
@@ -28,12 +28,13 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.SurfaceControl;
import android.view.animation.Animation;
import android.view.animation.ClipRectAnimation;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java
index 10d7aad..e7cc285 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowConfigurationTests.java
@@ -16,17 +16,6 @@
package com.android.server.wm;
-import org.junit.Test;
-
-import android.app.WindowConfiguration;
-import android.content.res.Configuration;
-import android.graphics.Rect;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.view.DisplayInfo;
-
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
@@ -35,9 +24,21 @@
import static android.app.WindowConfiguration.WINDOW_CONFIG_APP_BOUNDS;
import static android.app.WindowConfiguration.WINDOW_CONFIG_WINDOWING_MODE;
import static android.content.pm.ActivityInfo.CONFIG_WINDOW_CONFIGURATION;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
+
+import android.app.WindowConfiguration;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.platform.test.annotations.Presubmit;
+import android.view.DisplayInfo;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
/**
* Test class to for {@link android.app.WindowConfiguration}.
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java
index 502cb6e..6b1feb8 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerControllerTests.java
@@ -16,21 +16,22 @@
package com.android.server.wm;
-import android.app.WindowConfiguration;
-import android.content.res.Configuration;
-import android.support.test.filters.FlakyTest;
-import org.junit.Test;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.content.res.Configuration.EMPTY;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import android.content.res.Configuration;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+
/**
* Test class for {@link WindowContainerController}.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
index f8b2828..dc763b9 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
@@ -16,20 +16,6 @@
package com.android.server.wm;
-import android.support.test.filters.FlakyTest;
-import android.view.SurfaceControl;
-import android.view.SurfaceSession;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.content.res.Configuration;
-import android.graphics.Rect;
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import java.util.Comparator;
-
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
@@ -44,7 +30,6 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyFloat;
import static org.mockito.Mockito.eq;
@@ -53,6 +38,21 @@
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.platform.test.annotations.Presubmit;
+import android.view.SurfaceControl;
+import android.view.SurfaceSession;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Comparator;
+
/**
* Test class for {@link WindowContainer}.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
index e076399..ffc8622 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
@@ -20,19 +20,19 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+
+import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.mockito.Matchers.eq;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.Mock;
-
import java.util.function.Consumer;
/**
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
index 431d1a7..ea3a3d0 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
@@ -16,29 +16,31 @@
package com.android.server.wm;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static android.view.DisplayCutout.fromBoundingRect;
+import static android.view.WindowManager.LayoutParams.FILL_PARENT;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import android.app.ActivityManager.TaskDescription;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.DisplayInfo;
import android.view.Gravity;
import android.view.IWindow;
import android.view.WindowManager;
-import static android.view.DisplayCutout.fromBoundingRect;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
-import static android.view.WindowManager.LayoutParams.FILL_PARENT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.server.wm.utils.WmDisplayCutout;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
/**
* Tests for the {@link WindowState#computeFrameLw} method and other window frame machinery.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java
index d13c3c9..6664756 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRule.java
@@ -33,9 +33,10 @@
import android.hardware.display.DisplayManagerInternal;
import android.os.PowerManagerInternal;
import android.os.PowerSaveState;
-import android.support.test.InstrumentationRegistry;
import android.view.InputChannel;
+import androidx.test.InstrumentationRegistry;
+
import com.android.server.LocalServices;
import com.android.server.input.InputManagerService;
import com.android.server.policy.WindowManagerPolicy;
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
index 6cf6d7b..570a853 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowManagerServiceRuleTest.java
@@ -20,8 +20,9 @@
import static org.junit.Assert.assertThat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java
index 0ddba6a..645015f 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java
@@ -16,19 +16,6 @@
package com.android.server.wm;
-import android.graphics.Rect;
-import android.view.SurfaceControl;
-import android.view.WindowManager;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import java.util.LinkedList;
-
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.hardware.camera2.params.OutputConfiguration.ROTATION_90;
@@ -52,7 +39,6 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
@@ -61,6 +47,20 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
+import android.graphics.Rect;
+import android.platform.test.annotations.Presubmit;
+import android.view.SurfaceControl;
+import android.view.WindowManager;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.LinkedList;
+
/**
* Tests for the {@link WindowState} class.
*
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java
index e173b7d..057f047 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowSurfacePlacerTest.java
@@ -20,13 +20,15 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.WindowManager.TRANSIT_TASK_CLOSE;
import static android.view.WindowManager.TRANSIT_TASK_OPEN;
+
import static junit.framework.Assert.assertEquals;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.WindowManager;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
index ef019fe..5db0867 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
@@ -16,30 +16,12 @@
package com.android.server.wm;
+import static android.app.AppOpsManager.OP_NONE;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.Display.DEFAULT_DISPLAY;
-import static android.view.View.VISIBLE;
-
-import android.content.res.Configuration;
-import android.graphics.Rect;
-import android.hardware.display.DisplayManagerGlobal;
-import android.testing.DexmakerShareClassLoaderRule;
-import android.util.Log;
-import android.view.Display;
-import android.view.DisplayInfo;
-import org.junit.Assert;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.view.IWindow;
-import android.view.WindowManager;
-
-import static android.app.AppOpsManager.OP_NONE;
import static android.view.DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS;
+import static android.view.View.VISIBLE;
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
@@ -52,10 +34,29 @@
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
+
import static org.mockito.Mockito.mock;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.hardware.display.DisplayManagerGlobal;
+import android.testing.DexmakerShareClassLoaderRule;
+import android.util.Log;
+import android.view.Display;
+import android.view.DisplayInfo;
+import android.view.IWindow;
+import android.view.WindowManager;
+
+import androidx.test.InstrumentationRegistry;
+
import com.android.server.AttributeCache;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+
import java.util.HashSet;
import java.util.LinkedList;
@@ -157,7 +158,11 @@
// If @After throws an exception, the error isn't logged. This will make sure any failures
// in the tear down are clear. This can be removed when b/37850063 is fixed.
try {
- final LinkedList<WindowState> nonCommonWindows = new LinkedList();
+ // Test may schedule to perform surface placement or other messages. Wait until a
+ // stable state to clean up for consistency.
+ waitUntilHandlersIdle();
+
+ final LinkedList<WindowState> nonCommonWindows = new LinkedList<>();
synchronized (sWm.mWindowMap) {
sWm.mRoot.forAllWindows(w -> {
@@ -170,7 +175,12 @@
nonCommonWindows.pollLast().removeImmediately();
}
- mDisplayContent.removeImmediately();
+ for (int i = sWm.mRoot.mChildren.size() - 1; i >= 0; --i) {
+ final DisplayContent displayContent = sWm.mRoot.mChildren.get(i);
+ if (!displayContent.isDefaultDisplay) {
+ displayContent.removeImmediately();
+ }
+ }
sWm.mInputMethodTarget = null;
sWm.mClosingApps.clear();
sWm.mOpeningApps.clear();
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java
index e3b7174..3732486 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java
@@ -16,23 +16,24 @@
package com.android.server.wm;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-
import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
+
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for the {@link WindowToken} class.
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java b/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java
index 5085254..bbc6550 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTracingTest.java
@@ -29,12 +29,13 @@
import android.content.Context;
import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.filters.FlakyTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.proto.ProtoOutputStream;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.Preconditions;
import com.android.server.wm.WindowManagerTraceProto;
diff --git a/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java b/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java
index 547be55..8f9fb1b 100644
--- a/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/ZOrderingTests.java
@@ -27,19 +27,19 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
-import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.filters.FlakyTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
index d0f0fe3..3364aef 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/InsetUtilsTest.java
@@ -16,13 +16,18 @@
package com.android.server.wm.utils;
+import static android.hardware.camera2.params.OutputConfiguration.ROTATION_90;
+import static android.view.Surface.ROTATION_0;
+import static android.view.Surface.ROTATION_180;
+import static android.view.Surface.ROTATION_270;
+
import static junit.framework.Assert.assertEquals;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.Pair;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -39,5 +44,29 @@
InsetUtils.addInsets(rect1, rect2);
assertEquals(new Rect(60, 80, 100, 120), rect1);
}
+
+ @Test
+ public void rotate() {
+ final Rect original = new Rect(1, 2, 3, 4);
+
+ assertEquals("rot0", original, rotateCopy(original, ROTATION_0));
+
+ final Rect rot90 = rotateCopy(original, ROTATION_90);
+ assertEquals("rot90", new Rect(2, 3, 4, 1), rot90);
+
+ final Rect rot180 = rotateCopy(original, ROTATION_180);
+ assertEquals("rot180", new Rect(3, 4, 1, 2), rot180);
+ assertEquals("rot90(rot90)=rot180", rotateCopy(rot90, ROTATION_90), rot180);
+
+ final Rect rot270 = rotateCopy(original, ROTATION_270);
+ assertEquals("rot270", new Rect(4, 1, 2, 3), rot270);
+ assertEquals("rot90(rot180)=rot270", rotateCopy(rot180, ROTATION_90), rot270);
+ }
+
+ private static Rect rotateCopy(Rect insets, int rotationDelta) {
+ final Rect copy = new Rect(insets);
+ InsetUtils.rotateInsets(copy, rotationDelta);
+ return copy;
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java
index 6bbc7eb..5d08920 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/RotationCacheTest.java
@@ -24,14 +24,12 @@
import static org.junit.Assert.assertThat;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Pair;
-import com.android.server.wm.utils.RotationCache.RotationDependentComputation;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
-import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java b/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
index f7addf6..9ce3dca 100644
--- a/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/utils/WmDisplayCutoutTest.java
@@ -25,11 +25,12 @@
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Size;
import android.view.DisplayCutout;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/services/tests/servicestests/test-apps/SuspendTestApp/Android.mk b/services/tests/servicestests/test-apps/SuspendTestApp/Android.mk
index ae0b0f9..7e7decf 100644
--- a/services/tests/servicestests/test-apps/SuspendTestApp/Android.mk
+++ b/services/tests/servicestests/test-apps/SuspendTestApp/Android.mk
@@ -20,7 +20,7 @@
LOCAL_COMPATIBILITY_SUITE := device-tests
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator
+LOCAL_STATIC_JAVA_LIBRARIES := androidx-test ub-uiautomator
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_SRC_FILES += ../../src/com/android/server/pm/SuspendPackagesTest.java
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..59eab3f 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() {
@@ -410,7 +411,7 @@
@Test
public void testLights() throws Exception {
NotificationRecord r = getLightsNotification();
- r.setImportance(NotificationManager.IMPORTANCE_DEFAULT, "for testing");
+ r.setSystemImportance(NotificationManager.IMPORTANCE_DEFAULT);
mService.buzzBeepBlinkLocked(r);
@@ -453,7 +454,7 @@
@Test
public void testNoInterruptionForMin() throws Exception {
NotificationRecord r = getBeepyNotification();
- r.setImportance(NotificationManager.IMPORTANCE_MIN, "foo");
+ r.setSystemImportance(NotificationManager.IMPORTANCE_MIN);
mService.buzzBeepBlinkLocked(r);
@@ -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());
@@ -1013,7 +1015,7 @@
@Test
public void testA11yMinInitialPost() throws Exception {
NotificationRecord r = getQuietNotification();
- r.setImportance(IMPORTANCE_MIN, "");
+ r.setSystemImportance(IMPORTANCE_MIN);
mService.buzzBeepBlinkLocked(r);
verify(mAccessibilityService, never()).sendAccessibilityEvent(any(), anyInt());
}
@@ -1070,7 +1072,7 @@
@Test
public void testLightsUnimportant() {
NotificationRecord r = getLightsNotification();
- r.setImportance(IMPORTANCE_LOW, "testing");
+ r.setSystemImportance(IMPORTANCE_LOW);
mService.buzzBeepBlinkLocked(r);
verifyNeverLights();
assertFalse(r.isInterruptive());
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/CriticalNotificationExtractorTest.java b/services/tests/uiservicestests/src/com/android/server/notification/CriticalNotificationExtractorTest.java
new file mode 100644
index 0000000..1409da1
--- /dev/null
+++ b/services/tests/uiservicestests/src/com/android/server/notification/CriticalNotificationExtractorTest.java
@@ -0,0 +1,109 @@
+/*
+ * 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.server.notification;
+
+import static android.app.NotificationManager.IMPORTANCE_LOW;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.content.pm.PackageManager;
+import android.os.UserHandle;
+import android.service.notification.StatusBarNotification;
+import android.testing.TestableContext;
+
+import com.android.server.UiServiceTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+public class CriticalNotificationExtractorTest extends UiServiceTestCase {
+ @Mock
+ private PackageManager mPackageManagerClient;
+ private TestableContext mContext = spy(getContext());
+ private CriticalNotificationExtractor mExtractor;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext.setMockPackageManager(mPackageManagerClient);
+ mExtractor = new CriticalNotificationExtractor();
+ }
+
+ /** confirm there is no affect on notifcations if the automotive feature flag is not set */
+ @Test
+ public void testExtractCritically_nonsupporting() throws Exception {
+ when(mPackageManagerClient.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE, 0))
+ .thenReturn(false);
+ mExtractor.initialize(mContext, null);
+
+ assertCriticality(Notification.CATEGORY_CAR_EMERGENCY,
+ CriticalNotificationExtractor.NORMAL);
+
+ assertCriticality(Notification.CATEGORY_CAR_WARNING, CriticalNotificationExtractor.NORMAL);
+
+ assertCriticality(Notification.CATEGORY_CAR_INFORMATION,
+ CriticalNotificationExtractor.NORMAL);
+
+ assertCriticality(Notification.CATEGORY_CALL,
+ CriticalNotificationExtractor.NORMAL);
+ }
+
+ @Test
+ public void testExtractCritically() throws Exception {
+ when(mPackageManagerClient.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE, 0))
+ .thenReturn(true);
+ mExtractor.initialize(mContext, null);
+
+ assertCriticality(Notification.CATEGORY_CAR_EMERGENCY,
+ CriticalNotificationExtractor.CRITICAL);
+
+ assertCriticality(Notification.CATEGORY_CAR_WARNING,
+ CriticalNotificationExtractor.CRITICAL_LOW);
+
+ assertCriticality(Notification.CATEGORY_CAR_INFORMATION,
+ CriticalNotificationExtractor.NORMAL);
+
+ assertCriticality(Notification.CATEGORY_CALL,
+ CriticalNotificationExtractor.NORMAL);
+ }
+
+ private void assertCriticality(String cat, int criticality) {
+ NotificationRecord info = generateRecord(cat);
+ mExtractor.process(info);
+ assertThat(info.getCriticality(), is(criticality));
+ }
+
+
+ private NotificationRecord generateRecord(String category) {
+ NotificationChannel channel = new NotificationChannel("a", "a", IMPORTANCE_LOW);
+ final Notification.Builder builder = new Notification.Builder(getContext())
+ .setContentTitle("foo")
+ .setCategory(category)
+ .setSmallIcon(android.R.drawable.sym_def_app_icon);
+ Notification n = builder.build();
+ StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0,
+ 0, n, UserHandle.ALL, null, System.currentTimeMillis());
+ return new NotificationRecord(getContext(), sbn, channel);
+ }
+}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ImportanceExtractorTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ImportanceExtractorTest.java
index 73d5961..abc6e3c 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ImportanceExtractorTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ImportanceExtractorTest.java
@@ -79,7 +79,7 @@
//
@Test
- public void testAppPreferenceChannelNone() throws Exception {
+ public void testAppPreferenceChannelNone() {
ImportanceExtractor extractor = new ImportanceExtractor();
extractor.setConfig(mConfig);
@@ -93,12 +93,12 @@
extractor.process(r);
- assertEquals(NotificationManager.IMPORTANCE_UNSPECIFIED, r.getUserImportance());
+ assertEquals(NotificationManager.IMPORTANCE_UNSPECIFIED, r.getImportance());
assertEquals(notificationImportance, r.getImportance());
}
@Test
- public void testAppPreferenceChannelPreference() throws Exception {
+ public void testAppPreferenceChannelPreference() {
ImportanceExtractor extractor = new ImportanceExtractor();
extractor.setConfig(mConfig);
@@ -111,6 +111,6 @@
extractor.process(r);
- assertEquals(r.getUserImportance(), NotificationManager.IMPORTANCE_HIGH);
+ assertEquals(r.getImportance(), NotificationManager.IMPORTANCE_HIGH);
}
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java
index 7ee0501..b30bb4b 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java
@@ -110,7 +110,7 @@
mRecordMinCall = new NotificationRecord(mContext, new StatusBarNotification(callPkg,
callPkg, 1, "minCall", callUid, callUid, n1,
new UserHandle(userId), "", 2000), getDefaultChannel());
- mRecordMinCall.setUserImportance(NotificationManager.IMPORTANCE_MIN);
+ mRecordMinCall.setSystemImportance(NotificationManager.IMPORTANCE_MIN);
Notification n2 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setCategory(Notification.CATEGORY_CALL)
@@ -119,7 +119,7 @@
mRecordHighCall = new NotificationRecord(mContext, new StatusBarNotification(callPkg,
callPkg, 1, "highcall", callUid, callUid, n2,
new UserHandle(userId), "", 1999), getDefaultChannel());
- mRecordHighCall.setUserImportance(NotificationManager.IMPORTANCE_HIGH);
+ mRecordHighCall.setSystemImportance(NotificationManager.IMPORTANCE_HIGH);
Notification n3 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setStyle(new Notification.MediaStyle()
@@ -128,14 +128,14 @@
mRecordDefaultMedia = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "media", uid2, uid2, n3, new UserHandle(userId),
"", 1499), getDefaultChannel());
- mRecordDefaultMedia.setUserImportance(NotificationManager.IMPORTANCE_DEFAULT);
+ mRecordDefaultMedia.setSystemImportance(NotificationManager.IMPORTANCE_DEFAULT);
Notification n4 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setStyle(new Notification.MessagingStyle("sender!")).build();
mRecordInlineReply = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "inlinereply", uid2, uid2, n4, new UserHandle(userId),
"", 1599), getDefaultChannel());
- mRecordInlineReply.setUserImportance(NotificationManager.IMPORTANCE_HIGH);
+ mRecordInlineReply.setSystemImportance(NotificationManager.IMPORTANCE_HIGH);
mRecordInlineReply.setPackagePriority(Notification.PRIORITY_MAX);
if (smsPkg != null) {
@@ -144,7 +144,7 @@
mRecordSms = new NotificationRecord(mContext, new StatusBarNotification(smsPkg,
smsPkg, 1, "sms", smsUid, smsUid, n5, new UserHandle(userId),
"", 1299), getDefaultChannel());
- mRecordSms.setUserImportance(NotificationManager.IMPORTANCE_DEFAULT);
+ mRecordSms.setSystemImportance(NotificationManager.IMPORTANCE_DEFAULT);
}
Notification n6 = new Notification.Builder(mContext, TEST_CHANNEL_ID).build();
@@ -152,20 +152,20 @@
pkg2, 1, "starred", uid2, uid2, n6, new UserHandle(userId),
"", 1259), getDefaultChannel());
mRecordStarredContact.setContactAffinity(ValidateNotificationPeople.STARRED_CONTACT);
- mRecordStarredContact.setUserImportance(NotificationManager.IMPORTANCE_DEFAULT);
+ mRecordStarredContact.setSystemImportance(NotificationManager.IMPORTANCE_DEFAULT);
Notification n7 = new Notification.Builder(mContext, TEST_CHANNEL_ID).build();
mRecordContact = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "contact", uid2, uid2, n7, new UserHandle(userId),
"", 1259), getDefaultChannel());
mRecordContact.setContactAffinity(ValidateNotificationPeople.VALID_CONTACT);
- mRecordContact.setUserImportance(NotificationManager.IMPORTANCE_DEFAULT);
+ mRecordContact.setSystemImportance(NotificationManager.IMPORTANCE_DEFAULT);
Notification n8 = new Notification.Builder(mContext, TEST_CHANNEL_ID).build();
mRecordUrgent = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "urgent", uid2, uid2, n8, new UserHandle(userId),
"", 1258), getDefaultChannel());
- mRecordUrgent.setUserImportance(NotificationManager.IMPORTANCE_HIGH);
+ mRecordUrgent.setSystemImportance(NotificationManager.IMPORTANCE_HIGH);
Notification n9 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setCategory(Notification.CATEGORY_MESSAGE)
@@ -175,7 +175,7 @@
mRecordCheater = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "cheater", uid2, uid2, n9, new UserHandle(userId),
"", 9258), getDefaultChannel());
- mRecordCheater.setUserImportance(NotificationManager.IMPORTANCE_LOW);
+ mRecordCheater.setSystemImportance(NotificationManager.IMPORTANCE_LOW);
mRecordCheater.setPackagePriority(Notification.PRIORITY_MAX);
Notification n10 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
@@ -183,7 +183,7 @@
mRecordEmail = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "email", uid2, uid2, n10, new UserHandle(userId),
"", 1599), getDefaultChannel());
- mRecordEmail.setUserImportance(NotificationManager.IMPORTANCE_HIGH);
+ mRecordEmail.setSystemImportance(NotificationManager.IMPORTANCE_HIGH);
Notification n11 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setCategory(Notification.CATEGORY_MESSAGE)
@@ -192,7 +192,7 @@
mRecordCheaterColorized = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "cheater", uid2, uid2, n11, new UserHandle(userId),
"", 9258), getDefaultChannel());
- mRecordCheaterColorized.setUserImportance(NotificationManager.IMPORTANCE_LOW);
+ mRecordCheaterColorized.setSystemImportance(NotificationManager.IMPORTANCE_LOW);
Notification n12 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setCategory(Notification.CATEGORY_MESSAGE)
@@ -202,7 +202,7 @@
mNoMediaSessionMedia = new NotificationRecord(mContext, new StatusBarNotification(
pkg2, pkg2, 1, "cheater", uid2, uid2, n12, new UserHandle(userId),
"", 9258), getDefaultChannel());
- mNoMediaSessionMedia.setUserImportance(NotificationManager.IMPORTANCE_DEFAULT);
+ mNoMediaSessionMedia.setSystemImportance(NotificationManager.IMPORTANCE_DEFAULT);
Notification n13 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setFlag(Notification.FLAG_FOREGROUND_SERVICE, true)
@@ -211,7 +211,7 @@
mRecordColorized = new NotificationRecord(mContext, new StatusBarNotification(pkg2,
pkg2, 1, "colorized", uid2, uid2, n13,
new UserHandle(userId), "", 1999), getDefaultChannel());
- mRecordHighCall.setUserImportance(NotificationManager.IMPORTANCE_HIGH);
+ mRecordHighCall.setSystemImportance(NotificationManager.IMPORTANCE_HIGH);
Notification n14 = new Notification.Builder(mContext, TEST_CHANNEL_ID)
.setCategory(Notification.CATEGORY_CALL)
@@ -221,7 +221,7 @@
mRecordColorizedCall = new NotificationRecord(mContext, new StatusBarNotification(callPkg,
callPkg, 1, "colorizedCall", callUid, callUid, n14,
new UserHandle(userId), "", 1999), getDefaultChannel());
- mRecordColorizedCall.setUserImportance(NotificationManager.IMPORTANCE_HIGH);
+ mRecordColorizedCall.setSystemImportance(NotificationManager.IMPORTANCE_HIGH);
}
@Test
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index 0cbb1aa..0ff124e 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -73,7 +73,6 @@
import android.app.NotificationChannelGroup;
import android.app.NotificationManager;
import android.app.IUriGrantsManager;
-import android.app.admin.DeviceAdminInfo;
import android.app.admin.DevicePolicyManagerInternal;
import android.app.usage.UsageStatsManagerInternal;
import android.companion.ICompanionDeviceManager;
@@ -727,6 +726,25 @@
}
@Test
+ public void testBlockedNotifications_blockedByAssistant() throws Exception {
+ when(mPackageManager.isPackageSuspendedForUser(anyString(), anyInt())).thenReturn(false);
+
+ NotificationChannel channel = new NotificationChannel("id", "name",
+ NotificationManager.IMPORTANCE_HIGH);
+ NotificationRecord r = generateNotificationRecord(channel);
+ mService.addEnqueuedNotification(r);
+
+ r.setAssistantImportance(IMPORTANCE_NONE);
+
+ NotificationManagerService.PostNotificationRunnable runnable =
+ mService.new PostNotificationRunnable(r.getKey());
+ runnable.run();
+ waitForIdle();
+
+ verify(mUsageStats, never()).registerPostedByApp(any());
+ }
+
+ @Test
public void testEnqueueNotificationWithTag_PopulatesGetActiveNotifications() throws Exception {
mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag", 0,
generateNotificationRecord(null).getNotification(), 0);
@@ -2465,13 +2483,29 @@
final NotificationVisibility nv = NotificationVisibility.obtain(r.getKey(), 0, 1, true);
mService.mNotificationDelegate.onNotificationClear(mUid, 0, PKG, r.sbn.getTag(),
- r.sbn.getId(), r.getUserId(), r.getKey(), NotificationStats.DISMISSAL_AOD, nv);
+ r.sbn.getId(), r.getUserId(), r.getKey(), NotificationStats.DISMISSAL_AOD,
+ NotificationStats.DISMISS_SENTIMENT_POSITIVE, nv);
waitForIdle();
assertEquals(NotificationStats.DISMISSAL_AOD, r.getStats().getDismissalSurface());
}
@Test
+ public void testStats_dismissalSentiment() throws Exception {
+ final NotificationRecord r = generateNotificationRecord(mTestNotificationChannel);
+ mService.addNotification(r);
+
+ final NotificationVisibility nv = NotificationVisibility.obtain(r.getKey(), 0, 1, true);
+ mService.mNotificationDelegate.onNotificationClear(mUid, 0, PKG, r.sbn.getTag(),
+ r.sbn.getId(), r.getUserId(), r.getKey(), NotificationStats.DISMISSAL_AOD,
+ NotificationStats.DISMISS_SENTIMENT_NEGATIVE, nv);
+ waitForIdle();
+
+ assertEquals(NotificationStats.DISMISS_SENTIMENT_NEGATIVE,
+ r.getStats().getDismissalSentiment());
+ }
+
+ @Test
public void testApplyAdjustmentMultiUser() throws Exception {
final NotificationRecord r = generateNotificationRecord(mTestNotificationChannel);
mService.addNotification(r);
@@ -2494,6 +2528,27 @@
}
@Test
+ public void testAssistantIBlockingTriggersCancel() throws Exception {
+ final NotificationRecord r = generateNotificationRecord(mTestNotificationChannel);
+ mService.addNotification(r);
+ NotificationManagerService.WorkerHandler handler = mock(
+ NotificationManagerService.WorkerHandler.class);
+ mService.setHandler(handler);
+
+ Bundle signals = new Bundle();
+ signals.putInt(Adjustment.KEY_IMPORTANCE, IMPORTANCE_NONE);
+ Adjustment adjustment = new Adjustment(
+ r.sbn.getPackageName(), r.getKey(), signals, "", r.getUser().getIdentifier());
+ when(mAssistants.isSameUser(any(), anyInt())).thenReturn(true);
+ mBinderService.applyAdjustmentFromAssistant(null, adjustment);
+
+ waitForIdle();
+
+ verify(handler, timeout(300).times(0)).scheduleSendRankingUpdate();
+ verify(handler, times(1)).scheduleCancelNotification(any());
+ }
+
+ @Test
public void testApplyEnqueuedAdjustmentFromAssistant_singleUser() throws Exception {
final NotificationRecord r = generateNotificationRecord(mTestNotificationChannel);
mService.addEnqueuedNotification(r);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationRecordTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationRecordTest.java
index 6be633e..11b086c 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationRecordTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationRecordTest.java
@@ -16,6 +16,9 @@
package com.android.server.notification;
import static android.app.NotificationChannel.USER_LOCKED_IMPORTANCE;
+import static android.app.NotificationManager.IMPORTANCE_DEFAULT;
+import static android.app.NotificationManager.IMPORTANCE_HIGH;
+import static android.app.NotificationManager.IMPORTANCE_LOW;
import static android.service.notification.NotificationListenerService.Ranking
.USER_SENTIMENT_NEGATIVE;
import static android.service.notification.NotificationListenerService.Ranking
@@ -306,14 +309,14 @@
@Test
public void testImportance_locked_preUpgrade() throws Exception {
- defaultChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
+ defaultChannel.setImportance(IMPORTANCE_LOW);
defaultChannel.lockFields(USER_LOCKED_IMPORTANCE);
StatusBarNotification sbn = getNotification(PKG_N_MR1, true /* noisy */,
true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
false /* lights */, false /* defaultLights */, null /* group */);
NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel);
- assertEquals(NotificationManager.IMPORTANCE_LOW, record.getImportance());
+ assertEquals(IMPORTANCE_LOW, record.getImportance());
}
@Test
@@ -718,4 +721,73 @@
record.setSmartActions(smartActions);
assertEquals(smartActions, record.getSmartActions());
}
+
+ @Test
+ public void testUpdateNotificationChannel() {
+ StatusBarNotification sbn = getNotification(PKG_O, true /* noisy */,
+ true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
+ false /* lights */, false /* defaultLights */, groupId /* group */);
+ NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel);
+
+ assertEquals(channel.getImportance(), record.getImportance());
+
+ record.updateNotificationChannel(
+ new NotificationChannel(channelId, "", channel.getImportance() - 1));
+
+ assertEquals(channel.getImportance() - 1, record.getImportance());
+ }
+
+ @Test
+ public void testCalculateImportance_systemImportance() {
+ channel.setImportance(IMPORTANCE_HIGH);
+ StatusBarNotification sbn = getNotification(PKG_O, true /* noisy */,
+ true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
+ false /* lights */, false /* defaultLights */, groupId /* group */);
+ NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel);
+
+ record.setSystemImportance(IMPORTANCE_LOW);
+ assertEquals(IMPORTANCE_LOW, record.getImportance());
+
+ record = new NotificationRecord(mMockContext, sbn, channel);
+ channel.lockFields(USER_LOCKED_IMPORTANCE);
+
+ record.setSystemImportance(IMPORTANCE_LOW);
+ assertEquals(IMPORTANCE_LOW, record.getImportance());
+ }
+
+ @Test
+ public void testCalculateImportance_asstImportance() {
+ channel.setImportance(IMPORTANCE_HIGH);
+ StatusBarNotification sbn = getNotification(PKG_O, true /* noisy */,
+ true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
+ false /* lights */, false /* defaultLights */, groupId /* group */);
+ NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel);
+
+ record.setAssistantImportance(IMPORTANCE_LOW);
+ assertEquals(IMPORTANCE_LOW, record.getImportance());
+
+ // assistant ignored if user expressed preference
+ record = new NotificationRecord(mMockContext, sbn, channel);
+ channel.lockFields(USER_LOCKED_IMPORTANCE);
+
+ record.setAssistantImportance(IMPORTANCE_LOW);
+ assertEquals(channel.getImportance(), record.getImportance());
+ }
+
+ @Test
+ public void testCalculateImportance_asstImportanceChannelUpdate() {
+ channel.setImportance(IMPORTANCE_HIGH);
+ StatusBarNotification sbn = getNotification(PKG_O, true /* noisy */,
+ true /* defaultSound */, false /* buzzy */, false /* defaultBuzz */,
+ false /* lights */, false /* defaultLights */, groupId /* group */);
+ NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel);
+
+ record.setAssistantImportance(IMPORTANCE_LOW);
+ assertEquals(IMPORTANCE_LOW, record.getImportance());
+
+ record.updateNotificationChannel(
+ new NotificationChannel(channelId, "", IMPORTANCE_DEFAULT));
+
+ assertEquals(IMPORTANCE_LOW, record.getImportance());
+ }
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationStatsTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationStatsTest.java
index 0a630f4..bae8564 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationStatsTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationStatsTest.java
@@ -16,6 +16,8 @@
package com.android.server.notification;
import static android.service.notification.NotificationStats.DISMISSAL_PEEK;
+import static android.service.notification.NotificationStats.DISMISS_SENTIMENT_NEGATIVE;
+import static android.service.notification.NotificationStats.DISMISS_SENTIMENT_POSITIVE;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
@@ -46,6 +48,7 @@
assertFalse(stats.hasViewedSettings());
assertFalse(stats.hasSnoozed());
assertEquals(NotificationStats.DISMISSAL_NOT_DISMISSED, stats.getDismissalSurface());
+ assertEquals(NotificationStats.DISMISS_SENTIMENT_UNKNOWN, stats.getDismissalSentiment());
}
@Test
@@ -97,10 +100,19 @@
}
@Test
+ public void testDismissalSentiment() {
+ NotificationStats stats = new NotificationStats();
+ stats.setDismissalSentiment(DISMISS_SENTIMENT_NEGATIVE);
+ assertEquals(DISMISS_SENTIMENT_NEGATIVE, stats.getDismissalSentiment());
+ assertFalse(stats.hasInteracted());
+ }
+
+ @Test
public void testWriteToParcel() {
NotificationStats stats = new NotificationStats();
stats.setViewedSettings();
stats.setDismissalSurface(NotificationStats.DISMISSAL_AOD);
+ stats.setDismissalSentiment(NotificationStats.DISMISS_SENTIMENT_POSITIVE);
Parcel parcel = Parcel.obtain();
stats.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java
index 7e0fcc9..5638cb36 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java
@@ -203,8 +203,42 @@
}
@Test
+ public void testSortShouldRespectCritical() throws Exception {
+ ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(7);
+ NotificationRecord critical = generateRecord(0);
+ NotificationRecord critical_ish = generateRecord(1);
+ NotificationRecord critical_notAtAll = generateRecord(100);
+
+ notificationList.add(critical_ish);
+ notificationList.add(mRecordGroupGSortA);
+ notificationList.add(critical_notAtAll);
+ notificationList.add(mRecordGroupGSortB);
+ notificationList.add(mRecordNoGroup);
+ notificationList.add(mRecordNoGroupSortA);
+ notificationList.add(critical);
+ mHelper.sort(notificationList);
+
+ assertTrue(mHelper.indexOf(notificationList, critical) == 0);
+ assertTrue(mHelper.indexOf(notificationList, critical_ish) == 1);
+ assertTrue(mHelper.indexOf(notificationList, critical_notAtAll) == 6);
+ }
+
+ private NotificationRecord generateRecord(int criticality) {
+ NotificationChannel channel = new NotificationChannel("a", "a", IMPORTANCE_LOW);
+ final Notification.Builder builder = new Notification.Builder(getContext())
+ .setContentTitle("foo")
+ .setSmallIcon(android.R.drawable.sym_def_app_icon);
+ Notification n = builder.build();
+ StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0,
+ 0, n, UserHandle.ALL, null, System.currentTimeMillis());
+ NotificationRecord notificationRecord = new NotificationRecord(getContext(), sbn, channel);
+ notificationRecord.setCriticality(criticality);
+ return notificationRecord;
+ }
+
+ @Test
public void testFindAfterRankingWithASplitGroup() throws Exception {
- ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(3);
+ ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(4);
notificationList.add(mRecordGroupGSortA);
notificationList.add(mRecordGroupGSortB);
notificationList.add(mRecordNoGroup);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
index 96ac935..110e3fe 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ScheduleCalendarTest.java
@@ -333,6 +333,17 @@
}
@Test
+ public void testMaybeSetNextAlarm_expiredOldAlarm() {
+ mScheduleInfo.exitAtAlarm = true;
+ mScheduleInfo.nextAlarm = 998;
+ mScheduleCalendar.setSchedule(mScheduleInfo);
+
+ mScheduleCalendar.maybeSetNextAlarm(1000, 1001);
+
+ assertEquals(1001, mScheduleInfo.nextAlarm);
+ }
+
+ @Test
@FlakyTest
public void testIsInSchedule_inScheduleOvernight() {
Calendar cal = new GregorianCalendar();
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java
index c0bd7cc..d335450 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java
@@ -171,4 +171,17 @@
assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_OFF, config, r));
}
+
+ @Test
+ public void testSuppressAnything_bypass_ZenModeOn() {
+ NotificationRecord r = getNotificationRecord();
+ r.setCriticality(CriticalNotificationExtractor.CRITICAL);
+ when(r.sbn.getPackageName()).thenReturn("bananas");
+ ZenModeConfig config = mock(ZenModeConfig.class);
+
+ assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_NO_INTERRUPTIONS, config, r));
+
+ r.setCriticality(CriticalNotificationExtractor.CRITICAL_LOW);
+ assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_NO_INTERRUPTIONS, config, r));
+ }
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
index 24beb59..91f4bc8 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
@@ -38,6 +38,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.app.AppGlobals;
import android.app.AppOpsManager;
import android.app.NotificationManager;
import android.content.ComponentName;
@@ -49,8 +50,10 @@
import android.media.AudioManagerInternal;
import android.media.VolumePolicy;
import android.media.AudioSystem;
+import android.net.Uri;
import android.provider.Settings;
import android.provider.Settings.Global;
+import android.service.notification.Condition;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ScheduleInfo;
import android.test.suitebuilder.annotation.SmallTest;
@@ -61,9 +64,9 @@
import com.android.internal.R;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.server.notification.ManagedServices.UserProfiles;
import com.android.internal.util.FastXmlSerializer;
import com.android.server.UiServiceTestCase;
-import android.util.Slog;
import org.junit.Before;
import org.junit.Test;
@@ -83,7 +86,7 @@
@TestableLooper.RunWithLooper
public class ZenModeHelperTest extends UiServiceTestCase {
- @Mock ConditionProviders mConditionProviders;
+ ConditionProviders mConditionProviders;
@Mock NotificationManager mNotificationManager;
@Mock private Resources mResources;
private TestableLooper mTestableLooper;
@@ -103,6 +106,9 @@
when(mResources.getString(R.string.zen_mode_default_events_name)).thenReturn("events");
when(mContext.getSystemService(NotificationManager.class)).thenReturn(mNotificationManager);
+ mConditionProviders = new ConditionProviders(mContext, new UserProfiles(),
+ AppGlobals.getPackageManager());
+ mConditionProviders.addSystemProvider(new CountdownConditionProvider());
mZenModeHelperSpy = spy(new ZenModeHelper(mContext, mTestableLooper.getLooper(),
mConditionProviders));
}
@@ -290,23 +296,39 @@
@Test
public void testZenUpgradeNotification() {
- // shows zen upgrade notification if stored settings says to shows, boot is completed
+ // shows zen upgrade notification if stored settings says to shows,
+ // zen has not been updated, boot is completed
// and we're setting zen mode on
- Settings.Global.putInt(mContentResolver, Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 1);
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 1);
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_SETTINGS_UPDATED, 0);
mZenModeHelperSpy.mIsBootComplete = true;
mZenModeHelperSpy.setZenModeSetting(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
verify(mZenModeHelperSpy, times(1)).createZenUpgradeNotification();
verify(mNotificationManager, times(1)).notify(eq(ZenModeHelper.TAG),
eq(SystemMessage.NOTE_ZEN_UPGRADE), any());
- assertEquals(0, Settings.Global.getInt(mContentResolver,
- Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, -1));
+ assertEquals(0, Settings.Secure.getInt(mContentResolver,
+ Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, -1));
}
@Test
public void testNoZenUpgradeNotification() {
// doesn't show upgrade notification if stored settings says don't show
- Settings.Global.putInt(mContentResolver, Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_SETTINGS_UPDATED, 0);
+ mZenModeHelperSpy.mIsBootComplete = true;
+ mZenModeHelperSpy.setZenModeSetting(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
+
+ verify(mZenModeHelperSpy, never()).createZenUpgradeNotification();
+ verify(mNotificationManager, never()).notify(eq(ZenModeHelper.TAG),
+ eq(SystemMessage.NOTE_ZEN_UPGRADE), any());
+ }
+
+ @Test
+ public void testNoZenUpgradeNotificationZenUpdated() {
+ // doesn't show upgrade notification since zen was already updated
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
+ Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_SETTINGS_UPDATED, 1);
mZenModeHelperSpy.mIsBootComplete = true;
mZenModeHelperSpy.setZenModeSetting(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
@@ -615,7 +637,37 @@
}
@Test
- public void testReadXml() throws Exception {
+ public void testReadXmlRestore() throws Exception {
+ setupZenConfig();
+
+ // one enabled automatic rule
+ ArrayMap<String, ZenModeConfig.ZenRule> automaticRules = new ArrayMap<>();
+ ZenModeConfig.ZenRule customRule = new ZenModeConfig.ZenRule();
+ final ScheduleInfo customRuleInfo = new ScheduleInfo();
+ customRule.enabled = true;
+ customRule.creationTime = 0;
+ customRule.id = "customRule";
+ customRule.name = "Custom Rule";
+ customRule.zenMode = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
+ customRule.component = new ComponentName("test", "test");
+ customRule.conditionId = ZenModeConfig.toScheduleConditionId(customRuleInfo);
+ automaticRules.put("customRule", customRule);
+ mZenModeHelperSpy.mConfig.automaticRules = automaticRules;
+
+ ZenModeConfig original = mZenModeHelperSpy.mConfig.copy();
+
+ ByteArrayOutputStream baos = writeXmlAndPurge(false, null);
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(new BufferedInputStream(
+ new ByteArrayInputStream(baos.toByteArray())), null);
+ parser.nextTag();
+ mZenModeHelperSpy.readXml(parser, true);
+ assertEquals(original.hashCode(), mZenModeHelperSpy.mConfig.hashCode());
+ assertEquals(original, mZenModeHelperSpy.mConfig);
+ }
+
+ @Test
+ public void testReadXmlRulesNotOverriden() throws Exception {
setupZenConfig();
// automatic zen rule is enabled on upgrade so rules should not be overriden to default
@@ -629,8 +681,6 @@
enabledAutoRule.put("customRule", customRule);
mZenModeHelperSpy.mConfig.automaticRules = enabledAutoRule;
- ZenModeConfig expected = mZenModeHelperSpy.mConfig.copy();
-
// set previous version
ByteArrayOutputStream baos = writeXmlAndPurge(false, 5);
XmlPullParser parser = Xml.newPullParser();
@@ -783,17 +833,17 @@
public void testReadXmlAllDisabledRulesResetDefaultRules() throws Exception {
setupZenConfig();
- // all automatic zen rules are diabled on upgrade (and default rules don't already exist)
+ // all automatic zen rules are disabled on upgrade (and default rules don't already exist)
// so rules should be overriden by default rules
- ArrayMap<String, ZenModeConfig.ZenRule> enabledAutoRule = new ArrayMap<>();
+ ArrayMap<String, ZenModeConfig.ZenRule> disabledAutoRule = new ArrayMap<>();
ZenModeConfig.ZenRule customRule = new ZenModeConfig.ZenRule();
final ScheduleInfo weeknights = new ScheduleInfo();
customRule.enabled = false;
customRule.name = "Custom Rule";
customRule.zenMode = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
customRule.conditionId = ZenModeConfig.toScheduleConditionId(weeknights);
- enabledAutoRule.put("customRule", customRule);
- mZenModeHelperSpy.mConfig.automaticRules = enabledAutoRule;
+ disabledAutoRule.put("customRule", customRule);
+ mZenModeHelperSpy.mConfig.automaticRules = disabledAutoRule;
// set previous version
ByteArrayOutputStream baos = writeXmlAndPurge(false, 5);
@@ -860,7 +910,6 @@
setupZenConfigMaintained();
}
-
@Test
public void testReadXmlDefaultRulesExist() throws Exception {
setupZenConfig();
@@ -916,6 +965,30 @@
setupZenConfigMaintained();
}
+ @Test
+ public void testCountdownConditionSubscription() throws Exception {
+ ZenModeConfig config = new ZenModeConfig();
+ mZenModeHelperSpy.mConfig = config;
+ mZenModeHelperSpy.mConditions.evaluateConfig(mZenModeHelperSpy.mConfig, null, true);
+ assertEquals(0, mZenModeHelperSpy.mConditions.mSubscriptions.size());
+
+ mZenModeHelperSpy.mConfig.manualRule = new ZenModeConfig.ZenRule();
+ Uri conditionId = ZenModeConfig.toCountdownConditionId(9000000, false);
+ mZenModeHelperSpy.mConfig.manualRule.conditionId = conditionId;
+ mZenModeHelperSpy.mConfig.manualRule.component = new ComponentName("android",
+ CountdownConditionProvider.class.getName());
+ mZenModeHelperSpy.mConfig.manualRule.condition = new Condition(conditionId, "", "", "", 0,
+ Condition.STATE_TRUE, Condition.FLAG_RELEVANT_NOW);
+ mZenModeHelperSpy.mConfig.manualRule.enabled = true;
+ ZenModeConfig originalConfig = mZenModeHelperSpy.mConfig.copy();
+
+ mZenModeHelperSpy.mConditions.evaluateConfig(mZenModeHelperSpy.mConfig, null, true);
+
+ assertEquals(true, ZenModeConfig.isValidCountdownConditionId(conditionId));
+ assertEquals(originalConfig, mZenModeHelperSpy.mConfig);
+ assertEquals(1, mZenModeHelperSpy.mConditions.mSubscriptions.size());
+ }
+
private void setupZenConfig() {
mZenModeHelperSpy.mZenMode = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
mZenModeHelperSpy.mConfig.allowAlarms = false;
@@ -927,12 +1000,7 @@
mZenModeHelperSpy.mConfig.allowEvents = true;
mZenModeHelperSpy.mConfig.allowRepeatCallers= true;
mZenModeHelperSpy.mConfig.suppressedVisualEffects = SUPPRESSED_EFFECT_BADGE;
- mZenModeHelperSpy.mConfig.manualRule = new ZenModeConfig.ZenRule();
- mZenModeHelperSpy.mConfig.manualRule.zenMode =
- Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
- mZenModeHelperSpy.mConfig.manualRule.component = new ComponentName("a", "a");
- mZenModeHelperSpy.mConfig.manualRule.enabled = true;
- mZenModeHelperSpy.mConfig.manualRule.snoozing = true;
+ mZenModeHelperSpy.mConfig.manualRule = null;
}
private void setupZenConfigMaintained() {
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/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index 8283e97..b9de374 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -19,6 +19,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.job.JobService;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -373,6 +374,7 @@
* Return cursor for table query.
* @hide
*/
+ @UnsupportedAppUsage
public static Cursor query(ContentResolver cr, String[] projection,
String where, String orderBy) {
return cr.query(CONTENT_URI, projection, where,
@@ -403,6 +405,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessageToUri(ContentResolver resolver,
Uri uri, String address, String body, String subject,
Long date, boolean read, boolean deliveryReport) {
@@ -425,6 +428,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessageToUri(int subId, ContentResolver resolver,
Uri uri, String address, String body, String subject,
Long date, boolean read, boolean deliveryReport) {
@@ -447,6 +451,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessageToUri(ContentResolver resolver,
Uri uri, String address, String body, String subject,
Long date, boolean read, boolean deliveryReport, long threadId) {
@@ -471,6 +476,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessageToUri(int subId, ContentResolver resolver,
Uri uri, String address, String body, String subject,
Long date, boolean read, boolean deliveryReport, long threadId) {
@@ -503,6 +509,7 @@
* @return true if the operation succeeded
* @hide
*/
+ @UnsupportedAppUsage
public static boolean moveMessageToFolder(Context context,
Uri uri, int folder, int error) {
if (uri == null) {
@@ -546,6 +553,7 @@
* outgoing message.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isOutgoingFolder(int messageType) {
return (messageType == MESSAGE_TYPE_FAILED)
|| (messageType == MESSAGE_TYPE_OUTBOX)
@@ -587,6 +595,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(ContentResolver resolver,
String address, String body, String subject, Long date,
boolean read) {
@@ -607,6 +616,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(int subId, ContentResolver resolver,
String address, String body, String subject, Long date, boolean read) {
return addMessageToUri(subId, resolver, CONTENT_URI, address, body,
@@ -647,6 +657,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(ContentResolver resolver,
String address, String body, String subject, Long date) {
return addMessageToUri(SubscriptionManager.getDefaultSmsSubscriptionId(),
@@ -665,6 +676,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(int subId, ContentResolver resolver,
String address, String body, String subject, Long date) {
return addMessageToUri(subId, resolver, CONTENT_URI, address, body,
@@ -692,6 +704,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(ContentResolver resolver,
String address, String body, String subject, Long date) {
return addMessageToUri(SubscriptionManager.getDefaultSmsSubscriptionId(),
@@ -710,6 +723,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(int subId, ContentResolver resolver,
String address, String body, String subject, Long date) {
return addMessageToUri(subId, resolver, CONTENT_URI, address, body,
@@ -756,6 +770,7 @@
* @return the URI for the new message
* @hide
*/
+ @UnsupportedAppUsage
public static Uri addMessage(ContentResolver resolver,
String address, String body, String subject, Long date,
boolean deliveryReport, long threadId) {
@@ -1935,12 +1950,14 @@
*/
public static final class Threads implements ThreadsColumns {
+ @UnsupportedAppUsage
private static final String[] ID_PROJECTION = { BaseColumns._ID };
/**
* Private {@code content://} style URL for this table. Used by
* {@link #getOrCreateThreadId(android.content.Context, java.util.Set)}.
*/
+ @UnsupportedAppUsage
private static final Uri THREAD_ID_CONTENT_URI = Uri.parse(
"content://mms-sms/threadID");
@@ -2069,6 +2086,7 @@
* </ul>
* @hide
*/
+ @UnsupportedAppUsage
public static final Pattern NAME_ADDR_EMAIL_PATTERN =
Pattern.compile("\\s*(\"[^\"]*\"|[^<>\"]+)\\s*<([^<>]+)>\\s*");
@@ -2096,6 +2114,7 @@
* Helper method to extract email address from address string.
* @hide
*/
+ @UnsupportedAppUsage
public static String extractAddrSpec(String address) {
Matcher match = NAME_ADDR_EMAIL_PATTERN.matcher(address);
@@ -2112,6 +2131,7 @@
* @return true if address is an email address; false otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isEmailAddress(String address) {
if (TextUtils.isEmpty(address)) {
return false;
@@ -2129,6 +2149,7 @@
* @return true if number is a phone number; false otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isPhoneNumber(String number) {
if (TextUtils.isEmpty(number)) {
return false;
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 1dfe5df..a45d70b 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -22,6 +22,7 @@
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.PersistableBundle;
import android.os.RemoteException;
@@ -224,6 +225,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";
@@ -1205,6 +1213,7 @@
* disable_metered_apns}
* @hide
*/
+ @UnsupportedAppUsage
public static final String KEY_CARRIER_DEFAULT_ACTIONS_ON_REDIRECTION_STRING_ARRAY =
"carrier_default_actions_on_redirection_string_array";
@@ -1817,6 +1826,7 @@
* Key identifying if voice call barring notification is required to be shown to the user.
* @hide
*/
+ @UnsupportedAppUsage
public static final String KEY_DISABLE_VOICE_BARRING_NOTIFICATION_BOOL =
"disable_voice_barring_notification_bool";
@@ -2041,6 +2051,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/CellIdentity.java b/telephony/java/android/telephony/CellIdentity.java
index 2a41829..c240dbb 100644
--- a/telephony/java/android/telephony/CellIdentity.java
+++ b/telephony/java/android/telephony/CellIdentity.java
@@ -17,14 +17,11 @@
package android.telephony;
import android.annotation.CallSuper;
-import android.annotation.IntDef;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
/**
@@ -32,44 +29,6 @@
* CellIdentityXxx which represents cell identity for specific network access technology.
*/
public abstract class CellIdentity implements Parcelable {
- /**
- * Cell identity type
- * @hide
- */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = "TYPE_", value = {TYPE_GSM, TYPE_CDMA, TYPE_LTE, TYPE_WCDMA, TYPE_TDSCDMA})
- public @interface Type {}
-
- /**
- * Unknown cell identity type
- * @hide
- */
- public static final int TYPE_UNKNOWN = 0;
- /**
- * GSM cell identity type
- * @hide
- */
- public static final int TYPE_GSM = 1;
- /**
- * CDMA cell identity type
- * @hide
- */
- public static final int TYPE_CDMA = 2;
- /**
- * LTE cell identity type
- * @hide
- */
- public static final int TYPE_LTE = 3;
- /**
- * WCDMA cell identity type
- * @hide
- */
- public static final int TYPE_WCDMA = 4;
- /**
- * TDS-CDMA cell identity type
- * @hide
- */
- public static final int TYPE_TDSCDMA = 5;
/** @hide */
public static final int INVALID_CHANNEL_NUMBER = -1;
@@ -138,7 +97,9 @@
* @hide
* @return The type of the cell identity
*/
- public @Type int getType() { return mType; }
+ public @CellInfo.Type int getType() {
+ return mType;
+ }
/**
* Returns the channel number of the cell identity.
@@ -217,11 +178,12 @@
public CellIdentity createFromParcel(Parcel in) {
int type = in.readInt();
switch (type) {
- case TYPE_GSM: return CellIdentityGsm.createFromParcelBody(in);
- case TYPE_WCDMA: return CellIdentityWcdma.createFromParcelBody(in);
- case TYPE_CDMA: return CellIdentityCdma.createFromParcelBody(in);
- case TYPE_LTE: return CellIdentityLte.createFromParcelBody(in);
- case TYPE_TDSCDMA: return CellIdentityTdscdma.createFromParcelBody(in);
+ case CellInfo.TYPE_GSM: return CellIdentityGsm.createFromParcelBody(in);
+ case CellInfo.TYPE_WCDMA: return CellIdentityWcdma.createFromParcelBody(in);
+ case CellInfo.TYPE_CDMA: return CellIdentityCdma.createFromParcelBody(in);
+ case CellInfo.TYPE_LTE: return CellIdentityLte.createFromParcelBody(in);
+ case CellInfo.TYPE_TDSCDMA:
+ return CellIdentityTdscdma.createFromParcelBody(in);
default: throw new IllegalArgumentException("Bad Cell identity Parcel");
}
}
diff --git a/telephony/java/android/telephony/CellIdentityCdma.java b/telephony/java/android/telephony/CellIdentityCdma.java
index 58a2c45..5b67dc4 100644
--- a/telephony/java/android/telephony/CellIdentityCdma.java
+++ b/telephony/java/android/telephony/CellIdentityCdma.java
@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.text.TextUtils;
@@ -54,7 +55,7 @@
* @hide
*/
public CellIdentityCdma() {
- super(TAG, TYPE_CDMA, null, null, null, null);
+ super(TAG, CellInfo.TYPE_CDMA, null, null, null, null);
mNetworkId = Integer.MAX_VALUE;
mSystemId = Integer.MAX_VALUE;
mBasestationId = Integer.MAX_VALUE;
@@ -74,6 +75,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat) {
this(nid, sid, bid, lon, lat, null, null);
}
@@ -94,7 +96,7 @@
*/
public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat, String alphal,
String alphas) {
- super(TAG, TYPE_CDMA, null, null, alphal, alphas);
+ super(TAG, CellInfo.TYPE_CDMA, null, null, alphal, alphas);
mNetworkId = nid;
mSystemId = sid;
mBasestationId = bid;
@@ -213,7 +215,7 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
- super.writeToParcel(dest, TYPE_CDMA);
+ super.writeToParcel(dest, CellInfo.TYPE_CDMA);
dest.writeInt(mNetworkId);
dest.writeInt(mSystemId);
dest.writeInt(mBasestationId);
@@ -223,7 +225,7 @@
/** Construct from Parcel, type has already been processed */
private CellIdentityCdma(Parcel in) {
- super(TAG, TYPE_CDMA, in);
+ super(TAG, CellInfo.TYPE_CDMA, in);
mNetworkId = in.readInt();
mSystemId = in.readInt();
mBasestationId = in.readInt();
diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java
index c697880..5c84791 100644
--- a/telephony/java/android/telephony/CellIdentityGsm.java
+++ b/telephony/java/android/telephony/CellIdentityGsm.java
@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.text.TextUtils;
@@ -34,15 +35,18 @@
// 16-bit GSM Cell Identity described in TS 27.007, 0..65535
private final int mCid;
// 16-bit GSM Absolute RF Channel Number
+ @UnsupportedAppUsage
private final int mArfcn;
// 6-bit Base Station Identity Code
+ @UnsupportedAppUsage
private final int mBsic;
/**
* @hide
*/
+ @UnsupportedAppUsage
public CellIdentityGsm() {
- super(TAG, TYPE_GSM, null, null, null, null);
+ super(TAG, CellInfo.TYPE_GSM, null, null, null, null);
mLac = Integer.MAX_VALUE;
mCid = Integer.MAX_VALUE;
mArfcn = Integer.MAX_VALUE;
@@ -92,7 +96,7 @@
*/
public CellIdentityGsm(int lac, int cid, int arfcn, int bsic, String mccStr,
String mncStr, String alphal, String alphas) {
- super(TAG, TYPE_GSM, mccStr, mncStr, alphal, alphas);
+ super(TAG, CellInfo.TYPE_GSM, mccStr, mncStr, alphal, alphas);
mLac = lac;
mCid = cid;
mArfcn = arfcn;
@@ -237,7 +241,7 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
- super.writeToParcel(dest, TYPE_GSM);
+ super.writeToParcel(dest, CellInfo.TYPE_GSM);
dest.writeInt(mLac);
dest.writeInt(mCid);
dest.writeInt(mArfcn);
@@ -246,7 +250,7 @@
/** Construct from Parcel, type has already been processed */
private CellIdentityGsm(Parcel in) {
- super(TAG, TYPE_GSM, in);
+ super(TAG, CellInfo.TYPE_GSM, in);
mLac = in.readInt();
mCid = in.readInt();
mArfcn = in.readInt();
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index 177fced..65c904b 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.text.TextUtils;
@@ -36,6 +37,7 @@
// 16-bit tracking area code
private final int mTac;
// 18-bit Absolute RF Channel Number
+ @UnsupportedAppUsage
private final int mEarfcn;
// cell bandwidth, in kHz
private final int mBandwidth;
@@ -43,8 +45,9 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public CellIdentityLte() {
- super(TAG, TYPE_LTE, null, null, null, null);
+ super(TAG, CellInfo.TYPE_LTE, null, null, null, null);
mCi = Integer.MAX_VALUE;
mPci = Integer.MAX_VALUE;
mTac = Integer.MAX_VALUE;
@@ -62,6 +65,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac) {
this(ci, pci, tac, Integer.MAX_VALUE, Integer.MAX_VALUE, String.valueOf(mcc),
String.valueOf(mnc), null, null);
@@ -99,7 +103,7 @@
*/
public CellIdentityLte(int ci, int pci, int tac, int earfcn, int bandwidth, String mccStr,
String mncStr, String alphal, String alphas) {
- super(TAG, TYPE_LTE, mccStr, mncStr, alphal, alphas);
+ super(TAG, CellInfo.TYPE_LTE, mccStr, mncStr, alphal, alphas);
mCi = ci;
mPci = pci;
mTac = tac;
@@ -241,7 +245,7 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
- super.writeToParcel(dest, TYPE_LTE);
+ super.writeToParcel(dest, CellInfo.TYPE_LTE);
dest.writeInt(mCi);
dest.writeInt(mPci);
dest.writeInt(mTac);
@@ -251,7 +255,7 @@
/** Construct from Parcel, type has already been processed */
private CellIdentityLte(Parcel in) {
- super(TAG, TYPE_LTE, in);
+ super(TAG, CellInfo.TYPE_LTE, in);
mCi = in.readInt();
mPci = in.readInt();
mTac = in.readInt();
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index b99fe46..21b9601 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -40,7 +40,7 @@
* @hide
*/
public CellIdentityTdscdma() {
- super(TAG, TYPE_TDSCDMA, null, null, null, null);
+ super(TAG, CellInfo.TYPE_TDSCDMA, null, null, null, null);
mLac = Integer.MAX_VALUE;
mCid = Integer.MAX_VALUE;
mCpid = Integer.MAX_VALUE;
@@ -75,7 +75,7 @@
*/
public CellIdentityTdscdma(String mcc, String mnc, int lac, int cid, int cpid, int uarfcn,
String alphal, String alphas) {
- super(TAG, TYPE_TDSCDMA, mcc, mnc, alphal, alphas);
+ super(TAG, CellInfo.TYPE_TDSCDMA, mcc, mnc, alphal, alphas);
mLac = lac;
mCid = cid;
mCpid = cpid;
@@ -175,7 +175,7 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
- super.writeToParcel(dest, TYPE_TDSCDMA);
+ super.writeToParcel(dest, CellInfo.TYPE_TDSCDMA);
dest.writeInt(mLac);
dest.writeInt(mCid);
dest.writeInt(mCpid);
@@ -184,7 +184,7 @@
/** Construct from Parcel, type has already been processed */
private CellIdentityTdscdma(Parcel in) {
- super(TAG, TYPE_TDSCDMA, in);
+ super(TAG, CellInfo.TYPE_TDSCDMA, in);
mLac = in.readInt();
mCid = in.readInt();
mCpid = in.readInt();
diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java
index 43f9406..e26fcb3 100644
--- a/telephony/java/android/telephony/CellIdentityWcdma.java
+++ b/telephony/java/android/telephony/CellIdentityWcdma.java
@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.text.TextUtils;
@@ -36,13 +37,14 @@
// 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511
private final int mPsc;
// 16-bit UMTS Absolute RF Channel Number described in TS 25.101 sec. 5.4.4
+ @UnsupportedAppUsage
private final int mUarfcn;
/**
* @hide
*/
public CellIdentityWcdma() {
- super(TAG, TYPE_TDSCDMA, null, null, null, null);
+ super(TAG, CellInfo.TYPE_WCDMA, null, null, null, null);
mLac = Integer.MAX_VALUE;
mCid = Integer.MAX_VALUE;
mPsc = Integer.MAX_VALUE;
@@ -93,7 +95,7 @@
*/
public CellIdentityWcdma (int lac, int cid, int psc, int uarfcn,
String mccStr, String mncStr, String alphal, String alphas) {
- super(TAG, TYPE_WCDMA, mccStr, mncStr, alphal, alphas);
+ super(TAG, CellInfo.TYPE_WCDMA, mccStr, mncStr, alphal, alphas);
mLac = lac;
mCid = cid;
mPsc = psc;
@@ -227,7 +229,7 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
if (DBG) log("writeToParcel(Parcel, int): " + toString());
- super.writeToParcel(dest, TYPE_WCDMA);
+ super.writeToParcel(dest, CellInfo.TYPE_WCDMA);
dest.writeInt(mLac);
dest.writeInt(mCid);
dest.writeInt(mPsc);
@@ -236,7 +238,7 @@
/** Construct from Parcel, type has already been processed */
private CellIdentityWcdma(Parcel in) {
- super(TAG, TYPE_WCDMA, in);
+ super(TAG, CellInfo.TYPE_WCDMA, in);
mLac = in.readInt();
mCid = in.readInt();
mPsc = in.readInt();
diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java
index bffeb17..4fe1b01 100644
--- a/telephony/java/android/telephony/CellInfo.java
+++ b/telephony/java/android/telephony/CellInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -29,29 +30,60 @@
*/
public abstract class CellInfo implements Parcelable {
- // Type fields for parceling
- /** @hide */
- protected static final int TYPE_GSM = 1;
- /** @hide */
- protected static final int TYPE_CDMA = 2;
- /** @hide */
- protected static final int TYPE_LTE = 3;
- /** @hide */
- protected static final int TYPE_WCDMA = 4;
- /** @hide */
- protected static final int TYPE_TDCDMA = 5;
+ /**
+ * Cell identity type
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "TYPE_", value = {TYPE_GSM, TYPE_CDMA, TYPE_LTE, TYPE_WCDMA, TYPE_TDSCDMA})
+ public @interface Type {}
+ /**
+ * Unknown cell identity type
+ * @hide
+ */
+ public static final int TYPE_UNKNOWN = 0;
+ /**
+ * GSM cell identity type
+ * @hide
+ */
+ public static final int TYPE_GSM = 1;
+ /**
+ * CDMA cell identity type
+ * @hide
+ */
+ public static final int TYPE_CDMA = 2;
+ /**
+ * LTE cell identity type
+ * @hide
+ */
+ public static final int TYPE_LTE = 3;
+ /**
+ * WCDMA cell identity type
+ * @hide
+ */
+ public static final int TYPE_WCDMA = 4;
+ /**
+ * TD-SCDMA cell identity type
+ * @hide
+ */
+ public static final int TYPE_TDSCDMA = 5;
// Type to distinguish where time stamp gets recorded.
/** @hide */
+ @UnsupportedAppUsage
public static final int TIMESTAMP_TYPE_UNKNOWN = 0;
/** @hide */
+ @UnsupportedAppUsage
public static final int TIMESTAMP_TYPE_ANTENNA = 1;
/** @hide */
+ @UnsupportedAppUsage
public static final int TIMESTAMP_TYPE_MODEM = 2;
/** @hide */
+ @UnsupportedAppUsage
public static final int TIMESTAMP_TYPE_OEM_RIL = 3;
/** @hide */
+ @UnsupportedAppUsage
public static final int TIMESTAMP_TYPE_JAVA_RIL = 4;
/** @hide */
@@ -158,9 +190,11 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getTimeStampType() {
return mTimeStampType;
}
+
/** @hide */
public void setTimeStampType(int timeStampType) {
if (timeStampType < TIMESTAMP_TYPE_UNKNOWN || timeStampType > TIMESTAMP_TYPE_JAVA_RIL) {
@@ -196,6 +230,7 @@
}
}
+ @UnsupportedAppUsage
private static String timeStampTypeToString(int type) {
switch (type) {
case 1:
@@ -272,7 +307,7 @@
case TYPE_CDMA: return CellInfoCdma.createFromParcelBody(in);
case TYPE_LTE: return CellInfoLte.createFromParcelBody(in);
case TYPE_WCDMA: return CellInfoWcdma.createFromParcelBody(in);
- case TYPE_TDCDMA: return CellInfoTdscdma.createFromParcelBody(in);
+ case TYPE_TDSCDMA: return CellInfoTdscdma.createFromParcelBody(in);
default: throw new RuntimeException("Bad CellInfo Parcel");
}
}
diff --git a/telephony/java/android/telephony/CellInfoCdma.java b/telephony/java/android/telephony/CellInfoCdma.java
index 8b8d1bb..f67733d 100644
--- a/telephony/java/android/telephony/CellInfoCdma.java
+++ b/telephony/java/android/telephony/CellInfoCdma.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
@@ -32,6 +33,7 @@
private CellSignalStrengthCdma mCellSignalStrengthCdma;
/** @hide */
+ @UnsupportedAppUsage
public CellInfoCdma() {
super();
mCellIdentityCdma = new CellIdentityCdma();
@@ -39,6 +41,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public CellInfoCdma(CellInfoCdma ci) {
super(ci);
this.mCellIdentityCdma = ci.mCellIdentityCdma.copy();
@@ -50,6 +53,7 @@
return mCellIdentityCdma;
}
/** @hide */
+ @UnsupportedAppUsage
public void setCellIdentity(CellIdentityCdma cid) {
mCellIdentityCdma = cid;
}
diff --git a/telephony/java/android/telephony/CellInfoGsm.java b/telephony/java/android/telephony/CellInfoGsm.java
index f7af1b2..7211de1 100644
--- a/telephony/java/android/telephony/CellInfoGsm.java
+++ b/telephony/java/android/telephony/CellInfoGsm.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
@@ -32,6 +33,7 @@
private CellSignalStrengthGsm mCellSignalStrengthGsm;
/** @hide */
+ @UnsupportedAppUsage
public CellInfoGsm() {
super();
mCellIdentityGsm = new CellIdentityGsm();
diff --git a/telephony/java/android/telephony/CellInfoLte.java b/telephony/java/android/telephony/CellInfoLte.java
index 97d856e..389f643 100644
--- a/telephony/java/android/telephony/CellInfoLte.java
+++ b/telephony/java/android/telephony/CellInfoLte.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
@@ -32,6 +33,7 @@
private CellSignalStrengthLte mCellSignalStrengthLte;
/** @hide */
+ @UnsupportedAppUsage
public CellInfoLte() {
super();
mCellIdentityLte = new CellIdentityLte();
@@ -51,6 +53,7 @@
return mCellIdentityLte;
}
/** @hide */
+ @UnsupportedAppUsage
public void setCellIdentity(CellIdentityLte cid) {
if (DBG) log("setCellIdentity: " + cid);
mCellIdentityLte = cid;
@@ -62,6 +65,7 @@
return mCellSignalStrengthLte;
}
/** @hide */
+ @UnsupportedAppUsage
public void setCellSignalStrength(CellSignalStrengthLte css) {
if (DBG) log("setCellSignalStrength: " + css);
mCellSignalStrengthLte = css;
diff --git a/telephony/java/android/telephony/CellInfoTdscdma.java b/telephony/java/android/telephony/CellInfoTdscdma.java
index 4fb1bce..40cadde 100644
--- a/telephony/java/android/telephony/CellInfoTdscdma.java
+++ b/telephony/java/android/telephony/CellInfoTdscdma.java
@@ -110,7 +110,7 @@
/** Implement the Parcelable interface */
@Override
public void writeToParcel(Parcel dest, int flags) {
- super.writeToParcel(dest, flags, TYPE_TDCDMA);
+ super.writeToParcel(dest, flags, TYPE_TDSCDMA);
mCellIdentityTdscdma.writeToParcel(dest, flags);
mCellSignalStrengthTdscdma.writeToParcel(dest, flags);
}
diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java
index 5bcaa6e..0133153 100644
--- a/telephony/java/android/telephony/CellLocation.java
+++ b/telephony/java/android/telephony/CellLocation.java
@@ -20,6 +20,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.annotation.UnsupportedAppUsage;
import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
import com.android.internal.telephony.ITelephony;
@@ -57,6 +58,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static CellLocation newFromBundle(Bundle bundle) {
// TelephonyManager.getDefault().getCurrentPhoneType() handles the case when
// ITelephony interface is not up yet.
@@ -73,11 +75,13 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public abstract void fillInNotifierBundle(Bundle bundle);
/**
* @hide
*/
+ @UnsupportedAppUsage
public abstract boolean isEmpty();
/**
diff --git a/telephony/java/android/telephony/CellSignalStrengthGsm.java b/telephony/java/android/telephony/CellSignalStrengthGsm.java
index cff159b..1e8d119 100644
--- a/telephony/java/android/telephony/CellSignalStrengthGsm.java
+++ b/telephony/java/android/telephony/CellSignalStrengthGsm.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
@@ -34,11 +35,15 @@
private static final int GSM_SIGNAL_STRENGTH_GOOD = 8;
private static final int GSM_SIGNAL_STRENGTH_MODERATE = 5;
+ @UnsupportedAppUsage
private int mSignalStrength; // in ASU; Valid values are (0-31, 99) as defined in TS 27.007 8.5
+ @UnsupportedAppUsage
private int mBitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5
+ @UnsupportedAppUsage
private int mTimingAdvance; // range from 0-219 or Integer.MAX_VALUE if unknown
/** @hide */
+ @UnsupportedAppUsage
public CellSignalStrengthGsm() {
setDefaultValues();
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 2f059f4..ed7d4b2 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
@@ -30,14 +31,21 @@
private static final String LOG_TAG = "CellSignalStrengthLte";
private static final boolean DBG = false;
+ @UnsupportedAppUsage
private int mSignalStrength;
+ @UnsupportedAppUsage
private int mRsrp;
+ @UnsupportedAppUsage
private int mRsrq;
+ @UnsupportedAppUsage
private int mRssnr;
+ @UnsupportedAppUsage
private int mCqi;
+ @UnsupportedAppUsage
private int mTimingAdvance;
/** @hide */
+ @UnsupportedAppUsage
public CellSignalStrengthLte() {
setDefaultValues();
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthWcdma.java b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
index 21cf0be..66e0882 100644
--- a/telephony/java/android/telephony/CellSignalStrengthWcdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
@@ -34,8 +35,10 @@
private static final int WCDMA_SIGNAL_STRENGTH_GOOD = 8;
private static final int WCDMA_SIGNAL_STRENGTH_MODERATE = 5;
+ @UnsupportedAppUsage
private int mSignalStrength; // in ASU; Valid values are (0-31, 99) as defined in TS 27.007 8.5
// or Integer.MAX_VALUE if unknown
+ @UnsupportedAppUsage
private int mBitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5 or
// Integer.MAX_VALUE if unknown
private int mRscp; // bit error rate (0-96, 255) as defined in TS 27.007 8.69 or
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 4fa304a..ee5cdc2 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -16,6 +16,8 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Contains disconnect call causes generated by the framework and the RIL.
* @hide
@@ -329,6 +331,7 @@
}
/** Returns descriptive string for the specified disconnect cause. */
+ @UnsupportedAppUsage
public static String toString(int cause) {
switch (cause) {
case NOT_DISCONNECTED:
diff --git a/telephony/java/android/telephony/ModemInfo.java b/telephony/java/android/telephony/ModemInfo.java
new file mode 100644
index 0000000..564effe
--- /dev/null
+++ b/telephony/java/android/telephony/ModemInfo.java
@@ -0,0 +1,104 @@
+/*
+ * 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.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+/**
+ * Information of a single logical modem indicating
+ * its id, supported rats and whether it supports voice or data, etc.
+ * @hide
+ */
+public class ModemInfo implements Parcelable {
+ public final int modemId;
+ public final int rat; /* bitset */
+ public final boolean isVoiceSupported;
+ public final boolean isDataSupported;
+
+ public ModemInfo(int modemId, int rat, boolean isVoiceSupported, boolean isDataSupported) {
+ this.modemId = modemId;
+ this.rat = rat;
+ this.isVoiceSupported = isVoiceSupported;
+ this.isDataSupported = isDataSupported;
+ }
+
+ public ModemInfo(Parcel in) {
+ modemId = in.readInt();
+ rat = in.readInt();
+ isVoiceSupported = in.readBoolean();
+ isDataSupported = in.readBoolean();
+ }
+
+ @Override
+ public String toString() {
+ return "modemId=" + modemId + " rat=" + rat + " isVoiceSupported:" + isVoiceSupported
+ + " isDataSupported:" + isDataSupported;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modemId, rat, isVoiceSupported, isDataSupported);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || !(o instanceof ModemInfo) || hashCode() != o.hashCode()) {
+ return false;
+ }
+
+ if (this == o) {
+ return true;
+ }
+
+ ModemInfo s = (ModemInfo) o;
+
+ return (modemId == s.modemId
+ && rat == s.rat
+ && isVoiceSupported == s.isVoiceSupported
+ && isDataSupported == s.isDataSupported);
+ }
+
+ /**
+ * {@link Parcelable#describeContents}
+ */
+ public @ContentsFlags int describeContents() {
+ return 0;
+ }
+
+ /**
+ * {@link Parcelable#writeToParcel}
+ */
+ public void writeToParcel(Parcel dest, @WriteFlags int flags) {
+ dest.writeInt(modemId);
+ dest.writeInt(rat);
+ dest.writeBoolean(isVoiceSupported);
+ dest.writeBoolean(isDataSupported);
+ }
+
+ public static final Parcelable.Creator<ModemInfo> CREATOR = new Parcelable.Creator() {
+ public ModemInfo createFromParcel(Parcel in) {
+ return new ModemInfo(in);
+ }
+
+ public ModemInfo[] newArray(int size) {
+ return new ModemInfo[size];
+ }
+ };
+}
diff --git a/telephony/java/android/telephony/NeighboringCellInfo.java b/telephony/java/android/telephony/NeighboringCellInfo.java
index 25851e3..8e99518 100644
--- a/telephony/java/android/telephony/NeighboringCellInfo.java
+++ b/telephony/java/android/telephony/NeighboringCellInfo.java
@@ -16,16 +16,17 @@
package android.telephony;
-import android.os.Parcel;
-import android.os.Parcelable;
-import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN;
import static android.telephony.TelephonyManager.NETWORK_TYPE_EDGE;
import static android.telephony.TelephonyManager.NETWORK_TYPE_GPRS;
-import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS;
import static android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA;
-import static android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA;
import static android.telephony.TelephonyManager.NETWORK_TYPE_HSPA;
+import static android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA;
+import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS;
+import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN;
+import android.annotation.UnsupportedAppUsage;
+import android.os.Parcel;
+import android.os.Parcelable;
/**
@@ -47,24 +48,29 @@
* In GSM, mRssi is the Received RSSI;
* In UMTS, mRssi is the Level index of CPICH Received Signal Code Power
*/
+ @UnsupportedAppUsage
private int mRssi;
/**
* CID in 16 bits format in GSM. Return UNKNOWN_CID in UMTS and CMDA.
*/
+ @UnsupportedAppUsage
private int mCid;
/**
* LAC in 16 bits format in GSM. Return UNKNOWN_CID in UMTS and CMDA.
*/
+ @UnsupportedAppUsage
private int mLac;
/**
* Primary Scrambling Code in 9 bits format in UMTS
* Return UNKNOWN_CID in GSM and CMDA.
*/
+ @UnsupportedAppUsage
private int mPsc;
/**
* Radio network type, value is one of following
* TelephonyManager.NETWORK_TYPE_XXXXXX.
*/
+ @UnsupportedAppUsage
private int mNetworkType;
/**
@@ -100,6 +106,39 @@
mCid = cid;
}
+ /** @hide */
+ public NeighboringCellInfo(final CellInfoGsm info) {
+ mNetworkType = TelephonyManager.NETWORK_TYPE_GPRS;
+
+ mRssi = info.getCellSignalStrength().getAsuLevel();
+ if (mRssi == Integer.MAX_VALUE) mRssi = UNKNOWN_RSSI;
+
+ mLac = info.getCellIdentity().getLac();
+ if (mLac == Integer.MAX_VALUE) mLac = UNKNOWN_CID;
+
+ mCid = info.getCellIdentity().getCid();
+ if (mCid == Integer.MAX_VALUE) mCid = UNKNOWN_CID;
+
+ mPsc = UNKNOWN_CID;
+ }
+
+ /** @hide */
+ public NeighboringCellInfo(final CellInfoWcdma info) {
+ mNetworkType = TelephonyManager.NETWORK_TYPE_UMTS;
+
+ mRssi = info.getCellSignalStrength().getAsuLevel();
+ if (mRssi == Integer.MAX_VALUE) mRssi = UNKNOWN_RSSI;
+
+ mLac = info.getCellIdentity().getLac();
+ if (mLac == Integer.MAX_VALUE) mLac = UNKNOWN_CID;
+
+ mCid = info.getCellIdentity().getCid();
+ if (mCid == Integer.MAX_VALUE) mCid = UNKNOWN_CID;
+
+ mPsc = info.getCellIdentity().getPsc();
+ if (mPsc == Integer.MAX_VALUE) mPsc = UNKNOWN_CID;
+ }
+
/**
* Initialize the object from rssi, location string, and radioType
* radioType is one of following
diff --git a/telephony/java/android/telephony/PhoneCapability.aidl b/telephony/java/android/telephony/PhoneCapability.aidl
new file mode 100644
index 0000000..5de8d4a
--- /dev/null
+++ b/telephony/java/android/telephony/PhoneCapability.aidl
@@ -0,0 +1,20 @@
+/*
+**
+** 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 may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.telephony;
+
+parcelable PhoneCapability;
\ No newline at end of file
diff --git a/telephony/java/android/telephony/PhoneCapability.java b/telephony/java/android/telephony/PhoneCapability.java
new file mode 100644
index 0000000..2ebfa53
--- /dev/null
+++ b/telephony/java/android/telephony/PhoneCapability.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.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Define capability of a modem group. That is, the capabilities
+ * are shared between those modems defined by list of modem IDs.
+ * @hide
+ */
+public class PhoneCapability implements Parcelable {
+ public final int maxActiveVoiceCalls;
+ public final int maxActiveData;
+ public final int max5G;
+ public final List<ModemInfo> logicalModemList;
+
+ public PhoneCapability(int maxActiveVoiceCalls, int maxActiveData, int max5G,
+ List<ModemInfo> logicalModemList) {
+ this.maxActiveVoiceCalls = maxActiveVoiceCalls;
+ this.maxActiveData = maxActiveData;
+ this.max5G = max5G;
+ // Make sure it's not null.
+ this.logicalModemList = logicalModemList == null ? new ArrayList<>() : logicalModemList;
+ }
+
+ @Override
+ public String toString() {
+ return "maxActiveVoiceCalls=" + maxActiveVoiceCalls + " maxActiveData=" + maxActiveData
+ + " max5G=" + max5G + "logicalModemList:"
+ + Arrays.toString(logicalModemList.toArray());
+ }
+
+ private PhoneCapability(Parcel in) {
+ maxActiveVoiceCalls = in.readInt();
+ maxActiveData = in.readInt();
+ max5G = in.readInt();
+ logicalModemList = new ArrayList<>();
+ in.readList(logicalModemList, ModemInfo.class.getClassLoader());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(maxActiveVoiceCalls, maxActiveData, max5G, logicalModemList);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || !(o instanceof PhoneCapability) || hashCode() != o.hashCode()) {
+ return false;
+ }
+
+ if (this == o) {
+ return true;
+ }
+
+ PhoneCapability s = (PhoneCapability) o;
+
+ return (maxActiveVoiceCalls == s.maxActiveVoiceCalls
+ && maxActiveData == s.maxActiveData
+ && max5G == s.max5G
+ && logicalModemList.equals(s.logicalModemList));
+ }
+
+ /**
+ * {@link Parcelable#describeContents}
+ */
+ public @Parcelable.ContentsFlags int describeContents() {
+ return 0;
+ }
+
+ /**
+ * {@link Parcelable#writeToParcel}
+ */
+ public void writeToParcel(Parcel dest, @Parcelable.WriteFlags int flags) {
+ dest.writeInt(maxActiveVoiceCalls);
+ dest.writeInt(maxActiveData);
+ dest.writeInt(max5G);
+ dest.writeList(logicalModemList);
+ }
+
+ public static final Parcelable.Creator<PhoneCapability> CREATOR = new Parcelable.Creator() {
+ public PhoneCapability createFromParcel(Parcel in) {
+ return new PhoneCapability(in);
+ }
+
+ public PhoneCapability[] newArray(int size) {
+ return new PhoneCapability[size];
+ }
+ };
+}
diff --git a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
index f7dee99..ac6bcaa 100644
--- a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
+++ b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
@@ -19,6 +19,7 @@
import com.android.i18n.phonenumbers.AsYouTypeFormatter;
import com.android.i18n.phonenumbers.PhoneNumberUtil;
+import android.annotation.UnsupportedAppUsage;
import android.telephony.PhoneNumberUtils;
import android.text.Editable;
import android.text.Selection;
@@ -50,6 +51,7 @@
*/
private boolean mStopFormatting;
+ @UnsupportedAppUsage
private AsYouTypeFormatter mFormatter;
/**
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index fadfc91..f6e8d34 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -23,6 +23,7 @@
import com.android.i18n.phonenumbers.ShortNumberInfo;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
@@ -279,6 +280,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String extractNetworkPortionAlt(String phoneNumber) {
if (phoneNumber == null) {
return null;
@@ -352,6 +354,7 @@
* RFC 3601 says pause is 'p' and tonewait is 'w'.
* @hide
*/
+ @UnsupportedAppUsage
public static String convertPreDial(String phoneNumber) {
if (phoneNumber == null) {
return null;
@@ -464,6 +467,7 @@
/**
* @hide only for testing.
*/
+ @UnsupportedAppUsage
public static boolean compare(String a, String b, boolean useStrictComparation) {
return (useStrictComparation ? compareStrictly(a, b) : compareLoosely(a, b));
}
@@ -482,6 +486,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean
compareLoosely(String a, String b) {
int ia, ib;
@@ -579,6 +584,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static boolean
compareStrictly(String a, String b) {
return compareStrictly(a, b, true);
@@ -587,6 +593,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public static boolean
compareStrictly(String a, String b, boolean acceptInvalidCCCPrefix) {
if (a == null || b == null) {
@@ -1260,6 +1267,7 @@
* @deprecated Use link #formatNumber(String phoneNumber, String defaultCountryIso) instead
*/
@Deprecated
+ @UnsupportedAppUsage
public static String formatNumber(String source, int defaultFormattingType) {
SpannableStringBuilder text = new SpannableStringBuilder(source);
formatNumber(text, defaultFormattingType);
@@ -1720,6 +1728,7 @@
//
// However, in order to loose match 650-555-1212 and 555-1212, we need to set the min match
// to 7.
+ @UnsupportedAppUsage
static final int MIN_MATCH = 7;
/**
@@ -1744,6 +1753,7 @@
* listed in the RIL / SIM, otherwise return false.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isEmergencyNumber(int subId, String number) {
// Return true only if the specified number *exactly* matches
// one of the emergency numbers listed by the RIL / SIM.
@@ -1794,6 +1804,7 @@
* same digits as any of those emergency numbers.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isPotentialEmergencyNumber(int subId, String number) {
// Check against the emergency numbers listed by the RIL / SIM,
// and *don't* require an exact match.
@@ -1858,6 +1869,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isEmergencyNumber(String number, String defaultCountryIso) {
return isEmergencyNumber(getDefaultVoiceSubId(), number, defaultCountryIso);
}
@@ -2081,6 +2093,7 @@
* is currently in.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isLocalEmergencyNumber(Context context, int subId, String number) {
return isLocalEmergencyNumberInternal(subId, number,
context,
@@ -2109,6 +2122,7 @@
* @see android.location.CountryDetector
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isPotentialLocalEmergencyNumber(Context context, String number) {
return isPotentialLocalEmergencyNumber(context, getDefaultVoiceSubId(), number);
}
@@ -2135,6 +2149,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isPotentialLocalEmergencyNumber(Context context, int subId,
String number) {
return isLocalEmergencyNumberInternal(subId, number,
@@ -2244,6 +2259,7 @@
* to read the VM number.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isVoiceMailNumber(Context context, int subId, String number) {
String vmNumber, mdn;
try {
@@ -2390,6 +2406,7 @@
*
* @hide TODO: pending API Council approval
*/
+ @UnsupportedAppUsage
public static String cdmaCheckAndProcessPlusCode(String dialStr) {
if (!TextUtils.isEmpty(dialStr)) {
if (isReallyDialable(dialStr.charAt(0)) &&
@@ -2569,6 +2586,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static CharSequence ttsSpanAsPhoneNumber(CharSequence phoneNumber) {
return createTtsSpannable(phoneNumber);
}
@@ -2680,6 +2698,7 @@
* i.e. NXX-NXX-XXXX, N is any digit 2-9 and X is any digit 0-9
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isNanp (String dialStr) {
boolean retVal = false;
if (dialStr != null) {
@@ -2727,6 +2746,7 @@
* @param number
* @return true if number contains @
*/
+ @UnsupportedAppUsage
public static boolean isUriNumber(String number) {
// Note we allow either "@" or "%40" to indicate a URI, in case
// the passed-in string is URI-escaped. (Neither "@" nor "%40"
@@ -2744,6 +2764,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String getUsernameFromUriNumber(String number) {
// The delimiter between username and domain name can be
// either "@" or "%40" (the URI-escaped equivalent.)
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 8420165..bd6a59d 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -17,16 +17,16 @@
package android.telephony;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
-import android.telecom.TelecomManager;
import com.android.internal.telephony.IPhoneStateListener;
-import java.util.List;
import java.lang.ref.WeakReference;
+import java.util.List;
/**
* A listener class for monitoring changes in specific telephony states
@@ -171,6 +171,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final int LISTEN_PRECISE_CALL_STATE = 0x00000800;
/**
@@ -271,11 +272,20 @@
*/
public static final int LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 0x00100000;
+ /**
+ * Listen for changes to the phone capability.
+ *
+ * @see #onPhoneCapabilityChanged
+ * @hide
+ */
+ public static final int LISTEN_PHONE_CAPABILITY_CHANGE = 0x00200000;
+
/*
* Subscription used to listen to the phone state changes
* @hide
*/
/** @hide */
+ @UnsupportedAppUsage
protected Integer mSubId;
private final Handler mHandler;
@@ -293,6 +303,7 @@
* using a particular non-null Looper.
* @hide
*/
+ @UnsupportedAppUsage
public PhoneStateListener(Looper looper) {
this(null, looper);
}
@@ -303,6 +314,7 @@
* own non-null Looper use PhoneStateListener(int subId, Looper looper) below.
* @hide
*/
+ @UnsupportedAppUsage
public PhoneStateListener(Integer subId) {
this(subId, Looper.myLooper());
}
@@ -312,6 +324,7 @@
* and non-null Looper.
* @hide
*/
+ @UnsupportedAppUsage
public PhoneStateListener(Integer subId, Looper looper) {
if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
mSubId = subId;
@@ -389,6 +402,10 @@
PhoneStateListener.this.onPhysicalChannelConfigurationChanged(
(List<PhysicalChannelConfig>)msg.obj);
break;
+ case LISTEN_PHONE_CAPABILITY_CHANGE:
+ PhoneStateListener.this.onPhoneCapabilityChanged(
+ (PhoneCapability) msg.obj);
+ break;
}
}
};
@@ -515,6 +532,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void onOtaspChanged(int otaspMode) {
// default implementation empty
}
@@ -532,6 +550,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void onPreciseCallStateChanged(PreciseCallState callState) {
// default implementation empty
}
@@ -541,6 +560,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void onPreciseDataConnectionStateChanged(
PreciseDataConnectionState dataConnectionState) {
// default implementation empty
@@ -551,6 +571,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void onDataConnectionRealTimeInfoChanged(
DataConnectionRealTimeInfo dcRtInfo) {
// default implementation empty
@@ -562,6 +583,7 @@
* @param stateInfo is the current LTE network information
* @hide
*/
+ @UnsupportedAppUsage
public void onVoLteServiceStateChanged(VoLteServiceState stateInfo) {
}
@@ -608,11 +630,22 @@
* @param rawData is the byte array of the OEM hook raw data.
* @hide
*/
+ @UnsupportedAppUsage
public void onOemHookRawEvent(byte[] rawData) {
// default implementation empty
}
/**
+ * Callback invoked when phone capability changes. Requires
+ * the READ_PRIVILEGED_PHONE_STATE permission.
+ * @param capability the new phone capability
+ * @hide
+ */
+ public void onPhoneCapabilityChanged(PhoneCapability capability) {
+ // default implementation empty
+ }
+
+ /**
* Callback invoked when telephony has received notice from a carrier
* app that a network action that could result in connectivity loss
* has been requested by an app using
@@ -739,8 +772,13 @@
public void onPhysicalChannelConfigurationChanged(List<PhysicalChannelConfig> configs) {
send(LISTEN_PHYSICAL_CHANNEL_CONFIGURATION, 0, 0, configs);
}
+
+ public void onPhoneCapabilityChanged(PhoneCapability capability) {
+ send(LISTEN_PHONE_CAPABILITY_CHANGE, 0, 0, capability);
+ }
}
+ @UnsupportedAppUsage
IPhoneStateListener callback = new IPhoneStateListenerStub(this);
private void log(String s) {
diff --git a/telephony/java/android/telephony/PreciseCallState.java b/telephony/java/android/telephony/PreciseCallState.java
index f246416..ed5c26a 100644
--- a/telephony/java/android/telephony/PreciseCallState.java
+++ b/telephony/java/android/telephony/PreciseCallState.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.DisconnectCause;
@@ -71,6 +72,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public PreciseCallState(int ringingCall, int foregroundCall, int backgroundCall,
int disconnectCause, int preciseDisconnectCause) {
mRingingCallState = ringingCall;
@@ -113,6 +115,7 @@
* @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED
* @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING
*/
+ @UnsupportedAppUsage
public int getRingingCallState() {
return mRingingCallState;
}
@@ -131,6 +134,7 @@
* @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED
* @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING
*/
+ @UnsupportedAppUsage
public int getForegroundCallState() {
return mForegroundCallState;
}
@@ -149,6 +153,7 @@
* @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED
* @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING
*/
+ @UnsupportedAppUsage
public int getBackgroundCallState() {
return mBackgroundCallState;
}
@@ -195,6 +200,7 @@
* @see DisconnectCause#CDMA_ACCESS_BLOCKED
* @see DisconnectCause#ERROR_UNSPECIFIED
*/
+ @UnsupportedAppUsage
public int getDisconnectCause() {
return mDisconnectCause;
}
@@ -233,6 +239,7 @@
* @see PreciseDisconnectCause#CDMA_ACCESS_BLOCKED
* @see PreciseDisconnectCause#ERROR_UNSPECIFIED
*/
+ @UnsupportedAppUsage
public int getPreciseDisconnectCause() {
return mPreciseDisconnectCause;
}
diff --git a/telephony/java/android/telephony/PreciseDataConnectionState.java b/telephony/java/android/telephony/PreciseDataConnectionState.java
index 31c9a9e..b258f52 100644
--- a/telephony/java/android/telephony/PreciseDataConnectionState.java
+++ b/telephony/java/android/telephony/PreciseDataConnectionState.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.TelephonyManager;
@@ -53,6 +54,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public PreciseDataConnectionState(int state, int networkType,
String apnType, String apn, String reason,
LinkProperties linkProperties, String failCause) {
@@ -95,6 +97,7 @@
* @see TelephonyManager#DATA_CONNECTED
* @see TelephonyManager#DATA_SUSPENDED
*/
+ @UnsupportedAppUsage
public int getDataConnectionState() {
return mState;
}
@@ -119,6 +122,7 @@
* @see TelephonyManager#NETWORK_TYPE_EHRPD
* @see TelephonyManager#NETWORK_TYPE_HSPAP
*/
+ @UnsupportedAppUsage
public int getDataConnectionNetworkType() {
return mNetworkType;
}
@@ -126,6 +130,7 @@
/**
* Get data connection APN type
*/
+ @UnsupportedAppUsage
public String getDataConnectionAPNType() {
return mAPNType;
}
@@ -133,6 +138,7 @@
/**
* Get data connection APN.
*/
+ @UnsupportedAppUsage
public String getDataConnectionAPN() {
return mAPN;
}
@@ -140,6 +146,7 @@
/**
* Get data connection change reason.
*/
+ @UnsupportedAppUsage
public String getDataConnectionChangeReason() {
return mReason;
}
@@ -147,6 +154,7 @@
/**
* Get the properties of the network link.
*/
+ @UnsupportedAppUsage
public LinkProperties getDataConnectionLinkProperties() {
return mLinkProperties;
}
@@ -154,6 +162,7 @@
/**
* Get data connection fail cause, in case there was a failure.
*/
+ @UnsupportedAppUsage
public String getDataConnectionFailCause() {
return mFailCause;
}
diff --git a/telephony/java/android/telephony/PreciseDisconnectCause.java b/telephony/java/android/telephony/PreciseDisconnectCause.java
index 46e2adb..2acaf34 100644
--- a/telephony/java/android/telephony/PreciseDisconnectCause.java
+++ b/telephony/java/android/telephony/PreciseDisconnectCause.java
@@ -332,6 +332,8 @@
public static final int SIP_NOT_REACHABLE = 1320;
/** Others */
public static final int SIP_CLIENT_ERROR = 1321;
+ /** 481 : Transaction Does Not Exist */
+ public static final int SIP_TRANSACTION_DOES_NOT_EXIST = 1322;
/** 5xx responses
* 501 : Server Internal Error
*/
diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java
index d657bae..1d79988 100644
--- a/telephony/java/android/telephony/RadioAccessFamily.java
+++ b/telephony/java/android/telephony/RadioAccessFamily.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -77,6 +78,7 @@
* in RadioAccessFamily. It's a bit mask value to represent
* the support type.
*/
+ @UnsupportedAppUsage
public RadioAccessFamily(int phoneId, int radioAccessFamily) {
mPhoneId = phoneId;
mRadioAccessFamily = radioAccessFamily;
@@ -87,6 +89,7 @@
*
* @return phone ID
*/
+ @UnsupportedAppUsage
public int getPhoneId() {
return mPhoneId;
}
@@ -96,6 +99,7 @@
*
* @return radio access family
*/
+ @UnsupportedAppUsage
public int getRadioAccessFamily() {
return mRadioAccessFamily;
}
@@ -150,6 +154,7 @@
}
};
+ @UnsupportedAppUsage
public static int getRafFromNetworkType(int type) {
int raf;
@@ -263,6 +268,7 @@
return TelephonyManager.NETWORK_CLASS_UNKNOWN;
}
+ @UnsupportedAppUsage
public static int getNetworkTypeFromRaf(int raf) {
int type;
diff --git a/telephony/java/android/telephony/Rlog.java b/telephony/java/android/telephony/Rlog.java
index e0b46e1..5f2fa33 100644
--- a/telephony/java/android/telephony/Rlog.java
+++ b/telephony/java/android/telephony/Rlog.java
@@ -20,6 +20,7 @@
import android.text.TextUtils;
import android.util.Log;
+import android.annotation.UnsupportedAppUsage;
import android.util.Base64;
import java.security.MessageDigest;
@@ -38,6 +39,7 @@
private Rlog() {
}
+ @UnsupportedAppUsage
public static int v(String tag, String msg) {
return Log.println_native(Log.LOG_ID_RADIO, Log.VERBOSE, tag, msg);
}
@@ -47,28 +49,34 @@
msg + '\n' + Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int d(String tag, String msg) {
return Log.println_native(Log.LOG_ID_RADIO, Log.DEBUG, tag, msg);
}
+ @UnsupportedAppUsage
public static int d(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_RADIO, Log.DEBUG, tag,
msg + '\n' + Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int i(String tag, String msg) {
return Log.println_native(Log.LOG_ID_RADIO, Log.INFO, tag, msg);
}
+ @UnsupportedAppUsage
public static int i(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_RADIO, Log.INFO, tag,
msg + '\n' + Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int w(String tag, String msg) {
return Log.println_native(Log.LOG_ID_RADIO, Log.WARN, tag, msg);
}
+ @UnsupportedAppUsage
public static int w(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_RADIO, Log.WARN, tag,
msg + '\n' + Log.getStackTraceString(tr));
@@ -78,10 +86,12 @@
return Log.println_native(Log.LOG_ID_RADIO, Log.WARN, tag, Log.getStackTraceString(tr));
}
+ @UnsupportedAppUsage
public static int e(String tag, String msg) {
return Log.println_native(Log.LOG_ID_RADIO, Log.ERROR, tag, msg);
}
+ @UnsupportedAppUsage
public static int e(String tag, String msg, Throwable tr) {
return Log.println_native(Log.LOG_ID_RADIO, Log.ERROR, tag,
msg + '\n' + Log.getStackTraceString(tr));
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 9e8529e..2ee1a09 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -169,6 +170,7 @@
* IWLAN
* @hide
*/
+ @UnsupportedAppUsage
public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18;
/**
@@ -233,6 +235,7 @@
private String mDataOperatorAlphaLong;
private String mDataOperatorAlphaShort;
private String mDataOperatorNumeric;
+ @UnsupportedAppUsage
private boolean mIsManualNetworkSelection;
private boolean mIsEmergencyOnly;
@@ -240,16 +243,24 @@
private int mRilVoiceRadioTechnology;
private int mRilDataRadioTechnology;
+ @UnsupportedAppUsage
private boolean mCssIndicator;
+ @UnsupportedAppUsage
private int mNetworkId;
+ @UnsupportedAppUsage
private int mSystemId;
+ @UnsupportedAppUsage
private int mCdmaRoamingIndicator;
+ @UnsupportedAppUsage
private int mCdmaDefaultRoamingIndicator;
+ @UnsupportedAppUsage
private int mCdmaEriIconIndex;
+ @UnsupportedAppUsage
private int mCdmaEriIconMode;
private boolean mIsDataRoamingFromRegistration;
+ @UnsupportedAppUsage
private boolean mIsUsingCarrierAggregation;
private int mChannelNumber;
@@ -294,6 +305,7 @@
* @return newly created ServiceState
* @hide
*/
+ @UnsupportedAppUsage
public static ServiceState newFromBundle(Bundle m) {
ServiceState ret;
ret = new ServiceState();
@@ -442,6 +454,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getVoiceRegState() {
return mVoiceRegState;
}
@@ -456,6 +469,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getDataRegState() {
return mDataRegState;
}
@@ -516,6 +530,7 @@
* @return roaming status
* @hide
*/
+ @UnsupportedAppUsage
public boolean getVoiceRoaming() {
return mVoiceRoamingType != ROAMING_TYPE_NOT_ROAMING;
}
@@ -525,6 +540,7 @@
* @return roaming type
* @hide
*/
+ @UnsupportedAppUsage
public int getVoiceRoamingType() {
return mVoiceRoamingType;
}
@@ -534,6 +550,7 @@
* @return roaming type
* @hide
*/
+ @UnsupportedAppUsage
public boolean getDataRoaming() {
return mDataRoamingType != ROAMING_TYPE_NOT_ROAMING;
}
@@ -545,6 +562,7 @@
* once the data registration phase has completed.
* @hide
*/
+ @UnsupportedAppUsage
public void setDataRoamingFromRegistration(boolean dataRoaming) {
mIsDataRoamingFromRegistration = dataRoaming;
}
@@ -563,6 +581,7 @@
* @return roaming type
* @hide
*/
+ @UnsupportedAppUsage
public int getDataRoamingType() {
return mDataRoamingType;
}
@@ -570,6 +589,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public boolean isEmergencyOnly() {
return mIsEmergencyOnly;
}
@@ -577,6 +597,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getCdmaRoamingIndicator(){
return this.mCdmaRoamingIndicator;
}
@@ -584,6 +605,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getCdmaDefaultRoamingIndicator(){
return this.mCdmaDefaultRoamingIndicator;
}
@@ -591,6 +613,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getCdmaEriIconIndex() {
return this.mCdmaEriIconIndex;
}
@@ -598,6 +621,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int getCdmaEriIconMode() {
return this.mCdmaEriIconMode;
}
@@ -619,6 +643,7 @@
* @return long name of operator
* @hide
*/
+ @UnsupportedAppUsage
public String getVoiceOperatorAlphaLong() {
return mVoiceOperatorAlphaLong;
}
@@ -648,6 +673,7 @@
* @return short name of operator, null if unregistered or unknown
* @hide
*/
+ @UnsupportedAppUsage
public String getVoiceOperatorAlphaShort() {
return mVoiceOperatorAlphaShort;
}
@@ -657,6 +683,7 @@
* @return short name of operator, null if unregistered or unknown
* @hide
*/
+ @UnsupportedAppUsage
public String getDataOperatorAlphaShort() {
return mDataOperatorAlphaShort;
}
@@ -700,6 +727,7 @@
* @return numeric format of operator, null if unregistered or unknown
* @hide
*/
+ @UnsupportedAppUsage
public String getVoiceOperatorNumeric() {
return mVoiceOperatorNumeric;
}
@@ -709,6 +737,7 @@
* @return numeric format of operator, null if unregistered or unknown
* @hide
*/
+ @UnsupportedAppUsage
public String getDataOperatorNumeric() {
return mDataOperatorNumeric;
}
@@ -794,6 +823,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String rilRadioTechnologyToString(int rt) {
String rtString;
@@ -968,12 +998,14 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setVoiceRegState(int state) {
mVoiceRegState = state;
if (DBG) Rlog.d(LOG_TAG, "[ServiceState] setVoiceRegState=" + mVoiceRegState);
}
/** @hide */
+ @UnsupportedAppUsage
public void setDataRegState(int state) {
mDataRegState = state;
if (VDBG) Rlog.d(LOG_TAG, "[ServiceState] setDataRegState=" + mDataRegState);
@@ -997,21 +1029,25 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setVoiceRoaming(boolean roaming) {
mVoiceRoamingType = (roaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
}
/** @hide */
+ @UnsupportedAppUsage
public void setVoiceRoamingType(int type) {
mVoiceRoamingType = type;
}
/** @hide */
+ @UnsupportedAppUsage
public void setDataRoaming(boolean dataRoaming) {
mDataRoamingType = (dataRoaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
}
/** @hide */
+ @UnsupportedAppUsage
public void setDataRoamingType(int type) {
mDataRoamingType = type;
}
@@ -1019,6 +1055,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setEmergencyOnly(boolean emergencyOnly) {
mIsEmergencyOnly = emergencyOnly;
}
@@ -1026,6 +1063,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setCdmaRoamingIndicator(int roaming) {
this.mCdmaRoamingIndicator = roaming;
}
@@ -1033,6 +1071,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setCdmaDefaultRoamingIndicator (int roaming) {
this.mCdmaDefaultRoamingIndicator = roaming;
}
@@ -1040,6 +1079,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setCdmaEriIconIndex(int index) {
this.mCdmaEriIconIndex = index;
}
@@ -1047,6 +1087,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void setCdmaEriIconMode(int mode) {
this.mCdmaEriIconMode = mode;
}
@@ -1080,6 +1121,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setOperatorAlphaLong(String longName) {
mVoiceOperatorAlphaLong = longName;
mDataOperatorAlphaLong = longName;
@@ -1106,6 +1148,7 @@
* @param b second obj
* @return true if two objects equal or both are null
*/
+ @UnsupportedAppUsage
private static boolean equalsHandlesNulls (Object a, Object b) {
return (a == null) ? (b == null) : a.equals (b);
}
@@ -1116,6 +1159,7 @@
* @param m intent notifier map
* @hide
*/
+ @UnsupportedAppUsage
private void setFromNotifierBundle(Bundle m) {
mVoiceRegState = m.getInt("voiceRegState");
mDataRegState = m.getInt("dataRegState");
@@ -1149,6 +1193,7 @@
* @param m intent notifier Bundle
* @hide
*/
+ @UnsupportedAppUsage
public void fillInNotifierBundle(Bundle m) {
m.putInt("voiceRegState", mVoiceRegState);
m.putInt("dataRegState", mDataRegState);
@@ -1221,6 +1266,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setCssIndicator(int css) {
this.mCssIndicator = (css != 0);
}
@@ -1233,10 +1279,12 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getRilVoiceRadioTechnology() {
return this.mRilVoiceRadioTechnology;
}
/** @hide */
+ @UnsupportedAppUsage
public int getRilDataRadioTechnology() {
return this.mRilDataRadioTechnology;
}
@@ -1245,6 +1293,7 @@
* @Deprecated to be removed Q3 2013 use {@link #getRilDataRadioTechnology} or
* {@link #getRilVoiceRadioTechnology}
*/
+ @UnsupportedAppUsage
public int getRadioTechnology() {
Rlog.e(LOG_TAG, "ServiceState.getRadioTechnology() DEPRECATED will be removed *******");
return getRilDataRadioTechnology();
@@ -1374,16 +1423,19 @@
/** @hide */
+ @UnsupportedAppUsage
public int getDataNetworkType() {
return rilRadioTechnologyToNetworkType(mRilDataRadioTechnology);
}
/** @hide */
+ @UnsupportedAppUsage
public int getVoiceNetworkType() {
return rilRadioTechnologyToNetworkType(mRilVoiceRadioTechnology);
}
/** @hide */
+ @UnsupportedAppUsage
public int getCssIndicator() {
return this.mCssIndicator ? 1 : 0;
}
@@ -1407,6 +1459,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean isGsm(int radioTechnology) {
return radioTechnology == RIL_RADIO_TECHNOLOGY_GPRS
|| radioTechnology == RIL_RADIO_TECHNOLOGY_EDGE
@@ -1424,6 +1477,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean isCdma(int radioTechnology) {
return radioTechnology == RIL_RADIO_TECHNOLOGY_IS95A
|| radioTechnology == RIL_RADIO_TECHNOLOGY_IS95B
@@ -1441,11 +1495,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean bearerBitmapHasCdma(int radioTechnologyBitmap) {
return (RIL_RADIO_CDMA_TECHNOLOGY_BITMASK & radioTechnologyBitmap) != 0;
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean bitmaskHasTech(int bearerBitmask, int radioTech) {
if (bearerBitmask == 0) {
return true;
@@ -1517,6 +1573,7 @@
* voice SS. The voice SS is only used if it is IN_SERVICE (otherwise the base SS is returned).
* @hide
* */
+ @UnsupportedAppUsage
public static ServiceState mergeServiceStates(ServiceState baseSs, ServiceState voiceSs) {
if (voiceSs.mVoiceRegState != STATE_IN_SERVICE) {
return baseSs;
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index 95abb91..ed758a9 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -36,21 +37,27 @@
private static final boolean DBG = false;
/** @hide */
+ @UnsupportedAppUsage
public static final int SIGNAL_STRENGTH_NONE_OR_UNKNOWN
= TelephonyProtoEnums.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; // = 0
/** @hide */
+ @UnsupportedAppUsage
public static final int SIGNAL_STRENGTH_POOR
= TelephonyProtoEnums.SIGNAL_STRENGTH_POOR; // = 1
/** @hide */
+ @UnsupportedAppUsage
public static final int SIGNAL_STRENGTH_MODERATE
= TelephonyProtoEnums.SIGNAL_STRENGTH_MODERATE; // = 2
/** @hide */
+ @UnsupportedAppUsage
public static final int SIGNAL_STRENGTH_GOOD
= TelephonyProtoEnums.SIGNAL_STRENGTH_GOOD; // = 3
/** @hide */
+ @UnsupportedAppUsage
public static final int SIGNAL_STRENGTH_GREAT
= TelephonyProtoEnums.SIGNAL_STRENGTH_GREAT; // = 4
/** @hide */
+ @UnsupportedAppUsage
public static final int NUM_SIGNAL_STRENGTH_BINS = 5;
/** @hide */
public static final String[] SIGNAL_STRENGTH_NAMES = {
@@ -75,24 +82,39 @@
private static final String MEASUMENT_TYPE_RSCP = "rscp";
/** Parameters reported by the Radio */
+ @UnsupportedAppUsage
private int mGsmSignalStrength; // Valid values are (0-31, 99) as defined in TS 27.007 8.5
+ @UnsupportedAppUsage
private int mGsmBitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5
+ @UnsupportedAppUsage
private int mCdmaDbm; // This value is the RSSI value
+ @UnsupportedAppUsage
private int mCdmaEcio; // This value is the Ec/Io
+ @UnsupportedAppUsage
private int mEvdoDbm; // This value is the EVDO RSSI value
+ @UnsupportedAppUsage
private int mEvdoEcio; // This value is the EVDO Ec/Io
+ @UnsupportedAppUsage
private int mEvdoSnr; // Valid values are 0-8. 8 is the highest signal to noise ratio
+ @UnsupportedAppUsage
private int mLteSignalStrength;
+ @UnsupportedAppUsage
private int mLteRsrp;
+ @UnsupportedAppUsage
private int mLteRsrq;
+ @UnsupportedAppUsage
private int mLteRssnr;
+ @UnsupportedAppUsage
private int mLteCqi;
+ @UnsupportedAppUsage
private int mTdScdmaRscp; // Valid values are -24...-120dBm or INVALID if unknown
private int mWcdmaSignalStrength;
private int mWcdmaRscpAsu; // the WCDMA RSCP in ASU as reported from the HAL
+ @UnsupportedAppUsage
private int mWcdmaRscp; // the WCDMA RSCP in dBm
/** Parameters from the framework */
+ @UnsupportedAppUsage
private int mLteRsrpBoost; // offset to be reduced from the rsrp threshold while calculating
// signal strength level
private boolean mIsGsm; // This value is set by the ServiceStateTracker
@@ -121,6 +143,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static SignalStrength newFromBundle(Bundle m) {
SignalStrength ret;
ret = new SignalStrength();
@@ -133,6 +156,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public SignalStrength() {
this(true);
}
@@ -145,6 +169,7 @@
* @return newly created SignalStrength
* @hide
*/
+ @UnsupportedAppUsage
public SignalStrength(boolean gsmFlag) {
mGsmSignalStrength = 99;
mGsmBitErrorRate = -1;
@@ -247,6 +272,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public SignalStrength(SignalStrength s) {
copyFrom(s);
}
@@ -254,6 +280,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected void copyFrom(SignalStrength s) {
mGsmSignalStrength = s.mGsmSignalStrength;
mGsmBitErrorRate = s.mGsmBitErrorRate;
@@ -284,6 +311,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public SignalStrength(Parcel in) {
if (DBG) log("Size of signalstrength parcel:" + in.dataSize());
@@ -351,6 +379,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final Parcelable.Creator<SignalStrength> CREATOR = new Parcelable.Creator() {
public SignalStrength createFromParcel(Parcel in) {
return new SignalStrength(in);
@@ -372,6 +401,7 @@
* Valid values for all signalstrength fields
* @hide
*/
+ @UnsupportedAppUsage
public void validateInput() {
if (DBG) log("Signal before validate=" + this);
// TS 27.007 8.5
@@ -546,26 +576,31 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getLteSignalStrength() {
return mLteSignalStrength;
}
/** @hide */
+ @UnsupportedAppUsage
public int getLteRsrp() {
return mLteRsrp;
}
/** @hide */
+ @UnsupportedAppUsage
public int getLteRsrq() {
return mLteRsrq;
}
/** @hide */
+ @UnsupportedAppUsage
public int getLteRssnr() {
return mLteRssnr;
}
/** @hide */
+ @UnsupportedAppUsage
public int getLteCqi() {
return mLteCqi;
}
@@ -594,6 +629,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getAsuLevel() {
int asuLevel = 0;
if (mIsGsm) {
@@ -629,6 +665,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getDbm() {
int dBm = INVALID;
@@ -661,6 +698,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getGsmDbm() {
int dBm;
@@ -680,6 +718,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getGsmLevel() {
int level;
@@ -702,6 +741,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getGsmAsuLevel() {
// ASU ranges from 0 to 31 - TS 27.007 Sec 8.5
// asu = 0 (-113dB or less) is very weak
@@ -717,6 +757,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getCdmaLevel() {
final int cdmaDbm = getCdmaDbm();
final int cdmaEcio = getCdmaEcio();
@@ -746,6 +787,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getCdmaAsuLevel() {
final int cdmaDbm = getCdmaDbm();
final int cdmaEcio = getCdmaEcio();
@@ -777,6 +819,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getEvdoLevel() {
int evdoDbm = getEvdoDbm();
int evdoSnr = getEvdoSnr();
@@ -805,6 +848,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getEvdoAsuLevel() {
int evdoDbm = getEvdoDbm();
int evdoSnr = getEvdoSnr();
@@ -835,6 +879,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getLteDbm() {
return mLteRsrp;
}
@@ -844,6 +889,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getLteLevel() {
/*
* TS 36.214 Physical Layer Section 5.1.3
@@ -930,6 +976,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getLteAsuLevel() {
int lteAsuLevel = 99;
int lteDbm = getLteDbm();
@@ -973,6 +1020,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getTdScdmaDbm() {
return this.mTdScdmaRscp;
}
@@ -985,6 +1033,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getTdScdmaLevel() {
final int tdScdmaDbm = getTdScdmaDbm();
int level;
@@ -1006,6 +1055,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getTdScdmaAsuLevel() {
final int tdScdmaDbm = getTdScdmaDbm();
int tdScdmaAsuLevel;
@@ -1245,6 +1295,7 @@
* @param m intent notifier map
* @hide
*/
+ @UnsupportedAppUsage
private void setFromNotifierBundle(Bundle m) {
mGsmSignalStrength = m.getInt("GsmSignalStrength");
mGsmBitErrorRate = m.getInt("GsmBitErrorRate");
@@ -1282,6 +1333,7 @@
* @param m intent notifier Bundle
* @hide
*/
+ @UnsupportedAppUsage
public void fillInNotifierBundle(Bundle m) {
m.putInt("GsmSignalStrength", mGsmSignalStrength);
m.putInt("GsmBitErrorRate", mGsmBitErrorRate);
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index 38bc640..ea408bf 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -19,6 +19,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SuppressAutoDoc;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
@@ -88,6 +89,7 @@
new ArrayMap<Integer, SmsManager>();
/** A concrete subscription id, or the pseudo DEFAULT_SUBSCRIPTION_ID */
+ @UnsupportedAppUsage
private int mSubId;
/*
@@ -272,6 +274,17 @@
private static final int SMS_PICK = 2;
/**
+ * 3gpp2 SMS priority is not specified
+ * @hide
+ */
+ public static final int SMS_MESSAGE_PRIORITY_NOT_SPECIFIED = -1;
+ /**
+ * 3gpp SMS period is not specified
+ * @hide
+ */
+ public static final int SMS_MESSAGE_PERIOD_NOT_SPECIFIED = -1;
+
+ /**
* Send a text based SMS.
*
* <p class="note"><strong>Note:</strong> Using this method requires that your app has the
@@ -440,6 +453,7 @@
* @throws IllegalArgumentException if destinationAddress or text are empty
* {@hide}
*/
+ @UnsupportedAppUsage
public void sendTextMessage(
String destinationAddress, String scAddress, String text,
PendingIntent sentIntent, PendingIntent deliveryIntent,
@@ -461,11 +475,11 @@
}
if (priority < 0x00 || priority > 0x03) {
- throw new IllegalArgumentException("Invalid priority");
+ priority = SMS_MESSAGE_PRIORITY_NOT_SPECIFIED;
}
if (validityPeriod < 0x05 || validityPeriod > 0x09b0a0) {
- throw new IllegalArgumentException("Invalid validity period");
+ validityPeriod = SMS_MESSAGE_PERIOD_NOT_SPECIFIED;
}
try {
@@ -493,6 +507,7 @@
* PendingIntent, int, boolean, int)
* @hide
*/
+ @UnsupportedAppUsage
public void sendTextMessageWithoutPersisting(
String destinationAddress, String scAddress, String text,
PendingIntent sentIntent, PendingIntent deliveryIntent, int priority,
@@ -718,12 +733,14 @@
* @throws IllegalArgumentException if destinationAddress or data are empty
* {@hide}
*/
+ @UnsupportedAppUsage
public void sendMultipartTextMessage(
String destinationAddress, String scAddress, ArrayList<String> parts,
ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents,
int priority, boolean expectMore, int validityPeriod) {
sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
- deliveryIntents, true /* persistMessage*/);
+ deliveryIntents, true /* persistMessage*/, priority, expectMore,
+ validityPeriod);
}
private void sendMultipartTextMessageInternal(
@@ -738,11 +755,11 @@
}
if (priority < 0x00 || priority > 0x03) {
- throw new IllegalArgumentException("Invalid priority");
+ priority = SMS_MESSAGE_PRIORITY_NOT_SPECIFIED;
}
if (validityPeriod < 0x05 || validityPeriod > 0x09b0a0) {
- throw new IllegalArgumentException("Invalid validity period");
+ validityPeriod = SMS_MESSAGE_PERIOD_NOT_SPECIFIED;
}
if (parts.size() > 1) {
@@ -985,6 +1002,7 @@
* @throws IllegalArgumentException if pdu is NULL
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean copyMessageToIcc(byte[] smsc, byte[] pdu,int status) {
boolean success = false;
@@ -1015,6 +1033,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean
deleteMessageFromIcc(int messageIndex) {
boolean success = false;
@@ -1049,6 +1068,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean updateMessageOnIcc(int messageIndex, int newStatus, byte[] pdu) {
boolean success = false;
@@ -1075,6 +1095,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public ArrayList<SmsMessage> getAllMessagesFromIcc() {
List<SmsRawData> records = null;
@@ -1187,6 +1208,7 @@
* @throws IllegalArgumentException if endMessageId < startMessageId
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean enableCellBroadcastRange(int startMessageId, int endMessageId, int ranType) {
boolean success = false;
@@ -1229,6 +1251,7 @@
* @throws IllegalArgumentException if endMessageId < startMessageId
* {@hide}
*/
+ @UnsupportedAppUsage
public boolean disableCellBroadcastRange(int startMessageId, int endMessageId, int ranType) {
boolean success = false;
@@ -1346,6 +1369,7 @@
* @return true if enabled, false otherwise
* @hide
*/
+ @UnsupportedAppUsage
public boolean isSMSPromptEnabled() {
ISms iccISms = null;
try {
diff --git a/telephony/java/android/telephony/SmsMessage.java b/telephony/java/android/telephony/SmsMessage.java
index 57f89e3..91e24a9 100644
--- a/telephony/java/android/telephony/SmsMessage.java
+++ b/telephony/java/android/telephony/SmsMessage.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.annotation.StringDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.Resources;
import android.os.Binder;
import android.text.TextUtils;
@@ -107,18 +108,21 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public SmsMessageBase mWrappedSmsMessage;
/** Indicates the subId
*
* @hide
*/
+ @UnsupportedAppUsage
private int mSubId = 0;
/** set Subscription information
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSubId(int subId) {
mSubId = subId;
}
@@ -127,6 +131,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public int getSubId() {
return mSubId;
}
@@ -368,6 +373,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static ArrayList<String> fragmentText(String text) {
// This function is for MO SMS
TextEncodingDetails ted = (useCdmaFormatForMoSms()) ?
@@ -822,6 +828,7 @@
*
* @return true if Cdma format should be used for MO SMS, false otherwise.
*/
+ @UnsupportedAppUsage
private static boolean useCdmaFormatForMoSms() {
// IMS is registered with SMS support, check the SMS format supported
return useCdmaFormatForMoSms(SubscriptionManager.getDefaultSmsSubscriptionId());
@@ -836,6 +843,7 @@
*
* @return true if Cdma format should be used for MO SMS, false otherwise.
*/
+ @UnsupportedAppUsage
private static boolean useCdmaFormatForMoSms(int subId) {
SmsManager smsManager = SmsManager.getSmsManagerForSubscriptionId(subId);
if (!smsManager.isImsSmsSupported()) {
diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java
index d76e39b..ec26622 100644
--- a/telephony/java/android/telephony/SubscriptionInfo.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -18,6 +18,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
@@ -135,26 +136,14 @@
private String mCardId;
/**
- * @hide
+ * Whether the subscription is opportunistic.
*/
- public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName,
- CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
- Bitmap icon, String mcc, String mnc, String countryIso) {
- this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
- roaming, icon, mcc, mnc, countryIso, false /* isEmbedded */,
- null /* accessRules */, null /* accessRules */);
- }
+ private boolean mIsOpportunistic;
/**
- * @hide
+ * SubId of the parent subscription, if there is one.
*/
- public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName,
- CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
- Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
- @Nullable UiccAccessRule[] accessRules) {
- this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
- roaming, icon, mcc, mnc, countryIso, isEmbedded, accessRules, null /* cardId */);
- }
+ private int mParentSubId;
/**
* @hide
@@ -163,6 +152,19 @@
CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
@Nullable UiccAccessRule[] accessRules, String cardId) {
+ this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
+ roaming, icon, mcc, mnc, countryIso, isEmbedded, accessRules, cardId,
+ false, SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+ }
+
+ /**
+ * @hide
+ */
+ public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName,
+ CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
+ Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
+ @Nullable UiccAccessRule[] accessRules, String cardId, boolean isOpportunistic,
+ int parentSubId) {
this.mId = id;
this.mIccId = iccId;
this.mSimSlotIndex = simSlotIndex;
@@ -179,6 +181,8 @@
this.mIsEmbedded = isEmbedded;
this.mAccessRules = accessRules;
this.mCardId = cardId;
+ this.mIsOpportunistic = isOpportunistic;
+ this.mParentSubId = parentSubId;
}
/**
@@ -213,6 +217,7 @@
* Sets the name displayed to the user that identifies this subscription
* @hide
*/
+ @UnsupportedAppUsage
public void setDisplayName(CharSequence name) {
this.mDisplayName = name;
}
@@ -237,6 +242,7 @@
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
* @hide
*/
+ @UnsupportedAppUsage
public int getNameSource() {
return this.mNameSource;
}
@@ -295,6 +301,7 @@
* Sets the color displayed to the user that identifies this subscription
* @hide
*/
+ @UnsupportedAppUsage
public void setIconTint(int iconTint) {
this.mIconTint = iconTint;
}
@@ -369,6 +376,29 @@
}
/**
+ * An opportunistic subscription connects to a network that is
+ * limited in functionality and / or coverage.
+ *
+ * @return whether subscription is opportunistic.
+ */
+ public boolean isOpportunistic() {
+ return mIsOpportunistic;
+ }
+
+ /**
+ * Used in scenarios where a child subscription is bundled with a primary parent subscription.
+ * The child subscription will typically be opportunistic (see {@link #isOpportunistic()})
+ * and will be used to provide data services where available, with the parent being the primary
+ * fallback subscription.
+ *
+ * @return subId of parent subscription if it’s bundled with a primary subscription.
+ * If there isn't one, {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID}
+ */
+ public int getParentSubId() {
+ return mParentSubId;
+ }
+
+ /**
* Checks whether the app with the given context is authorized to manage this subscription
* according to its metadata. Only supported for embedded subscriptions (if {@link #isEmbedded}
* returns true).
@@ -460,10 +490,12 @@
boolean isEmbedded = source.readBoolean();
UiccAccessRule[] accessRules = source.createTypedArray(UiccAccessRule.CREATOR);
String cardId = source.readString();
+ boolean isOpportunistic = source.readBoolean();
+ int parentSubId = source.readInt();
return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName,
nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso,
- isEmbedded, accessRules, cardId);
+ isEmbedded, accessRules, cardId, isOpportunistic, parentSubId);
}
@Override
@@ -490,6 +522,8 @@
dest.writeBoolean(mIsEmbedded);
dest.writeTypedArray(mAccessRules, flags);
dest.writeString(mCardId);
+ dest.writeBoolean(mIsOpportunistic);
+ dest.writeInt(mParentSubId);
}
@Override
@@ -522,6 +556,7 @@
+ " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc
+ " mnc " + mMnc + " isEmbedded " + mIsEmbedded
+ " accessRules " + Arrays.toString(mAccessRules)
- + " cardId=" + cardIdToPrint + "}";
+ + " cardId=" + cardIdToPrint + " isOpportunistic " + mIsOpportunistic
+ + " parentSubId=" + mParentSubId + "}";
}
}
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 17e7c49..119733e 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -28,7 +28,9 @@
import android.annotation.SuppressAutoDoc;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.BroadcastOptions;
+import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
@@ -43,6 +45,7 @@
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.telephony.euicc.EuiccManager;
import android.util.DisplayMetrics;
import com.android.internal.telephony.IOnSubscriptionsChangedListener;
@@ -84,6 +87,7 @@
/** Indicates the caller wants the default sub id. */
/** @hide */
+ @UnsupportedAppUsage
public static final int DEFAULT_SUBSCRIPTION_ID = Integer.MAX_VALUE;
/**
@@ -106,6 +110,7 @@
public static final int MAX_SUBSCRIPTION_ID_VALUE = DEFAULT_SUBSCRIPTION_ID - 1;
/** @hide */
+ @UnsupportedAppUsage
public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");
/**
@@ -183,6 +188,7 @@
* The name_source is from the user
* @hide
*/
+ @UnsupportedAppUsage
public static final int NAME_SOURCE_USER_INPUT = 2;
/**
@@ -301,7 +307,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
@@ -433,6 +439,24 @@
public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled";
/**
+ * TelephonyProvider column name for whether a subscription is opportunistic, that is,
+ * whether the network it connects to is limited in functionality or coverage.
+ * For example, CBRS.
+ * IS_EMBEDDED should always be true.
+ * <p>Type: INTEGER (int), 1 for opportunistic or 0 for non-opportunistic.
+ * @hide
+ */
+ public static final String IS_OPPORTUNISTIC = "is_opportunistic";
+
+ /**
+ * TelephonyProvider column name for subId of parent subscription of an opportunistic
+ * subscription.
+ * if the parent sub id is valid, then is_opportunistic should always to true.
+ * @hide
+ */
+ public static final String PARENT_SUB_ID = "parent_sub_id";
+
+ /**
* Broadcast Action: The user has changed one of the default subs related to
* data, phone calls, or sms</p>
*
@@ -595,6 +619,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public SubscriptionManager(Context context) {
if (DBG) logd("SubscriptionManager created");
mContext = context;
@@ -773,6 +798,7 @@
* include those that were inserted before, maybe empty but not null.
* @hide
*/
+ @UnsupportedAppUsage
public List<SubscriptionInfo> getAllSubscriptionInfoList() {
if (VDBG) logd("[getAllSubscriptionInfoList]+");
@@ -944,6 +970,7 @@
* all subscriptions that have been seen.
* @hide
*/
+ @UnsupportedAppUsage
public int getAllSubscriptionInfoCount() {
if (VDBG) logd("[getAllSubscriptionInfoCount]+");
@@ -1049,26 +1076,12 @@
* @return the number of records updated
* @hide
*/
+ @UnsupportedAppUsage
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)
+ );
}
/**
@@ -1091,29 +1104,15 @@
* @return the number of records updated or < 0 if invalid subId
* @hide
*/
+ @UnsupportedAppUsage
public int setDisplayName(String displayName, int subId, long nameSource) {
if (VDBG) {
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)
+ );
}
/**
@@ -1123,25 +1122,15 @@
* @return the number of records updated
* @hide
*/
+ @UnsupportedAppUsage
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)
+ );
}
/**
@@ -1151,25 +1140,12 @@
* @return the number of records updated
* @hide
*/
+ @UnsupportedAppUsage
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)
+ );
}
/**
@@ -1178,6 +1154,7 @@
* SIM_NOT_INSERTED or < 0 if an invalid slot index
* @hide
*/
+ @UnsupportedAppUsage
public static int getSlotIndex(int subId) {
if (!isValidSubscriptionId(subId)) {
if (DBG) {
@@ -1201,6 +1178,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static int[] getSubId(int slotIndex) {
if (!isValidSlotIndex(slotIndex)) {
logd("[getSubId]- fail");
@@ -1222,6 +1200,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static int getPhoneId(int subId) {
if (!isValidSubscriptionId(subId)) {
if (DBG) {
@@ -1319,11 +1298,13 @@
* @return the SubscriptionInfo for the default voice subscription.
* @hide
*/
+ @UnsupportedAppUsage
public SubscriptionInfo getDefaultVoiceSubscriptionInfo() {
return getActiveSubscriptionInfo(getDefaultVoiceSubscriptionId());
}
/** @hide */
+ @UnsupportedAppUsage
public static int getDefaultVoicePhoneId() {
return getPhoneId(getDefaultVoiceSubscriptionId());
}
@@ -1352,6 +1333,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setDefaultSmsSubId(int subId) {
if (VDBG) logd("setDefaultSmsSubId sub id = " + subId);
try {
@@ -1377,6 +1359,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getDefaultSmsPhoneId() {
return getPhoneId(getDefaultSmsSubscriptionId());
}
@@ -1405,6 +1388,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setDefaultDataSubId(int subId) {
if (VDBG) logd("setDataSubscription sub id = " + subId);
try {
@@ -1425,11 +1409,13 @@
* @return the SubscriptionInfo for the default data subscription.
* @hide
*/
+ @UnsupportedAppUsage
public SubscriptionInfo getDefaultDataSubscriptionInfo() {
return getActiveSubscriptionInfo(getDefaultDataSubscriptionId());
}
/** @hide */
+ @UnsupportedAppUsage
public int getDefaultDataPhoneId() {
return getPhoneId(getDefaultDataSubscriptionId());
}
@@ -1468,6 +1454,7 @@
* an invalid subscription id, i.e. < 0.
* @hide
*/
+ @UnsupportedAppUsage
public void clearDefaultsForInactiveSubIds() {
if (VDBG) logd("clearDefaultsForInactiveSubIds");
try {
@@ -1484,6 +1471,7 @@
* @return true if a valid subId else false
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isValidSubscriptionId(int subId) {
return subId > INVALID_SUBSCRIPTION_ID ;
}
@@ -1493,21 +1481,25 @@
* usable subId means its neither a INVALID_SUBSCRIPTION_ID nor a DEFAULT_SUB_ID.
* @hide
*/
+ @UnsupportedAppUsage
public static boolean isUsableSubIdValue(int subId) {
return subId >= MIN_SUBSCRIPTION_ID_VALUE && subId <= MAX_SUBSCRIPTION_ID_VALUE;
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean isValidSlotIndex(int slotIndex) {
return slotIndex >= 0 && slotIndex < TelephonyManager.getDefault().getSimCount();
}
/** @hide */
+ @UnsupportedAppUsage
public static boolean isValidPhoneId(int phoneId) {
return phoneId >= 0 && phoneId < TelephonyManager.getDefault().getPhoneCount();
}
/** @hide */
+ @UnsupportedAppUsage
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
int[] subIds = SubscriptionManager.getSubId(phoneId);
if (subIds != null && subIds.length > 0) {
@@ -1518,6 +1510,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId, int subId) {
if (VDBG) logd("putPhoneIdAndSubIdExtra: phoneId=" + phoneId + " subId=" + subId);
intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
@@ -1533,6 +1526,7 @@
* is never null but the length maybe 0.
* @hide
*/
+ @UnsupportedAppUsage
public @NonNull int[] getActiveSubscriptionIdList() {
int[] subId = null;
@@ -1691,6 +1685,7 @@
* @return Resources associated with Subscription.
* @hide
*/
+ @UnsupportedAppUsage
public static Resources getResourcesForSubId(Context context, int subId) {
final SubscriptionInfo subInfo =
SubscriptionManager.from(context).getActiveSubscriptionInfo(subId);
@@ -1714,6 +1709,7 @@
* and the SIM providing the subscription is present in a slot and in "LOADED" state.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isActiveSubId(int subId) {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -1994,4 +1990,114 @@
}
return false;
}
+
+ /**
+ * Set preferred default data.
+ * Set on which slot default data will be on.
+ *
+ * @param slotId which slot is preferred to for cellular data.
+ * @hide
+ *
+ */
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public void setPreferredData(int slotId) {
+ if (VDBG) logd("[setPreferredData]+ slotId:" + slotId);
+ setSubscriptionPropertyHelper(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
+ "setPreferredData", (iSub)-> iSub.setPreferredData(slotId));
+ }
+
+ /**
+ * Get User downloaded Profiles.
+ *
+ * Provide all available user downloaded profile on the phone.
+ * @param slotId on which phone the switch will operate on
+ */
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ List<SubscriptionInfo> getOpportunisticSubscriptions(int slotId) {
+ String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
+ List<SubscriptionInfo> subInfoList = null;
+
+ try {
+ ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+ if (iSub != null) {
+ subInfoList = iSub.getOpportunisticSubscriptions(slotId, pkgForDebug);
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
+
+ if (subInfoList == null) {
+ subInfoList = new ArrayList<>();
+ }
+
+ return subInfoList;
+ }
+
+ /**
+ * Switch to a certain subscription
+ *
+ * @param subId sub id
+ * @param callbackIntent pending intent that will be sent after operation is done.
+ */
+ @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
+ public void switchToSubscription(int subId, PendingIntent callbackIntent) {
+ EuiccManager euiccManager = new EuiccManager(mContext);
+ euiccManager.switchToSubscription(subId, callbackIntent);
+ }
+
+ /**
+ * Set opportunistic by simInfo index
+ *
+ * @param opportunistic whether it’s opportunistic subscription.
+ * @param subId the unique SubscriptionInfo index in database
+ * @return the number of records updated
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public int setOpportunistic(boolean opportunistic, int subId) {
+ if (VDBG) logd("[setOpportunistic]+ opportunistic:" + opportunistic + " subId:" + subId);
+ return setSubscriptionPropertyHelper(subId, "setOpportunistic",
+ (iSub)-> iSub.setOpportunistic(opportunistic, subId));
+ }
+
+ /**
+ * Set parent subId by simInfo index
+ *
+ * @param parentSubId subId of its parent subscription.
+ * @param subId the unique SubscriptionInfo index in database
+ * @return the number of records updated
+ * @hide
+ *
+ */
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public int setParentSubId(int parentSubId, int subId) {
+ if (VDBG) logd("[setParentSubId]+ parentSubId:" + parentSubId + " subId:" + subId);
+ return setSubscriptionPropertyHelper(subId, "parentSubId",
+ (iSub)-> iSub.setParentSubId(parentSubId, subId));
+ }
+
+ 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/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index b2eb5e0..81d0d68 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -28,6 +28,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;
import android.app.ActivityThread;
import android.app.PendingIntent;
@@ -155,6 +156,7 @@
private final Context mContext;
private final int mSubId;
+ @UnsupportedAppUsage
private SubscriptionManager mSubscriptionManager;
private TelephonyScanManager mTelephonyScanManager;
@@ -168,18 +170,24 @@
**/
/** @hide */
public enum MultiSimVariants {
+ @UnsupportedAppUsage
DSDS,
+ @UnsupportedAppUsage
DSDA,
+ @UnsupportedAppUsage
TSTS,
+ @UnsupportedAppUsage
UNKNOWN
};
/** @hide */
+ @UnsupportedAppUsage
public TelephonyManager(Context context) {
this(context, SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
}
/** @hide */
+ @UnsupportedAppUsage
public TelephonyManager(Context context, int subId) {
mSubId = subId;
Context appContext = context.getApplicationContext();
@@ -192,6 +200,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
private TelephonyManager() {
mContext = null;
mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
@@ -201,6 +210,7 @@
/** @hide
/* @deprecated - use getSystemService as described above */
+ @UnsupportedAppUsage
public static TelephonyManager getDefault() {
return sInstance;
}
@@ -228,6 +238,7 @@
* Returns UNKNOWN for others
*/
/** {@hide} */
+ @UnsupportedAppUsage
public MultiSimVariants getMultiSimConfiguration() {
String mSimConfig =
SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG);
@@ -288,6 +299,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static TelephonyManager from(Context context) {
return (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
}
@@ -319,6 +331,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public boolean isMultiSimEnabled() {
return (multiSimConfig.equals("dsds") || multiSimConfig.equals("dsda") ||
multiSimConfig.equals("tsts"));
@@ -672,6 +685,7 @@
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
@Deprecated
+ @UnsupportedAppUsage
public static final String ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED =
"android.intent.action.PRECISE_DATA_CONNECTION_STATE_CHANGED";
@@ -1206,6 +1220,7 @@
*/
/** {@hide} */
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getDeviceSoftwareVersion(int slotIndex) {
ITelephony telephony = getITelephony();
if (telephony == null) return null;
@@ -1418,6 +1433,7 @@
* @param slotIndex of which Nai is returned
*/
/** {@hide}*/
+ @UnsupportedAppUsage
public String getNai(int slotIndex) {
int[] subId = SubscriptionManager.getSubId(slotIndex);
if (subId == null) {
@@ -1544,7 +1560,7 @@
* @return List of NeighboringCellInfo or null if info unavailable.
*
* @deprecated Use {@link #getAllCellInfo} which returns a superset of the information
- * from NeighboringCellInfo.
+ * from NeighboringCellInfo, including LTE cell information.
*/
@Deprecated
@RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
@@ -1657,6 +1673,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
private int getPhoneTypeFromProperty(int phoneId) {
String type = getTelephonyProperty(phoneId,
TelephonyProperties.CURRENT_ACTIVE_PHONE, null);
@@ -1691,6 +1708,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getPhoneType(int networkMode) {
switch(networkMode) {
case RILConstants.NETWORK_MODE_CDMA:
@@ -1736,6 +1754,7 @@
/**
* The contents of the /proc/cmdline file
*/
+ @UnsupportedAppUsage
private static String getProcCmdLine()
{
String cmdline = "";
@@ -1782,6 +1801,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getLteOnCdmaModeStatic() {
int retVal;
int curVal;
@@ -1837,6 +1857,7 @@
* @param subId
* @hide
*/
+ @UnsupportedAppUsage
public String getNetworkOperatorName(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, "");
@@ -1864,6 +1885,7 @@
* @param subId
* @hide
*/
+ @UnsupportedAppUsage
public String getNetworkOperator(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getNetworkOperatorForPhone(phoneId);
@@ -1880,6 +1902,7 @@
* @param phoneId
* @hide
**/
+ @UnsupportedAppUsage
public String getNetworkOperatorForPhone(int phoneId) {
return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, "");
}
@@ -1942,6 +1965,7 @@
* @param subId
* @hide
*/
+ @UnsupportedAppUsage
public boolean isNetworkRoaming(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return Boolean.parseBoolean(getTelephonyProperty(phoneId,
@@ -1970,6 +1994,7 @@
* @param subId for which Network CountryIso is returned
* @hide
*/
+ @UnsupportedAppUsage
public String getNetworkCountryIso(int subId) {
return getNetworkCountryIsoForPhone(getPhoneId(subId));
}
@@ -1985,6 +2010,7 @@
* @param phoneId for which Network CountryIso is returned
*/
/** {@hide} */
+ @UnsupportedAppUsage
public String getNetworkCountryIsoForPhone(int phoneId) {
try {
ITelephony telephony = getITelephony();
@@ -2040,6 +2066,7 @@
/** Current network is IWLAN */
public static final int NETWORK_TYPE_IWLAN = TelephonyProtoEnums.NETWORK_TYPE_IWLAN; // = 18.
/** Current network is LTE_CA {@hide} */
+ @UnsupportedAppUsage
public static final int NETWORK_TYPE_LTE_CA = TelephonyProtoEnums.NETWORK_TYPE_LTE_CA; // = 19.
/** Max network type number. Update as new types are added. Don't add negative types. {@hide} */
@@ -2092,6 +2119,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getNetworkType(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2154,6 +2182,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getDataNetworkType(int subId) {
try{
ITelephony telephony = getITelephony();
@@ -2189,6 +2218,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getVoiceNetworkType(int subId) {
try{
ITelephony telephony = getITelephony();
@@ -2216,10 +2246,13 @@
/** Unknown network class. {@hide} */
public static final int NETWORK_CLASS_UNKNOWN = 0;
/** Class of broadly defined "2G" networks. {@hide} */
+ @UnsupportedAppUsage
public static final int NETWORK_CLASS_2_G = 1;
/** Class of broadly defined "3G" networks. {@hide} */
+ @UnsupportedAppUsage
public static final int NETWORK_CLASS_3_G = 2;
/** Class of broadly defined "4G" networks. {@hide} */
+ @UnsupportedAppUsage
public static final int NETWORK_CLASS_4_G = 3;
/**
@@ -2228,6 +2261,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static int getNetworkClass(int networkType) {
switch (networkType) {
case NETWORK_TYPE_GPRS:
@@ -2264,6 +2298,7 @@
*
* @hide pending API council review
*/
+ @UnsupportedAppUsage
public String getNetworkTypeName() {
return getNetworkTypeName(getNetworkType());
}
@@ -2276,6 +2311,7 @@
*
*/
/** {@hide} */
+ @UnsupportedAppUsage
public static String getNetworkTypeName(int type) {
switch (type) {
case NETWORK_TYPE_GPRS:
@@ -2475,6 +2511,7 @@
*/
/** {@hide} */
// FIXME Input argument slotIndex should be of type int
+ @UnsupportedAppUsage
public boolean hasIccCard(int slotIndex) {
try {
@@ -2638,6 +2675,7 @@
* @param subId for which SimOperator is returned
* @hide
*/
+ @UnsupportedAppUsage
public String getSimOperator(int subId) {
return getSimOperatorNumeric(subId);
}
@@ -2651,6 +2689,7 @@
* @see #getSimState
* @hide
*/
+ @UnsupportedAppUsage
public String getSimOperatorNumeric() {
int subId = mSubId;
if (!SubscriptionManager.isUsableSubIdValue(subId)) {
@@ -2679,6 +2718,7 @@
* @param subId for which SimOperator is returned
* @hide
*/
+ @UnsupportedAppUsage
public String getSimOperatorNumeric(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getSimOperatorNumericForPhone(phoneId);
@@ -2692,6 +2732,7 @@
* @param phoneId for which SimOperator is returned
* @hide
*/
+ @UnsupportedAppUsage
public String getSimOperatorNumericForPhone(int phoneId) {
return getTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, "");
@@ -2718,6 +2759,7 @@
* @param subId for which SimOperatorName is returned
* @hide
*/
+ @UnsupportedAppUsage
public String getSimOperatorName(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getSimOperatorNameForPhone(phoneId);
@@ -2728,6 +2770,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getSimOperatorNameForPhone(int phoneId) {
return getTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, "");
@@ -2746,6 +2789,7 @@
* @param subId for which SimCountryIso is returned
* @hide
*/
+ @UnsupportedAppUsage
public String getSimCountryIso(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getSimCountryIsoForPhone(phoneId);
@@ -2756,6 +2800,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getSimCountryIsoForPhone(int phoneId) {
return getTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, "");
@@ -2782,6 +2827,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getSimSerialNumber(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -2807,6 +2853,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getLteOnCdmaMode() {
return getLteOnCdmaMode(getSubId());
}
@@ -2822,6 +2869,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getLteOnCdmaMode(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2929,6 +2977,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getSubscriberId(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3109,6 +3158,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getGroupIdLevel1(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3158,6 +3208,7 @@
android.Manifest.permission.READ_SMS,
android.Manifest.permission.READ_PHONE_NUMBERS
})
+ @UnsupportedAppUsage
public String getLine1Number(int subId) {
String number = null;
try {
@@ -3244,6 +3295,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getLine1AlphaTag(int subId) {
String alphaTag = null;
try {
@@ -3278,6 +3330,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable String[] getMergedSubscriberIds() {
try {
ITelephony telephony = getITelephony();
@@ -3296,6 +3349,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getMsisdn() {
return getMsisdn(getSubId());
}
@@ -3308,6 +3362,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getMsisdn(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3341,6 +3396,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getVoiceMailNumber(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3900,6 +3956,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getVoiceMessageCount() {
return getVoiceMessageCount(getSubId());
}
@@ -3910,6 +3967,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getVoiceMessageCount(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -3945,6 +4003,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getVoiceMailAlphaTag(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3991,6 +4050,7 @@
* @return the IMPI, or null if not present or not loaded
* @hide
*/
+ @UnsupportedAppUsage
public String getIsimImpi() {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -4011,6 +4071,7 @@
* @return the IMS domain name, or null if not present or not loaded
* @hide
*/
+ @UnsupportedAppUsage
public String getIsimDomain() {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -4032,6 +4093,7 @@
* not present or not loaded
* @hide
*/
+ @UnsupportedAppUsage
public String[] getIsimImpu() {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -4050,6 +4112,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
private IPhoneSubInfo getSubscriberInfo() {
// get it each time because that process crashes a lot
return IPhoneSubInfo.Stub.asInterface(ServiceManager.getService("iphonesubinfo"));
@@ -4115,6 +4178,7 @@
* @param subId the subscription to check call state for.
* @hide
*/
+ @UnsupportedAppUsage
public @CallState int getCallState(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
return getCallStateForSlot(phoneId);
@@ -4226,6 +4290,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
private ITelephony getITelephony() {
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
}
@@ -4310,6 +4375,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getCdmaEriIconIndex(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -4344,6 +4410,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public int getCdmaEriIconMode(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -4374,6 +4441,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ @UnsupportedAppUsage
public String getCdmaEriText(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -4846,6 +4914,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String nvReadItem(int itemID) {
try {
ITelephony telephony = getITelephony();
@@ -4926,6 +4995,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean nvResetConfig(int resetType) {
try {
ITelephony telephony = getITelephony();
@@ -4962,6 +5032,7 @@
* {@see SubscriptionManager#getDefaultVoiceSubscriptionId()}
* {@see SubscriptionManager#getDefaultSmsSubscriptionId()}
*/
+ @UnsupportedAppUsage
private int getSubId(int preferredSubId) {
if (SubscriptionManager.isUsableSubIdValue(mSubId)) {
return mSubId;
@@ -4990,6 +5061,7 @@
* {@see SubscriptionManager#getDefaultVoiceSubscriptionId()}
* {@see SubscriptionManager#getDefaultSmsSubscriptionId()}
*/
+ @UnsupportedAppUsage
private int getPhoneId(int preferredSubId) {
return SubscriptionManager.getPhoneId(getSubId(preferredSubId));
}
@@ -5005,6 +5077,7 @@
* {@hide}
*/
@VisibleForTesting
+ @UnsupportedAppUsage
public int getSlotIndex() {
int slotIndex = SubscriptionManager.getSlotIndex(getSubId());
if (slotIndex == SubscriptionManager.SIM_NOT_INSERTED) {
@@ -5018,6 +5091,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static void setTelephonyProperty(int phoneId, String property, String value) {
String propVal = "";
String p[] = null;
@@ -5095,6 +5169,7 @@
* @return The value at the given index of settings.
* @hide
*/
+ @UnsupportedAppUsage
public static int getIntAtIndex(android.content.ContentResolver cr,
String name, int index)
throws android.provider.Settings.SettingNotFoundException {
@@ -5127,6 +5202,7 @@
* @return true if the value was set, false on database errors
* @hide
*/
+ @UnsupportedAppUsage
public static boolean putIntAtIndex(android.content.ContentResolver cr,
String name, int index, int value) {
String data = "";
@@ -5168,6 +5244,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String getTelephonyProperty(int phoneId, String property, String defaultVal) {
String propVal = null;
String prop = SystemProperties.get(property);
@@ -5188,12 +5265,14 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static String getTelephonyProperty(String property, String defaultVal) {
String propVal = SystemProperties.get(property);
return propVal == null ? defaultVal : propVal;
}
/** @hide */
+ @UnsupportedAppUsage
public int getSimCount() {
// FIXME Need to get it from Telephony Dev Controller when that gets implemented!
// and then this method shouldn't be used at all!
@@ -5230,6 +5309,7 @@
* not present or not loaded
* @hide
*/
+ @UnsupportedAppUsage
public String[] getIsimPcscf() {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -5310,6 +5390,7 @@
* Authentication error, no memory space available in EFMUK
* @hide
*/
+ @UnsupportedAppUsage
public String getIccAuthentication(int subId, int appType, int authType, String data) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -5472,6 +5553,7 @@
* Corresponds to features defined in ImsFeature.
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable IImsRegistration getImsRegistration(int slotIndex, int feature) {
try {
ITelephony telephony = getITelephony();
@@ -5491,6 +5573,7 @@
* Corresponds to features defined in ImsFeature.
* @hide
*/
+ @UnsupportedAppUsage
public @Nullable IImsConfig getImsConfig(int slotIndex, int feature) {
try {
ITelephony telephony = getITelephony();
@@ -5509,6 +5592,7 @@
* @param Registration state
* @hide
*/
+ @UnsupportedAppUsage
public void setImsRegistrationState(boolean registered) {
try {
ITelephony telephony = getITelephony();
@@ -5529,6 +5613,7 @@
* @return the preferred network type, defined in RILConstants.java.
* @hide
*/
+ @UnsupportedAppUsage
public int getPreferredNetworkType(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -5677,6 +5762,7 @@
* @return true on success; false on any failure.
* @hide
*/
+ @UnsupportedAppUsage
public boolean setPreferredNetworkType(int subId, int networkType) {
try {
ITelephony telephony = getITelephony();
@@ -5851,6 +5937,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean setRoamingOverride(List<String> gsmRoamingList,
List<String> gsmNonRoamingList, List<String> cdmaRoamingList,
List<String> cdmaNonRoamingList) {
@@ -6648,14 +6735,12 @@
@Deprecated
public boolean isTtyModeSupported() {
try {
- ITelephony telephony = getITelephony();
- if (telephony != null) {
- return telephony.isTtyModeSupported();
+ TelecomManager telecomManager = TelecomManager.from(mContext);
+ if (telecomManager != null) {
+ return telecomManager.isTtySupported();
}
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#isTtyModeSupported", e);
} catch (SecurityException e) {
- Log.e(TAG, "Permission error calling ITelephony#isTtyModeSupported", e);
+ Log.e(TAG, "Permission error calling TelecomManager#isTtySupported", e);
}
return false;
}
@@ -6707,6 +6792,7 @@
* @see SubscriptionManager#getDefaultSubscriptionId()
* @hide
*/
+ @UnsupportedAppUsage
public boolean isImsRegistered() {
try {
return getITelephony().isImsRegistered(getSubId());
@@ -6723,6 +6809,7 @@
* @see SubscriptionManager#getDefaultSubscriptionId()
* @hide
*/
+ @UnsupportedAppUsage
public boolean isVolteAvailable() {
try {
return getITelephony().isVolteAvailable(getSubId());
@@ -6739,6 +6826,7 @@
* @return true if VT is available, or false if it is unavailable or unknown.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isVideoTelephonyAvailable() {
try {
return getITelephony().isVideoTelephonyAvailable(getSubId());
@@ -6753,6 +6841,7 @@
* @return true if VoWiFi is available, or false if it is unavailable or unknown.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isWifiCallingAvailable() {
try {
return getITelephony().isWifiCallingAvailable(getSubId());
@@ -6795,6 +6884,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSimOperatorNumericForPhone(int phoneId, String numeric) {
setTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, numeric);
@@ -6815,6 +6905,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSimOperatorNameForPhone(int phoneId, String name) {
setTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, name);
@@ -6835,6 +6926,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSimCountryIsoForPhone(int phoneId, String iso) {
setTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso);
@@ -6855,6 +6947,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setSimStateForPhone(int phoneId, String state) {
setTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_SIM_STATE, state);
@@ -6960,6 +7053,7 @@
* @param version baseband version
* @hide
*/
+ @UnsupportedAppUsage
public void setBasebandVersionForPhone(int phoneId, String version) {
setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_BASEBAND_VERSION, version);
}
@@ -7025,6 +7119,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPhoneType(int phoneId, int type) {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
TelephonyManager.setTelephonyProperty(phoneId,
@@ -7054,6 +7149,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getOtaSpNumberSchemaForPhone(int phoneId, String defaultValue) {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
return TelephonyManager.getTelephonyProperty(phoneId,
@@ -7141,6 +7237,7 @@
* @param name the alphabetic name of current registered operator.
* @hide
*/
+ @UnsupportedAppUsage
public void setNetworkOperatorNameForPhone(int phoneId, String name) {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, name);
@@ -7163,6 +7260,7 @@
* @param operator the numeric name (MCC+MNC) of current registered operator
* @hide
*/
+ @UnsupportedAppUsage
public void setNetworkOperatorNumericForPhone(int phoneId, String numeric) {
setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_NUMERIC, numeric);
}
@@ -7183,6 +7281,7 @@
* @param isRoaming is network in romaing state or not
* @hide
*/
+ @UnsupportedAppUsage
public void setNetworkRoamingForPhone(int phoneId, boolean isRoaming) {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISROAMING,
@@ -7210,6 +7309,7 @@
* @param type the network type currently in use on the device for data transmission
* @hide
*/
+ @UnsupportedAppUsage
public void setDataNetworkTypeForPhone(int phoneId, int type) {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
setTelephonyProperty(phoneId,
@@ -7222,6 +7322,7 @@
* Returns the subscription ID for the given phone account.
* @hide
*/
+ @UnsupportedAppUsage
public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
try {
@@ -7313,6 +7414,7 @@
* either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information.
* @hide
*/
+ @UnsupportedAppUsage
public ServiceState getServiceStateForSubscriber(int subId) {
try {
ITelephony service = getITelephony();
@@ -7973,4 +8075,23 @@
}
return UNKNOWN_CARRIER_ID_LIST_VERSION;
}
+
+
+ /**
+ * How many modems can have simultaneous data connections.
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
+ public int getNumberOfModemsWithSimultaneousDataConnections() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.getNumberOfModemsWithSimultaneousDataConnections(
+ getSubId(), mContext.getOpPackageName());
+ }
+ } catch (RemoteException ex) {
+ // This could happen if binder process crashes.
+ }
+ return 0;
+ }
}
diff --git a/telephony/java/android/telephony/VoLteServiceState.java b/telephony/java/android/telephony/VoLteServiceState.java
index afef601b..25bb8b4 100644
--- a/telephony/java/android/telephony/VoLteServiceState.java
+++ b/telephony/java/android/telephony/VoLteServiceState.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -77,6 +78,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public VoLteServiceState(int srvccState) {
initialize();
diff --git a/telephony/java/android/telephony/cdma/CdmaCellLocation.java b/telephony/java/android/telephony/cdma/CdmaCellLocation.java
index 7c10569..ee602c0 100644
--- a/telephony/java/android/telephony/cdma/CdmaCellLocation.java
+++ b/telephony/java/android/telephony/cdma/CdmaCellLocation.java
@@ -16,6 +16,7 @@
package android.telephony.cdma;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.telephony.CellLocation;
@@ -23,6 +24,7 @@
* Represents the cell location on a CDMA phone.
*/
public class CdmaCellLocation extends CellLocation {
+ @UnsupportedAppUsage
private int mBaseStationId = -1;
/**
@@ -36,6 +38,7 @@
* to 1296000, both values inclusive (corresponding to a range of -90
* to +90 degrees). Integer.MAX_VALUE is considered invalid value.
*/
+ @UnsupportedAppUsage
private int mBaseStationLatitude = INVALID_LAT_LONG;
/**
@@ -44,9 +47,12 @@
* to 2592000, both values inclusive (corresponding to a range of -180
* to +180 degrees). Integer.MAX_VALUE is considered invalid value.
*/
+ @UnsupportedAppUsage
private int mBaseStationLongitude = INVALID_LAT_LONG;
+ @UnsupportedAppUsage
private int mSystemId = -1;
+ @UnsupportedAppUsage
private int mNetworkId = -1;
/**
@@ -200,6 +206,7 @@
* @param b second obj
* @return true if two objects equal or both are null
*/
+ @UnsupportedAppUsage
private static boolean equalsHandlesNulls(Object a, Object b) {
return (a == null) ? (b == null) : a.equals (b);
}
diff --git a/telephony/java/android/telephony/euicc/DownloadableSubscription.java b/telephony/java/android/telephony/euicc/DownloadableSubscription.java
index edf3b08..f1d5bdd 100644
--- a/telephony/java/android/telephony/euicc/DownloadableSubscription.java
+++ b/telephony/java/android/telephony/euicc/DownloadableSubscription.java
@@ -17,6 +17,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.os.Parcel;
import android.os.Parcelable;
@@ -59,6 +60,7 @@
*/
@Nullable
@Deprecated
+ @UnsupportedAppUsage
public final String encodedActivationCode;
@Nullable private String confirmationCode;
@@ -188,6 +190,7 @@
* @deprecated - Do not use.
*/
@Deprecated
+ @UnsupportedAppUsage
public void setCarrierName(String carrierName) {
this.carrierName = carrierName;
}
@@ -234,6 +237,7 @@
* @deprecated - Do not use.
*/
@Deprecated
+ @UnsupportedAppUsage
public void setAccessRules(UiccAccessRule[] accessRules) {
this.accessRules = Arrays.asList(accessRules);
}
diff --git a/telephony/java/android/telephony/euicc/EuiccInfo.java b/telephony/java/android/telephony/euicc/EuiccInfo.java
index a4adf05..28855b2 100644
--- a/telephony/java/android/telephony/euicc/EuiccInfo.java
+++ b/telephony/java/android/telephony/euicc/EuiccInfo.java
@@ -16,6 +16,7 @@
package android.telephony.euicc;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -43,6 +44,7 @@
};
@Nullable
+ @UnsupportedAppUsage
private final String osVersion;
/**
diff --git a/telephony/java/android/telephony/gsm/GsmCellLocation.java b/telephony/java/android/telephony/gsm/GsmCellLocation.java
index 1717802..98ce333 100644
--- a/telephony/java/android/telephony/gsm/GsmCellLocation.java
+++ b/telephony/java/android/telephony/gsm/GsmCellLocation.java
@@ -16,6 +16,7 @@
package android.telephony.gsm;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.telephony.CellLocation;
@@ -91,6 +92,7 @@
* Set the primary scrambling code.
* @hide
*/
+ @UnsupportedAppUsage
public void setPsc(int psc) {
mPsc = psc;
}
diff --git a/telephony/java/android/telephony/ims/ImsCallForwardInfo.java b/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
index 2831127..34b8884 100644
--- a/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
+++ b/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -30,30 +31,37 @@
// Refer to ImsUtInterface#CDIV_CF_XXX
/** @hide */
// TODO: Make private, do not modify this field directly, use getter.
+ @UnsupportedAppUsage
public int mCondition;
// 0: disabled, 1: enabled
/** @hide */
// TODO: Make private, do not modify this field directly, use getter.
+ @UnsupportedAppUsage
public int mStatus;
// 0x91: International, 0x81: Unknown
/** @hide */
// TODO: Make private, do not modify this field directly, use getter.
+ @UnsupportedAppUsage
public int mToA;
// Service class
/** @hide */
// TODO: Make private, do not modify this field directly, use getter.
+ @UnsupportedAppUsage
public int mServiceClass;
// Number (it will not include the "sip" or "tel" URI scheme)
/** @hide */
// TODO: Make private, do not modify this field directly, use getter.
+ @UnsupportedAppUsage
public String mNumber;
// No reply timer for CF
/** @hide */
// TODO: Make private, do not modify this field directly, use getter.
+ @UnsupportedAppUsage
public int mTimeSeconds;
/** @hide */
// TODO: Will be removed in the future, use public constructor instead.
+ @UnsupportedAppUsage
public ImsCallForwardInfo() {
}
diff --git a/telephony/java/android/telephony/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java
index 350dfe3..f0d3c89 100644
--- a/telephony/java/android/telephony/ims/ImsCallProfile.java
+++ b/telephony/java/android/telephony/ims/ImsCallProfile.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -260,8 +261,10 @@
/** @hide */
public int mServiceType;
/** @hide */
+ @UnsupportedAppUsage
public int mCallType;
/** @hide */
+ @UnsupportedAppUsage
public int mRestrictCause = CALL_RESTRICT_CAUSE_NONE;
/**
@@ -287,8 +290,10 @@
* a {@link android.os.Binder}.
*/
/** @hide */
+ @UnsupportedAppUsage
public Bundle mCallExtras;
/** @hide */
+ @UnsupportedAppUsage
public ImsStreamMediaProfile mMediaProfile;
/** @hide */
@@ -568,6 +573,7 @@
* See {@link #presentationToOir(int)}.
* @hide
*/
+ @UnsupportedAppUsage
public static int presentationToOIR(int presentation) {
switch (presentation) {
case PhoneConstants.PRESENTATION_RESTRICTED:
diff --git a/telephony/java/android/telephony/ims/ImsExternalCallState.java b/telephony/java/android/telephony/ims/ImsExternalCallState.java
index e158fa8..8d18ae8 100644
--- a/telephony/java/android/telephony/ims/ImsExternalCallState.java
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -58,6 +59,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public ImsExternalCallState(int callId, Uri address, boolean isPullable, int callState,
int callType, boolean isCallheld) {
mCallId = callId;
diff --git a/telephony/java/android/telephony/ims/ImsReasonInfo.java b/telephony/java/android/telephony/ims/ImsReasonInfo.java
index 81f2fe7..b981f05 100644
--- a/telephony/java/android/telephony/ims/ImsReasonInfo.java
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -163,6 +164,8 @@
public static final int CODE_SIP_NOT_REACHABLE = 341;
// Others
public static final int CODE_SIP_CLIENT_ERROR = 342;
+ // 481 Transaction Does Not Exist
+ public static final int CODE_SIP_TRANSACTION_DOES_NOT_EXIST = 343;
// 5xx responses
// 501 : Server Internal Error
public static final int CODE_SIP_SERVER_INTERNAL_ERROR = 351;
@@ -581,12 +584,15 @@
// For main reason code
/** @hide */
+ @UnsupportedAppUsage
public int mCode;
// For the extra code value; it depends on the code value.
/** @hide */
+ @UnsupportedAppUsage
public int mExtraCode;
// For the additional message of the reason info.
/** @hide */
+ @UnsupportedAppUsage
public String mExtraMessage;
/** @hide */
@@ -603,6 +609,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public ImsReasonInfo(int code, int extraCode) {
mCode = code;
mExtraCode = extraCode;
diff --git a/telephony/java/android/telephony/ims/ImsSsInfo.java b/telephony/java/android/telephony/ims/ImsSsInfo.java
index c6f8622..3a784c1 100644
--- a/telephony/java/android/telephony/ims/ImsSsInfo.java
+++ b/telephony/java/android/telephony/ims/ImsSsInfo.java
@@ -16,10 +16,15 @@
package android.telephony.ims;
+import android.annotation.IntDef;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* Provides the result to the update operation for the supplementary service configuration.
*
@@ -34,16 +39,45 @@
public static final int DISABLED = 0;
public static final int ENABLED = 1;
+ /**
+ * Provision status of service
+ */
+ /** @hide */
+ @IntDef({
+ SERVICE_PROVISIONING_UNKNOWN,
+ SERVICE_NOT_PROVISIONED,
+ SERVICE_PROVISIONED
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ServiceProvisionStatus {}
+ /**
+ * Unknown provision status for the service.
+ */
+ public static final int SERVICE_PROVISIONING_UNKNOWN = (-1);
+ /**
+ * Service is not provisioned.
+ */
+ public static final int SERVICE_NOT_PROVISIONED = 0;
+ /**
+ * Service is provisioned.
+ */
+ public static final int SERVICE_PROVISIONED = 1;
+
// 0: disabled, 1: enabled
/** @hide */
// TODO: Make private, do not modify this field directly, use getter!
+ @UnsupportedAppUsage
public int mStatus;
/** @hide */
// TODO: Make private, do not modify this field directly, use getter!
+ @UnsupportedAppUsage
public String mIcbNum;
+ /** @hide */
+ public int mProvisionStatus = SERVICE_PROVISIONING_UNKNOWN;
/**@hide*/
// TODO: Remove! Do not use this constructor, instead use public version.
+ @UnsupportedAppUsage
public ImsSsInfo() {
}
@@ -74,16 +108,30 @@
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mStatus);
out.writeString(mIcbNum);
+ out.writeInt(mProvisionStatus);
}
@Override
public String toString() {
- return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled");
+ return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled")
+ + ", ProvisionStatus: " + provisionStatusToString(mProvisionStatus);
+ }
+
+ private static String provisionStatusToString(int pStatus) {
+ switch (pStatus) {
+ case SERVICE_NOT_PROVISIONED:
+ return "Service not provisioned";
+ case SERVICE_PROVISIONED:
+ return "Service provisioned";
+ default:
+ return "Service provisioning unknown";
+ }
}
private void readFromParcel(Parcel in) {
mStatus = in.readInt();
mIcbNum = in.readString();
+ mProvisionStatus = in.readInt();
}
public static final Creator<ImsSsInfo> CREATOR =
@@ -112,4 +160,15 @@
public String getIcbNum() {
return mIcbNum;
}
+
+ /**
+ * @return Supplementary Service Provision status. Valid Values are:
+ * {@link #SERVICE_PROVISIONING_UNKNOWN},
+ * {@link #SERVICE_NOT_PROVISIONED},
+ * {@link #SERVICE_PROVISIONED}
+ */
+ @ServiceProvisionStatus
+ public int getProvisionStatus() {
+ return mProvisionStatus;
+ }
}
diff --git a/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
index 137106a..52d72b5 100644
--- a/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -82,13 +83,16 @@
// Audio related information
/** @hide */
+ @UnsupportedAppUsage
public int mAudioQuality;
/** @hide */
+ @UnsupportedAppUsage
public int mAudioDirection;
// Video related information
/** @hide */
public int mVideoQuality;
/** @hide */
+ @UnsupportedAppUsage
public int mVideoDirection;
// Rtt related information
/** @hide */
@@ -156,6 +160,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public ImsStreamMediaProfile() {
mAudioQuality = AUDIO_QUALITY_NONE;
mAudioDirection = DIRECTION_SEND_RECEIVE;
diff --git a/telephony/java/android/telephony/ims/ImsVideoCallProvider.java b/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
index b4f60b9..1772401 100644
--- a/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
+++ b/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
@@ -179,6 +180,7 @@
* Returns binder object which can be used across IPC methods.
* @hide
*/
+ @UnsupportedAppUsage
public final IImsVideoCallProvider getInterface() {
return mBinder;
}
diff --git a/telephony/java/android/telephony/ims/compat/ImsService.java b/telephony/java/android/telephony/ims/compat/ImsService.java
index cf1efb3..2750e51 100644
--- a/telephony/java/android/telephony/ims/compat/ImsService.java
+++ b/telephony/java/android/telephony/ims/compat/ImsService.java
@@ -17,6 +17,7 @@
package android.telephony.ims.compat;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
@@ -86,6 +87,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
protected final IBinder mImsServiceController = new IImsServiceController.Stub() {
@Override
diff --git a/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java b/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java
index 0a12cae..e8fcac1 100644
--- a/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java
+++ b/telephony/java/android/telephony/ims/compat/feature/ImsFeature.java
@@ -17,6 +17,7 @@
package android.telephony.ims.compat.feature;
import android.annotation.IntDef;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.os.IInterface;
@@ -104,10 +105,12 @@
mSlotId = slotId;
}
+ @UnsupportedAppUsage
public int getFeatureState() {
return mState;
}
+ @UnsupportedAppUsage
protected final void setFeatureState(@ImsState int state) {
if (mState != state) {
mState = state;
diff --git a/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java b/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
index d3d17f4..40ea208 100644
--- a/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
+++ b/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
@@ -20,6 +20,7 @@
import android.os.Message;
import android.os.RemoteException;
+import android.annotation.UnsupportedAppUsage;
import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsCallSessionListener;
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
index e5ed825..23de2fd 100644
--- a/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
@@ -28,6 +28,7 @@
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsVideoCallProvider;
+import android.annotation.UnsupportedAppUsage;
import android.telephony.ims.ImsCallSession;
/**
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java
index 2c325ba8..e55c3d0 100644
--- a/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsConfigImplBase.java
@@ -16,6 +16,7 @@
package android.telephony.ims.compat.stub;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.os.RemoteException;
@@ -58,6 +59,7 @@
ImsConfigStub mImsConfigStub;
+ @UnsupportedAppUsage
public ImsConfigImplBase(Context context) {
mImsConfigStub = new ImsConfigStub(this, context);
}
@@ -162,6 +164,7 @@
public void setVideoQuality(int quality, ImsConfigListener listener) throws RemoteException {
}
+ @UnsupportedAppUsage
public IImsConfig getIImsConfig() { return mImsConfigStub; }
/**
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
index b2aa080..976c2be 100644
--- a/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
@@ -19,6 +19,7 @@
import android.os.Bundle;
import android.os.RemoteException;
+import android.annotation.UnsupportedAppUsage;
import android.telephony.ims.ImsCallForwardInfo;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsSsData;
diff --git a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
index 0d315e5..1ebb697 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
@@ -21,6 +21,7 @@
import android.telephony.SignalStrength;
import android.telephony.CellInfo;
import android.telephony.DataConnectionRealTimeInfo;
+import android.telephony.PhoneCapability;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
@@ -50,5 +51,6 @@
void onOemHookRawEvent(in byte[] rawData);
void onCarrierNetworkChange(in boolean active);
void onUserMobileDataStateChanged(in boolean enabled);
+ void onPhoneCapabilityChanged(in PhoneCapability capability);
}
diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl
index 5e015e0..6521f0b 100755
--- a/telephony/java/com/android/internal/telephony/ISub.aidl
+++ b/telephony/java/com/android/internal/telephony/ISub.aidl
@@ -156,6 +156,42 @@
*/
int setDataRoaming(int roaming, int subId);
+ /**
+ * Switch to a certain subscription
+ *
+ * @param opportunistic whether it’s opportunistic subscription.
+ * @param subId the unique SubscriptionInfo index in database
+ * @return the number of records updated
+ */
+ int setOpportunistic(boolean opportunistic, int subId);
+
+ /**
+ * Set parent subId by simInfo index
+ *
+ * @param parentSubId: subId of its parent subscription.
+ * @param subId the unique SubscriptionInfo index in database
+ * @return the number of records updated
+ */
+ int setParentSubId(int parentSubId, int subId);
+
+ /**
+ * Set preferred default data.
+ * Set on which slot default data will be on.
+ *
+ * @param slotId which slot is preferred to for cellular data.
+ * @hide
+ *
+ */
+ int setPreferredData(int slotId);
+
+ /**
+ * Get User downloaded Profiles.
+ *
+ * Provide all available user downloaded profile on the phone.
+ * @param slotId on which phone the switch will operate on
+ */
+ List<SubscriptionInfo> getOpportunisticSubscriptions(int slotId, String callingPackage);
+
int getSlotIndex(int subId);
int[] getSubId(int slotIndex);
@@ -186,7 +222,7 @@
int[] getActiveSubIdList();
- void setSubscriptionProperty(int subId, String propKey, String propValue);
+ int setSubscriptionProperty(int subId, String propKey, String propValue);
String getSubscriptionProperty(int subId, String propKey, String callingPackage);
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index f9c3940..c59a739 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1531,4 +1531,10 @@
* @hide
*/
void refreshUiccProfile(int subId);
+
+ /**
+ * How many modems can have simultaneous data connections.
+ * @hide
+ */
+ int getNumberOfModemsWithSimultaneousDataConnections(int subId, String callingPackage);
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index 0127db9..e0e1a7b 100644
--- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -21,6 +21,7 @@
import android.net.NetworkCapabilities;
import android.os.Bundle;
import android.telephony.CellInfo;
+import android.telephony.PhoneCapability;
import android.telephony.PhysicalChannelConfig;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
@@ -74,4 +75,5 @@
void notifySubscriptionInfoChanged();
void notifyCarrierNetworkChange(in boolean active);
void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
+ void notifyPhoneCapabilityChanged(in PhoneCapability capability);
}
diff --git a/telephony/java/com/android/internal/telephony/SmsConstants.java b/telephony/java/com/android/internal/telephony/SmsConstants.java
index 2449108..0aba468 100644
--- a/telephony/java/com/android/internal/telephony/SmsConstants.java
+++ b/telephony/java/com/android/internal/telephony/SmsConstants.java
@@ -58,7 +58,11 @@
* See TS 23.038.
*/
public enum MessageClass{
- UNKNOWN, CLASS_0, CLASS_1, CLASS_2, CLASS_3;
+ UNKNOWN,
+ CLASS_0,
+ CLASS_1,
+ CLASS_2,
+ CLASS_3;
}
/**
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index 51369d0..5ecb43e 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -15,7 +15,6 @@
*/
package com.android.internal.telephony;
-import android.content.Intent;
import android.content.Intent;
import android.telephony.SubscriptionManager;
diff --git a/test-base/Android.bp b/test-base/Android.bp
index d25b477..0b8a02a 100644
--- a/test-base/Android.bp
+++ b/test-base/Android.bp
@@ -19,9 +19,8 @@
// This contains the junit.framework and android.test classes that were in
// Android API level 25 excluding those from android.test.runner.
// Also contains the com.android.internal.util.Predicate[s] classes.
-java_library {
+java_sdk_library {
name: "android.test.base",
- installable: true,
srcs: ["src/**/*.java"],
@@ -29,11 +28,38 @@
javacflags: ["-Xep:DepAnn:ERROR"],
},
+ hostdex: true,
+
+ api_packages: [
+ "android.test",
+ "android.test.suitebuilder.annotation",
+ "com.android.internal.util",
+ "junit.framework",
+ ],
+
+ droiddoc_options: ["stubsourceonly"],
+ compile_dex: true,
+}
+
+// Build the android.test.base_static library
+// ==========================================
+// This is only intended for inclusion in the android.test.runner-minus-junit,
+// robolectric_android-all-stub and repackaged.android.test.* libraries.
+// Must not be used elewhere.
+java_library_static {
+ name: "android.test.base_static",
+ installable: false,
+
+ srcs: ["src/**/*.java"],
+
+ errorprone: {
+ javacflags: ["-Xep:DepAnn:ERROR"],
+ },
+
// Needs to be consistent with the repackaged version of this make target.
java_version: "1.8",
sdk_version: "current",
- hostdex: true,
}
// Build the legacy-test library
@@ -46,7 +72,7 @@
installable: true,
sdk_version: "current",
- static_libs: ["android.test.base"],
+ static_libs: ["android.test.base_static"],
}
// Build the repackaged.android.test.base library
@@ -57,7 +83,7 @@
name: "repackaged.android.test.base",
sdk_version: "current",
- static_libs: ["android.test.base"],
+ static_libs: ["android.test.base_static"],
jarjar_rules: "jarjar-rules.txt",
// Pin java_version until jarjar is certified to support later versions. http://b/72703434
@@ -84,38 +110,3 @@
],
}
-droiddoc {
- name: "android-test-base-api-stubs-gen-docs",
- srcs: [
- "src/**/*.java",
- ],
- custom_template: "droiddoc-templates-sdk",
- installable: false,
- args: "-stubpackages android.test:" +
- "android.test.suitebuilder.annotation:" +
- "com.android.internal.util:" +
- "junit.framework -stubsourceonly -nodocs",
- sdk_version: "current",
- api_tag_name: "ANDROID_TEST_BASE",
- api_filename: "android-test-base-api.txt",
- removed_api_filename: "android-test-base-removed.txt",
-}
-
-// Build the android.test.base.stubs library
-// =========================================
-java_library_static {
- name: "android.test.base.stubs",
- srcs: [
- ":android-test-base-api-stubs-gen-docs",
- ],
- product_variables: {
- pdk: {
- enabled: false,
- },
- unbundled_build: {
- enabled: false,
- },
- },
- sdk_version: "current",
- compile_dex: true,
-}
diff --git a/test-base/Android.mk b/test-base/Android.mk
index baf5726..a9d30cf 100644
--- a/test-base/Android.mk
+++ b/test-base/Android.mk
@@ -16,50 +16,6 @@
LOCAL_PATH:= $(call my-dir)
-# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
-ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
-
-ANDROID_TEST_BASE_API_FILE := $(LOCAL_PATH)/api/android-test-base-current.txt
-ANDROID_TEST_BASE_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-base-removed.txt
-
-full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.base.stubs,,COMMON)/classes.jar
-# Archive a copy of the classes.jar in SDK build.
-$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.base.stubs.jar)
-
-# Check that the android.test.base.stubs library has not changed
-# ==============================================================
-
-# Check that the API we're building hasn't changed from the not-yet-released
-# SDK version.
-$(eval $(call check-api, \
- check-android-test-base-api-current, \
- $(ANDROID_TEST_BASE_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE), \
- $(ANDROID_TEST_BASE_REMOVED_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_REMOVED_API_FILE), \
- -error 2 -error 3 -error 4 -error 5 -error 6 \
- -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
- -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
- -error 25 -error 26 -error 27, \
- cat $(LOCAL_PATH)/api/apicheck_msg_android_test_base.txt, \
- check-android-test-base-api, \
- $(OUT_DOCS)/android-test-base-api-stubs-gen-docs-stubs.srcjar \
- ))
-
-.PHONY: check-android-test-base-api
-checkapi: check-android-test-base-api
-
-.PHONY: update-android-test-base-api
-update-api: update-android-test-base-api
-
-update-android-test-base-api: $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) | $(ACP)
- @echo Copying current.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) $(ANDROID_TEST_BASE_API_FILE)
- @echo Copying removed.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_REMOVED_API_FILE) $(ANDROID_TEST_BASE_REMOVED_API_FILE)
-
-endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
-
ifeq ($(HOST_OS),linux)
# Build the legacy-performance-test-hostdex library
# =================================================
diff --git a/test-base/api/apicheck_msg_android_test_base.txt b/test-base/api/apicheck_msg_android_test_base.txt
deleted file mode 100644
index 144aecc..0000000
--- a/test-base/api/apicheck_msg_android_test_base.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-******************************
-You have tried to change the API from what has been previously approved.
-
-To make these errors go away, you have two choices:
- 1) You can add "@hide" javadoc comments to the methods, etc. listed in the
- errors above.
-
- 2) You can update android-test-base-current.txt by executing the following command:
- make update-android-test-base-api
-
- To submit the revised android-test-base-current.txt to the main Android repository,
- you will need approval.
-******************************
-
-
-
diff --git a/test-base/api/android-test-base-current.txt b/test-base/api/current.txt
similarity index 100%
rename from test-base/api/android-test-base-current.txt
rename to test-base/api/current.txt
diff --git a/test-base/api/android-test-base-removed.txt b/test-base/api/removed.txt
similarity index 100%
copy from test-base/api/android-test-base-removed.txt
copy to test-base/api/removed.txt
diff --git a/test-base/api/android-test-base-removed.txt b/test-base/api/system-current.txt
similarity index 100%
copy from test-base/api/android-test-base-removed.txt
copy to test-base/api/system-current.txt
diff --git a/test-base/api/android-test-base-removed.txt b/test-base/api/system-removed.txt
similarity index 100%
rename from test-base/api/android-test-base-removed.txt
rename to test-base/api/system-removed.txt
diff --git a/test-base/api/android-test-base-removed.txt b/test-base/api/test-current.txt
similarity index 100%
copy from test-base/api/android-test-base-removed.txt
copy to test-base/api/test-current.txt
diff --git a/test-base/api/android-test-base-removed.txt b/test-base/api/test-removed.txt
similarity index 100%
copy from test-base/api/android-test-base-removed.txt
copy to test-base/api/test-removed.txt
diff --git a/test-legacy/Android.bp b/test-legacy/Android.bp
index d2af8a9..833c714 100644
--- a/test-legacy/Android.bp
+++ b/test-legacy/Android.bp
@@ -25,7 +25,7 @@
static_libs: [
"android.test.base-minus-junit",
"android.test.runner-minus-junit",
- "android.test.mock",
+ "android.test.mock.impl",
],
no_framework_libs: true,
diff --git a/test-mock/Android.bp b/test-mock/Android.bp
index 8d3faae..5eba017 100644
--- a/test-mock/Android.bp
+++ b/test-mock/Android.bp
@@ -16,95 +16,15 @@
// Build the android.test.mock library
// ===================================
-java_library {
+java_sdk_library {
name: "android.test.mock",
- installable: true,
- java_version: "1.8",
srcs: ["src/**/*.java"],
- no_framework_libs: true,
- libs: [
- "framework",
+ api_packages: [
+ "android.test.mock",
],
-}
-doc_defaults {
- name:"android.test.mock.docs-defaults",
- srcs: ["src/android/test/mock/**/*.java"],
-
- // Includes the main framework source to ensure that doclava has access to the
- // visibility information for the base classes of the mock classes. Without it
- // otherwise hidden methods could be visible.
- srcs_lib: "framework",
- srcs_lib_whitelist_dirs: ["core/java"],
srcs_lib_whitelist_pkgs: ["android"],
- libs: [
- "core-oj",
- "core-libart",
- "framework",
- "conscrypt",
- "okhttp",
- "bouncycastle",
- "ext",
- ],
- local_sourcepaths: ["src/android/test/mock"],
- custom_template: "droiddoc-templates-sdk",
- installable: false,
-}
-
-android_test_mock_docs_args =
- "-hide 110 -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128 " +
- "-stubpackages android.test.mock " +
- "-nodocs "
-
-droiddoc {
- name: "android.test.mock.docs",
- defaults: ["android.test.mock.docs-defaults"],
-
- api_tag_name: "ANDROID_TEST_MOCK",
- api_filename: "api/android-test-mock-current.txt",
- removed_api_filename: "api/android-test-mock-removed.txt",
-
- args: android_test_mock_docs_args,
-}
-
-droiddoc {
- name: "android.test.mock.docs-system",
- defaults: ["android.test.mock.docs-defaults"],
-
- api_tag_name: "ANDROID_TEST_MOCK_SYSTEM",
- api_filename: "api/android-test-mock-system-current.txt",
- removed_api_filename: "api/android-test-mock-system-removed.txt",
-
- args: android_test_mock_docs_args +
- "-showAnnotation android.annotation.SystemApi ",
-}
-
-java_library_static {
- name: "android.test.mock.stubs",
- srcs: [":android.test.mock.docs"],
- sdk_version: "current",
- product_variables: {
- unbundled_build: {
- // Unbundled apps will use the prebuilt one
- // prebuilts/sdk/current
- enabled: false,
- },
- },
- compile_dex: true,
-}
-
-java_library_static {
- name: "android.test.mock.stubs-system",
- srcs: [":android.test.mock.docs-system"],
- sdk_version: "system_current",
- product_variables: {
- unbundled_build: {
- // Unbundled apps will use the prebuilt one
- // prebuilts/sdk/system_current
- enabled: false,
- },
- },
compile_dex: true,
}
diff --git a/test-mock/Android.mk b/test-mock/Android.mk
deleted file mode 100644
index 73a7340..0000000
--- a/test-mock/Android.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-# Copyright (C) 2008 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.
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-# Archive a copy of the classes.jar in SDK build.
-full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.mock.stubs,,COMMON)/classes.jar
-$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.mock.stubs.jar)
-
-# Check that the android.test.mock.stubs library has not changed
-# ==============================================================
-ANDROID_TEST_MOCK_API_FILE := $(LOCAL_PATH)/api/android-test-mock-current.txt
-ANDROID_TEST_MOCK_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-mock-removed.txt
-
-# Check that the API we're building hasn't changed from the not-yet-released
-# SDK version.
-$(eval $(call check-api, \
- check-android-test-mock-api-current, \
- $(ANDROID_TEST_MOCK_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE), \
- $(ANDROID_TEST_MOCK_REMOVED_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_REMOVED_API_FILE), \
- -error 2 -error 3 -error 4 -error 5 -error 6 \
- -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
- -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
- -error 25 -error 26 -error 27, \
- cat $(LOCAL_PATH)/api/apicheck_msg_android_test_mock.txt, \
- check-android-test-mock-api, \
- $(OUT_DOCS)/android.test.mock.docs-stubs.srcjar \
- ))
-
-.PHONY: check-android-test-mock-api
-checkapi: check-android-test-mock-api
-
-.PHONY: update-android-test-mock-api
-update-api: update-android-test-mock-api
-
-update-android-test-mock-api: $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE) | $(ACP)
- @echo Copying current.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_API_FILE) $(ANDROID_TEST_MOCK_API_FILE)
- @echo Copying removed.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_REMOVED_API_FILE) $(ANDROID_TEST_MOCK_REMOVED_API_FILE)
-
-# Archive a copy of the classes.jar in SDK build.
-full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.mock.stubs-system,,COMMON)/classes.jar
-$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.mock.stubs_system.jar)
-
-# Check that the android.test.mock.stubs-system library has not changed
-# =====================================================================
-ANDROID_TEST_MOCK_SYSTEM_API_FILE := $(LOCAL_PATH)/api/android-test-mock-system-current.txt
-ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-mock-system-removed.txt
-
-# Check that the API we're building hasn't changed from the not-yet-released
-# SDK version.
-$(eval $(call check-api, \
- check-android-test-mock-system-api-current, \
- $(ANDROID_TEST_MOCK_SYSTEM_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_API_FILE), \
- $(ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE), \
- -error 2 -error 3 -error 4 -error 5 -error 6 \
- -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
- -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
- -error 25 -error 26 -error 27, \
- cat $(LOCAL_PATH)/api/apicheck_msg_android_test_mock-system.txt, \
- check-android-test-mock-system-api, \
- $(OUT_DOCS)/android.test.mock.docs-system-stubs.srcjar \
- ))
-
-.PHONY: check-android-test-mock-system-api
-checkapi: check-android-test-mock-system-api
-
-.PHONY: update-android-test-mock-system-api
-update-api: update-android-test-mock-system-api
-
-update-android-test-mock-system-api: $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_API_FILE) | $(ACP)
- @echo Copying current.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_API_FILE) $(ANDROID_TEST_MOCK_SYSTEM_API_FILE)
- @echo Copying removed.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE) $(ANDROID_TEST_MOCK_SYSTEM_REMOVED_API_FILE)
diff --git a/test-mock/api/apicheck_msg_android_test_mock-system.txt b/test-mock/api/apicheck_msg_android_test_mock-system.txt
deleted file mode 100644
index 3a97117..0000000
--- a/test-mock/api/apicheck_msg_android_test_mock-system.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-******************************
-You have tried to change the API from what has been previously approved.
-
-To make these errors go away, you have two choices:
- 1) You can add "@hide" javadoc comments to the methods, etc. listed in the
- errors above.
-
- 2) You can update android-test-mock-current.txt by executing the following command:
- make update-android-test-mock-system-api
-
- To submit the revised android-test-mock-system-current.txt to the main Android repository,
- you will need approval.
-******************************
-
-
-
diff --git a/test-mock/api/apicheck_msg_android_test_mock.txt b/test-mock/api/apicheck_msg_android_test_mock.txt
deleted file mode 100644
index e388935..0000000
--- a/test-mock/api/apicheck_msg_android_test_mock.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-******************************
-You have tried to change the API from what has been previously approved.
-
-To make these errors go away, you have two choices:
- 1) You can add "@hide" javadoc comments to the methods, etc. listed in the
- errors above.
-
- 2) You can update android-test-mock-current.txt by executing the following command:
- make update-android-test-mock-api
-
- To submit the revised android-test-mock-current.txt to the main Android repository,
- you will need approval.
-******************************
-
-
-
diff --git a/test-mock/api/android-test-mock-current.txt b/test-mock/api/current.txt
similarity index 100%
rename from test-mock/api/android-test-mock-current.txt
rename to test-mock/api/current.txt
diff --git a/test-mock/api/android-test-mock-removed.txt b/test-mock/api/removed.txt
similarity index 100%
rename from test-mock/api/android-test-mock-removed.txt
rename to test-mock/api/removed.txt
diff --git a/test-mock/api/android-test-mock-system-current.txt b/test-mock/api/system-current.txt
similarity index 100%
rename from test-mock/api/android-test-mock-system-current.txt
rename to test-mock/api/system-current.txt
diff --git a/test-mock/api/android-test-mock-system-removed.txt b/test-mock/api/system-removed.txt
similarity index 100%
rename from test-mock/api/android-test-mock-system-removed.txt
rename to test-mock/api/system-removed.txt
diff --git a/test-mock/api/test-current.txt b/test-mock/api/test-current.txt
new file mode 100644
index 0000000..f1ec000
--- /dev/null
+++ b/test-mock/api/test-current.txt
@@ -0,0 +1,22 @@
+package android.test.mock {
+
+ public class MockContext extends android.content.Context {
+ method public java.lang.String getOpPackageName();
+ }
+
+ public deprecated class MockPackageManager extends android.content.pm.PackageManager {
+ method public boolean arePermissionsIndividuallyControlled();
+ method public java.lang.String getDefaultBrowserPackageNameAsUser(int);
+ method public int getInstallReason(java.lang.String, android.os.UserHandle);
+ method public java.util.List<android.content.pm.ApplicationInfo> getInstalledApplicationsAsUser(int, int);
+ method public java.util.List<android.content.pm.PackageInfo> getInstalledPackagesAsUser(int, int);
+ method public java.lang.String[] getNamesForUids(int[]);
+ method public java.lang.String getPermissionControllerPackageName();
+ method public java.lang.String getServicesSystemSharedLibraryPackageName();
+ method public java.lang.String getSharedSystemSharedLibraryPackageName();
+ method public void grantRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
+ method public void revokeRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
+ }
+
+}
+
diff --git a/test-mock/api/android-test-mock-system-removed.txt b/test-mock/api/test-removed.txt
similarity index 100%
copy from test-mock/api/android-test-mock-system-removed.txt
copy to test-mock/api/test-removed.txt
diff --git a/test-runner/Android.bp b/test-runner/Android.bp
index 2caa6c4..ea615b9 100644
--- a/test-runner/Android.bp
+++ b/test-runner/Android.bp
@@ -16,23 +16,32 @@
// Build the android.test.runner library
// =====================================
-java_library {
+java_sdk_library {
name: "android.test.runner",
- installable: true,
- // Needs to be consistent with the repackaged version of this make target.
- java_version: "1.8",
srcs: ["src/**/*.java"],
errorprone: {
javacflags: ["-Xep:DepAnn:ERROR"],
},
- sdk_version: "current",
libs: [
"android.test.base",
- "android.test.mock.stubs",
+ "android.test.mock",
],
+ stub_only_libs: [
+ "android.test.base",
+ "android.test.mock",
+ ],
+ api_packages: [
+ "android.test",
+ "android.test.suitebuilder",
+ "junit.runner",
+ "junit.textui",
+ ],
+
+ droiddoc_options: ["stubsourceonly"],
+ compile_dex: true
}
// Build the android.test.runner-minus-junit library
@@ -46,8 +55,8 @@
sdk_version: "current",
libs: [
- "android.test.base",
- "android.test.mock.stubs",
+ "android.test.base_static",
+ "android.test.mock",
"junit",
],
}
@@ -70,7 +79,7 @@
sdk_version: "current",
libs: [
- "android.test.base",
+ "android.test.base_static",
],
jarjar_rules: "jarjar-rules.txt",
@@ -78,48 +87,3 @@
java_version: "1.8",
}
-droiddoc {
- name: "android-test-runner-api-stubs-gen-docs",
- srcs: [
- "src/**/*.java",
- ],
- libs: [
- "core-oj",
- "core-libart",
- "framework",
- "android.test.base",
- "android.test.mock",
- ],
- custom_template: "droiddoc-templates-sdk",
- installable: false,
- args: "-stubpackages android.test:" +
- "android.test.suitebuilder:" +
- "junit.runner:" +
- "junit.textui -stubsourceonly -nodocs",
- api_tag_name: "ANDROID_TEST_RUNNER",
- api_filename: "android-test-runner-current.txt",
- removed_api_filename: "android-test-runner-removed.txt",
-}
-
-// Build the android.test.runner.stubs library
-// =========================================
-java_library_static {
- name: "android.test.runner.stubs",
- srcs: [
- ":android-test-runner-api-stubs-gen-docs",
- ],
- libs: [
- "android.test.base.stubs",
- "android.test.mock.stubs",
- ],
- product_variables: {
- pdk: {
- enabled: false,
- },
- unbundled_build: {
- enabled: false,
- },
- },
- sdk_version: "current",
- compile_dex: true,
-}
diff --git a/test-runner/Android.mk b/test-runner/Android.mk
index b70d249..18bde85 100644
--- a/test-runner/Android.mk
+++ b/test-runner/Android.mk
@@ -16,49 +16,5 @@
LOCAL_PATH:= $(call my-dir)
-# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
-ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
-
-ANDROID_TEST_RUNNER_API_FILE := $(LOCAL_PATH)/api/android-test-runner-current.txt
-ANDROID_TEST_RUNNER_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-runner-removed.txt
-
-full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.runner.stubs,,COMMON)/classes.jar
-# Archive a copy of the classes.jar in SDK build.
-$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.runner.stubs.jar)
-
-# Check that the android.test.runner.stubs library has not changed
-# ================================================================
-
-# Check that the API we're building hasn't changed from the not-yet-released
-# SDK version.
-$(eval $(call check-api, \
- check-android-test-runner-api-current, \
- $(ANDROID_TEST_RUNNER_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE), \
- $(ANDROID_TEST_RUNNER_REMOVED_API_FILE), \
- $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE), \
- -error 2 -error 3 -error 4 -error 5 -error 6 \
- -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
- -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
- -error 25 -error 26 -error 27, \
- cat $(LOCAL_PATH)/api/apicheck_msg_android_test_runner.txt, \
- check-android-test-runner-api, \
- $(OUT_DOCS)/android-test-runner-api-stubs-gen-docs-stubs.srcjar \
- ))
-
-.PHONY: check-android-test-runner-api
-checkapi: check-android-test-runner-api
-
-.PHONY: update-android-test-runner-api
-update-api: update-android-test-runner-api
-
-update-android-test-runner-api: $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) | $(ACP)
- @echo Copying current.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) $(ANDROID_TEST_RUNNER_API_FILE)
- @echo Copying removed.txt
- $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE) $(ANDROID_TEST_RUNNER_REMOVED_API_FILE)
-
-endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
-
# additionally, build unit tests in a separate .apk
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/test-runner/api/apicheck_msg_android_test_runner.txt b/test-runner/api/apicheck_msg_android_test_runner.txt
deleted file mode 100644
index cf2d15e..0000000
--- a/test-runner/api/apicheck_msg_android_test_runner.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-******************************
-You have tried to change the API from what has been previously approved.
-
-To make these errors go away, you have two choices:
- 1) You can add "@hide" javadoc comments to the methods, etc. listed in the
- errors above.
-
- 2) You can update android-test-runner-current.txt by executing the following command:
- make update-android-test-runner-api
-
- To submit the revised android-test-runner-current.txt to the main Android repository,
- you will need approval.
-******************************
-
-
-
diff --git a/test-runner/api/android-test-runner-current.txt b/test-runner/api/current.txt
similarity index 100%
rename from test-runner/api/android-test-runner-current.txt
rename to test-runner/api/current.txt
diff --git a/test-runner/api/android-test-runner-removed.txt b/test-runner/api/removed.txt
similarity index 100%
copy from test-runner/api/android-test-runner-removed.txt
copy to test-runner/api/removed.txt
diff --git a/test-runner/api/android-test-runner-removed.txt b/test-runner/api/system-current.txt
similarity index 100%
copy from test-runner/api/android-test-runner-removed.txt
copy to test-runner/api/system-current.txt
diff --git a/test-runner/api/android-test-runner-removed.txt b/test-runner/api/system-removed.txt
similarity index 100%
rename from test-runner/api/android-test-runner-removed.txt
rename to test-runner/api/system-removed.txt
diff --git a/test-runner/api/android-test-runner-removed.txt b/test-runner/api/test-current.txt
similarity index 100%
copy from test-runner/api/android-test-runner-removed.txt
copy to test-runner/api/test-current.txt
diff --git a/test-runner/api/android-test-runner-removed.txt b/test-runner/api/test-removed.txt
similarity index 100%
copy from test-runner/api/android-test-runner-removed.txt
copy to test-runner/api/test-removed.txt
diff --git a/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java b/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
index e247951..e509d2d 100644
--- a/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
+++ b/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/BackgroundDexOptServiceIntegrationTests.java
@@ -17,8 +17,10 @@
package com.android.server.pm;
import android.app.AlarmManager;
+import android.app.UiAutomation;
import android.content.Context;
import android.os.Environment;
+import android.os.ParcelFileDescriptor;
import android.os.SystemProperties;
import android.os.storage.StorageManager;
import android.support.test.InstrumentationRegistry;
@@ -34,6 +36,7 @@
import org.junit.runners.JUnit4;
import java.io.File;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -141,27 +144,17 @@
// Run the command and return the stdout.
private static String runShellCommand(String cmd) throws IOException {
Log.i(TAG, String.format("running command: '%s'", cmd));
- long startTime = System.nanoTime();
- Process p = Runtime.getRuntime().exec(cmd);
- int res;
- try {
- res = p.waitFor();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
+ ParcelFileDescriptor pfd = InstrumentationRegistry.getInstrumentation().getUiAutomation()
+ .executeShellCommand(cmd);
+ byte[] buf = new byte[512];
+ int bytesRead;
+ FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
+ StringBuilder stdout = new StringBuilder();
+ while ((bytesRead = fis.read(buf)) != -1) {
+ stdout.append(new String(buf, 0, bytesRead));
}
- String stdout = inputStreamToString(p.getInputStream());
- String stderr = inputStreamToString(p.getErrorStream());
- long elapsedTime = System.nanoTime() - startTime;
- Log.i(TAG, String.format("ran command: '%s' in %d ms with return code %d", cmd,
- TimeUnit.NANOSECONDS.toMillis(elapsedTime), res));
- Log.i(TAG, "stdout");
- Log.i(TAG, stdout);
- Log.i(TAG, "stderr");
- Log.i(TAG, stderr);
- if (res != 0) {
- throw new RuntimeException(String.format("failed command: '%s'", cmd));
- }
- return stdout;
+ fis.close();
+ return stdout.toString();
}
// Run the command and return the stdout split by lines.
diff --git a/tests/libs-permissions/Android.mk b/tests/libs-permissions/Android.mk
index eb38623..f4250c8 100644
--- a/tests/libs-permissions/Android.mk
+++ b/tests/libs-permissions/Android.mk
@@ -13,3 +13,17 @@
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
LOCAL_SRC_FILES:= product/com.android.test.libs.product.xml
include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := com.android.test.libs.product_services
+LOCAL_PRODUCT_SERVICES_MODULE := true
+LOCAL_SRC_FILES := $(call all-java-files-under, product_services/java)
+LOCAL_REQUIRED_MODULES := com.android.test.libs.product_services.xml
+include $(BUILD_JAVA_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := com.android.test.libs.product_services.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_SERVICES_ETC)/permissions
+LOCAL_SRC_FILES:= product_services/com.android.test.libs.product_services.xml
+include $(BUILD_PREBUILT)
diff --git a/vr/com.google.vr.platform.xml b/tests/libs-permissions/product_services/com.android.test.libs.product_services.xml
similarity index 74%
copy from vr/com.google.vr.platform.xml
copy to tests/libs-permissions/product_services/com.android.test.libs.product_services.xml
index 952b476..082a9be 100644
--- a/vr/com.google.vr.platform.xml
+++ b/tests/libs-permissions/product_services/com.android.test.libs.product_services.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- 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.
@@ -15,6 +15,6 @@
-->
<permissions>
- <library name="com.google.vr.platform"
- file="/system/framework/com.google.vr.platform.jar" />
+ <library name="com.android.test.libs.product_services"
+ file="/product_services/framework/com.android.test.libs.product_services.jar" />
</permissions>
diff --git a/tests/libs-permissions/product_services/java/com/android/test/libs/product_services/LibsProductServicesTest.java b/tests/libs-permissions/product_services/java/com/android/test/libs/product_services/LibsProductServicesTest.java
new file mode 100644
index 0000000..dcbdae8
--- /dev/null
+++ b/tests/libs-permissions/product_services/java/com/android/test/libs/product_services/LibsProductServicesTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.test.libs.product_services;
+
+/**
+ * Test class for product_services libs.
+ */
+public class LibsProductServicesTest {
+
+ /**
+ * Dummy method for testing.
+ */
+ public static void test() {
+ }
+}
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/tests/privapp-permissions/Android.mk b/tests/privapp-permissions/Android.mk
index 9795188..1149b8a 100644
--- a/tests/privapp-permissions/Android.mk
+++ b/tests/privapp-permissions/Android.mk
@@ -46,3 +46,19 @@
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
LOCAL_SRC_FILES:= product/privapp-permissions-test.xml
include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_PACKAGE_NAME := ProductServicesPrivAppPermissionTest
+LOCAL_SDK_VERSION := current
+LOCAL_PRIVILEGED_MODULE := true
+LOCAL_MANIFEST_FILE := product_services/AndroidManifest.xml
+LOCAL_PRODUCT_SERVICES_MODULE := true
+LOCAL_REQUIRED_MODULES := product_servicesprivapp-permissions-test.xml
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := product_servicesprivapp-permissions-test.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_SERVICES_ETC)/permissions
+LOCAL_SRC_FILES:= product_services/privapp-permissions-test.xml
+include $(BUILD_PREBUILT)
diff --git a/tests/privapp-permissions/product_services/AndroidManifest.xml b/tests/privapp-permissions/product_services/AndroidManifest.xml
new file mode 100644
index 0000000..511ddee
--- /dev/null
+++ b/tests/privapp-permissions/product_services/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2018 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.framework.permission.privapp.tests.product_services">
+
+ <!-- MANAGE_USB is signature|privileged -->
+ <uses-permission android:name="android.permission.MANAGE_USB"/>
+</manifest>
diff --git a/tests/privapp-permissions/product_services/privapp-permissions-test.xml b/tests/privapp-permissions/product_services/privapp-permissions-test.xml
new file mode 100644
index 0000000..43baebb
--- /dev/null
+++ b/tests/privapp-permissions/product_services/privapp-permissions-test.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
+ <privapp-permissions package="com.android.framework.permission.privapp.tests.product_services">
+ <permission name="android.permission.MANAGE_USB"/>
+ </privapp-permissions>
+</permissions>
diff --git a/tests/testables/Android.bp b/tests/testables/Android.bp
new file mode 100644
index 0000000..f07f09d
--- /dev/null
+++ b/tests/testables/Android.bp
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 2017 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.
+//
+
+java_library {
+
+ name: "testables",
+ // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_MODULE_TAG
+ // LOCAL_MODULE_TAG := tests
+
+ srcs: ["src/**/*.java"],
+
+ libs: [
+ "android.test.runner",
+ "android.test.mock",
+ "android-support-test",
+ "mockito-target-inline-minus-junit4",
+ ],
+
+}
diff --git a/tests/testables/Android.mk b/tests/testables/Android.mk
deleted file mode 100644
index f3cbac0..0000000
--- a/tests/testables/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := testables
-LOCAL_MODULE_TAG := tests
-
-LOCAL_SRC_FILES := $(call all-java-files-under,src)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.mock \
- android-support-test \
- mockito-target-inline-minus-junit4
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/utils/testutils/Android.bp b/tests/utils/testutils/Android.bp
new file mode 100644
index 0000000..4be6534
--- /dev/null
+++ b/tests/utils/testutils/Android.bp
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 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.
+//
+
+java_library {
+ name: "frameworks-base-testutils",
+
+ srcs: ["java/**/*.java"],
+
+ static_libs: ["android-support-test"],
+
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ "android.test.mock",
+ "mockito-target-minus-junit4",
+ ],
+}
diff --git a/tests/utils/testutils/Android.mk b/tests/utils/testutils/Android.mk
deleted file mode 100644
index a76616f..0000000
--- a/tests/utils/testutils/Android.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (C) 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := frameworks-base-testutils
-LOCAL_MODULE_TAG := tests
-
-LOCAL_SRC_FILES := $(call all-java-files-under,java)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test
-
-LOCAL_JAVA_LIBRARIES := \
- android.test.runner \
- android.test.base \
- android.test.mock \
- mockito-target-minus-junit4 \
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp
index f064cb1..0a517ab 100644
--- a/tools/aapt2/Debug.cpp
+++ b/tools/aapt2/Debug.cpp
@@ -408,6 +408,41 @@
}
}
+void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* printer) {
+ using namespace android;
+
+ if (pool->getError() == NO_INIT) {
+ printer->Print("String pool is unitialized.\n");
+ return;
+ } else if (pool->getError() != NO_ERROR) {
+ printer->Print("String pool is corrupt/invalid.\n");
+ return;
+ }
+
+ SortedVector<const void*> uniqueStrings;
+ const size_t N = pool->size();
+ for (size_t i=0; i<N; i++) {
+ size_t len;
+ if (pool->isUTF8()) {
+ uniqueStrings.add(pool->string8At(i, &len));
+ } else {
+ uniqueStrings.add(pool->stringAt(i, &len));
+ }
+ }
+
+ printer->Print(StringPrintf("String pool of %zd unique %s %s strings, %zd entries and %zd styles "
+ "using %zd bytes:\n", uniqueStrings.size(),
+ pool->isUTF8() ? "UTF-8" : "UTF-16",
+ pool->isSorted() ? "sorted" : "non-sorted", N, pool->styleCount(),
+ pool->bytes()));
+
+ const size_t NS = pool->size();
+ for (size_t s=0; s<NS; s++) {
+ String8 str = pool->string8ObjectAt(s);
+ printer->Print(StringPrintf("String #%zd : %s\n", s, str.string()));
+ }
+}
+
namespace {
class XmlPrinter : public xml::ConstVisitor {
diff --git a/tools/aapt2/Debug.h b/tools/aapt2/Debug.h
index 382707e..a43197c 100644
--- a/tools/aapt2/Debug.h
+++ b/tools/aapt2/Debug.h
@@ -38,6 +38,7 @@
static void PrintStyleGraph(ResourceTable* table, const ResourceName& target_style);
static void DumpHex(const void* data, size_t len);
static void DumpXml(const xml::XmlResource& doc, text::Printer* printer);
+ static void DumpResStringPool(const android::ResStringPool* pool, text::Printer* printer);
};
} // namespace aapt
diff --git a/tools/aapt2/LoadedApk.cpp b/tools/aapt2/LoadedApk.cpp
index 1dd46ba..a73d56c 100644
--- a/tools/aapt2/LoadedApk.cpp
+++ b/tools/aapt2/LoadedApk.cpp
@@ -76,7 +76,7 @@
}
std::string error;
- table = util::make_unique<ResourceTable>();
+ table = util::make_unique<ResourceTable>(/** validate_resources **/ false);
if (!DeserializeTableFromPb(pb_table, collection.get(), table.get(), &error)) {
diag->Error(DiagMessage(source)
<< "failed to deserialize " << kProtoResourceTablePath << ": " << error);
@@ -120,7 +120,7 @@
io::IFile* table_file = collection->FindFile(kApkResourceTablePath);
if (table_file != nullptr) {
- table = util::make_unique<ResourceTable>();
+ table = util::make_unique<ResourceTable>(/** validate_resources **/ false);
std::unique_ptr<io::IData> data = table_file->OpenAsData();
if (data == nullptr) {
diag->Error(DiagMessage(source) << "failed to open " << kApkResourceTablePath);
@@ -184,10 +184,7 @@
std::unique_ptr<io::IFileCollectionIterator> iterator = apk_->Iterator();
while (iterator->HasNext()) {
io::IFile* file = iterator->Next();
-
std::string path = file->GetSource().path;
- // The name of the path has the format "<zip-file-name>@<path-to-file>".
- path = path.substr(path.find('@') + 1);
// Skip resources that are not referenced if requested.
if (path.find("res/") == 0 && referenced_resources.find(path) == referenced_resources.end()) {
@@ -257,6 +254,53 @@
return true;
}
+std::unique_ptr<xml::XmlResource> LoadedApk::LoadXml(const std::string& file_path,
+ IDiagnostics* diag) {
+ io::IFile* file = apk_->FindFile(file_path);
+ if (file == nullptr) {
+ diag->Error(DiagMessage() << "failed to find file");
+ return nullptr;
+ }
+
+ std::unique_ptr<xml::XmlResource> doc;
+ if (format_ == ApkFormat::kProto) {
+ std::unique_ptr<io::InputStream> in = file->OpenInputStream();
+ if (!in) {
+ diag->Error(DiagMessage() << "failed to open file");
+ return nullptr;
+ }
+
+ io::ZeroCopyInputAdaptor adaptor(in.get());
+ pb::XmlNode pb_node;
+ if (!pb_node.ParseFromZeroCopyStream(&adaptor)) {
+ diag->Error(DiagMessage() << "failed to parse file as proto XML");
+ return nullptr;
+ }
+
+ std::string err;
+ doc = DeserializeXmlResourceFromPb(pb_node, &err);
+ if (!doc) {
+ diag->Error(DiagMessage() << "failed to deserialize proto XML: " << err);
+ return nullptr;
+ }
+ } else if (format_ == ApkFormat::kBinary) {
+ std::unique_ptr<io::IData> data = file->OpenAsData();
+ if (!data) {
+ diag->Error(DiagMessage() << "failed to open file");
+ return nullptr;
+ }
+
+ std::string err;
+ doc = xml::Inflate(data->data(), data->size(), &err);
+ if (!doc) {
+ diag->Error(DiagMessage() << "failed to parse file as binary XML: " << err);
+ return nullptr;
+ }
+ }
+
+ return doc;
+}
+
ApkFormat LoadedApk::DetermineApkFormat(io::IFileCollection* apk) {
if (apk->FindFile(kApkResourceTablePath) != nullptr) {
return ApkFormat::kBinary;
diff --git a/tools/aapt2/LoadedApk.h b/tools/aapt2/LoadedApk.h
index 41f879d..dcb085a 100644
--- a/tools/aapt2/LoadedApk.h
+++ b/tools/aapt2/LoadedApk.h
@@ -70,6 +70,10 @@
return apk_.get();
}
+ ApkFormat GetApkFormat() {
+ return format_;
+ }
+
const ResourceTable* GetResourceTable() const {
return table_.get();
}
@@ -106,6 +110,8 @@
const TableFlattenerOptions& options, FilterChain* filters,
IArchiveWriter* writer, xml::XmlResource* manifest = nullptr);
+ /** Loads the file as an xml document. */
+ std::unique_ptr<xml::XmlResource> LoadXml(const std::string& file_path, IDiagnostics* diag);
private:
DISALLOW_COPY_AND_ASSIGN(LoadedApk);
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index 23903c9e..37013c0 100644
--- a/tools/aapt2/Main.cpp
+++ b/tools/aapt2/Main.cpp
@@ -71,7 +71,7 @@
explicit MainCommand(IDiagnostics* diagnostics) : Command("aapt2"), diagnostics_(diagnostics) {
AddOptionalSubcommand(util::make_unique<CompileCommand>(diagnostics));
AddOptionalSubcommand(util::make_unique<LinkCommand>(diagnostics));
- AddOptionalSubcommand(util::make_unique<DumpCommand>());
+ AddOptionalSubcommand(util::make_unique<DumpCommand>(diagnostics));
AddOptionalSubcommand(util::make_unique<DiffCommand>());
AddOptionalSubcommand(util::make_unique<OptimizeCommand>());
AddOptionalSubcommand(util::make_unique<ConvertCommand>());
diff --git a/tools/aapt2/Resource.cpp b/tools/aapt2/Resource.cpp
index b78f48c..ae01170 100644
--- a/tools/aapt2/Resource.cpp
+++ b/tools/aapt2/Resource.cpp
@@ -96,6 +96,8 @@
return "styleable";
case ResourceType::kTransition:
return "transition";
+ case ResourceType::kUnknown:
+ return "unknown";
case ResourceType::kXml:
return "xml";
}
diff --git a/tools/aapt2/Resource.h b/tools/aapt2/Resource.h
index 6fcf0f6..879d0bd 100644
--- a/tools/aapt2/Resource.h
+++ b/tools/aapt2/Resource.h
@@ -66,6 +66,11 @@
kStyle,
kStyleable,
kTransition,
+
+ // Not a parsed type. It is only used when loading resource tables that may have modified type
+ // names
+ kUnknown,
+
kXml,
};
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index d0faac3..58b5e8f 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -26,6 +26,7 @@
#include "androidfw/ResourceTypes.h"
#include "ConfigDescription.h"
+#include "Debug.h"
#include "NameMangler.h"
#include "ResourceValues.h"
#include "ValueVisitor.h"
@@ -38,8 +39,9 @@
namespace aapt {
-static bool less_than_type(const std::unique_ptr<ResourceTableType>& lhs, ResourceType rhs) {
- return lhs->type < rhs;
+static bool less_than_type_and_id(const std::unique_ptr<ResourceTableType>& lhs,
+ const std::pair<ResourceType, Maybe<uint8_t>>& rhs) {
+ return lhs->type < rhs.first || (lhs->type == rhs.first && rhs.second && lhs->id < rhs.second);
}
template <typename T>
@@ -51,7 +53,7 @@
static bool less_than_struct_with_name_and_id(const std::unique_ptr<T>& lhs,
const std::pair<StringPiece, Maybe<uint8_t>>& rhs) {
int name_cmp = lhs->name.compare(0, lhs->name.size(), rhs.first.data(), rhs.first.size());
- return name_cmp < 0 || (name_cmp == 0 && lhs->id < rhs.second);
+ return name_cmp < 0 || (name_cmp == 0 && rhs.second && lhs->id < rhs.second);
}
ResourceTablePackage* ResourceTable::FindPackage(const StringPiece& name) const {
@@ -115,42 +117,52 @@
return packages.emplace(iter, std::move(new_package))->get();
}
-ResourceTableType* ResourceTablePackage::FindType(ResourceType type) {
+ResourceTableType* ResourceTablePackage::FindType(ResourceType type, const Maybe<uint8_t> id) {
const auto last = types.end();
- auto iter = std::lower_bound(types.begin(), last, type, less_than_type);
- if (iter != last && (*iter)->type == type) {
+ auto iter = std::lower_bound(types.begin(), last, std::make_pair(type, id),
+ less_than_type_and_id);
+ if (iter != last && (*iter)->type == type && (!id || id == (*iter)->id)) {
return iter->get();
}
return nullptr;
}
-ResourceTableType* ResourceTablePackage::FindOrCreateType(ResourceType type) {
+ResourceTableType* ResourceTablePackage::FindOrCreateType(ResourceType type,
+ const Maybe<uint8_t> id) {
const auto last = types.end();
- auto iter = std::lower_bound(types.begin(), last, type, less_than_type);
- if (iter != last && (*iter)->type == type) {
+ auto iter = std::lower_bound(types.begin(), last, std::make_pair(type, id),
+ less_than_type_and_id);
+ if (iter != last && (*iter)->type == type && (!id || id == (*iter)->id)) {
return iter->get();
}
- return types.emplace(iter, new ResourceTableType(type))->get();
+
+ auto new_type = new ResourceTableType(type);
+ new_type->id = id;
+ return types.emplace(iter, std::move(new_type))->get();
}
-ResourceEntry* ResourceTableType::FindEntry(const StringPiece& name) {
+ResourceEntry* ResourceTableType::FindEntry(const StringPiece& name, const Maybe<uint8_t> id) {
const auto last = entries.end();
- auto iter =
- std::lower_bound(entries.begin(), last, name, less_than_struct_with_name<ResourceEntry>);
- if (iter != last && name == (*iter)->name) {
+ auto iter = std::lower_bound(entries.begin(), last, std::make_pair(name, id),
+ less_than_struct_with_name_and_id<ResourceEntry>);
+ if (iter != last && name == (*iter)->name && (!id || id == (*iter)->id)) {
return iter->get();
}
return nullptr;
}
-ResourceEntry* ResourceTableType::FindOrCreateEntry(const StringPiece& name) {
+ResourceEntry* ResourceTableType::FindOrCreateEntry(const StringPiece& name,
+ const Maybe<uint8_t> id) {
auto last = entries.end();
- auto iter =
- std::lower_bound(entries.begin(), last, name, less_than_struct_with_name<ResourceEntry>);
- if (iter != last && name == (*iter)->name) {
+ auto iter = std::lower_bound(entries.begin(), last, std::make_pair(name, id),
+ less_than_struct_with_name_and_id<ResourceEntry>);
+ if (iter != last && name == (*iter)->name && (!id || id == (*iter)->id)) {
return iter->get();
}
- return entries.emplace(iter, new ResourceEntry(name))->get();
+
+ auto new_entry = new ResourceEntry(name);
+ new_entry->id = id;
+ return entries.emplace(iter, std::move(new_entry))->get();
}
ResourceConfigValue* ResourceEntry::FindValue(const ConfigDescription& config) {
@@ -302,9 +314,15 @@
// Keep the existing attribute.
return CollisionResult::kKeepOriginal;
}
+
return CollisionResult::kConflict;
}
+ResourceTable::CollisionResult ResourceTable::IgnoreCollision(Value* /** existing **/,
+ Value* /** incoming **/) {
+ return CollisionResult::kKeepBoth;
+}
+
static StringPiece ResourceNameValidator(const StringPiece& name) {
if (!IsValidResourceEntryName(name)) {
return name;
@@ -321,15 +339,17 @@
const StringPiece& product,
std::unique_ptr<Value> value,
IDiagnostics* diag) {
- return AddResourceImpl(name, {}, config, product, std::move(value), ResourceNameValidator,
- ResolveValueCollision, diag);
+ return AddResourceImpl(name, ResourceId{}, config, product, std::move(value),
+ (validate_resources_ ? ResourceNameValidator : SkipNameValidator),
+ (validate_resources_ ? ResolveValueCollision : IgnoreCollision), diag);
}
bool ResourceTable::AddResourceWithId(const ResourceNameRef& name, const ResourceId& res_id,
const ConfigDescription& config, const StringPiece& product,
std::unique_ptr<Value> value, IDiagnostics* diag) {
- return AddResourceImpl(name, res_id, config, product, std::move(value), ResourceNameValidator,
- ResolveValueCollision, diag);
+ return AddResourceImpl(name, res_id, config, product, std::move(value),
+ (validate_resources_ ? ResourceNameValidator : SkipNameValidator),
+ (validate_resources_ ? ResolveValueCollision : IgnoreCollision), diag);
}
bool ResourceTable::AddFileReference(const ResourceNameRef& name,
@@ -337,14 +357,18 @@
const Source& source,
const StringPiece& path,
IDiagnostics* diag) {
- return AddFileReferenceImpl(name, config, source, path, nullptr, ResourceNameValidator, diag);
+ return AddFileReferenceImpl(name, config, source, path, nullptr,
+ (validate_resources_ ? ResourceNameValidator : SkipNameValidator),
+ diag);
}
bool ResourceTable::AddFileReferenceMangled(const ResourceNameRef& name,
const ConfigDescription& config, const Source& source,
const StringPiece& path, io::IFile* file,
IDiagnostics* diag) {
- return AddFileReferenceImpl(name, config, source, path, file, SkipNameValidator, diag);
+ return AddFileReferenceImpl(name, config, source, path, file,
+ (validate_resources_ ? ResourceNameValidator : SkipNameValidator),
+ diag);
}
bool ResourceTable::AddFileReferenceImpl(const ResourceNameRef& name,
@@ -363,7 +387,7 @@
const StringPiece& product, std::unique_ptr<Value> value,
IDiagnostics* diag) {
return AddResourceImpl(name, ResourceId{}, config, product, std::move(value), SkipNameValidator,
- ResolveValueCollision, diag);
+ (validate_resources_ ? ResolveValueCollision : IgnoreCollision), diag);
}
bool ResourceTable::AddResourceWithIdMangled(const ResourceNameRef& name, const ResourceId& id,
@@ -371,7 +395,7 @@
const StringPiece& product,
std::unique_ptr<Value> value, IDiagnostics* diag) {
return AddResourceImpl(name, id, config, product, std::move(value), SkipNameValidator,
- ResolveValueCollision, diag);
+ (validate_resources_ ? ResolveValueCollision : IgnoreCollision), diag);
}
bool ResourceTable::ValidateName(NameValidator name_validator, const ResourceNameRef& name,
@@ -398,37 +422,57 @@
return false;
}
+ // Check for package names appearing twice with two different package ids
ResourceTablePackage* package = FindOrCreatePackage(name.package);
if (res_id.is_valid_dynamic() && package->id && package->id.value() != res_id.package_id()) {
- diag->Error(DiagMessage(source) << "trying to add resource '" << name << "' with ID " << res_id
- << " but package '" << package->name << "' already has ID "
- << StringPrintf("%02x", package->id.value()));
+ diag->Error(DiagMessage(source)
+ << "trying to add resource '" << name << "' with ID " << res_id
+ << " but package '" << package->name << "' already has ID "
+ << StringPrintf("%02x", package->id.value()));
return false;
}
- ResourceTableType* type = package->FindOrCreateType(name.type);
- if (res_id.is_valid_dynamic() && type->id && type->id.value() != res_id.type_id()) {
+ // Whether or not to error on duplicate resources
+ bool check_id = validate_resources_ && res_id.is_valid_dynamic();
+ // Whether or not to create a duplicate resource if the id does not match
+ bool use_id = !validate_resources_ && res_id.is_valid_dynamic();
+
+ ResourceTableType* type = package->FindOrCreateType(name.type, use_id ? res_id.type_id()
+ : Maybe<uint8_t>());
+
+ // Check for types appearing twice with two different type ids
+ if (check_id && type->id && type->id.value() != res_id.type_id()) {
diag->Error(DiagMessage(source)
- << "trying to add resource '" << name << "' with ID " << res_id << " but type '"
- << type->type << "' already has ID " << StringPrintf("%02x", type->id.value()));
+ << "trying to add resource '" << name << "' with ID " << res_id
+ << " but type '" << type->type << "' already has ID "
+ << StringPrintf("%02x", type->id.value()));
return false;
}
- ResourceEntry* entry = type->FindOrCreateEntry(name.entry);
- if (res_id.is_valid_dynamic() && entry->id && entry->id.value() != res_id.entry_id()) {
+ ResourceEntry* entry = type->FindOrCreateEntry(name.entry, use_id ? res_id.entry_id()
+ : Maybe<uint8_t>());
+
+ // Check for entries appearing twice with two different entry ids
+ if (check_id && entry->id && entry->id.value() != res_id.entry_id()) {
diag->Error(DiagMessage(source)
- << "trying to add resource '" << name << "' with ID " << res_id
- << " but resource already has ID "
- << ResourceId(package->id.value(), type->id.value(), entry->id.value()));
+ << "trying to add resource '" << name << "' with ID " << res_id
+ << " but resource already has ID "
+ << ResourceId(package->id.value(), type->id.value(), entry->id.value()));
return false;
}
ResourceConfigValue* config_value = entry->FindOrCreateValue(config, product);
- if (config_value->value == nullptr) {
+ if (!config_value->value) {
// Resource does not exist, add it now.
config_value->value = std::move(value);
} else {
switch (conflict_resolver(config_value->value.get(), value.get())) {
+ case CollisionResult::kKeepBoth:
+ // Insert the value ignoring for duplicate configurations
+ entry->values.push_back(util::make_unique<ResourceConfigValue>(config, product));
+ entry->values.back()->value = std::move(value);
+ break;
+
case CollisionResult::kTakeNew:
// Take the incoming value.
config_value->value = std::move(value);
@@ -450,17 +494,22 @@
type->id = res_id.type_id();
entry->id = res_id.entry_id();
}
+
return true;
}
+bool ResourceTable::GetValidateResources() {
+ return validate_resources_;
+}
+
bool ResourceTable::SetVisibility(const ResourceNameRef& name, const Visibility& visibility,
IDiagnostics* diag) {
- return SetVisibilityImpl(name, visibility, ResourceId{}, ResourceNameValidator, diag);
+ return SetVisibilityImpl(name, visibility, {}, ResourceNameValidator, diag);
}
bool ResourceTable::SetVisibilityMangled(const ResourceNameRef& name, const Visibility& visibility,
IDiagnostics* diag) {
- return SetVisibilityImpl(name, visibility, ResourceId{}, SkipNameValidator, diag);
+ return SetVisibilityImpl(name, visibility, {}, SkipNameValidator, diag);
}
bool ResourceTable::SetVisibilityWithId(const ResourceNameRef& name, const Visibility& visibility,
@@ -484,28 +533,42 @@
return false;
}
+ // Check for package names appearing twice with two different package ids
ResourceTablePackage* package = FindOrCreatePackage(name.package);
if (res_id.is_valid_dynamic() && package->id && package->id.value() != res_id.package_id()) {
- diag->Error(DiagMessage(source) << "trying to add resource '" << name << "' with ID " << res_id
- << " but package '" << package->name << "' already has ID "
- << StringPrintf("%02x", package->id.value()));
+ diag->Error(DiagMessage(source)
+ << "trying to add resource '" << name << "' with ID " << res_id
+ << " but package '" << package->name << "' already has ID "
+ << StringPrintf("%02x", package->id.value()));
return false;
}
- ResourceTableType* type = package->FindOrCreateType(name.type);
- if (res_id.is_valid_dynamic() && type->id && type->id.value() != res_id.type_id()) {
+ // Whether or not to error on duplicate resources
+ bool check_id = validate_resources_ && res_id.is_valid_dynamic();
+ // Whether or not to create a duplicate resource if the id does not match
+ bool use_id = !validate_resources_ && res_id.is_valid_dynamic();
+
+ ResourceTableType* type = package->FindOrCreateType(name.type, use_id ? res_id.type_id()
+ : Maybe<uint8_t>());
+
+ // Check for types appearing twice with two different type ids
+ if (check_id && type->id && type->id.value() != res_id.type_id()) {
diag->Error(DiagMessage(source)
- << "trying to add resource '" << name << "' with ID " << res_id << " but type '"
- << type->type << "' already has ID " << StringPrintf("%02x", type->id.value()));
+ << "trying to add resource '" << name << "' with ID " << res_id
+ << " but type '" << type->type << "' already has ID "
+ << StringPrintf("%02x", type->id.value()));
return false;
}
- ResourceEntry* entry = type->FindOrCreateEntry(name.entry);
- if (res_id.is_valid_dynamic() && entry->id && entry->id.value() != res_id.entry_id()) {
+ ResourceEntry* entry = type->FindOrCreateEntry(name.entry, use_id ? res_id.entry_id()
+ : Maybe<uint8_t>());
+
+ // Check for entries appearing twice with two different entry ids
+ if (check_id && entry->id && entry->id.value() != res_id.entry_id()) {
diag->Error(DiagMessage(source)
- << "trying to add resource '" << name << "' with ID " << res_id
- << " but resource already has ID "
- << ResourceId(package->id.value(), type->id.value(), entry->id.value()));
+ << "trying to add resource '" << name << "' with ID " << res_id
+ << " but resource already has ID "
+ << ResourceId(package->id.value(), type->id.value(), entry->id.value()));
return false;
}
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h
index 8534eaa..c40323c 100644
--- a/tools/aapt2/ResourceTable.h
+++ b/tools/aapt2/ResourceTable.h
@@ -146,8 +146,9 @@
explicit ResourceTableType(const ResourceType type) : type(type) {}
- ResourceEntry* FindEntry(const android::StringPiece& name);
- ResourceEntry* FindOrCreateEntry(const android::StringPiece& name);
+ ResourceEntry* FindEntry(const android::StringPiece& name, Maybe<uint8_t> id = Maybe<uint8_t>());
+ ResourceEntry* FindOrCreateEntry(const android::StringPiece& name,
+ Maybe<uint8_t> id = Maybe<uint8_t>());
private:
DISALLOW_COPY_AND_ASSIGN(ResourceTableType);
@@ -163,8 +164,9 @@
std::vector<std::unique_ptr<ResourceTableType>> types;
ResourceTablePackage() = default;
- ResourceTableType* FindType(ResourceType type);
- ResourceTableType* FindOrCreateType(const ResourceType type);
+ ResourceTableType* FindType(ResourceType type, Maybe<uint8_t> id = Maybe<uint8_t>());
+ ResourceTableType* FindOrCreateType(const ResourceType type,
+ Maybe<uint8_t> id = Maybe<uint8_t>());
private:
DISALLOW_COPY_AND_ASSIGN(ResourceTablePackage);
@@ -174,14 +176,18 @@
class ResourceTable {
public:
ResourceTable() = default;
+ explicit ResourceTable(bool validate_resources) : validate_resources_(validate_resources) {}
- enum class CollisionResult { kKeepOriginal, kConflict, kTakeNew };
+ enum class CollisionResult { kKeepBoth, kKeepOriginal, kConflict, kTakeNew };
using CollisionResolverFunc = std::function<CollisionResult(Value*, Value*)>;
// When a collision of resources occurs, this method decides which value to keep.
static CollisionResult ResolveValueCollision(Value* existing, Value* incoming);
+ // When a collision of resources occurs, this method keeps both values
+ static CollisionResult IgnoreCollision(Value* existing, Value* incoming);
+
bool AddResource(const ResourceNameRef& name, const ConfigDescription& config,
const android::StringPiece& product, std::unique_ptr<Value> value,
IDiagnostics* diag);
@@ -208,6 +214,8 @@
const android::StringPiece& product, std::unique_ptr<Value> value,
IDiagnostics* diag);
+ bool GetValidateResources();
+
bool SetVisibility(const ResourceNameRef& name, const Visibility& visibility, IDiagnostics* diag);
bool SetVisibilityMangled(const ResourceNameRef& name, const Visibility& visibility,
IDiagnostics* diag);
@@ -299,6 +307,9 @@
const Visibility& symbol, NameValidator name_validator,
IDiagnostics* diag);
+ // Controls whether the table validates resource names and prevents duplicate resource names
+ bool validate_resources_ = true;
+
DISALLOW_COPY_AND_ASSIGN(ResourceTable);
};
diff --git a/tools/aapt2/SdkConstants.cpp b/tools/aapt2/SdkConstants.cpp
index 8ebde75..f4b0124 100644
--- a/tools/aapt2/SdkConstants.cpp
+++ b/tools/aapt2/SdkConstants.cpp
@@ -25,8 +25,8 @@
namespace aapt {
-static const char* sDevelopmentSdkCodeName = "P";
-static ApiVersion sDevelopmentSdkLevel = 28;
+static const char* sDevelopmentSdkCodeName = "Q";
+static ApiVersion sDevelopmentSdkLevel = 10000;
static const std::vector<std::pair<uint16_t, ApiVersion>> sAttrIdMap = {
{0x021c, 1},
@@ -54,6 +54,7 @@
{0x0530, SDK_NOUGAT_MR1},
{0x0568, SDK_O},
{0x056d, SDK_O_MR1},
+ {0x0586, SDK_P},
};
static bool less_entry_id(const std::pair<uint16_t, ApiVersion>& p, uint16_t entryId) {
diff --git a/tools/aapt2/Source.h b/tools/aapt2/Source.h
index 0f312d6..92934c3 100644
--- a/tools/aapt2/Source.h
+++ b/tools/aapt2/Source.h
@@ -31,12 +31,16 @@
struct Source {
std::string path;
Maybe<size_t> line;
+ Maybe<std::string> archive;
Source() = default;
inline Source(const android::StringPiece& path) : path(path.to_string()) { // NOLINT(implicit)
}
+ inline Source(const android::StringPiece& path, const android::StringPiece& archive)
+ : path(path.to_string()), archive(archive.to_string()) {}
+
inline Source(const android::StringPiece& path, size_t line)
: path(path.to_string()), line(line) {}
@@ -45,10 +49,14 @@
}
std::string to_string() const {
- if (line) {
- return ::android::base::StringPrintf("%s:%zd", path.c_str(), line.value());
+ std::string s = path;
+ if (archive) {
+ s = ::android::base::StringPrintf("%s@%s", archive.value().c_str(), s.c_str());
}
- return path;
+ if (line) {
+ s = ::android::base::StringPrintf("%s:%zd", s.c_str(), line.value());
+ }
+ return s;
}
};
diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp
index 36b5578..62c19fb 100644
--- a/tools/aapt2/cmd/Compile.cpp
+++ b/tools/aapt2/cmd/Compile.cpp
@@ -41,8 +41,10 @@
#include "format/proto/ProtoSerialize.h"
#include "io/BigBufferStream.h"
#include "io/FileStream.h"
+#include "io/FileSystem.h"
#include "io/StringStream.h"
#include "io/Util.h"
+#include "io/ZipArchive.h"
#include "util/Files.h"
#include "util/Maybe.h"
#include "util/Util.h"
@@ -135,81 +137,20 @@
return name.str();
}
-static bool IsHidden(const StringPiece& filename) {
- return util::StartsWith(filename, ".");
-}
-
-// Walks the res directory structure, looking for resource files.
-static bool LoadInputFilesFromDir(IAaptContext* context, const CompileOptions& options,
- std::vector<ResourcePathData>* out_path_data) {
- const std::string& root_dir = options.res_dir.value();
- std::unique_ptr<DIR, decltype(closedir)*> d(opendir(root_dir.data()), closedir);
- if (!d) {
- context->GetDiagnostics()->Error(DiagMessage(root_dir) << "failed to open directory: "
- << SystemErrorCodeToString(errno));
- return false;
- }
-
- while (struct dirent* entry = readdir(d.get())) {
- if (IsHidden(entry->d_name)) {
- continue;
- }
-
- std::string prefix_path = root_dir;
- file::AppendPath(&prefix_path, entry->d_name);
-
- if (file::GetFileType(prefix_path) != file::FileType::kDirectory) {
- continue;
- }
-
- std::unique_ptr<DIR, decltype(closedir)*> subdir(opendir(prefix_path.data()), closedir);
- if (!subdir) {
- context->GetDiagnostics()->Error(DiagMessage(prefix_path) << "failed to open directory: "
- << SystemErrorCodeToString(errno));
- return false;
- }
-
- while (struct dirent* leaf_entry = readdir(subdir.get())) {
- if (IsHidden(leaf_entry->d_name)) {
- continue;
- }
-
- std::string full_path = prefix_path;
- file::AppendPath(&full_path, leaf_entry->d_name);
-
- std::string err_str;
- Maybe<ResourcePathData> path_data = ExtractResourcePathData(full_path, &err_str);
- if (!path_data) {
- context->GetDiagnostics()->Error(DiagMessage(full_path) << err_str);
- return false;
- }
-
- out_path_data->push_back(std::move(path_data.value()));
- }
- }
-
- // File-system directory enumeration order is platform-dependent. Sort the result to remove any
- // inconsistencies between platforms.
- std::sort(
- out_path_data->begin(), out_path_data->end(),
- [](const ResourcePathData& a, const ResourcePathData& b) { return a.source < b.source; });
- return true;
-}
-
static bool CompileTable(IAaptContext* context, const CompileOptions& options,
- const ResourcePathData& path_data, IArchiveWriter* writer,
+ const ResourcePathData& path_data, io::IFile* file, IArchiveWriter* writer,
const std::string& output_path) {
ResourceTable table;
{
- FileInputStream fin(path_data.source.path);
- if (fin.HadError()) {
+ auto fin = file->OpenInputStream();
+ if (fin->HadError()) {
context->GetDiagnostics()->Error(DiagMessage(path_data.source)
- << "failed to open file: " << fin.GetError());
+ << "failed to open file: " << fin->GetError());
return false;
}
// Parse the values file from XML.
- xml::XmlPullParser xml_parser(&fin);
+ xml::XmlPullParser xml_parser(fin.get());
ResourceParserOptions parser_options;
parser_options.error_on_positional_arguments = !options.legacy_mode;
@@ -222,7 +163,7 @@
parser_options.visibility = options.visibility;
ResourceParser res_parser(context->GetDiagnostics(), &table, path_data.source, path_data.config,
- parser_options);
+ parser_options);
if (!res_parser.Parse(&xml_parser)) {
return false;
}
@@ -288,44 +229,48 @@
Printer r_txt_printer(&fout_text);
for (const auto& package : table.packages) {
- for (const auto& type : package->types) {
- for (const auto& entry : type->entries) {
- // Check access modifiers.
- switch(entry->visibility.level) {
- case Visibility::Level::kUndefined :
- r_txt_printer.Print("default ");
- break;
- case Visibility::Level::kPublic :
- r_txt_printer.Print("public ");
- break;
- case Visibility::Level::kPrivate :
- r_txt_printer.Print("private ");
- }
+ // Only print resources defined locally, e.g. don't write android attributes.
+ if (package->name.empty()) {
+ for (const auto& type : package->types) {
+ for (const auto& entry : type->entries) {
+ // Check access modifiers.
+ switch (entry->visibility.level) {
+ case Visibility::Level::kUndefined :
+ r_txt_printer.Print("default ");
+ break;
+ case Visibility::Level::kPublic :
+ r_txt_printer.Print("public ");
+ break;
+ case Visibility::Level::kPrivate :
+ r_txt_printer.Print("private ");
+ }
- if (type->type != ResourceType::kStyleable) {
- r_txt_printer.Print("int ");
- r_txt_printer.Print(to_string(type->type));
- r_txt_printer.Print(" ");
- r_txt_printer.Println(entry->name);
- } else {
- r_txt_printer.Print("int[] styleable ");
- r_txt_printer.Println(entry->name);
+ if (type->type != ResourceType::kStyleable) {
+ r_txt_printer.Print("int ");
+ r_txt_printer.Print(to_string(type->type));
+ r_txt_printer.Print(" ");
+ r_txt_printer.Println(entry->name);
+ } else {
+ r_txt_printer.Print("int[] styleable ");
+ r_txt_printer.Println(entry->name);
- if (!entry->values.empty()) {
- auto styleable = static_cast<const Styleable*>(entry->values.front()->value.get());
- for (const auto& attr : styleable->entries) {
- // The visibility of the children under the styleable does not matter as they are
- // nested under their parent and use its visibility.
- r_txt_printer.Print("default int styleable ");
- r_txt_printer.Print(entry->name);
- // If the package name is present, also include it in the mangled name (e.g.
- // "android")
- if (!attr.name.value().package.empty()) {
+ if (!entry->values.empty()) {
+ auto styleable =
+ static_cast<const Styleable*>(entry->values.front()->value.get());
+ for (const auto& attr : styleable->entries) {
+ // The visibility of the children under the styleable does not matter as they are
+ // nested under their parent and use its visibility.
+ r_txt_printer.Print("default int styleable ");
+ r_txt_printer.Print(entry->name);
+ // If the package name is present, also include it in the mangled name (e.g.
+ // "android")
+ if (!attr.name.value().package.empty()) {
+ r_txt_printer.Print("_");
+ r_txt_printer.Print(MakePackageSafeName(attr.name.value().package));
+ }
r_txt_printer.Print("_");
- r_txt_printer.Print(MakePackageSafeName(attr.name.value().package));
+ r_txt_printer.Println(attr.name.value().entry);
}
- r_txt_printer.Print("_");
- r_txt_printer.Println(attr.name.value().entry);
}
}
}
@@ -404,7 +349,7 @@
}
static bool CompileXml(IAaptContext* context, const CompileOptions& options,
- const ResourcePathData& path_data, IArchiveWriter* writer,
+ const ResourcePathData& path_data, io::IFile* file, IArchiveWriter* writer,
const std::string& output_path) {
if (context->IsVerbose()) {
context->GetDiagnostics()->Note(DiagMessage(path_data.source) << "compiling XML");
@@ -412,18 +357,17 @@
std::unique_ptr<xml::XmlResource> xmlres;
{
- FileInputStream fin(path_data.source.path);
- if (fin.HadError()) {
+ auto fin = file->OpenInputStream();
+ if (fin->HadError()) {
context->GetDiagnostics()->Error(DiagMessage(path_data.source)
- << "failed to open file: " << fin.GetError());
+ << "failed to open file: " << fin->GetError());
return false;
}
- xmlres = xml::Inflate(&fin, context->GetDiagnostics(), path_data.source);
- }
-
- if (!xmlres) {
- return false;
+ xmlres = xml::Inflate(fin.get(), context->GetDiagnostics(), path_data.source);
+ if (!xmlres) {
+ return false;
+ }
}
xmlres->file.name = ResourceName({}, *ParseResourceType(path_data.resource_dir), path_data.name);
@@ -504,7 +448,7 @@
}
static bool CompilePng(IAaptContext* context, const CompileOptions& options,
- const ResourcePathData& path_data, IArchiveWriter* writer,
+ const ResourcePathData& path_data, io::IFile* file, IArchiveWriter* writer,
const std::string& output_path) {
if (context->IsVerbose()) {
context->GetDiagnostics()->Note(DiagMessage(path_data.source) << "compiling PNG");
@@ -518,15 +462,17 @@
res_file.type = ResourceFile::Type::kPng;
{
- std::string content;
- if (!android::base::ReadFileToString(path_data.source.path, &content,
- true /*follow_symlinks*/)) {
- context->GetDiagnostics()->Error(DiagMessage(path_data.source)
- << "failed to open file: "
- << SystemErrorCodeToString(errno));
+ auto data = file->OpenAsData();
+ if (!data) {
+ context->GetDiagnostics()->Error(DiagMessage(path_data.source) << "failed to open file ");
return false;
}
+ // Read the file as a string
+ char buffer_2[data->size()];
+ memcpy(&buffer_2, data->data(), data->size());
+ StringPiece content(buffer_2, data->size());
+
BigBuffer crunched_png_buffer(4096);
io::BigBufferOutputStream crunched_png_buffer_out(&crunched_png_buffer);
@@ -594,7 +540,7 @@
if (context->IsVerbose()) {
// For debugging only, use the legacy PNG cruncher and compare the resulting file sizes.
// This will help catch exotic cases where the new code may generate larger PNGs.
- std::stringstream legacy_stream(content);
+ std::stringstream legacy_stream(content.to_string());
BigBuffer legacy_buffer(4096);
Png png(context->GetDiagnostics());
if (!png.process(path_data.source, &legacy_stream, &legacy_buffer, {})) {
@@ -608,41 +554,31 @@
}
io::BigBufferInputStream buffer_in(&buffer);
- if (!WriteHeaderAndDataToWriter(output_path, res_file, &buffer_in, writer,
- context->GetDiagnostics())) {
- return false;
- }
- return true;
+ return WriteHeaderAndDataToWriter(output_path, res_file, &buffer_in, writer,
+ context->GetDiagnostics());
}
static bool CompileFile(IAaptContext* context, const CompileOptions& options,
- const ResourcePathData& path_data, IArchiveWriter* writer,
+ const ResourcePathData& path_data, io::IFile* file, IArchiveWriter* writer,
const std::string& output_path) {
if (context->IsVerbose()) {
context->GetDiagnostics()->Note(DiagMessage(path_data.source) << "compiling file");
}
- BigBuffer buffer(256);
ResourceFile res_file;
res_file.name = ResourceName({}, *ParseResourceType(path_data.resource_dir), path_data.name);
res_file.config = path_data.config;
res_file.source = path_data.source;
res_file.type = ResourceFile::Type::kUnknown;
- std::string error_str;
- Maybe<android::FileMap> f = file::MmapPath(path_data.source.path, &error_str);
- if (!f) {
- context->GetDiagnostics()->Error(DiagMessage(path_data.source) << "failed to mmap file: "
- << error_str);
+ auto data = file->OpenAsData();
+ if (!data) {
+ context->GetDiagnostics()->Error(DiagMessage(path_data.source) << "failed to open file ");
return false;
}
- io::MmappedData mmapped_in(std::move(f.value()));
- if (!WriteHeaderAndDataToWriter(output_path, res_file, &mmapped_in, writer,
- context->GetDiagnostics())) {
- return false;
- }
- return true;
+ return WriteHeaderAndDataToWriter(output_path, res_file, data.get(), writer,
+ context->GetDiagnostics());
}
class CompileContext : public IAaptContext {
@@ -697,6 +633,79 @@
bool verbose_ = false;
};
+int Compile(IAaptContext* context, io::IFileCollection* inputs, IArchiveWriter* output_writer,
+ CompileOptions& options) {
+ bool error = false;
+
+ // Iterate over the input files in a stable, platform-independent manner
+ auto file_iterator = inputs->Iterator();
+ while (file_iterator->HasNext()) {
+ auto file = file_iterator->Next();
+ std::string path = file->GetSource().path;
+
+ // Skip hidden input files
+ if (file::IsHidden(path)) {
+ continue;
+ }
+
+ if (!options.res_zip && !IsValidFile(context, path)) {
+ error = true;
+ continue;
+ }
+
+ // Extract resource type information from the full path
+ std::string err_str;
+ ResourcePathData path_data;
+ if (auto maybe_path_data = ExtractResourcePathData(path, &err_str)) {
+ path_data = maybe_path_data.value();
+ } else {
+ context->GetDiagnostics()->Error(DiagMessage(file->GetSource()) << err_str);
+ error = true;
+ continue;
+ }
+
+ // Determine how to compile the file based on its type.
+ auto compile_func = &CompileFile;
+ if (path_data.resource_dir == "values" && path_data.extension == "xml") {
+ compile_func = &CompileTable;
+ // We use a different extension (not necessary anymore, but avoids altering the existing
+ // build system logic).
+ path_data.extension = "arsc";
+
+ } else if (const ResourceType* type = ParseResourceType(path_data.resource_dir)) {
+ if (*type != ResourceType::kRaw) {
+ if (path_data.extension == "xml") {
+ compile_func = &CompileXml;
+ } else if ((!options.no_png_crunch && path_data.extension == "png")
+ || path_data.extension == "9.png") {
+ compile_func = &CompilePng;
+ }
+ }
+ } else {
+ context->GetDiagnostics()->Error(DiagMessage()
+ << "invalid file path '" << path_data.source << "'");
+ error = true;
+ continue;
+ }
+
+ // Treat periods as a reserved character that should not be present in a file name
+ // Legacy support for AAPT which did not reserve periods
+ if (compile_func != &CompileFile && !options.legacy_mode
+ && std::count(path_data.name.begin(), path_data.name.end(), '.') != 0) {
+ error = true;
+ context->GetDiagnostics()->Error(DiagMessage(file->GetSource())
+ << "file name cannot contain '.' other than for"
+ << " specifying the extension");
+ continue;
+ }
+
+ const std::string out_path = BuildIntermediateContainerFilename(path_data);
+ error |= !compile_func(context, options, path_data, file, output_writer, out_path);
+ }
+
+ return error ? 1 : 0;
+}
+
int CompileCommand::Action(const std::vector<std::string>& args) {
CompileContext context(diagnostic_);
context.SetVerbose(options_.verbose);
@@ -716,37 +725,55 @@
}
}
+ std::unique_ptr<io::IFileCollection> file_collection;
std::unique_ptr<IArchiveWriter> archive_writer;
- std::vector<ResourcePathData> input_data;
- if (options_.res_dir) {
+ // Collect the resources files to compile
+ if (options_.res_dir && options_.res_zip) {
+ context.GetDiagnostics()->Error(DiagMessage()
+ << "only one of --dir and --zip can be specified");
+ return 1;
+ } else if (options_.res_dir) {
if (!args.empty()) {
- // Can't have both files and a resource directory.
context.GetDiagnostics()->Error(DiagMessage() << "files given but --dir specified");
Usage(&std::cerr);
return 1;
}
- if (!LoadInputFilesFromDir(&context, options_, &input_data)) {
+ // Load the files from the res directory
+ std::string err;
+ file_collection = io::FileCollection::Create(options_.res_dir.value(), &err);
+ if (!file_collection) {
+ context.GetDiagnostics()->Error(DiagMessage(options_.res_dir.value()) << err);
return 1;
}
archive_writer = CreateZipFileArchiveWriter(context.GetDiagnostics(), options_.output_path);
+ } else if (options_.res_zip) {
+ if (!args.empty()) {
+ context.GetDiagnostics()->Error(DiagMessage() << "files given but --zip specified");
+ Usage(&std::cerr);
+ return 1;
+ }
+ // Load a zip file containing a res directory
+ std::string err;
+ file_collection = io::ZipFileCollection::Create(options_.res_zip.value(), &err);
+ if (!file_collection) {
+ context.GetDiagnostics()->Error(DiagMessage(options_.res_zip.value()) << err);
+ return 1;
+ }
+
+ archive_writer = CreateZipFileArchiveWriter(context.GetDiagnostics(), options_.output_path);
} else {
- input_data.reserve(args.size());
+ auto collection = util::make_unique<io::FileCollection>();
// Collect data from the path for each input file.
for (const std::string& arg : args) {
- std::string error_str;
- if (Maybe<ResourcePathData> path_data = ExtractResourcePathData(arg, &error_str)) {
- input_data.push_back(std::move(path_data.value()));
- } else {
- context.GetDiagnostics()->Error(DiagMessage() << error_str << " (" << arg << ")");
- return 1;
- }
+ collection->InsertFile(arg);
}
+ file_collection = std::move(collection);
archive_writer = CreateDirectoryArchiveWriter(context.GetDiagnostics(), options_.output_path);
}
@@ -754,57 +781,7 @@
return 1;
}
- bool error = false;
- for (ResourcePathData& path_data : input_data) {
- if (options_.verbose) {
- context.GetDiagnostics()->Note(DiagMessage(path_data.source) << "processing");
- }
-
- if (!IsValidFile(&context, path_data.source.path)) {
- error = true;
- continue;
- }
-
- // Determine how to compile the file based on its type.
- auto compile_func = &CompileFile;
- if (path_data.resource_dir == "values" && path_data.extension == "xml") {
- compile_func = &CompileTable;
- // We use a different extension (not necessary anymore, but avoids altering the existing
- // build system logic).
- path_data.extension = "arsc";
-
- } else if (const ResourceType* type = ParseResourceType(path_data.resource_dir)) {
- if (*type != ResourceType::kRaw) {
- if (path_data.extension == "xml") {
- compile_func = &CompileXml;
- } else if ((!options_.no_png_crunch && path_data.extension == "png")
- || path_data.extension == "9.png") {
- compile_func = &CompilePng;
- }
- }
- } else {
- context.GetDiagnostics()->Error(DiagMessage()
- << "invalid file path '" << path_data.source << "'");
- error = true;
- continue;
- }
-
- // Treat periods as a reserved character that should not be present in a file name
- // Legacy support for AAPT which did not reserve periods
- if (compile_func != &CompileFile && !options_.legacy_mode
- && std::count(path_data.name.begin(), path_data.name.end(), '.') != 0) {
- error = true;
- context.GetDiagnostics()->Error(DiagMessage() << "resource file '" << path_data.source.path
- << "' name cannot contain '.' other than for"
- << "specifying the extension");
- continue;
- }
-
- // Compile the file.
- const std::string out_path = BuildIntermediateContainerFilename(path_data);
- error |= !compile_func(&context, options_, path_data, archive_writer.get(), out_path);
- }
- return error ? 1 : 0;
+ return Compile(&context, file_collection.get(), archive_writer.get(), options_);
}
} // namespace aapt
diff --git a/tools/aapt2/cmd/Compile.h b/tools/aapt2/cmd/Compile.h
index 4151952..c429d5f 100644
--- a/tools/aapt2/cmd/Compile.h
+++ b/tools/aapt2/cmd/Compile.h
@@ -18,7 +18,8 @@
#define AAPT2_COMPILE_H
#include "androidfw/StringPiece.h"
-
+#include "format/Archive.h"
+#include "process/IResourceTableConsumer.h"
#include "Command.h"
#include "Diagnostics.h"
#include "ResourceTable.h"
@@ -28,6 +29,7 @@
struct CompileOptions {
std::string output_path;
Maybe<std::string> res_dir;
+ Maybe<std::string> res_zip;
Maybe<std::string> generate_text_symbols_path;
Maybe<Visibility::Level> visibility;
bool pseudolocalize = false;
@@ -36,6 +38,7 @@
bool verbose = false;
};
+/** Parses flags and compiles resources to be used in linking. */
class CompileCommand : public Command {
public:
explicit CompileCommand(IDiagnostics* diagnostic) : Command("compile", "c"),
@@ -43,6 +46,8 @@
SetDescription("Compiles resources to be linked into an apk.");
AddRequiredFlag("-o", "Output path", &options_.output_path);
AddOptionalFlag("--dir", "Directory to scan for resources", &options_.res_dir);
+ AddOptionalFlag("--zip", "Zip file containing the res directory to scan for resources",
+ &options_.res_zip);
AddOptionalFlag("--output-text-symbols",
"Generates a text file containing the resource symbols in the\n"
"specified file", &options_.generate_text_symbols_path);
@@ -51,10 +56,10 @@
AddOptionalSwitch("--no-crunch", "Disables PNG processing", &options_.no_png_crunch);
AddOptionalSwitch("--legacy", "Treat errors that used to be valid in AAPT as warnings",
&options_.legacy_mode);
- AddOptionalSwitch("-v", "Enables verbose logging", &options_.verbose);
AddOptionalFlag("--visibility",
"Sets the visibility of the compiled resources to the specified\n"
"level. Accepted levels: public, private, default", &visibility_);
+ AddOptionalSwitch("-v", "Enables verbose logging", &options_.verbose);
}
int Action(const std::vector<std::string>& args) override;
@@ -65,6 +70,8 @@
Maybe<std::string> visibility_;
};
+int Compile(IAaptContext* context, io::IFileCollection* inputs,
+ IArchiveWriter* output_writer, CompileOptions& options);
}// namespace aapt
#endif //AAPT2_COMPILE_H
diff --git a/tools/aapt2/cmd/Compile_test.cpp b/tools/aapt2/cmd/Compile_test.cpp
index d21addf..dd5198c 100644
--- a/tools/aapt2/cmd/Compile_test.cpp
+++ b/tools/aapt2/cmd/Compile_test.cpp
@@ -18,6 +18,7 @@
#include "android-base/file.h"
#include "io/StringStream.h"
+#include "io/ZipArchive.h"
#include "java/AnnotationProcessor.h"
#include "test/Test.h"
@@ -29,7 +30,6 @@
args.push_back(path);
args.push_back("-o");
args.push_back(outDir);
- args.push_back("-v");
if (legacy) {
args.push_back("--legacy");
}
@@ -94,4 +94,56 @@
ASSERT_EQ(remove(path5_out.c_str()), 0);
}
-}
\ No newline at end of file
+TEST(CompilerTest, DirInput) {
+ StdErrDiagnostics diag;
+ std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build();
+ const std::string kResDir = android::base::Dirname(android::base::GetExecutablePath())
+ + "/integration-tests/CompileTest/DirInput/res";
+ const std::string kOutputFlata = android::base::Dirname(android::base::GetExecutablePath())
+ + "/integration-tests/CompileTest/DirInput/compiled.flata";
+ remove(kOutputFlata.c_str());
+
+ std::vector<android::StringPiece> args;
+ args.push_back("--dir");
+ args.push_back(kResDir);
+ args.push_back("-o");
+ args.push_back(kOutputFlata);
+ ASSERT_EQ(CompileCommand(&diag).Execute(args, &std::cerr), 0);
+
+ // Check for the presence of the compiled files
+ std::string err;
+ std::unique_ptr<io::ZipFileCollection> zip = io::ZipFileCollection::Create(kOutputFlata, &err);
+ ASSERT_NE(zip, nullptr) << err;
+ ASSERT_NE(zip->FindFile("drawable_image.png.flat"), nullptr);
+ ASSERT_NE(zip->FindFile("layout_layout.xml.flat"), nullptr);
+ ASSERT_NE(zip->FindFile("values_values.arsc.flat"), nullptr);
+ ASSERT_EQ(remove(kOutputFlata.c_str()), 0);
+}
+
+TEST(CompilerTest, ZipInput) {
+ StdErrDiagnostics diag;
+ std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build();
+ const std::string kResZip = android::base::Dirname(android::base::GetExecutablePath())
+ + "/integration-tests/CompileTest/ZipInput/res.zip";
+ const std::string kOutputFlata = android::base::Dirname(android::base::GetExecutablePath())
+ + "/integration-tests/CompileTest/ZipInput/compiled.flata";
+ remove(kOutputFlata.c_str());
+
+ std::vector<android::StringPiece> args;
+ args.push_back("--zip");
+ args.push_back(kResZip);
+ args.push_back("-o");
+ args.push_back(kOutputFlata);
+ ASSERT_EQ(CompileCommand(&diag).Execute(args, &std::cerr), 0);
+
+ // Check for the presence of the compiled files
+ std::string err;
+ std::unique_ptr<io::ZipFileCollection> zip = io::ZipFileCollection::Create(kOutputFlata, &err);
+ ASSERT_NE(zip, nullptr) << err;
+ ASSERT_NE(zip->FindFile("drawable_image.png.flat"), nullptr);
+ ASSERT_NE(zip->FindFile("layout_layout.xml.flat"), nullptr);
+ ASSERT_NE(zip->FindFile("values_values.arsc.flat"), nullptr);
+ ASSERT_EQ(remove(kOutputFlata.c_str()), 0);
+}
+
+} // namespace aapt
\ No newline at end of file
diff --git a/tools/aapt2/cmd/Convert.cpp b/tools/aapt2/cmd/Convert.cpp
index d57eaa1..86b1f4c 100644
--- a/tools/aapt2/cmd/Convert.cpp
+++ b/tools/aapt2/cmd/Convert.cpp
@@ -105,10 +105,7 @@
std::unique_ptr<io::IFileCollectionIterator> iterator = apk->GetFileCollection()->Iterator();
while (iterator->HasNext()) {
io::IFile* file = iterator->Next();
-
std::string path = file->GetSource().path;
- // The name of the path has the format "<zip-file-name>@<path-to-file>".
- path = path.substr(path.find('@') + 1);
// Manifest, resource table and resources have already been taken care of.
if (path == kAndroidManifestPath ||
diff --git a/tools/aapt2/cmd/Dump.cpp b/tools/aapt2/cmd/Dump.cpp
index 8b1f672..b4311c5 100644
--- a/tools/aapt2/cmd/Dump.cpp
+++ b/tools/aapt2/cmd/Dump.cpp
@@ -24,8 +24,11 @@
#include "Debug.h"
#include "Diagnostics.h"
+#include "LoadedApk.h"
+#include "Util.h"
#include "format/Container.h"
#include "format/binary/BinaryResourceParser.h"
+#include "format/binary/XmlFlattener.h"
#include "format/proto/ProtoDeserialize.h"
#include "io/FileStream.h"
#include "io/ZipArchive.h"
@@ -70,184 +73,6 @@
printer->Println(StringPrintf("Data: offset=%" PRIi64 " length=%zd", offset, len));
}
-static bool DumpXmlFile(IAaptContext* context, io::IFile* file, bool proto,
- text::Printer* printer) {
- std::unique_ptr<xml::XmlResource> doc;
- if (proto) {
- std::unique_ptr<io::InputStream> in = file->OpenInputStream();
- if (in == nullptr) {
- context->GetDiagnostics()->Error(DiagMessage() << "failed to open file");
- return false;
- }
-
- io::ZeroCopyInputAdaptor adaptor(in.get());
- pb::XmlNode pb_node;
- if (!pb_node.ParseFromZeroCopyStream(&adaptor)) {
- context->GetDiagnostics()->Error(DiagMessage() << "failed to parse file as proto XML");
- return false;
- }
-
- std::string err;
- doc = DeserializeXmlResourceFromPb(pb_node, &err);
- if (doc == nullptr) {
- context->GetDiagnostics()->Error(DiagMessage() << "failed to deserialize proto XML");
- return false;
- }
- printer->Println("Proto XML");
- } else {
- std::unique_ptr<io::IData> data = file->OpenAsData();
- if (data == nullptr) {
- context->GetDiagnostics()->Error(DiagMessage() << "failed to open file");
- return false;
- }
-
- std::string err;
- doc = xml::Inflate(data->data(), data->size(), &err);
- if (doc == nullptr) {
- context->GetDiagnostics()->Error(DiagMessage() << "failed to parse file as binary XML");
- return false;
- }
- printer->Println("Binary XML");
- }
-
- Debug::DumpXml(*doc, printer);
- return true;
-}
-
-static bool TryDumpFile(IAaptContext* context, const std::string& file_path,
- const DumpOptions& options) {
- // Use a smaller buffer so that there is less latency for dumping to stdout.
- constexpr size_t kStdOutBufferSize = 1024u;
- io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
- Printer printer(&fout);
-
- std::string err;
- std::unique_ptr<io::ZipFileCollection> zip = io::ZipFileCollection::Create(file_path, &err);
- if (zip) {
- ResourceTable table;
- bool proto = false;
- if (io::IFile* file = zip->FindFile("resources.pb")) {
- proto = true;
-
- std::unique_ptr<io::IData> data = file->OpenAsData();
- if (data == nullptr) {
- context->GetDiagnostics()->Error(DiagMessage(file_path) << "failed to open resources.pb");
- return false;
- }
-
- pb::ResourceTable pb_table;
- if (!pb_table.ParseFromArray(data->data(), data->size())) {
- context->GetDiagnostics()->Error(DiagMessage(file_path) << "invalid resources.pb");
- return false;
- }
-
- if (!DeserializeTableFromPb(pb_table, zip.get(), &table, &err)) {
- context->GetDiagnostics()->Error(DiagMessage(file_path)
- << "failed to parse table: " << err);
- return false;
- }
- } else if (io::IFile* file = zip->FindFile("resources.arsc")) {
- std::unique_ptr<io::IData> data = file->OpenAsData();
- if (!data) {
- context->GetDiagnostics()->Error(DiagMessage(file_path) << "failed to open resources.arsc");
- return false;
- }
-
- BinaryResourceParser parser(context->GetDiagnostics(), &table, Source(file_path),
- data->data(), data->size());
- if (!parser.Parse()) {
- return false;
- }
- }
-
- if (!options.file_to_dump_path) {
- if (proto) {
- printer.Println("Proto APK");
- } else {
- printer.Println("Binary APK");
- }
- Debug::PrintTable(table, options.print_options, &printer);
- return true;
- }
-
- io::IFile* file = zip->FindFile(options.file_to_dump_path.value());
- if (file == nullptr) {
- context->GetDiagnostics()->Error(DiagMessage(file_path)
- << "file '" << options.file_to_dump_path.value()
- << "' not found in APK");
- return false;
- }
- return DumpXmlFile(context, file, proto, &printer);
- }
-
- err.clear();
-
- io::FileInputStream input(file_path);
- if (input.HadError()) {
- context->GetDiagnostics()->Error(DiagMessage(file_path)
- << "failed to open file: " << input.GetError());
- return false;
- }
-
- // Try as a compiled file.
- ContainerReader reader(&input);
- if (reader.HadError()) {
- context->GetDiagnostics()->Error(DiagMessage(file_path)
- << "failed to read container: " << reader.GetError());
- return false;
- }
-
- printer.Println("AAPT2 Container (APC)");
- ContainerReaderEntry* entry;
- while ((entry = reader.Next()) != nullptr) {
- if (entry->Type() == ContainerEntryType::kResTable) {
- printer.Println("kResTable");
-
- pb::ResourceTable pb_table;
- if (!entry->GetResTable(&pb_table)) {
- context->GetDiagnostics()->Error(DiagMessage(file_path)
- << "failed to parse proto table: " << entry->GetError());
- continue;
- }
-
- ResourceTable table;
- err.clear();
- if (!DeserializeTableFromPb(pb_table, nullptr /*files*/, &table, &err)) {
- context->GetDiagnostics()->Error(DiagMessage(file_path)
- << "failed to parse table: " << err);
- continue;
- }
-
- printer.Indent();
- Debug::PrintTable(table, options.print_options, &printer);
- printer.Undent();
- } else if (entry->Type() == ContainerEntryType::kResFile) {
- printer.Println("kResFile");
- pb::internal::CompiledFile pb_compiled_file;
- off64_t offset;
- size_t length;
- if (!entry->GetResFileOffsets(&pb_compiled_file, &offset, &length)) {
- context->GetDiagnostics()->Error(
- DiagMessage(file_path) << "failed to parse compiled proto file: " << entry->GetError());
- continue;
- }
-
- ResourceFile file;
- std::string error;
- if (!DeserializeCompiledFileFromPb(pb_compiled_file, &file, &error)) {
- context->GetDiagnostics()->Warn(DiagMessage(file_path)
- << "failed to parse compiled file: " << error);
- continue;
- }
-
- printer.Indent();
- DumpCompiledFile(file, Source(file_path), offset, length, &printer);
- printer.Undent();
- }
- }
- return true;
-}
-
namespace {
class DumpContext : public IAaptContext {
@@ -299,17 +124,290 @@
} // namespace
-int DumpCommand::Action(const std::vector<std::string>& args) {
+// Use a smaller buffer so that there is less latency for dumping to stdout.
+constexpr size_t kStdOutBufferSize = 1024u;
+
+int DumpAPCCommand::Action(const std::vector<std::string>& args) {
DumpContext context;
- context.SetVerbose(verbose_);
- options_.print_options.show_sources = true;
- options_.print_options.show_values = !no_values_;
- for (const std::string& arg : args) {
- if (!TryDumpFile(&context, arg, options_)) {
- return 1;
+ DebugPrintTableOptions print_options;
+ print_options.show_sources = true;
+ print_options.show_values = !no_values_;
+
+ if (args.size() < 1) {
+ diag_->Error(DiagMessage() << "No dump container specified.");
+ return 1;
+ }
+
+ io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
+ Printer printer(&fout);
+
+ for (auto container : args) {
+ io::FileInputStream input(container);
+ if (input.HadError()) {
+ context.GetDiagnostics()->Error(DiagMessage(container)
+ << "failed to open file: " << input.GetError());
+ return false;
+ }
+
+ // Try as a compiled file.
+ ContainerReader reader(&input);
+ if (reader.HadError()) {
+ context.GetDiagnostics()->Error(DiagMessage(container)
+ << "failed to read container: " << reader.GetError());
+ return false;
+ }
+
+ printer.Println("AAPT2 Container (APC)");
+ ContainerReaderEntry* entry;
+ std::string error;
+ while ((entry = reader.Next()) != nullptr) {
+ if (entry->Type() == ContainerEntryType::kResTable) {
+ printer.Println("kResTable");
+
+ pb::ResourceTable pb_table;
+ if (!entry->GetResTable(&pb_table)) {
+ context.GetDiagnostics()->Error(DiagMessage(container)
+ << "failed to parse proto table: "
+ << entry->GetError());
+ continue;
+ }
+
+ ResourceTable table;
+ error.clear();
+ if (!DeserializeTableFromPb(pb_table, nullptr /*files*/, &table, &error)) {
+ context.GetDiagnostics()->Error(DiagMessage(container)
+ << "failed to parse table: " << error);
+ continue;
+ }
+
+ printer.Indent();
+ Debug::PrintTable(table, print_options, &printer);
+ printer.Undent();
+ } else if (entry->Type() == ContainerEntryType::kResFile) {
+ printer.Println("kResFile");
+ pb::internal::CompiledFile pb_compiled_file;
+ off64_t offset;
+ size_t length;
+ if (!entry->GetResFileOffsets(&pb_compiled_file, &offset, &length)) {
+ context.GetDiagnostics()->Error(
+ DiagMessage(container) << "failed to parse compiled proto file: "
+ << entry->GetError());
+ continue;
+ }
+
+ ResourceFile file;
+ if (!DeserializeCompiledFileFromPb(pb_compiled_file, &file, &error)) {
+ context.GetDiagnostics()->Warn(DiagMessage(container)
+ << "failed to parse compiled file: " << error);
+ continue;
+ }
+
+ printer.Indent();
+ DumpCompiledFile(file, Source(container), offset, length, &printer);
+ printer.Undent();
+ }
}
}
+
return 0;
}
+int DumpConfigsCommand::Action(const std::vector<std::string>& args) {
+ if (args.size() < 1) {
+ diag_->Error(DiagMessage() << "No dump apk specified.");
+ return 1;
+ }
+
+ auto loaded_apk = LoadedApk::LoadApkFromPath(args[0], diag_);
+ if (!loaded_apk) {
+ return 1;
+ }
+
+ io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
+ Printer printer(&fout);
+
+ // Comparison function used to order configurations
+ auto compare = [](ConfigDescription c1, ConfigDescription c2) -> bool {
+ return c1.compare(c2) < 0;
+ };
+
+ // Insert the configurations into a set in order to keep every configuarion seen
+ std::set<ConfigDescription, decltype(compare)> configs(compare);
+ for (auto& package : loaded_apk->GetResourceTable()->packages) {
+ for (auto& type : package->types) {
+ for (auto& entry : type->entries) {
+ for (auto& value : entry->values) {
+ configs.insert(value->config);
+ }
+ }
+ }
+ }
+
+ // Print the configurations in order
+ for (auto& config : configs) {
+ printer.Print(StringPrintf("%s\n", config.to_string().data()));
+ }
+
+ return 0;
+}
+
+int DumpStringsCommand::Action(const std::vector<std::string>& args) {
+ DumpContext context;
+ if (args.size() < 1) {
+ diag_->Error(DiagMessage() << "No dump apk specified.");
+ return 1;
+ }
+
+ io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
+ Printer printer(&fout);
+
+ for (auto apk : args) {
+ auto loaded_apk = LoadedApk::LoadApkFromPath(apk, diag_);
+ if (!loaded_apk) {
+ return 1;
+ }
+
+ // Load the run-time xml string pool using the flattened data
+ BigBuffer buffer(4096);
+ StringPool::FlattenUtf8(&buffer, loaded_apk->GetResourceTable()->string_pool,
+ context.GetDiagnostics());
+ auto data = buffer.to_string();
+ android::ResStringPool pool(data.data(), data.size(), false);
+ Debug::DumpResStringPool(&pool, &printer);
+ }
+
+ return 0;
+}
+
+int DumpTableCommand::Action(const std::vector<std::string>& args) {
+ if (args.size() < 1) {
+ diag_->Error(DiagMessage() << "No dump apk specified.");
+ return 1;
+ }
+
+ io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
+ Printer printer(&fout);
+
+ DebugPrintTableOptions print_options;
+ print_options.show_sources = true;
+ print_options.show_values = !no_values_;
+
+ for (auto apk : args) {
+ auto loaded_apk = LoadedApk::LoadApkFromPath(apk, diag_);
+ if (!loaded_apk) {
+ return 1;
+ }
+
+ if (loaded_apk->GetApkFormat()) {
+ printer.Println("Proto APK");
+ } else {
+ printer.Println("Binary APK");
+ }
+
+ Debug::PrintTable(*loaded_apk->GetResourceTable(), print_options, &printer);
+ }
+
+ return 0;
+}
+
+int DumpXmlTreeCommand::Action(const std::vector<std::string>& args) {
+ if (args.size() < 1) {
+ diag_->Error(DiagMessage() << "No dump apk specified");
+ return 1;
+ }
+
+ auto loaded_apk = LoadedApk::LoadApkFromPath(args[0], diag_);
+ if (!loaded_apk) {
+ return 1;
+ }
+
+ io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
+ Printer printer(&fout);
+
+ // Dump the xml tree of every passed in file
+ for (auto file : files_) {
+ auto xml = loaded_apk->LoadXml(file, diag_);
+ if (!xml) {
+ return 1;
+ }
+
+ Debug::DumpXml(*xml, &printer);
+ }
+
+ return 0;
+}
+
+int DumpXmlStringsCommand::Action(const std::vector<std::string>& args) {
+ DumpContext context;
+ if (args.size() < 1) {
+ diag_->Error(DiagMessage() << "No dump apk specified.");
+ return 1;
+ }
+
+ auto loaded_apk = LoadedApk::LoadApkFromPath(args[0], diag_);
+ if (!loaded_apk) {
+ return 1;
+ }
+
+ io::FileOutputStream fout(STDOUT_FILENO, kStdOutBufferSize);
+ Printer printer(&fout);
+
+ // Dump the xml strings of every passed in file
+ for (auto xml_file : files_) {
+ android::ResXMLTree tree;
+
+ if (loaded_apk->GetApkFormat() == kProto) {
+ auto xml = loaded_apk->LoadXml(xml_file, diag_);
+ if (!xml) {
+ return 1;
+ }
+
+ // Flatten the xml document to get a binary representation of the proto xml file
+ BigBuffer buffer(4096);
+ XmlFlattenerOptions options = {};
+ options.keep_raw_values = true;
+ XmlFlattener flattener(&buffer, options);
+ if (!flattener.Consume(&context, xml.get())) {
+ return 1;
+ }
+
+ // Load the run-time xml tree using the flattened data
+ std::string data = buffer.to_string();
+ tree.setTo(data.data(), data.size(), /** copyData */ true);
+
+ } else if (loaded_apk->GetApkFormat() == kBinary) {
+ io::IFile* file = loaded_apk->GetFileCollection()->FindFile(xml_file);
+ if (!file) {
+ diag_->Error(DiagMessage(xml_file) << "file '" << xml_file << "' not found in APK");
+ return 1;
+ }
+
+ std::unique_ptr<io::IData> data = file->OpenAsData();
+ if (!data) {
+ diag_->Error(DiagMessage() << "failed to open file");
+ return 1;
+ }
+
+ // Load the run-time xml tree from the file data
+ tree.setTo(data->data(), data->size(), /** copyData */ true);
+ }
+
+ Debug::DumpResStringPool(&tree.getStrings(), &printer);
+ }
+
+ return 0;
+}
+
+/** Preform no action because a subcommand is required. */
+int DumpCommand::Action(const std::vector<std::string>& args) {
+ if (args.size() == 0) {
+ diag_->Error(DiagMessage() << "no subcommand specified");
+ } else {
+ diag_->Error(DiagMessage() << "unknown subcommand '" << args[0] << "'");
+ }
+
+ Usage(&std::cerr);
+ return 1;
+}
+
} // namespace aapt
diff --git a/tools/aapt2/cmd/Dump.h b/tools/aapt2/cmd/Dump.h
index 4893c8b..03a4fba 100644
--- a/tools/aapt2/cmd/Dump.h
+++ b/tools/aapt2/cmd/Dump.h
@@ -22,33 +22,117 @@
namespace aapt {
-struct DumpOptions {
- DebugPrintTableOptions print_options;
-
- // The path to a file within an APK to dump.
- Maybe<std::string> file_to_dump_path;
-};
-
-class DumpCommand : public Command {
+/** Command the contents of files generated from the compilation stage. */
+class DumpAPCCommand : public Command {
public:
- DumpCommand() : Command("dump", "d") {
- SetDescription("Prints resource and manifest information.");
+ explicit DumpAPCCommand(IDiagnostics* diag) : Command("apc"), diag_(diag) {
+ SetDescription("Print the contents of the AAPT2 Container (APC) generated fom compilation.");
AddOptionalSwitch("--no-values", "Suppresses output of values when displaying resource tables.",
- &no_values_);
- AddOptionalFlag("--file", "Dumps the specified file from the APK passed as arg.",
- &options_.file_to_dump_path);
- AddOptionalSwitch("-v", "increase verbosity of output", &verbose_);
+ &no_values_);
+ AddOptionalSwitch("-v", "Enables verbose logging.", &verbose_);
}
int Action(const std::vector<std::string>& args) override;
private:
- DumpOptions options_;
-
+ IDiagnostics* diag_;
bool verbose_ = false;
bool no_values_ = false;
};
+/** Prints every configuration used by a resource in an APK. */
+class DumpConfigsCommand : public Command {
+ public:
+ explicit DumpConfigsCommand(IDiagnostics* diag) : Command("configurations"), diag_(diag) {
+ SetDescription("Print every configuration used by a resource in the APK.");
+ }
+
+ int Action(const std::vector<std::string>& args) override;
+
+ private:
+ IDiagnostics* diag_;
+};
+
+/** Prints the contents of the resource table string pool in the APK. */
+class DumpStringsCommand : public Command {
+ public:
+ explicit DumpStringsCommand(IDiagnostics* diag) : Command("strings"), diag_(diag) {
+ SetDescription("Print the contents of the resource table string pool in the APK.");
+ }
+
+ int Action(const std::vector<std::string>& args) override;
+
+ private:
+ IDiagnostics* diag_;
+};
+
+/** Prints the contents of the resource table from the APK. */
+class DumpTableCommand : public Command {
+ public:
+ explicit DumpTableCommand(IDiagnostics* diag) : Command("resources"), diag_(diag) {
+ SetDescription("Print the contents of the resource table from the APK.");
+ AddOptionalSwitch("--no-values", "Suppresses output of values when displaying resource tables.",
+ &no_values_);
+ AddOptionalSwitch("-v", "Enables verbose logging.", &verbose_);
+ }
+
+ int Action(const std::vector<std::string>& args) override;
+
+ private:
+ IDiagnostics* diag_;
+ bool verbose_ = false;
+ bool no_values_ = false;
+};
+
+/** Prints the string pool of a compiled xml in an APK. */
+class DumpXmlStringsCommand : public Command {
+public:
+ explicit DumpXmlStringsCommand(IDiagnostics* diag) : Command("xmlstrings"), diag_(diag) {
+ SetDescription("Print the string pool of a compiled xml in an APK.");
+ AddRequiredFlagList("--file", "A compiled xml file to print", &files_);
+ }
+
+ int Action(const std::vector<std::string>& args) override;
+
+private:
+ IDiagnostics* diag_;
+ std::vector<std::string> files_;
+};
+
+
+/** Prints the tree of a compiled xml in an APK. */
+class DumpXmlTreeCommand : public Command {
+ public:
+ explicit DumpXmlTreeCommand(IDiagnostics* diag) : Command("xmltree"), diag_(diag) {
+ SetDescription("Print the tree of a compiled xml in an APK.");
+ AddRequiredFlagList("--file", "A compiled xml file to print", &files_);
+ }
+
+ int Action(const std::vector<std::string>& args) override;
+
+ private:
+ IDiagnostics* diag_;
+ std::vector<std::string> files_;
+};
+
+/** The default dump command. Preforms no action because a subcommand is required. */
+class DumpCommand : public Command {
+ public:
+ explicit DumpCommand(IDiagnostics* diag) : Command("dump", "d"), diag_(diag) {
+ AddOptionalSubcommand(util::make_unique<DumpAPCCommand>(diag_));
+ AddOptionalSubcommand(util::make_unique<DumpConfigsCommand>(diag_));
+ AddOptionalSubcommand(util::make_unique<DumpStringsCommand>(diag_));
+ AddOptionalSubcommand(util::make_unique<DumpTableCommand>(diag_));
+ AddOptionalSubcommand(util::make_unique<DumpXmlStringsCommand>(diag_));
+ AddOptionalSubcommand(util::make_unique<DumpXmlTreeCommand>(diag_));
+ }
+
+ int Action(const std::vector<std::string>& args) override;
+
+ private:
+ IDiagnostics* diag_;
+};
+
}// namespace aapt
#endif //AAPT2_DUMP_H
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp
index c94b847..119f56a 100644
--- a/tools/aapt2/cmd/Link.cpp
+++ b/tools/aapt2/cmd/Link.cpp
@@ -470,6 +470,10 @@
return ResourceFile::Type::kUnknown;
}
+static auto kDrawableVersions = std::map<std::string, ApiVersion>{
+ { "adaptive-icon" , SDK_O },
+};
+
bool ResourceFileFlattener::Flatten(ResourceTable* table, IArchiveWriter* archive_writer) {
bool error = false;
std::map<std::pair<ConfigDescription, StringPiece>, FileOperation> config_sorted_files;
@@ -567,6 +571,20 @@
FileOperation& file_op = map_entry.second;
if (file_op.xml_to_flatten) {
+ // Check minimum sdk versions supported for drawables
+ auto drawable_entry = kDrawableVersions.find(file_op.xml_to_flatten->root->name);
+ if (drawable_entry != kDrawableVersions.end()) {
+ if (drawable_entry->second > context_->GetMinSdkVersion()
+ && drawable_entry->second > config.sdkVersion) {
+ context_->GetDiagnostics()->Error(DiagMessage(file_op.xml_to_flatten->file.source)
+ << "<" << drawable_entry->first << "> elements "
+ << "require a sdk version of at least "
+ << (int16_t) drawable_entry->second);
+ error = true;
+ continue;
+ }
+ }
+
std::vector<std::unique_ptr<xml::XmlResource>> versioned_docs =
LinkAndVersionXmlFile(table, &file_op);
if (versioned_docs.empty()) {
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/configuration/ConfigurationParser_test.cpp b/tools/aapt2/configuration/ConfigurationParser_test.cpp
index febbb2e..ccaea4e 100644
--- a/tools/aapt2/configuration/ConfigurationParser_test.cpp
+++ b/tools/aapt2/configuration/ConfigurationParser_test.cpp
@@ -703,35 +703,24 @@
}
TEST_F(ConfigurationParserTest, AndroidSdkGroupAction_NonNumeric) {
- static constexpr const char* xml = R"xml(
+ auto doc = test::BuildXmlDom(R"xml(
<android-sdk
- label="P"
+ label="Q"
minSdkVersion="25"
- targetSdkVersion="%s"
- maxSdkVersion="%s">
- </android-sdk>)xml";
-
- const auto& dev_sdk = GetDevelopmentSdkCodeNameAndVersion();
- const char* codename = dev_sdk.first.data();
- const ApiVersion& version = dev_sdk.second;
-
- auto doc = test::BuildXmlDom(StringPrintf(xml, codename, codename));
+ targetSdkVersion="Q"
+ maxSdkVersion="Q">
+ </android-sdk>)xml");
PostProcessingConfiguration config;
- bool ok = AndroidSdkTagHandler(&config, NodeCast<Element>(doc.get()->root.get()), &diag_);
- ASSERT_TRUE(ok);
-
+ ASSERT_TRUE(AndroidSdkTagHandler(&config, NodeCast<Element>(doc.get()->root.get()), &diag_));
ASSERT_EQ(1ul, config.android_sdks.size());
- ASSERT_EQ(1u, config.android_sdks.count("P"));
-
- auto& out = config.android_sdks["P"];
+ ASSERT_EQ(1u, config.android_sdks.count("Q"));
AndroidSdk sdk;
sdk.min_sdk_version = 25;
- sdk.target_sdk_version = version;
- sdk.max_sdk_version = version;
-
- ASSERT_EQ(sdk, out);
+ sdk.target_sdk_version = 10000;
+ sdk.max_sdk_version = 10000;
+ ASSERT_EQ(sdk, config.android_sdks["Q"]);
}
TEST_F(ConfigurationParserTest, GlTextureGroupAction) {
diff --git a/tools/aapt2/format/Container.cpp b/tools/aapt2/format/Container.cpp
index 739555c..d4b4571 100644
--- a/tools/aapt2/format/Container.cpp
+++ b/tools/aapt2/format/Container.cpp
@@ -270,7 +270,8 @@
}
if (magic != kContainerFormatMagic) {
- error_ = "magic value doesn't match AAPT";
+ error_ =
+ StringPrintf("magic value is 0x%08x but AAPT expects 0x%08x", magic, kContainerFormatMagic);
return;
}
diff --git a/tools/aapt2/format/binary/BinaryResourceParser.cpp b/tools/aapt2/format/binary/BinaryResourceParser.cpp
index 8215ddf..3a39a6b 100644
--- a/tools/aapt2/format/binary/BinaryResourceParser.cpp
+++ b/tools/aapt2/format/binary/BinaryResourceParser.cpp
@@ -338,10 +338,13 @@
const std::string type_str = util::GetString(type_pool_, type->id - 1);
- const ResourceType* parsed_type = ParseResourceType(type_str);
- if (!parsed_type) {
- diag_->Error(DiagMessage(source_)
- << "invalid type name '" << type_str << "' for type with ID " << (int)type->id);
+ // Be lenient on the name of the type if the table is lenient on resource validation.
+ auto parsed_type = ResourceType::kUnknown;
+ if (const ResourceType* parsed = ParseResourceType(type_str)) {
+ parsed_type = *parsed;
+ } else if (table_->GetValidateResources()) {
+ diag_->Error(DiagMessage(source_) << "invalid type name '" << type_str << "' for type with ID "
+ << (int) type->id);
return false;
}
@@ -352,7 +355,7 @@
continue;
}
- const ResourceName name(package->name, *parsed_type,
+ const ResourceName name(package->name, parsed_type,
util::GetString(key_pool_, util::DeviceToHost32(entry->key.index)));
const ResourceId res_id(package->id.value(), type->id, static_cast<uint16_t>(it.index()));
diff --git a/tools/aapt2/format/binary/TableFlattener.cpp b/tools/aapt2/format/binary/TableFlattener.cpp
index 6fd4c8d..8641a7c 100644
--- a/tools/aapt2/format/binary/TableFlattener.cpp
+++ b/tools/aapt2/format/binary/TableFlattener.cpp
@@ -133,11 +133,10 @@
}
void Visit(Array* array) override {
- for (auto& item : array->elements) {
- ResTable_map* out_entry = buffer_->NextBlock<ResTable_map>();
- FlattenValue(item.get(), out_entry);
- out_entry->value.size = util::HostToDevice16(sizeof(out_entry->value));
- entry_count_++;
+ const size_t count = array->elements.size();
+ for (size_t i = 0; i < count; i++) {
+ Reference key(android::ResTable_map::ATTR_MIN + i);
+ FlattenEntry(&key, array->elements[i].get());
}
}
diff --git a/tools/aapt2/format/binary/TableFlattener_test.cpp b/tools/aapt2/format/binary/TableFlattener_test.cpp
index bab7010..af19b98 100644
--- a/tools/aapt2/format/binary/TableFlattener_test.cpp
+++ b/tools/aapt2/format/binary/TableFlattener_test.cpp
@@ -17,7 +17,9 @@
#include "format/binary/TableFlattener.h"
#include "android-base/stringprintf.h"
+#include "androidfw/TypeWrappers.h"
+#include "ResChunkPullParser.h"
#include "ResourceUtils.h"
#include "SdkConstants.h"
#include "format/binary/BinaryResourceParser.h"
@@ -236,6 +238,62 @@
EXPECT_EQ(attr.max_int, actual_attr->max_int);
}
+TEST_F(TableFlattenerTest, FlattenArray) {
+ auto array = util::make_unique<Array>();
+ array->elements.push_back(util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC),
+ 1u));
+ array->elements.push_back(util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC),
+ 2u));
+ std::unique_ptr<ResourceTable> table =
+ test::ResourceTableBuilder()
+ .SetPackageId("android", 0x01)
+ .AddValue("android:array/foo", ResourceId(0x01010000), std::move(array))
+ .Build();
+
+ std::string result;
+ ASSERT_TRUE(Flatten(context_.get(), {}, table.get(), &result));
+
+ // Parse the flattened resource table
+ ResChunkPullParser parser(result.data(), result.size());
+ ASSERT_TRUE(parser.IsGoodEvent(parser.Next()));
+ ASSERT_EQ(util::DeviceToHost16(parser.chunk()->type), RES_TABLE_TYPE);
+
+ // Retrieve the package of the entry
+ ResChunkPullParser table_parser(GetChunkData(parser.chunk()), GetChunkDataLen(parser.chunk()));
+ const ResChunk_header* package_chunk = nullptr;
+ while (table_parser.IsGoodEvent(table_parser.Next())) {
+ if (util::DeviceToHost16(table_parser.chunk()->type) == RES_TABLE_PACKAGE_TYPE) {
+ package_chunk = table_parser.chunk();
+ break;
+ }
+ }
+
+ // Retrieve the type that proceeds the array entry
+ ASSERT_NE(package_chunk, nullptr);
+ ResChunkPullParser package_parser(GetChunkData(table_parser.chunk()),
+ GetChunkDataLen(table_parser.chunk()));
+ const ResChunk_header* type_chunk = nullptr;
+ while (package_parser.IsGoodEvent(package_parser.Next())) {
+ if (util::DeviceToHost16(package_parser.chunk()->type) == RES_TABLE_TYPE_TYPE) {
+ type_chunk = package_parser.chunk();
+ break;
+ }
+ }
+
+ // Retrieve the array entry
+ ASSERT_NE(type_chunk, nullptr);
+ TypeVariant typeVariant((const ResTable_type*) type_chunk);
+ auto entry = (const ResTable_map_entry*)*typeVariant.beginEntries();
+ ASSERT_EQ(util::DeviceToHost16(entry->count), 2u);
+
+ // Check that the value and name of the array entries are correct
+ auto values = (const ResTable_map*)(((const uint8_t *)entry) + entry->size);
+ ASSERT_EQ(values->value.data, 1u);
+ ASSERT_EQ(values->name.ident, android::ResTable_map::ATTR_MIN);
+ ASSERT_EQ((values+1)->value.data, 2u);
+ ASSERT_EQ((values+1)->name.ident, android::ResTable_map::ATTR_MIN + 1);
+}
+
static std::unique_ptr<ResourceTable> BuildTableWithSparseEntries(
IAaptContext* context, const ConfigDescription& sparse_config, float load) {
std::unique_ptr<ResourceTable> table =
diff --git a/tools/aapt2/integration-tests/CompileTest/DirInput/res/drawable/image.png b/tools/aapt2/integration-tests/CompileTest/DirInput/res/drawable/image.png
new file mode 100644
index 0000000..1a3731b
--- /dev/null
+++ b/tools/aapt2/integration-tests/CompileTest/DirInput/res/drawable/image.png
Binary files differ
diff --git a/vr/com.google.vr.platform.xml b/tools/aapt2/integration-tests/CompileTest/DirInput/res/layout/layout.xml
similarity index 81%
rename from vr/com.google.vr.platform.xml
rename to tools/aapt2/integration-tests/CompileTest/DirInput/res/layout/layout.xml
index 952b476..e5835ed 100644
--- a/vr/com.google.vr.platform.xml
+++ b/tools/aapt2/integration-tests/CompileTest/DirInput/res/layout/layout.xml
@@ -14,7 +14,6 @@
limitations under the License.
-->
-<permissions>
- <library name="com.google.vr.platform"
- file="/system/framework/com.google.vr.platform.jar" />
-</permissions>
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
diff --git a/vr/com.google.vr.platform.xml b/tools/aapt2/integration-tests/CompileTest/DirInput/res/values/values.xml
similarity index 75%
copy from vr/com.google.vr.platform.xml
copy to tools/aapt2/integration-tests/CompileTest/DirInput/res/values/values.xml
index 952b476..62ab652 100644
--- a/vr/com.google.vr.platform.xml
+++ b/tools/aapt2/integration-tests/CompileTest/DirInput/res/values/values.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- 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.
@@ -14,7 +14,5 @@
limitations under the License.
-->
-<permissions>
- <library name="com.google.vr.platform"
- file="/system/framework/com.google.vr.platform.jar" />
-</permissions>
+<resources>
+</resources>
\ No newline at end of file
diff --git a/tools/aapt2/integration-tests/CompileTest/ZipInput/res.zip b/tools/aapt2/integration-tests/CompileTest/ZipInput/res.zip
new file mode 100644
index 0000000..00e396d
--- /dev/null
+++ b/tools/aapt2/integration-tests/CompileTest/ZipInput/res.zip
Binary files differ
diff --git a/tools/aapt2/io/FileSystem.cpp b/tools/aapt2/io/FileSystem.cpp
index 1387d22..16a20f4c 100644
--- a/tools/aapt2/io/FileSystem.cpp
+++ b/tools/aapt2/io/FileSystem.cpp
@@ -16,6 +16,9 @@
#include "io/FileSystem.h"
+#include <dirent.h>
+
+#include "android-base/errors.h"
#include "androidfw/StringPiece.h"
#include "utils/FileMap.h"
@@ -26,6 +29,7 @@
#include "util/Util.h"
using ::android::StringPiece;
+using ::android::base::SystemErrorCodeToString;
namespace aapt {
namespace io {
@@ -64,6 +68,50 @@
return result;
}
+std::unique_ptr<FileCollection> FileCollection::Create(const android::StringPiece& root,
+ std::string* outError) {
+ std::unique_ptr<FileCollection> collection =
+ std::unique_ptr<FileCollection>(new FileCollection());
+
+ std::unique_ptr<DIR, decltype(closedir) *> d(opendir(root.data()), closedir);
+ if (!d) {
+ *outError = "failed to open directory: " + SystemErrorCodeToString(errno);
+ return nullptr;
+ }
+
+ while (struct dirent *entry = readdir(d.get())) {
+ std::string prefix_path = root.to_string();
+ file::AppendPath(&prefix_path, entry->d_name);
+
+ // The directory to iterate over looking for files
+ if (file::GetFileType(prefix_path) != file::FileType::kDirectory
+ || file::IsHidden(prefix_path)) {
+ continue;
+ }
+
+ std::unique_ptr<DIR, decltype(closedir)*> subdir(opendir(prefix_path.data()), closedir);
+ if (!subdir) {
+ *outError = "failed to open directory: " + SystemErrorCodeToString(errno);
+ return nullptr;
+ }
+
+ while (struct dirent* leaf_entry = readdir(subdir.get())) {
+ std::string full_path = prefix_path;
+ file::AppendPath(&full_path, leaf_entry->d_name);
+
+ // Do not add folders to the file collection
+ if (file::GetFileType(full_path) == file::FileType::kDirectory
+ || file::IsHidden(full_path)) {
+ continue;
+ }
+
+ collection->InsertFile(full_path);
+ }
+ }
+
+ return collection;
+}
+
IFile* FileCollection::InsertFile(const StringPiece& path) {
return (files_[path.to_string()] = util::make_unique<RegularFile>(Source(path))).get();
}
diff --git a/tools/aapt2/io/FileSystem.h b/tools/aapt2/io/FileSystem.h
index 6be8807..fb6bf6e 100644
--- a/tools/aapt2/io/FileSystem.h
+++ b/tools/aapt2/io/FileSystem.h
@@ -59,6 +59,10 @@
public:
FileCollection() = default;
+ /** Creates a file collection containing all files contained in the specified root directory. */
+ static std::unique_ptr<FileCollection> Create(const android::StringPiece& path,
+ std::string* outError);
+
// Adds a file located at path. Returns the IFile representation of that file.
IFile* InsertFile(const android::StringPiece& path);
IFile* FindFile(const android::StringPiece& path) override;
diff --git a/tools/aapt2/io/ZipArchive.cpp b/tools/aapt2/io/ZipArchive.cpp
index 269b6c5..8e6d713 100644
--- a/tools/aapt2/io/ZipArchive.cpp
+++ b/tools/aapt2/io/ZipArchive.cpp
@@ -20,6 +20,7 @@
#include "ziparchive/zip_archive.h"
#include "Source.h"
+#include "util/Files.h"
#include "util/Util.h"
using ::android::StringPiece;
@@ -121,9 +122,14 @@
std::string zip_entry_path =
std::string(reinterpret_cast<const char*>(zip_entry_name.name),
zip_entry_name.name_length);
- std::string nested_path = path.to_string() + "@" + zip_entry_path;
- std::unique_ptr<IFile> file =
- util::make_unique<ZipFile>(collection->handle_, zip_data, Source(nested_path));
+
+ // Do not add folders to the file collection
+ if (util::EndsWith(zip_entry_path, "/")) {
+ continue;
+ }
+
+ std::unique_ptr<IFile> file = util::make_unique<ZipFile>(collection->handle_, zip_data,
+ Source(zip_entry_path, path.to_string()));
collection->files_by_name_[zip_entry_path] = file.get();
collection->files_.push_back(std::move(file));
}
@@ -132,6 +138,7 @@
if (out_error) *out_error = ErrorCodeString(result);
return {};
}
+
return collection;
}
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/aapt2/process/SymbolTable.cpp b/tools/aapt2/process/SymbolTable.cpp
index fc4c9b5..70efbf5 100644
--- a/tools/aapt2/process/SymbolTable.cpp
+++ b/tools/aapt2/process/SymbolTable.cpp
@@ -194,6 +194,7 @@
if (sr.package->id && sr.type->id && sr.entry->id) {
symbol->id = ResourceId(sr.package->id.value(), sr.type->id.value(), sr.entry->id.value());
+ symbol->is_dynamic = (sr.package->id.value() == 0);
}
if (name.type == ResourceType::kAttr || name.type == ResourceType::kAttrPrivate) {
diff --git a/tools/aapt2/util/Files.cpp b/tools/aapt2/util/Files.cpp
index 5a8ff09..7cd023b 100644
--- a/tools/aapt2/util/Files.cpp
+++ b/tools/aapt2/util/Files.cpp
@@ -149,6 +149,10 @@
return {};
}
+bool IsHidden(const android::StringPiece& path) {
+ return util::StartsWith(GetFilename(path), ".");
+}
+
void AppendPath(std::string* base, StringPiece part) {
CHECK(base != nullptr);
const bool base_has_trailing_sep = (!base->empty() && *(base->end() - 1) == sDirSep);
diff --git a/tools/aapt2/util/Files.h b/tools/aapt2/util/Files.h
index b26e4fa..219e1a0 100644
--- a/tools/aapt2/util/Files.h
+++ b/tools/aapt2/util/Files.h
@@ -70,6 +70,9 @@
// of the path.
android::StringPiece GetExtension(const android::StringPiece& path);
+// Returns whether or not the name of the file or directory is a hidden file name
+bool IsHidden(const android::StringPiece& path);
+
// Converts a package name (com.android.app) to a path: com/android/app
std::string PackageToPath(const android::StringPiece& package);
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}
diff --git a/tools/stats_log_api_gen/Collation.cpp b/tools/stats_log_api_gen/Collation.cpp
index ebdcdfd..40ee490 100644
--- a/tools/stats_log_api_gen/Collation.cpp
+++ b/tools/stats_log_api_gen/Collation.cpp
@@ -116,6 +116,9 @@
if (field->message_type()->full_name() ==
"android.os.statsd.AttributionNode") {
return JAVA_TYPE_ATTRIBUTION_CHAIN;
+ } else if (field->message_type()->full_name() ==
+ "android.os.statsd.KeyValuePair") {
+ return JAVA_TYPE_KEY_VALUE_PAIR;
} else {
return JAVA_TYPE_OBJECT;
}
@@ -181,6 +184,16 @@
expectedNumber++;
}
+ // Skips the key value pair atom.
+ for (map<int, const FieldDescriptor *>::const_iterator it = fields.begin();
+ it != fields.end(); it++) {
+ const FieldDescriptor *field = it->second;
+ java_type_t javaType = java_type(field);
+ if (javaType == JAVA_TYPE_KEY_VALUE_PAIR) {
+ return 0;
+ }
+ }
+
// Check that only allowed types are present. Remove any invalid ones.
for (map<int, const FieldDescriptor *>::const_iterator it = fields.begin();
it != fields.end(); it++) {
diff --git a/tools/stats_log_api_gen/Collation.h b/tools/stats_log_api_gen/Collation.h
index 5d2c302..ccdd145 100644
--- a/tools/stats_log_api_gen/Collation.h
+++ b/tools/stats_log_api_gen/Collation.h
@@ -48,6 +48,7 @@
JAVA_TYPE_DOUBLE = 6,
JAVA_TYPE_STRING = 7,
JAVA_TYPE_ENUM = 8,
+ JAVA_TYPE_KEY_VALUE_PAIR = 9,
JAVA_TYPE_OBJECT = -1,
JAVA_TYPE_BYTE_ARRAY = -2,
diff --git a/vr/Android.bp b/vr/Android.bp
deleted file mode 100644
index 775ec96..0000000
--- a/vr/Android.bp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (C) 2017 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.
-
-// Library to perform dlopen on the actual shared library.
-cc_library_shared {
- name: "libdvr_loader",
- owner: "google",
- srcs: ["dvr_library_loader.cpp"],
- cflags: [
- "-Wall",
- "-Werror",
- ],
-}
-
-// Java platform library for vr stuff.
-java_library {
- name: "com.google.vr.platform",
- installable: true,
- owner: "google",
- required: [
- "libdvr_loader",
- "libdvr",
- ],
- srcs: ["java/**/*.java"],
-}
-
-prebuilt_etc_xml {
- name: "com.google.vr.platform.xml",
- src: "com.google.vr.platform.xml",
-}
diff --git a/vr/dvr_library_loader.cpp b/vr/dvr_library_loader.cpp
deleted file mode 100644
index 0b4298a..0000000
--- a/vr/dvr_library_loader.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <dlfcn.h>
-#include <jni.h>
-
-#include <string>
-
-extern "C" {
-
-JNIEXPORT jlong JNICALL
-Java_com_google_vr_platform_Dvr_nativeLoadLibrary(
- JNIEnv* env, jclass, jstring java_library) {
- if (!java_library)
- return 0;
-
- // Convert the Java String object to a C++ null-terminated string.
- const char* data = env->GetStringUTFChars(java_library, NULL);
- size_t size = env->GetStringUTFLength(java_library);
- std::string library(data, size);
- env->ReleaseStringUTFChars(java_library, data);
-
- // Return the handle to the requested library.
- return reinterpret_cast<jlong>(
- dlopen(library.c_str(), RTLD_NOW | RTLD_LOCAL));
-}
-
-} // extern "C"
diff --git a/vr/java/com/google/vr/platform/DeviceInfo.java b/vr/java/com/google/vr/platform/DeviceInfo.java
deleted file mode 100644
index 6a4617d..0000000
--- a/vr/java/com/google/vr/platform/DeviceInfo.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.google.vr.platform;
-
-import android.annotation.UnsupportedAppUsage;
-import android.os.SystemProperties;
-
-/**
- * Class to get information about the vr device.
- * @hide
- */
-public class DeviceInfo {
-
- private static final String VR_MODE_BOOT = "ro.boot.vr";
-
- /**
- * Returns true if this device boots directly in VR mode.
- */
- @UnsupportedAppUsage
- public static boolean getVrBoot() {
- return SystemProperties.getBoolean(VR_MODE_BOOT, false);
- }
-}
diff --git a/vr/java/com/google/vr/platform/Dvr.java b/vr/java/com/google/vr/platform/Dvr.java
deleted file mode 100644
index 41dcd87..0000000
--- a/vr/java/com/google/vr/platform/Dvr.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.google.vr.platform;
-
-import android.annotation.UnsupportedAppUsage;
-
-/**
- * Class to load the dvr api.
- * @hide
- */
-public class Dvr {
- /**
- * Opens a shared library containing the dvr api and returns the handle to it.
- *
- * @return A Long object describing the handle returned by dlopen.
- */
- @UnsupportedAppUsage
- public static Long loadLibrary() {
- // Load a thin JNI library that runs dlopen on request.
- System.loadLibrary("dvr_loader");
-
- // Performs dlopen on the library and returns the handle.
- return nativeLoadLibrary("libdvr.so");
- }
-
- private static native long nativeLoadLibrary(String library);
-}
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 5631919..12f50c8 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -126,7 +126,7 @@
void acquireMulticastLock(IBinder binder, String tag);
- void releaseMulticastLock();
+ void releaseMulticastLock(String tag);
void updateInterfaceIpState(String ifaceName, int mode);
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index f210b61..3a4e88b 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -17,6 +17,7 @@
package android.net.wifi;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -40,6 +41,7 @@
/**
* Ascii encoded SSID. This will replace SSID when we deprecate it. @hide
*/
+ @UnsupportedAppUsage
public WifiSsid wifiSsid;
/**
@@ -51,12 +53,14 @@
* The HESSID from the beacon.
* @hide
*/
+ @UnsupportedAppUsage
public long hessid;
/**
* The ANQP Domain ID from the Hotspot 2.0 Indication element, if present.
* @hide
*/
+ @UnsupportedAppUsage
public int anqpDomainId;
/*
@@ -214,6 +218,7 @@
* @deprecated use is80211mcResponder() instead
* @hide
*/
+ @UnsupportedAppUsage
public boolean is80211McRTTResponder;
/**
@@ -226,6 +231,7 @@
* Timestamp representing date when this result was last seen, in milliseconds from 1970
* {@hide}
*/
+ @UnsupportedAppUsage
public long seen;
/**
@@ -284,6 +290,7 @@
* Number of time autojoin used it
* @hide
*/
+ @UnsupportedAppUsage
public int numUsage;
/**
@@ -291,6 +298,7 @@
* {@link UNSPECIFIED}.
* {@hide}
*/
+ @UnsupportedAppUsage
public int distanceCm;
/**
@@ -298,6 +306,7 @@
* Else {@link UNSPECIFIED}.
* {@hide}
*/
+ @UnsupportedAppUsage
public int distanceSdCm;
/** {@hide} */
@@ -314,6 +323,7 @@
* Defines flags; such as {@link #FLAG_PASSPOINT_NETWORK}.
* {@hide}
*/
+ @UnsupportedAppUsage
public long flags;
/**
@@ -391,29 +401,45 @@
* @hide
* anqp lines from supplicant BSS response
*/
+ @UnsupportedAppUsage
public List<String> anqpLines;
/** information elements from beacon
* @hide
*/
public static class InformationElement {
+ @UnsupportedAppUsage
public static final int EID_SSID = 0;
+ @UnsupportedAppUsage
public static final int EID_SUPPORTED_RATES = 1;
+ @UnsupportedAppUsage
public static final int EID_TIM = 5;
+ @UnsupportedAppUsage
public static final int EID_BSS_LOAD = 11;
+ @UnsupportedAppUsage
public static final int EID_ERP = 42;
public static final int EID_HT_CAPABILITIES = 45;
+ @UnsupportedAppUsage
public static final int EID_RSN = 48;
+ @UnsupportedAppUsage
public static final int EID_EXTENDED_SUPPORTED_RATES = 50;
+ @UnsupportedAppUsage
public static final int EID_HT_OPERATION = 61;
+ @UnsupportedAppUsage
public static final int EID_INTERWORKING = 107;
+ @UnsupportedAppUsage
public static final int EID_ROAMING_CONSORTIUM = 111;
+ @UnsupportedAppUsage
public static final int EID_EXTENDED_CAPS = 127;
public static final int EID_VHT_CAPABILITIES = 191;
+ @UnsupportedAppUsage
public static final int EID_VHT_OPERATION = 192;
+ @UnsupportedAppUsage
public static final int EID_VSA = 221;
+ @UnsupportedAppUsage
public int id;
+ @UnsupportedAppUsage
public byte[] bytes;
public InformationElement() {
@@ -428,6 +454,7 @@
/** information elements found in the beacon
* @hide
*/
+ @UnsupportedAppUsage
public InformationElement[] informationElements;
/** ANQP response elements.
@@ -704,6 +731,7 @@
}
/** Implement the Parcelable interface {@hide} */
+ @UnsupportedAppUsage
public static final Creator<ScanResult> CREATOR =
new Creator<ScanResult>() {
public ScanResult createFromParcel(Parcel in) {
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 2918cf6..ce8d71d 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.PackageManager;
import android.net.IpConfiguration;
import android.net.IpConfiguration.ProxySettings;
@@ -61,6 +62,7 @@
public static final String pskVarName = "psk";
/** {@hide} */
@Deprecated
+ @UnsupportedAppUsage
public static final String[] wepKeyVarNames = { "wep_key0", "wep_key1", "wep_key2", "wep_key3" };
/** {@hide} */
@Deprecated
@@ -305,6 +307,7 @@
* By default, 2G is chosen
* @hide
*/
+ @UnsupportedAppUsage
public int apBand = AP_BAND_2GHZ;
/**
@@ -314,6 +317,7 @@
* 0 - find a random available channel according to the apBand
* @hide
*/
+ @UnsupportedAppUsage
public int apChannel = 0;
/**
@@ -438,12 +442,14 @@
* This network configuration is visible to and usable by other users on the
* same device.
*/
+ @UnsupportedAppUsage
public boolean shared;
/**
* @hide
*/
@NonNull
+ @UnsupportedAppUsage
private IpConfiguration mIpConfiguration;
/**
@@ -456,12 +462,14 @@
* @hide
* default Gateway MAC address if known
*/
+ @UnsupportedAppUsage
public String defaultGwMacAddress;
/**
* @hide
* last time we connected, this configuration had validated internet access
*/
+ @UnsupportedAppUsage
public boolean validatedInternetAccess;
/**
@@ -491,6 +499,7 @@
* @hide
* Uid of last app issuing a connection related command
*/
+ @UnsupportedAppUsage
public int lastConnectUid;
/**
@@ -533,6 +542,7 @@
* the network we need to be before autojoin kicks in
*/
/** @hide **/
+ @UnsupportedAppUsage
public static int INVALID_RSSI = -127;
// States for the userApproved field
@@ -561,6 +571,7 @@
* @hide
* Number of reports indicating no Internet Access
*/
+ @UnsupportedAppUsage
public int numNoInternetAccessReports;
/**
@@ -592,6 +603,7 @@
* this configuration and selects "don't ask again".
* @hide
*/
+ @UnsupportedAppUsage
public boolean noInternetAccessExpected;
/**
@@ -624,6 +636,7 @@
* since we will now consider that the configuration belong to him.
* @hide
*/
+ @UnsupportedAppUsage
public boolean selfAdded;
/**
@@ -1557,6 +1570,7 @@
* Helper function, idenfity if a configuration should be treated as an enterprise network
* @hide
*/
+ @UnsupportedAppUsage
public boolean isEnterprise() {
return (allowedKeyManagement.get(KeyMgmt.WPA_EAP)
|| allowedKeyManagement.get(KeyMgmt.IEEE8021X))
@@ -1740,6 +1754,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public String getPrintableSsid() {
if (SSID == null) return "";
final int length = SSID.length();
@@ -1840,6 +1855,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getAuthType() {
if (allowedKeyManagement.cardinality() > 1) {
throw new IllegalStateException("More than one auth type set");
@@ -1902,42 +1918,50 @@
}
/** @hide */
+ @UnsupportedAppUsage
public IpConfiguration getIpConfiguration() {
return mIpConfiguration;
}
/** @hide */
+ @UnsupportedAppUsage
public void setIpConfiguration(IpConfiguration ipConfiguration) {
if (ipConfiguration == null) ipConfiguration = new IpConfiguration();
mIpConfiguration = ipConfiguration;
}
/** @hide */
+ @UnsupportedAppUsage
public StaticIpConfiguration getStaticIpConfiguration() {
return mIpConfiguration.getStaticIpConfiguration();
}
/** @hide */
+ @UnsupportedAppUsage
public void setStaticIpConfiguration(StaticIpConfiguration staticIpConfiguration) {
mIpConfiguration.setStaticIpConfiguration(staticIpConfiguration);
}
/** @hide */
+ @UnsupportedAppUsage
public IpConfiguration.IpAssignment getIpAssignment() {
return mIpConfiguration.ipAssignment;
}
/** @hide */
+ @UnsupportedAppUsage
public void setIpAssignment(IpConfiguration.IpAssignment ipAssignment) {
mIpConfiguration.ipAssignment = ipAssignment;
}
/** @hide */
+ @UnsupportedAppUsage
public IpConfiguration.ProxySettings getProxySettings() {
return mIpConfiguration.proxySettings;
}
/** @hide */
+ @UnsupportedAppUsage
public void setProxySettings(IpConfiguration.ProxySettings proxySettings) {
mIpConfiguration.proxySettings = proxySettings;
}
@@ -1991,6 +2015,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setProxy(ProxySettings settings, ProxyInfo proxy) {
mIpConfiguration.proxySettings = settings;
mIpConfiguration.httpProxy = proxy;
@@ -2012,6 +2037,7 @@
}
/** copy constructor {@hide} */
+ @UnsupportedAppUsage
public WifiConfiguration(WifiConfiguration source) {
if (source != null) {
networkId = source.networkId;
@@ -2149,6 +2175,7 @@
}
/** Implement the Parcelable interface {@hide} */
+ @UnsupportedAppUsage
public static final Creator<WifiConfiguration> CREATOR =
new Creator<WifiConfiguration>() {
public WifiConfiguration createFromParcel(Parcel in) {
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index 52f7a60..17847ea 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -16,6 +16,7 @@
package android.net.wifi;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.security.Credentials;
@@ -139,6 +140,7 @@
*/
private static final List<String> UNQUOTED_KEYS = Arrays.asList(ENGINE_KEY, OPP_KEY_CACHING);
+ @UnsupportedAppUsage
private HashMap<String, String> mFields = new HashMap<String, String>();
private X509Certificate[] mCaCerts;
private PrivateKey mClientPrivateKey;
@@ -574,6 +576,7 @@
* @param alias identifies the certificate
* @hide
*/
+ @UnsupportedAppUsage
public void setCaCertificateAlias(String alias) {
setFieldValue(CA_CERT_KEY, alias, CA_CERT_PREFIX);
}
@@ -612,6 +615,7 @@
* @return alias to the CA certificate
* @hide
*/
+ @UnsupportedAppUsage
public String getCaCertificateAlias() {
return getFieldValue(CA_CERT_KEY, CA_CERT_PREFIX);
}
@@ -760,6 +764,7 @@
* @param alias identifies the certificate
* @hide
*/
+ @UnsupportedAppUsage
public void setClientCertificateAlias(String alias) {
setFieldValue(CLIENT_CERT_KEY, alias, CLIENT_CERT_PREFIX);
setFieldValue(PRIVATE_KEY_ID_KEY, alias, Credentials.USER_PRIVATE_KEY);
@@ -778,6 +783,7 @@
* @return alias to the client certificate
* @hide
*/
+ @UnsupportedAppUsage
public String getClientCertificateAlias() {
return getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
}
diff --git a/wifi/java/android/net/wifi/WifiInfo.java b/wifi/java/android/net/wifi/WifiInfo.java
index 3eb13ce..1e03891 100644
--- a/wifi/java/android/net/wifi/WifiInfo.java
+++ b/wifi/java/android/net/wifi/WifiInfo.java
@@ -16,6 +16,7 @@
package android.net.wifi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
import android.net.NetworkInfo.DetailedState;
@@ -48,6 +49,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static final String DEFAULT_MAC_ADDRESS = "02:00:00:00:00:00";
static {
@@ -67,11 +69,14 @@
}
private SupplicantState mSupplicantState;
+ @UnsupportedAppUsage
private String mBSSID;
+ @UnsupportedAppUsage
private WifiSsid mWifiSsid;
private int mNetworkId;
/** @hide **/
+ @UnsupportedAppUsage
public static final int INVALID_RSSI = -127;
/** @hide **/
@@ -98,7 +103,9 @@
public static final String FREQUENCY_UNITS = "MHz";
private int mFrequency;
+ @UnsupportedAppUsage
private InetAddress mIpAddress;
+ @UnsupportedAppUsage
private String mMacAddress = DEFAULT_MAC_ADDRESS;
private boolean mEphemeral;
@@ -148,6 +155,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public int score;
/**
@@ -157,6 +165,7 @@
private boolean mMeteredHint;
/** @hide */
+ @UnsupportedAppUsage
public WifiInfo() {
mWifiSsid = null;
mBSSID = null;
@@ -248,11 +257,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public WifiSsid getWifiSsid() {
return mWifiSsid;
}
/** @hide */
+ @UnsupportedAppUsage
public void setBSSID(String BSSID) {
mBSSID = BSSID;
}
@@ -280,6 +291,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setRssi(int rssi) {
if (rssi < INVALID_RSSI)
rssi = INVALID_RSSI;
@@ -298,6 +310,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setLinkSpeed(int linkSpeed) {
this.mLinkSpeed = linkSpeed;
}
@@ -328,6 +341,7 @@
* @hide
* TODO: makes real freq boundaries
*/
+ @UnsupportedAppUsage
public boolean is5GHz() {
return ScanResult.is5GHz(mFrequency);
}
@@ -337,6 +351,7 @@
* @param macAddress the MAC address in {@code XX:XX:XX:XX:XX:XX} form
* @hide
*/
+ @UnsupportedAppUsage
public void setMacAddress(String macAddress) {
this.mMacAddress = macAddress;
}
@@ -366,6 +381,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public boolean getMeteredHint() {
return mMeteredHint;
}
@@ -376,11 +392,13 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public boolean isEphemeral() {
return mEphemeral;
}
/** @hide */
+ @UnsupportedAppUsage
public void setNetworkId(int id) {
mNetworkId = id;
}
@@ -405,6 +423,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setSupplicantState(SupplicantState state) {
mSupplicantState = state;
}
@@ -446,6 +465,7 @@
* @param stateName the name of the state, as a <code>String</code> returned
* in an event sent by {@code wpa_supplicant}.
*/
+ @UnsupportedAppUsage
void setSupplicantState(String stateName) {
mSupplicantState = valueOf(stateName);
}
@@ -463,6 +483,7 @@
}
/** {@hide} */
+ @UnsupportedAppUsage
public static String removeDoubleQuotes(String string) {
if (string == null) return null;
final int length = string.length();
@@ -527,6 +548,7 @@
}
/** Implement the Parcelable interface {@hide} */
+ @UnsupportedAppUsage
public static final Creator<WifiInfo> CREATOR =
new Creator<WifiInfo>() {
public WifiInfo createFromParcel(Parcel in) {
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index f16d006..b56a758 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -24,6 +24,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.ParceledListSlice;
import android.net.ConnectivityManager;
@@ -317,6 +318,31 @@
"android.net.wifi.extra.SUBSCRIPTION_REMEDIATION_METHOD";
/**
+ * Activity Action: lunch OSU (Online Sign Up) view.
+ * Included extras:
+ *
+ * {@link #EXTRA_OSU_NETWORK}: {@link Network} instance associated with OSU AP.
+ * {@link #EXTRA_URL}: String representation of a server URL used for OSU process.
+ *
+ * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
+ * components will be launched.
+ *
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_PASSPOINT_LAUNCH_OSU_VIEW =
+ "android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW";
+
+ /**
+ * The lookup key for a {@link android.net.Network} associated with OSU server.
+ *
+ * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
+ *
+ * @hide
+ */
+ public static final String EXTRA_OSU_NETWORK = "android.net.wifi.extra.OSU_NETWORK";
+
+ /**
* Broadcast intent action indicating that Wi-Fi has been enabled, disabled,
* enabling, disabling, or unknown. One extra provides this state as an int.
* Another extra provides the previous state, if available.
@@ -776,6 +802,7 @@
* changed on wifi.
* @hide
*/
+ @UnsupportedAppUsage
public static final String LINK_CONFIGURATION_CHANGED_ACTION =
"android.net.wifi.LINK_CONFIGURATION_CHANGED";
@@ -891,9 +918,11 @@
public static final int WIFI_MODE_FULL_HIGH_PERF = 3;
/** Anything worse than or equal to this will show 0 bars. */
+ @UnsupportedAppUsage
private static final int MIN_RSSI = -100;
/** Anything better than or equal to this will show the max bars. */
+ @UnsupportedAppUsage
private static final int MAX_RSSI = -55;
/**
@@ -901,6 +930,7 @@
* {@link #RSSI_CHANGED_ACTION} broadcast
* @hide
*/
+ @UnsupportedAppUsage
public static final int RSSI_LEVELS = 5;
/**
@@ -908,18 +938,21 @@
* 2.4 GHz and 5 GHz or make a dynamic decision on selecting the band.
* @hide
*/
+ @UnsupportedAppUsage
public static final int WIFI_FREQUENCY_BAND_AUTO = 0;
/**
* Operation on 5 GHz alone
* @hide
*/
+ @UnsupportedAppUsage
public static final int WIFI_FREQUENCY_BAND_5GHZ = 1;
/**
* Operation on 2.4 GHz alone
* @hide
*/
+ @UnsupportedAppUsage
public static final int WIFI_FREQUENCY_BAND_2GHZ = 2;
/** @hide */
@@ -932,9 +965,11 @@
private static final int MAX_ACTIVE_LOCKS = 50;
/* Number of currently active WifiLocks and MulticastLocks */
+ @UnsupportedAppUsage
private int mActiveLockCount;
private Context mContext;
+ @UnsupportedAppUsage
IWifiManager mService;
private final int mTargetSdkVersion;
@@ -1036,6 +1071,7 @@
* @throws UnsupportedOperationException if Passpoint is not enabled on the device.
* @hide
*/
+ @UnsupportedAppUsage
public WifiConfiguration getMatchingWifiConfig(ScanResult scanResult) {
try {
return mService.getMatchingWifiConfig(scanResult);
@@ -1725,6 +1761,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public String getCountryCode() {
try {
String country = mService.getCountryCode();
@@ -1739,6 +1776,7 @@
* @return {@code true} if supported, {@code false} otherwise.
* @hide
*/
+ @UnsupportedAppUsage
public boolean isDualBandSupported() {
try {
return mService.isDualBandSupported();
@@ -2004,6 +2042,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void cancelLocalOnlyHotspotRequest() {
synchronized (mLock) {
stopLocalOnlyHotspot();
@@ -2977,6 +3016,7 @@
* initialized again
* @hide
*/
+ @UnsupportedAppUsage
public void connect(int networkId, ActionListener listener) {
if (networkId < 0) throw new IllegalArgumentException("Network id cannot be negative");
getChannel().sendMessage(CONNECT_NETWORK, networkId, putListener(listener));
@@ -3002,6 +3042,7 @@
* initialized again
* @hide
*/
+ @UnsupportedAppUsage
public void save(WifiConfiguration config, ActionListener listener) {
if (config == null) throw new IllegalArgumentException("config cannot be null");
getChannel().sendMessage(SAVE_NETWORK, 0, putListener(listener), config);
@@ -3020,6 +3061,7 @@
* initialized again
* @hide
*/
+ @UnsupportedAppUsage
public void forget(int netId, ActionListener listener) {
if (netId < 0) throw new IllegalArgumentException("Network id cannot be negative");
getChannel().sendMessage(FORGET_NETWORK, netId, putListener(listener));
@@ -3034,6 +3076,7 @@
* initialized again
* @hide
*/
+ @UnsupportedAppUsage
public void disable(int netId, ActionListener listener) {
if (netId < 0) throw new IllegalArgumentException("Network id cannot be negative");
getChannel().sendMessage(DISABLE_NETWORK, netId, putListener(listener));
@@ -3089,6 +3132,7 @@
*
* @return Messenger pointing to the WifiService handler
*/
+ @UnsupportedAppUsage
private Messenger getWifiServiceMessenger() {
try {
return mService.getWifiServiceMessenger(mContext.getOpPackageName());
@@ -3390,7 +3434,7 @@
mService.acquireMulticastLock(mBinder, mTag);
synchronized (WifiManager.this) {
if (mActiveLockCount >= MAX_ACTIVE_LOCKS) {
- mService.releaseMulticastLock();
+ mService.releaseMulticastLock(mTag);
throw new UnsupportedOperationException(
"Exceeded maximum number of wifi locks");
}
@@ -3432,7 +3476,7 @@
synchronized (mBinder) {
if (mRefCounted ? (--mRefCount == 0) : (mHeld)) {
try {
- mService.releaseMulticastLock();
+ mService.releaseMulticastLock(mTag);
synchronized (WifiManager.this) {
mActiveLockCount--;
}
@@ -3519,6 +3563,7 @@
* Initialize the multicast filtering to 'on'
* @hide no intent to publish
*/
+ @UnsupportedAppUsage
public boolean initializeMulticastFiltering() {
try {
mService.initializeMulticastFiltering();
@@ -3543,6 +3588,7 @@
* @hide
*/
@RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
+ @UnsupportedAppUsage
public void enableVerboseLogging (int verbose) {
try {
mService.enableVerboseLogging(verbose);
@@ -3557,6 +3603,7 @@
* to decide what to show within the picker.
* @hide
*/
+ @UnsupportedAppUsage
public int getVerboseLoggingLevel() {
try {
return mService.getVerboseLoggingLevel();
@@ -3583,6 +3630,7 @@
* @return Get Network object of current wifi network
* @hide
*/
+ @UnsupportedAppUsage
public Network getCurrentNetwork() {
try {
return mService.getCurrentNetwork();
diff --git a/wifi/java/android/net/wifi/WifiSsid.java b/wifi/java/android/net/wifi/WifiSsid.java
index 5deb80a..9acbc14 100644
--- a/wifi/java/android/net/wifi/WifiSsid.java
+++ b/wifi/java/android/net/wifi/WifiSsid.java
@@ -16,6 +16,7 @@
package android.net.wifi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -42,9 +43,11 @@
public class WifiSsid implements Parcelable {
private static final String TAG = "WifiSsid";
+ @UnsupportedAppUsage
public final ByteArrayOutputStream octets = new ByteArrayOutputStream(32);
private static final int HEX_RADIX = 16;
+ @UnsupportedAppUsage
public static final String NONE = "<unknown ssid>";
private WifiSsid() {
@@ -58,6 +61,7 @@
return wifiSsid;
}
+ @UnsupportedAppUsage
public static WifiSsid createFromAsciiEncoded(String asciiEncoded) {
WifiSsid a = new WifiSsid();
a.convertToBytes(asciiEncoded);
@@ -220,6 +224,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public byte[] getOctets() {
return octets.toByteArray();
}
@@ -246,6 +251,7 @@
}
/** Implement the Parcelable interface {@hide} */
+ @UnsupportedAppUsage
public static final Creator<WifiSsid> CREATOR =
new Creator<WifiSsid>() {
public WifiSsid createFromParcel(Parcel in) {
diff --git a/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java b/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java
index 66297fc..ef9c59f 100644
--- a/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java
+++ b/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java
@@ -85,6 +85,17 @@
public static final int OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11;
/**
+ * The reason code for provisioning failure when a redirect server fails to start.
+ */
+ public static final int OSU_FAILURE_START_REDIRECT_SERVER = 12;
+
+ /**
+ * The reason code for provisioning failure when there is no OSU activity to listen to
+ * {@link WifiManager#ACTION_PASSPOINT_LAUNCH_OSU_VIEW} intent.
+ */
+ public static final int OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 13;
+
+ /**
* The status code for provisioning flow to indicate connecting to OSU AP
*/
public static final int OSU_STATUS_AP_CONNECTING = 1;
@@ -115,6 +126,16 @@
public static final int OSU_STATUS_INIT_SOAP_EXCHANGE = 6;
/**
+ * The status code for provisioning flow to indicate waiting for a HTTP redirect response.
+ */
+ public static final int OSU_STATUS_WAITING_FOR_REDIRECT_RESPONSE = 7;
+
+ /**
+ * The status code for provisioning flow to indicate a HTTP redirect response is received.
+ */
+ public static final int OSU_STATUS_REDIRECT_RESPONSE_RECEIVED = 8;
+
+ /**
* Provisioning status for OSU failure
*
* @param status indicates error condition
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
index b019fd7..6772096 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p;
+import android.annotation.UnsupportedAppUsage;
import android.net.wifi.WpsInfo;
import android.os.Parcelable;
import android.os.Parcel;
@@ -40,6 +41,7 @@
/** @hide */
public static final int MAX_GROUP_OWNER_INTENT = 15;
/** @hide */
+ @UnsupportedAppUsage
public static final int MIN_GROUP_OWNER_INTENT = 0;
/**
@@ -52,6 +54,7 @@
public int groupOwnerIntent = -1;
/** @hide */
+ @UnsupportedAppUsage
public int netId = WifiP2pGroup.PERSISTENT_NET_ID;
public WifiP2pConfig() {
@@ -66,6 +69,7 @@
}
/** P2P-GO-NEG-REQUEST 42:fc:89:a8:96:09 dev_passwd_id=4 {@hide}*/
+ @UnsupportedAppUsage
public WifiP2pConfig(String supplicantEvent) throws IllegalArgumentException {
String[] tokens = supplicantEvent.split(" ");
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java b/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java
index 98a595b..22dc2ed 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
import android.util.Log;
@@ -96,18 +97,21 @@
* WPS config methods supported
* @hide
*/
+ @UnsupportedAppUsage
public int wpsConfigMethodsSupported;
/**
* Device capability
* @hide
*/
+ @UnsupportedAppUsage
public int deviceCapability;
/**
* Group capability
* @hide
*/
+ @UnsupportedAppUsage
public int groupCapability;
public static final int CONNECTED = 0;
@@ -120,6 +124,7 @@
public int status = UNAVAILABLE;
/** @hide */
+ @UnsupportedAppUsage
public WifiP2pWfdInfo wfdInfo;
/** Detailed device string pattern with WFD info
@@ -179,6 +184,7 @@
* Note: The events formats can be looked up in the wpa_supplicant code
* @hide
*/
+ @UnsupportedAppUsage
public WifiP2pDevice(String string) throws IllegalArgumentException {
String[] tokens = string.split("[ \n]");
Matcher match;
@@ -279,6 +285,7 @@
* @throws IllegalArgumentException if the device is null or device address does not match
* @hide
*/
+ @UnsupportedAppUsage
public void update(WifiP2pDevice device) {
updateSupplicantDetails(device);
status = device.status;
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java b/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
index 3d0bb3d..72edd56 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
import android.net.wifi.p2p.WifiP2pDevice;
@@ -83,6 +84,7 @@
* @param device to be updated
* @hide
*/
+ @UnsupportedAppUsage
public void update(WifiP2pDevice device) {
updateSupplicantDetails(device);
mDevices.get(device.deviceAddress).status = device.status;
@@ -146,6 +148,7 @@
* @return WifiP2pDevice device removed, or null if none removed
* @hide
*/
+ @UnsupportedAppUsage
public WifiP2pDevice remove(String deviceAddress) {
validateDeviceAddress(deviceAddress);
return mDevices.remove(deviceAddress);
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java b/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
index 32673c7..01feb1e 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
@@ -37,6 +38,7 @@
/** The temporary network id.
* {@hide} */
+ @UnsupportedAppUsage
public static final int TEMPORARY_NET_ID = -1;
/** The persistent network id.
@@ -95,6 +97,7 @@
* Note: The events formats can be looked up in the wpa_supplicant code
* @hide
*/
+ @UnsupportedAppUsage
public WifiP2pGroup(String supplicantEvent) throws IllegalArgumentException {
String[] tokens = supplicantEvent.split(" ");
@@ -169,6 +172,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setIsGroupOwner(boolean isGo) {
mIsGroupOwner = isGo;
}
@@ -212,6 +216,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public boolean isClientListEmpty() {
return mClients.size() == 0;
}
@@ -242,6 +247,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setInterface(String intf) {
mInterface = intf;
}
@@ -252,11 +258,13 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getNetworkId() {
return mNetId;
}
/** @hide */
+ @UnsupportedAppUsage
public void setNetworkId(int netId) {
this.mNetId = netId;
}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java b/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java
index 64bb00b..8d92253 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java
@@ -18,6 +18,7 @@
import java.util.Collection;
import java.util.Map;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.LruCache;
@@ -33,6 +34,7 @@
private static final int CREDENTIAL_MAX_NUM = 32;
+ @UnsupportedAppUsage
private final LruCache<Integer, WifiP2pGroup> mGroups;
private final GroupDeleteListener mListener;
@@ -48,6 +50,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public WifiP2pGroupList(WifiP2pGroupList source, GroupDeleteListener listener) {
mListener = listener;
mGroups = new LruCache<Integer, WifiP2pGroup>(CREDENTIAL_MAX_NUM) {
@@ -72,6 +75,7 @@
*
* @return the list of p2p group.
*/
+ @UnsupportedAppUsage
public Collection<WifiP2pGroup> getGroupList() {
return mGroups.snapshot().values();
}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
index 8075e17..57f3973 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
@@ -19,6 +19,7 @@
import android.annotation.SdkConstant;
import android.annotation.SystemService;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.net.wifi.WpsInfo;
import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo;
@@ -325,6 +326,7 @@
public static final int CANCEL_CONNECT_SUCCEEDED = BASE + 12;
/** @hide */
+ @UnsupportedAppUsage
public static final int CREATE_GROUP = BASE + 13;
/** @hide */
public static final int CREATE_GROUP_FAILED = BASE + 14;
@@ -486,6 +488,7 @@
* @hide - hide this because it takes in a parameter of type IWifiP2pManager, which
* is a system private class.
*/
+ @UnsupportedAppUsage
public WifiP2pManager(IWifiP2pManager service) {
mService = service;
}
@@ -731,6 +734,7 @@
/* package */ final Binder mBinder;
+ @UnsupportedAppUsage
private AsyncChannel mAsyncChannel;
private P2pHandler mHandler;
Context mContext;
@@ -887,6 +891,7 @@
}
}
+ @UnsupportedAppUsage
private int putListener(Object listener) {
if (listener == null) return INVALID_LISTENER_KEY;
int key;
@@ -1099,6 +1104,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setWifiP2pChannels(Channel c, int lc, int oc, ActionListener listener) {
checkChannel(c);
Bundle p2pChannels = new Bundle();
@@ -1117,6 +1123,7 @@
* {@link ActionListener#onSuccess} or {@link ActionListener#onFailure}.
* @hide
*/
+ @UnsupportedAppUsage
public void startWps(Channel c, WpsInfo wps, ActionListener listener) {
checkChannel(c);
c.mAsyncChannel.sendMessage(START_WPS, 0, c.putListener(listener), wps);
@@ -1363,6 +1370,7 @@
* @param c is the channel created at {@link #initialize}
* @param listener for callback when group info is available. Can be null.
*/
+ @UnsupportedAppUsage
public void setDeviceName(Channel c, String devName, ActionListener listener) {
checkChannel(c);
WifiP2pDevice d = new WifiP2pDevice();
@@ -1371,6 +1379,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public void setWFDInfo(
Channel c, WifiP2pWfdInfo wfdInfo,
ActionListener listener) {
@@ -1401,6 +1410,7 @@
* @param listener for callbacks on success or failure. Can be null.
* @hide
*/
+ @UnsupportedAppUsage
public void deletePersistentGroup(Channel c, int netId, ActionListener listener) {
checkChannel(c);
c.mAsyncChannel.sendMessage(DELETE_PERSISTENT_GROUP, netId, c.putListener(listener));
@@ -1413,6 +1423,7 @@
* @param listener for callback when persistent group info list is available. Can be null.
* @hide
*/
+ @UnsupportedAppUsage
public void requestPersistentGroupInfo(Channel c, PersistentGroupInfoListener listener) {
checkChannel(c);
c.mAsyncChannel.sendMessage(REQUEST_PERSISTENT_GROUP_INFO, 0, c.putListener(listener));
@@ -1425,6 +1436,7 @@
/** @hide */
public static final int MIRACAST_SINK = 2;
/** Internal use only @hide */
+ @UnsupportedAppUsage
public void setMiracastMode(int mode) {
try {
mService.setMiracastMode(mode);
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java b/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java
index 98683cb..153e03c 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java
@@ -16,6 +16,8 @@
package android.net.wifi.p2p;
+import android.annotation.UnsupportedAppUsage;
+
/**
* A class representing a Wi-Fi p2p provisional discovery request/response
* See {@link #WifiP2pProvDiscEvent} for supported types
@@ -32,13 +34,17 @@
public static final int SHOW_PIN = 4;
/* One of PBC_REQ, PBC_RSP, ENTER_PIN or SHOW_PIN */
+ @UnsupportedAppUsage
public int event;
+ @UnsupportedAppUsage
public WifiP2pDevice device;
/* Valid when event = SHOW_PIN */
+ @UnsupportedAppUsage
public String pin;
+ @UnsupportedAppUsage
public WifiP2pProvDiscEvent() {
device = new WifiP2pDevice();
}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java b/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java
index ebf5c2a..ef1bff4 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
@@ -53,9 +54,11 @@
private int mMaxThroughput;
+ @UnsupportedAppUsage
public WifiP2pWfdInfo() {
}
+ @UnsupportedAppUsage
public WifiP2pWfdInfo(int devInfo, int ctrlPort, int maxTput) {
mWfdEnabled = true;
mDeviceInfo = devInfo;
@@ -63,18 +66,22 @@
mMaxThroughput = maxTput;
}
+ @UnsupportedAppUsage
public boolean isWfdEnabled() {
return mWfdEnabled;
}
+ @UnsupportedAppUsage
public void setWfdEnabled(boolean enabled) {
mWfdEnabled = enabled;
}
+ @UnsupportedAppUsage
public int getDeviceType() {
return (mDeviceInfo & DEVICE_TYPE);
}
+ @UnsupportedAppUsage
public boolean setDeviceType(int deviceType) {
if (deviceType >= WFD_SOURCE && deviceType <= SOURCE_OR_PRIMARY_SINK) {
mDeviceInfo &= ~DEVICE_TYPE;
@@ -112,6 +119,7 @@
return (mDeviceInfo & SESSION_AVAILABLE) != 0;
}
+ @UnsupportedAppUsage
public void setSessionAvailable(boolean enabled) {
if (enabled) {
mDeviceInfo |= SESSION_AVAILABLE_BIT1;
@@ -125,10 +133,12 @@
return mCtrlPort;
}
+ @UnsupportedAppUsage
public void setControlPort(int port) {
mCtrlPort = port;
}
+ @UnsupportedAppUsage
public void setMaxThroughput(int maxThroughput) {
mMaxThroughput = maxThroughput;
}
@@ -157,6 +167,7 @@
}
/** copy constructor */
+ @UnsupportedAppUsage
public WifiP2pWfdInfo(WifiP2pWfdInfo source) {
if (source != null) {
mWfdEnabled = source.mWfdEnabled;
@@ -182,6 +193,7 @@
}
/** Implement the Parcelable interface */
+ @UnsupportedAppUsage
public static final Creator<WifiP2pWfdInfo> CREATOR =
new Creator<WifiP2pWfdInfo>() {
public WifiP2pWfdInfo createFromParcel(Parcel in) {
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java
index a4118dc..c9e9867 100644
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java
+++ b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p.nsd;
+import android.annotation.UnsupportedAppUsage;
import android.net.nsd.DnsSdTxtRecord;
import android.text.TextUtils;
@@ -173,6 +174,7 @@
* @param version version number
* @hide
*/
+ @UnsupportedAppUsage
static String createRequest(String dnsName, int dnsType, int version) {
StringBuffer sb = new StringBuffer();
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java
index b931475..3563198 100644
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java
+++ b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p.nsd;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -83,6 +84,7 @@
* {"upnp", "10", "uuid:6859dede-8574-59ab-9322-123456789012::urn:schemas-upnp
* -org:service:ContentDirectory:2"}
*/
+ @UnsupportedAppUsage
private List<String> mQueryList;
/**
@@ -91,6 +93,7 @@
* @param queryList query string for wpa_supplicant
* @hide
*/
+ @UnsupportedAppUsage
protected WifiP2pServiceInfo(List<String> queryList) {
if (queryList == null) {
throw new IllegalArgumentException("query list cannot be null");
@@ -166,6 +169,7 @@
}
/** Implement the Parcelable interface {@hide} */
+ @UnsupportedAppUsage
public static final Creator<WifiP2pServiceInfo> CREATOR =
new Creator<WifiP2pServiceInfo>() {
public WifiP2pServiceInfo createFromParcel(Parcel in) {
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java
index 7462b85c..2e7f448 100644
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java
+++ b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java
@@ -16,6 +16,7 @@
package android.net.wifi.p2p.nsd;
+import android.annotation.UnsupportedAppUsage;
import android.net.wifi.p2p.WifiP2pManager;
import android.os.Parcel;
import android.os.Parcelable;
@@ -72,6 +73,7 @@
* @param query The part of service specific query.
* @hide
*/
+ @UnsupportedAppUsage
protected WifiP2pServiceRequest(int protocolType, String query) {
validateQuery(query);
@@ -262,6 +264,7 @@
}
/** Implement the Parcelable interface {@hide} */
+ @UnsupportedAppUsage
public static final Creator<WifiP2pServiceRequest> CREATOR =
new Creator<WifiP2pServiceRequest>() {
public WifiP2pServiceRequest createFromParcel(Parcel in) {